exactly look at the orange textpic.twitter.com/NjiMRhf6PL
Two-time Prometheus award-winning hard science fiction author. https://www.amazon.com/dp/B005JPPMS6 Learn how to homestead https://www.amazon.com/dp/B093BC3K1T
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
Add this Tweet to your website by copying the code below. Learn more
Add this video to your website by copying the code below. Learn more
By embedding Twitter content in your website or app, you are agreeing to the Twitter Developer Agreement and Developer Policy.
| Country | Code | For customers of |
|---|---|---|
| United States | 40404 | (any) |
| Canada | 21212 | (any) |
| United Kingdom | 86444 | Vodafone, Orange, 3, O2 |
| Brazil | 40404 | Nextel, TIM |
| Haiti | 40404 | Digicel, Voila |
| Ireland | 51210 | Vodafone, O2 |
| India | 53000 | Bharti Airtel, Videocon, Reliance |
| Indonesia | 89887 | AXIS, 3, Telkomsel, Indosat, XL Axiata |
| Italy | 4880804 | Wind |
| 3424486444 | Vodafone | |
| » See SMS short codes for other countries | ||
This timeline is where you’ll spend most of your time, getting instant updates about what matters to you.
Hover over the profile pic and click the Following button to unfollow any account.
When you see a Tweet you love, tap the heart — it lets the person who wrote it know you shared the love.
The fastest way to share someone else’s Tweet with your followers is with a Retweet. Tap the icon to send it instantly.
Add your thoughts about any Tweet with a Reply. Find a topic you’re passionate about, and jump right in.
Get instant insight into what people are talking about now.
Follow more accounts to get instant updates about topics you care about.
See the latest conversations about any topic instantly.
Catch up instantly on the best stories happening as they unfold.
exactly look at the orange textpic.twitter.com/NjiMRhf6PL
ok, this is very cool the line you're look at starts with the variable 'sections', which is defined previously sections is a data type called a hash ; it associates values, like two columns in a spreadsheet - each row forms a pair Monday: 3 Tuesday: 12 Wednesday: 99 etc so
we then say http://sections.select select is a method that gets invoked on sections, and at a high level is says "inspect every element of this, and winnow down to a subset that matches certain conditions" the conditions are specified inside the squiggle brackets { ... }
the code inside those brackets is EFFECTIVELY a miniature function. It takes as input each "row" (in the spreadsheet analogy), and it evaluates it to a boolean - should this "row" be selected ? the rows in the spreadsheet analogy each have two elements in them we can call >>>
the day of the week the "key" and we can call the number the "value". These are in fact the standard terms for the two parts of a "hash", the data type of sections. "Key" must be unique across the entire hash, but "value" can be repeated. Monday: 12 Tuesday: 12 but we can't >
have "Monday" in there twice. So, back to the mini function. The syntax { |k, v| ... } says "define a mini function which takes two arguments on each invocation; first one is the key, second one is the value" so http://sections.select { | k, v| <minifunc> } ...
* passes in k = Monday, v = 12 * evaluates the minifunc * gets either boolean true or false as a result * based on that, chooses or does not choose the pair k/v to put in the output bad_sections = http://sections.select { |k, v| k.count(":") + 1 != v } sets bad_sections
to have only those items from the original variable sections that have an improper count(":")
it's hugely powerful combined with ruby's left-to-right processing, you can chain very very complicated things together and get huge expressively power with very few words
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.