Skip to content

Instantly share code, notes, and snippets.

View dested's full-sized avatar
🕛
Code

Salvatore dested

🕛
Code
View GitHub Profile
<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;
package cse360assign1;
import java.util.*;
public class stringList {
private ArrayList<String> list;
private int count;
boolean DEBUG = true;
stringList() {
var page = new tabris.Page({
title: "TabFolder - Swipe",
topLevel: true
});
var sv = new tabris.ScrollView({
left: 0,
top: 50,
height: 400,
background: "#AB47BC"
import java.io.*;
import java.util.*;
public class NameApp {
private String name;
private int[] popularityRanks;
public static void main (String[] args) throws FileNotFoundException {
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 = "";
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 = "";
@dested
dested / gist:0e1ae2dfe0001af0bd5e
Created March 8, 2015 16:52
Angular 2 One Component Selector
<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'
}
})
// 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.
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'
var tempArrays = {};
function getArray(size) {
var tmp = tempArrays[size];
if (tmp) {
return tmp;
}
tmp=tempArrays[size] = new Uint8ClampedArray(size * 4);