Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
// http://en.wikipedia.org/wiki/Bridge_pattern | |
trait DrawingAPI { | |
def drawCircle(x:Double, y: Double, radius:Double) | |
} | |
class DrawingAPI1 extends DrawingAPI { | |
override def drawCircle(x: Double, y: Double, radius: Double) = { | |
printf("API1.circle at %f:%f radius %f\n", x, y, radius) | |
} |
#!/bin/sh | |
# one way (older scala version will be installed) | |
# sudo apt-get install scala | |
#2nd way | |
sudo apt-get remove scala-library scala | |
wget www.scala-lang.org/files/archive/scala-2.10.3.deb | |
sudo dpkg -i scala-2.10.3.deb | |
sudo apt-get update |
NOTE: 534 stars, 106 forks. I love you all. Please contribute tips and edits back to this cheat sheet -- email's will.sargent@gmail.com and you can treat gists like git repositories and send git diffs.
Every client-side applications has to talk to REST APIs. At the moment AngularDart does not provide any high-level abstractions to help you do that. You can send http requests, but that's it.
This post is about a spike I did a few days ago to explore possible ways of building such a library. It also shows that you can do quite a bit in just one hundred lines of Dart.
alias gdbnew='/usr/local/Cellar/gdb/7.6/bin/gdb' |
You might want to read this to get an introduction to armel vs armhf.
If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.
First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static
so that you can run ARM executables directly on linux
The following shows what to watch out for when making Angular Dart applications. For more information about Angular Dart, see angulardart.org.
This is an ad-hoc Java-to-Dart Transpiler written on two (admittedly long) evenings.
Note: It doesn't support the complete Java grammar specification and cannot translate everything. It only translates syntax and does not attempt to translate Java library classes and methods to Dart equivalents (with the exception of String.charAt
). You will have to make changes to the resulting Dart code.
However, I was able to successfully convert a 7000+ line command line application with only minimal fixes in 30 minutes.
Because Dart doesn't support overloading methods, I strongly recommend to first rename (using your favorite IDE) those methods in Java. I also noticed that Dart doesn't like if types, fields, or methods have the same name. Again, I recommend to rename all such occurrences before translating.
/* | |
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace | |
so it's better encapsulated. Now you can have multiple random number generators | |
and they won't stomp all over eachother's state. | |
If you want to use this as a substitute for Math.random(), use the random() | |
method like so: | |
var m = new MersenneTwister(); |