- Get all of these files into the target folder
- Run the following commands:
chmod +x *.sh
./nginx-start.sh
// Trie.js - super simple JS implementation | |
// https://en.wikipedia.org/wiki/Trie | |
// ----------------------------------------- | |
// we start with the TrieNode | |
function TrieNode(key) { | |
// the "key" value will be the character in sequence | |
this.key = key; | |
// Tarantool quick test | |
// Copyright, Dennis Anikin 2016 | |
// | |
// Quick disclaimer: | |
// | |
// This test shows 500K-1000K transactions per second on one CPU core | |
// and 600K-1600K queries per second on one CPU core. | |
// | |
// Based on the $6.57 per-month-price for the AWS t2.micro instance we can afford the tremendous number of 630bln queries for just $1 | |
// |
/** | |
* D Holbrook | |
* | |
* Code Club: PO1 | |
* | |
* (*) Define a binary tree data structure and related fundamental operations. | |
* | |
* Use whichever language features are the best fit (this will depend on the language you have selected). The following operations should be supported: | |
* | |
* Constructors |
chmod +x *.sh
./nginx-start.sh
var child_process = require('child_process'); | |
exports.handler = function(event, context) { | |
var proc = spawn('./test', [ JSON.stringify(event) ], { stdio: 'inherit' }); | |
proc.on('close', function(code){ | |
if(code !== 0) { | |
return context.done(new Error("Process exited with non-zero status code")); | |
} |
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
WITH RECURSIVE | |
x(i) AS ( VALUES (0) | |
UNION ALL SELECT i + 1 | |
FROM x | |
WHERE i < 101), | |
Z(Ix, Iy, Cx, Cy, X, Y, I) AS ( | |
SELECT | |
Ix, | |
Iy, | |
X :: FLOAT, |
fn main() { | |
let player_scores = [ | |
("Jack", 20), ("Jane", 23), ("Jill", 18), ("John", 19), | |
]; | |
let players = player_scores | |
.iter() | |
.map(|&(player, _score)| { | |
player | |
}) |
fn main() { | |
let mut teams = [ | |
[ ("Jack", 20), ("Jane", 23), ("Jill", 18), ("John", 19), ], | |
[ ("Bill", 17), ("Brenda", 16), ("Brad", 18), ("Barbara", 17), ] | |
]; | |
let teams_in_score_order = teams | |
.iter_mut() | |
.map(|team| { | |
team.sort_by(|&a, &b| a.1.cmp(&b.1)); |
// This code is editable and runnable! | |
fn main() { | |
// A simple integer calculator: | |
// `+` or `-` means add or subtract by 1 | |
// `*` or `/` means multiply or divide by 2 | |
let program = "+ + * - /"; | |
let mut accumulator = 0; | |
for token in program.chars() { |