Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');Here are 10 one-liners which show the power of scala programming, impress your friends and woo women; ok, maybe not. However, these one liners are a good set of examples using functional programming and scala syntax you may not be familiar with. I feel there is no better way to learn than to see real examples.
Updated: June 17, 2011 - I'm amazed at the popularity of this post, glad everyone enjoyed it and to see it duplicated across so many languages. I've included some of the suggestions to shorten up some of my scala examples. Some I intentionally left longer as a way for explaining / understanding what the functions were doing, not necessarily to produce the shortest possible code; so I'll include both.
The map function takes each element in the list and applies it to the corresponding function. In this example, we take each element and multiply it by 2. This will return a list of equivalent size, compare to o
| /* | |
| ##Device = Desktops | |
| ##Screen = 1281px to higher resolution desktops | |
| */ | |
| @media (min-width: 1281px) { | |
| /* CSS */ | |
| var Col = require('react-bootstrap/lib/Col') | |
| var PageHeader = require('react-bootstrap/lib/PageHeader') | |
| var React = require('react') | |
| var Row = require('react-bootstrap/lib/Row') | |
| var {connect} = require('react-redux') | |
| var {reduxForm} = require('redux-form') | |
| var DateInput = require('./DateInput') | |
| var FormField = require('./FormField') | |
| var LoadingButton = require('./LoadingButton') |
| /solve | |
| *.exe | |
| *.ilk | |
| *.pdb | |
| *.s | |
| *.obj |
| 'use strict'; // Luke | |
| // ------------------------------------------------- | |
| // Просто | |
| // ------------------------------------------------- | |
| var add = function(x) { | |
| var temp = x; | |
| var f = function (y) { | |
| temp += y; |
| # Save this file as lib/capistrano/tasks/git.cap | |
| namespace :git do | |
| desc 'Copy repo to releases' | |
| task create_release: :'git:update' do | |
| on roles(:all) do | |
| with fetch(:git_environmental_variables) do | |
| within repo_path do | |
| execute :git, :clone, '-b', fetch(:branch), '--recursive', '.', release_path | |
| end |
| Go Rust | |
| ----------- ------ | |
| break break | |
| case (syntax) | |
| chan (library) | |
| const const | |
| continue loop | |
| default (syntax) | |
| defer | |
| else else |
| 0-mail.com | |
| 0815.ru | |
| 0clickemail.com | |
| 0wnd.net | |
| 0wnd.org | |
| 10minutemail.com | |
| 20minutemail.com | |
| 2prong.com | |
| 30minutemail.com | |
| 3d-painting.com |