- Boot from Microsoft Windows Server 2012R2 DVD/ISO.
- From the Windows Setup menu, click "Next".
- Select "Repair your computer".
- Click on "Troubleshoot".
- Under Advanced options, click "Command Prompt".
At the command prompt, run the following commands:
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"/> | |
<title>Forms test</title> | |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" /> | |
</head> | |
<body> | |
<div class="container"> |
#!/usr/bin/env python | |
def to_base_ten(str_num): | |
i = 0 | |
base10 = 0 | |
for num in reversed(str_num): | |
base10 += int(num) * pow(3, i) | |
i += 1 | |
return base10 |
(defn roll-dice [sides] | |
(let [dice (map inc (take sides (range)))] | |
(rand-nth dice))) | |
(roll-dice 6) ;; => random number between 1 and 6 | |
;; This is much better: | |
(defn roll-dice [sides] | |
(inc (rand-int sides))) |
(ns graph) | |
(defrecord Node [properties]) | |
(defn new-node | |
[properties] (Node. properties)) | |
(defrecord Edge [node properties weight]) | |
(defn new-edge | |
([node] (Edge. node {} 0)) | |
([node properties] (Edge. node properties 0)) |
var sw = new Object(); | |
sw.square = function (x) { return x * x; } | |
sw.cube = function (x) { return x * (x * x); } | |
var x = 2 | |
var name = 'square'; | |
sw[name](x) // => 4 |
'use strict'; | |
// Add ECMA262-5 method binding if not supported natively | |
// | |
if (!('bind' in Function.prototype)) { | |
Function.prototype.bind= function(owner) { | |
var that= this; | |
if (arguments.length<=1) { | |
return function() { | |
return that.apply(owner, arguments); |
(ns die-parser.example | |
(:require [instaparse.core :as i])) | |
(def roller-grammar | |
"die = times <'d'> faces | |
times = number | |
faces = number | |
<number> = #'[0-9]+'") | |
(defn roll |
(import '[java.io DataOutputStream ByteArrayOutputStream]) | |
(defn write-int [out v] | |
(.writeInt out v)) | |
(defn write-string [out s] | |
(let [b (.getBytes s) | |
l (count s)] | |
(write-int out l) | |
(.write out b 0 l))) |
(ns sessions) | |
(defn create-sessions | |
"Initialize the session atom." | |
[] | |
(atom [])) | |
(defn put-session! | |
"Insert a session into the sessions atom." | |
[sessions session] |