- /api/group/ - returns a list of first 20 groups
- /api/group/?start=0 - returns a list of first 20 groups
- /api/group/?start=10 - returns a list of 20 groups starting from 10th group
- /api/group/?start=10&count=30 - returns a list of 30 groups starting from 10th group
- "count" is the number of items to be returned, from the position equal to "start" value.
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
'x LIKE "%'+'a b c'.gsub(/\s/, '%" AND x LIKE "%')+'%"' |
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
#!/bin/bash | |
# Run locally | |
cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> /etc/ssh/watterson/authorized_keys' | |
ssh [email protected] 'sudo service ssh restart' |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
namespace Kiss.Effigy.code { | |
public class ClsSensorPlaneIntersector { | |
public Vector Origin; | |
public Func<float, float, Vector> Parametric; | |
public float Plane; |
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
public class ClsSurfacePlaneIntersector : ClsIntersector { | |
public int Precision = 100; | |
public Vector3 FindPointIntersection(Func<float, Vector3> surfaceSlice, float elevation, float min, float max) { | |
var mid = (max + min) / 2; | |
var minE = surfaceSlice(min).Z; | |
var midE = surfaceSlice(mid).Z; | |
var maxE = surfaceSlice(max).Z; | |
if (FuzzyEqual(elevation, midE) || FuzzyEqual(mid, max)) { | |
return surfaceSlice(mid); | |
} |
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
func run() -> Int { | |
func fact(n : Int) -> Int { | |
return n == 0 ? 1 : n * fact(n-1) | |
} | |
return fact(3) | |
} | |
println(run()) | |
// Gives the following error: | |
// Instruction does not dominate all uses! |
Note that each command is preceded by $
to distinguish it from output; do not type the $
.
We start with the data file.
$ cat data.txt
4|55504|214052
7|37107|214052
6|45206|214052
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
#!/bin/bash | |
curl -s \ | |
-d '{ | |
"user": { | |
"email": "[email protected]", | |
"password": "password", | |
"password_confirmation": "password", | |
"profile_attributes": { | |
"gender": "m", | |
"name": "Matt Neary", |
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 marked = {}; | |
function markPoint(matrix, x, y) { | |
marked[x+","+y] = true; | |
} | |
function isPointMarked(matrix, x, y) { | |
return marked[x+","+y]; | |
} | |
function findNeighbors(matrix, x, y) { | |
return [-1, 0, 1].map(function (i) { | |
return [-1, 0, 1].map(function (j) { |
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
Intimations of Immortality from Recollections of Early Childhood | |
By Wordsworth | |
I | |
THERE was a time when meadow, grove, and stream, | |
The earth, and every common sight, | |
To me did seem | |
Apparelled in celestial light, | |
The glory and the freshness of a dream. | |
It is not now as it hath been of yore;-- |