(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
function multiply_matrix(a, b) | |
{ | |
var c = new Array; | |
for(y=0;y<a.length;y++){ | |
c[y] = new Array; | |
for(x=0;x<b[0].length;x++){ | |
sum = 0; | |
for(i=0;i<a[0].length;i++){ | |
sum += a[y][i] * b[i][x]; | |
} |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>HMAC-SHA256 Example</title> | |
</head> | |
<body> | |
<script src="http://crypto.stanford.edu/sjcl/sjcl.js"></script> | |
<script> | |
var sharedSecret, query, signature, hmac, xhr; |
See also:
jpsim gist (discussion)
jonathanmorley gist (discussion)
teukon's Draft Regex Golf Bonus Levels
Solutions to teukon's Draft Regex Golf Bonus Levels (SPOILERS! SPOILERS!) and discussion of mathematical regexes
Continued discussion of Regex Golf Bonus Levels and mathematical regexes (SPOILERS! SPOILERS!)
Please let me know if you find any errors here, or can fill in any of the missing data.
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)The Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.
Read more about ZSH at An Introduction to the Z Shell.
Choose one of the following options.
An example that shows the difference between creating a JavaScript class and subclass in ES5 and ES6.
/* 0-1 knapsack problem | |
For an overall introduction to knapsack problem, see https://en.wikipedia.org/wiki/Knapsack_problem | |
Function name: knapsack | |
Param: | |
items: an array of {w: v:} (where 'w' stands for weight, and 'v' stands for value) | |
capacity: a positive integer number | |
Will return max sum value that can reach, and the chosen subset to add up to the value. |
import React from 'react' | |
import { withRouter, Link } from 'react-router-dom' | |
import { graphql, compose } from 'react-apollo' | |
import { Formik } from 'formik' | |
import Yup from 'yup' | |
import FormWideError from '../elements/form/FormWideError' | |
import TextInput from '../elements/form/TextInput' | |
import Button from '../elements/form/Button' | |
import { H2 } from '../elements/text/Headings' |