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
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestShuffle.aspx.cs" Inherits="TestShuffle" %> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title>Test shuffle</title> | |
<style> | |
body { |
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: | |
#1. Declare your shuffle() function. No parameters necessary, since `deck` is a global variable. | |
#2. Run `test()`. | |
deckSize = 52 | |
deck = [0...deckSize] | |
rand = (min = 0, max = deckSize) -> | |
Math.floor(Math.random() * (max - min)) + min | |
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
var sys = require('sys') | |
var exec = require('child_process').exec; | |
function puts(error, stdout, stderr) { | |
sys.puts(stdout) | |
} | |
exec("ls -la", puts); |
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
var mongoose = require("mongoose"), | |
connection = mongoose.connection, | |
gracefulExit = function() { | |
connection.close(function() { | |
console.log('Mongoose default connection disconnected through app termination'); | |
process.exit(0); | |
}); | |
}; | |
mongoose.connect(process.env.MONGO_URI); |
NewerOlder