/* Nh?c */
var parent=document.getElementsByTagName("html")[0];
var _body = document.getElementsByTagName('body')[0];
var _div = document.createElement('div');
_div.style.height="25";
_div.style.width="100%";
_div.style.position="fixed";
_div.style.top="auto";
_div.style.bottom="0";
- Install VirtualBox on your machine
- Disable login credential: $ VBoxManage setproperty websrvauthlibrary null
- Download and uncompress the following image https://s3.amazonaws.com/vmfest-images/ubuntu-10-10-64bit-server.vdi.gz
- Clone the image to the directory where you want it to be permanently stored:
$ VBoxManage clonehd /path/to/downloaded/ubuntu-10-10-64bit-server.vdi /path/to/permanent/location/ubuntu...-server.vdi
- This should produce a uuid for your new image. Keep it around
- Start VirtualBox (the GUI) and:
- Create an new image Linux - Ubuntu (64bit)
- Select "Use existing hard disk" and if your newly cloned image doesn't appear in the drop-down list, click on the folder icon and find the image in your hard disk (the one you just cloned)
- Install VirtualBox on your machine
- Disable login credential:
$ VBoxManage setproperty websrvauthlibrary null
- Download and uncompress the following image
https://s3.amazonaws.com/vmfest-images/ubuntu-10-10-64bit-server.vdi.gz
- Clone the image to the directory where you want it to be permanently stored:
$ VBoxManage clonehd /path/to/downloaded/ubuntu-10-10-64bit-server.vdi /path/to/permanent/location/ubuntu...-server.vdi
- This should produce a uuid for your new image. Keep it around
- Start VirtualBox (the GUI) and:
- Create an new image Linux - Ubuntu (64bit)
- Select "Use existing hard disk" and if your newly cloned image doesn't appear in the drop-down list, click on the folder icon and find the image in your hard disk (the one you just cloned)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"route53:ChangeResourceRecordSets", | |
"route53:GetHostedZone", | |
"route53:ListResourceRecordSets" | |
], | |
"Effect": "Allow", | |
"Resource": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##usage ./devops.sh | |
createAscii(){ | |
echo " | |
_oo0oo_ | |
o8888888o | |
88' . '88 | |
(| -_- |) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;http://isites.harvard.edu/fs/docs/icb.topic623349.files/emacs_lisp.pdf | |
(defun fib-rec (n) | |
"finds the nth Fibonacci number using recursion" | |
(if (<= n 1) | |
1 | |
(+ (fib-rec (- n 1)) (fib-rec (- n 2))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
OlderNewer