This file contains hidden or 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
| #!/usr/bin/octave -qf | |
| arg_list = argv (); | |
| scale = str2num(arg_list{1}); | |
| iteration = str2num(arg_list{2}); | |
| cumulate = 0; b = 0; | |
| for i = 1:iteration | |
| a = randn(scale, scale); | |
| a = a'*a; |
This file contains hidden or 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
| var Q = require('q'); | |
| function runTasksSequentially(tasks) { | |
| function run(task) { | |
| var deferred = Q.defer(); | |
| setTimeout(function () { | |
| console.log(task); | |
| deferred.resolve(task + 1); | |
| }, 1000); |
This file contains hidden or 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
| require("../../test/env"); | |
| var fs = require("fs"), | |
| util = require("util"), | |
| Canvas = require("canvas"); | |
| var w = 1920, | |
| h = 1080; | |
| var projection = d3.geo.albersUsa() |
This file contains hidden or 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
| var Q = require('q') | |
| , fs = require('fs'); | |
| function add (num1, num2) { | |
| return num1 + num2; | |
| } | |
| function triple (num) { | |
| return num * f3(); | |
| } |
This file contains hidden or 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
| var Sequelize = require("sequelize"); | |
| var sequelize = new Sequelize('db', 'root', 'root', {dialect: 'mysql'}); | |
| var Project = sequelize.define('Project', { | |
| title: Sequelize.STRING, | |
| description: Sequelize.TEXT | |
| }); | |
| var Task = sequelize.define('Task', { | |
| title: Sequelize.STRING, |
This file contains hidden or 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
| /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ | |
| /** | |
| * This program will demonstrate how to use "aes128-cbc". | |
| * | |
| */ | |
| import com.jcraft.jsch.*; | |
| import java.awt.*; | |
| import javax.swing.*; | |
| public class AES{ |