(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
These examples are type 3 RESTful API requests and responses. The JSON-HAL specification is used to implement HATEOAS.
Some of the examples are based on my work as architect of the RESTful API at http://www.hautelook.com. All proprietary information has been removed.
object Solution { | |
def removeDuplicates(A : Array[Int]) : Array[Int] = { | |
val length=A.length | |
if(length==0 || length==1) A | |
var index=1 | |
for(compareIndex <- 1 to length) { | |
if(A(compareIndex)!=A(compareIndex-1)) { | |
A(index)=A(compareIndex) | |
index=index+1 | |
} |
package com.vast.example | |
import java.net.InetSocketAddress | |
import java.util.UUID | |
import java.util.concurrent.{Executors, TimeUnit} | |
import com.google.common.base.Splitter | |
import com.twitter.finagle.http.Http | |
import com.twitter.finagle.builder.{Server, ServerBuilder} | |
import com.twitter.finagle.service.TimeoutFilter | |
import com.twitter.finagle.{Service, SimpleFilter, GlobalRequestTimeoutException} |
import spark.SparkContext | |
import SparkContext._ | |
/** | |
* A port of [[http://blog.echen.me/2012/02/09/movie-recommendations-and-more-via-mapreduce-and-scalding/]] | |
* to Spark. | |
* Uses movie ratings data from MovieLens 100k dataset found at [[http://www.grouplens.org/node/73]] | |
*/ | |
object MovieSimilarities { |
sealed abstract class AVLTree[A <% Ordered[A]] { | |
def +(v:A):AVLTree[A] | |
def -(v:A):AVLTree[A] | |
def reconstruct:AVLTree[A] | |
def depth:Int | |
def contains(v:A):Boolean | |
def size:Int | |
def isEmpty:Boolean | |
def nonEmpty:Boolean | |
def toList:List[A] |
##usage ./devops.sh | |
createAscii(){ | |
echo " | |
_oo0oo_ | |
o8888888o | |
88' . '88 | |
(| -_- |) |
<?php | |
// API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = array( $_GET['id'] ); | |
// prep the bundle | |
$msg = array |
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"route53:ChangeResourceRecordSets", | |
"route53:GetHostedZone", | |
"route53:ListResourceRecordSets" | |
], | |
"Effect": "Allow", | |
"Resource": [ |
$ VBoxManage setproperty websrvauthlibrary null
https://s3.amazonaws.com/vmfest-images/ubuntu-10-10-64bit-server.vdi.gz
$ VBoxManage clonehd /path/to/downloaded/ubuntu-10-10-64bit-server.vdi /path/to/permanent/location/ubuntu...-server.vdi