Skip to content

Instantly share code, notes, and snippets.

Avatar
🕛
Code

Salvatore dested

🕛
Code
View GitHub Profile
View gist:10304588
var tempArrays = {};
function getArray(size) {
var tmp = tempArrays[size];
if (tmp) {
return tmp;
}
tmp=tempArrays[size] = new Uint8ClampedArray(size * 4);
View meomix
getPlaylistSongs = function(options) {
var deferred = Q.defer();
this._doRequest(YouTubeServiceType.PlaylistItems, {
part: 'contentDetails',
maxResults: 50,
playlistId: options.playlistId,
pageToken: options.pageToken || '',
fields: 'nextPageToken, items/contentDetails/videoId'
View gist:9471dfd2e17a045845f1
// Write a function 'find' in javascript that takes two argumens:
// N: A 2D Array of numbers where each row and each column are sorted in ascending order.
// v: A number
// If v is present in N, then find should return the position of v in N
// otherwise find should return false.
// Notes:
// Your code should be readable and efficient.
// You may NOT use the Javascript indexOf function in your code.
// For more clarification on the problem, see the example inputs below.
@dested
dested / gist:0e1ae2dfe0001af0bd5e
Created Mar 8, 2015
Angular 2 One Component Selector
View gist:0e1ae2dfe0001af0bd5e
<ion-tab title="Title One!">Content 1</ion-tab>
<ion-tab title="Title Two!">Content 2!</ion-tab>
@Component({
selector: 'ion-tab',
model:{
title:'title'
}
})
View gist:79c4e47fdb7150430937
import java.io.*;
import java.util.*;
public class Names {
public static void main(String[] args) throws FileNotFoundException {
Scanner input = new Scanner(new File("names.txt"));
Scanner console = new Scanner(System.in);
String text = "";
View gist:ef7ed9ab0101481feb50
import java.io.*;
import java.util.*;
public class Names {
public static void main(String[] args) throws FileNotFoundException {
Scanner console = new Scanner(System.in);
Scanner input = new Scanner(new File("names.txt"));
String text = "";
View gist:fba9cdd2f66cd9b5460d
import java.io.*;
import java.util.*;
public class NameApp {
private String name;
private int[] popularityRanks;
public static void main (String[] args) throws FileNotFoundException {
View gist:f69d1ca70a13f05e27d3d8cefb5997a5
var page = new tabris.Page({
title: "TabFolder - Swipe",
topLevel: true
});
var sv = new tabris.ScrollView({
left: 0,
top: 50,
height: 400,
background: "#AB47BC"
View gist:97aa4b574b58fc8da898e3efb1f1809d
package cse360assign1;
import java.util.*;
public class stringList {
private ArrayList<String> list;
private int count;
boolean DEBUG = true;
stringList() {
View bezier.html
<html>
<head>
<title>Bezier</title>
</head>
<body>
<canvas id="canvas" width="1500" height="1200"></canvas>
<input type="range" value="0.5" oninput="updateBezier(this.value)" min="0" max="1" step="0.005" style="position:absolute; width:98%; left:0; top:0;" />
<script type="text/javascript">
function Point(x, y) {
this.x = x;