duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
Miguel at 12:15 in path ~/Desktop | |
$ php test.php | |
doing things inside the function | |
I am a calback | |
Array | |
( | |
[0] => one | |
[1] => two | |
[2] => three | |
) |
beforeEach( function(){ console.log("Global before each")} ); | |
describe( "Describe 1", function(){ | |
beforeEach( function(){ console.log("Describe 1 - before each 1")} ); | |
beforeEach( function(){ console.log("Describe 1 - before each 2")} ); | |
//do tests... | |
it("a test...", function(){ | |
//if there is not a "it()", the beforeEach/afterEach does not execute | |
}); |
var scope, compiledTemplate, UserService, deferred; | |
//We must load the app module | |
//and VERY IMPORTANT, the template the directive uses via templateUrl | |
var TEMPLATE_URL = 'app/account/public/views/signupForm.html'; //proper path to the template | |
var TEMPLATE_KEY = '/app/account/public/views/signupForm.html'; //as loaded in the directive, used as Key in the tempalteCache | |
beforeEach( module( 'tybaNg', TEMPLATE_URL ) ); | |
<?php | |
interface Option/*[T]*/ { | |
/** | |
* @return T | |
*/ | |
public function get(); | |
/** | |
* @param => T $f |
// From: http://alvinalexander.com/scala/scala-class-object-function-convert-multiline-string-to-list-seq | |
implicit class QHelper( val sc : StringContext) { | |
def Q(args : Any*): Seq[String] = { | |
val strings = sc.parts.iterator | |
val expressions = args.iterator | |
var buf = new StringBuffer(strings.next) | |
while(strings.hasNext) { | |
buf append expressions.next | |
buf append strings.next |
import scala.util.Random | |
object ProgressBar extends App { | |
// list of times to sleep between each step of the progess, with different probabilities | |
val timesToSleep = List(500, 500, 500, 500, 600, 600, 600, 1000, 1000, 1000, 2000, 2000, 5000) | |
print("Progress [ ]") | |
Thread.sleep(500); | |
// 11 backspaces to override " ]" |
*************************************** | |
ScaleraBlog: Scala Rx Example, 1st Post | |
*************************************** | |
a vale 1 | |
b vale 2 | |
Lo guardamos en resultado, que es reactiva de a y b: 3 | |
Cambiamos el valor de b=6 | |
Resultado ahora debería valer 7 | |
7 |
import scala.util.Try | |
object FizzBuzz { | |
def main(args: Array[String]): Unit = { | |
val iterations = Try(args(0).toInt).getOrElse(0) | |
(1 to iterations).foreach {i => | |
if (i % 15 == 0) println(s"$i - FizzBuzz") | |
else if (i % 3 == 0) println(s"$i - Fizz") | |
else if (i % 5 == 0) println(s"$i - Buzz") | |
else println(s"$i") |
import akka.actor._ | |
import scala.concurrent.Await | |
import scala.concurrent.duration._ | |
object RebelAkktorsGist extends App { | |
/**************************** | |
* Messages * | |
***************************/ |