Skip to content

Instantly share code, notes, and snippets.

import datetime, time
start = time.time()
count = 0
for i in range(100):
for j in range(100):
for k in range(100):
#print i*j*k
print str(count) + " - " + str(i*j*k)
@morganwilde
morganwilde / info
Last active December 23, 2015 10:29
program gyvatė;
var
taskas, tarpp, liko, ilgis, tarpo, laik, tn : integer;
begin
tn := 1;
while tn = 1 do
begin
Randomize;
@morganwilde
morganwilde / gist:5574439
Created May 14, 2013 08:12
CATransform3D matrix with values explained
CATransform3D transformation = CATransform3DIdentity;
// x line
transformation.m11 = 1; // 20% less wide wall
transformation.m12 = 0; //-1 / 10.0; // skews left up, right down if >0
transformation.m13 = 0; // extends sideways for a short time
transformation.m14 = 0;// // 1 / 5000 = left side towards viewer, right side away from viewer
// y line
transformation.m21 = 0; //-1 / 2.0; // skews bottom left, top right if <0
transformation.m22 = 1; // .8 - 20% less tall
transformation.m23 = 0; // extends upward for a short time
@morganwilde
morganwilde / temp.html
Last active December 15, 2015 09:09
temp
<thead>
<tr>
{% for column in temvar['table']['columns'] %}
{% set thClass = '' %}
{% if column[2] == 'int4' and column[0] != temvar['table']['primary'] %}
{% set thClass = 'aright' %}
{% elif column[0] == temvar['table']['primary'] %}
{% set thClass = 'colPrimary' %}
{% else %}
{% set thClass = 'aleft' %}
.colHover {background-color: rgb(223, 223, 223);}
.cellHover {
box-shadow: 10px 0px 10px -10px rgba(0, 0, 0, 0.5) inset,
-10px 0px 10px -10px rgba(0, 0, 0, 0.5) inset;
}
.cellHover:first-child {box-shadow: -10px 0px 10px -10px rgba(0, 0, 0, 0.5) inset;}
.cellHover:last-child {box-shadow: 10px 0px 10px -10px rgba(0, 0, 0, 0.5) inset;}
th:hover {
cursor: pointer;