URLEncode Latex Formula -> [http://meyerweb.com/eric/tools/dencoder/]
Create Link:
![My Formula](http://latex.codecogs.com/gif.latex?<URLEncodedLaTeX>)
or
![My Formula](https://chart.googleapis.com/chart?cht=tx&chl=<URLEncodedLaTeX>)
URLEncode Latex Formula -> [http://meyerweb.com/eric/tools/dencoder/]
Create Link:
![My Formula](http://latex.codecogs.com/gif.latex?<URLEncodedLaTeX>)
or
![My Formula](https://chart.googleapis.com/chart?cht=tx&chl=<URLEncodedLaTeX>)
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
#!/bin/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |
As configured in my dotfiles.
start new:
tmux
start new with session name:
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |