View SassMeister-input-HTML.html
This file contains 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
<ul> | |
<li class="item1">Text 1</li> | |
<li class="item2">Some text 2</li> | |
<li class="item3">Dota 2</li> | |
<li class="item4">Moon</li> | |
</ul> |
View gist:bcbaf7c6a0ebffae8e99
This file contains 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 code1 = "0010110111011111001001000010110011011100111001101" | |
var code2 = "1102201100200102001002011102220011020111000220110" | |
function decodeMessage(message) { | |
if (message.length != 49){ | |
throw new Error("Bad length"); | |
} | |
var ans = []; | |
for (var i = 1; i < message.length; ++i) { | |
ans[ans.length] = (message[i] != message[i-1] ? 1 : 0); |
View gist:66dbb178c3994cb6f325
This file contains 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
;(defmacro while (conditions &body body) | |
; '(loop while , condition | |
;) | |
(defun vector-product(x y) | |
(reduce '+ 0 (map 'list #'* x y))) | |
(setq a (list (list 1 2) (list 3 4))) | |
(setq b (make-array '(2 2) :initial-element 2)) | |
; 2 2 |
View gist:f2e816aa1f30036f0680
This file contains 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
(defclass tagged () ((tag :reader get-tag :writer set-tag :initform "Empty tag" :initarg :tag))) | |
(defclass 3d-point (tagged) | |
( | |
(x :reader get-x :writer set-x :initarg :x) | |
(y :reader get-y :writer set-y :initarg :y) | |
(z :reader get-z :writer set-z :initarg :z) | |
) | |
) |
View gist:5a321b8023a87fcd51aa
This file contains 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
function SpaceShip(pilot, maxSpeed) { | |
this.pilot = pilot; | |
this.maxSpeed = maxSpeed; | |
} | |
SpaceShip.UPDATE_PILOT = "updatePilot"; | |
SpaceShip.prototype.updatePilot = function (newAge, newSkill) { | |
var notifier = Object.getNotifier(this); | |
var self = this; |
View gist:7806b0f1ae74b7193eb3
This file contains 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
function Schedule (pretend, real) { | |
this.morning = pretend["morning"]; | |
this.evening = pretend["evening"] | |
var morning = Symbol("morning") | |
var evening = Symbol("evening") | |
this[morning] = real["morning"]; | |
this[evening] = real["evening"]; |
View gist:9bec7928d30a47507988
This file contains 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
;(load "1.lsp") | |
(setq tree '(1 (2 5) 6 (10 (14 (25 27) 40)))) | |
(print tree) | |
(defun traverse-tree(tree depth) | |
(if (atom tree) | |
(progn (funcall func tree) (return-from traverse-tree)) | |
) | |
(let ((list-len (length tree))) |
View gist:103feabce9e63ad39d22
This file contains 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
;Macro study | |
(defun range-helper(x) | |
(if (= x 0) | |
(list x) | |
(cons x (range-helper (- x 1))) | |
) | |
) | |
(defun range (x) | |
(reverse (range-helper (- x 1))) |
View gist:52c90f02379c85c40ce3
This file contains 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
<html> | |
<head> | |
<title>English learner</title> | |
<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap.css"> | |
<link rel="stylesheet" type="text/css" href="1.css"> | |
</head> | |
<body ng-app="LearnerApp" ng-controller="WordCtr"> | |
<div class="navbar navbar-static"> | |
<div class="container"> | |
<div class="navbar-header"> |
View gist:b376e3c3cfbd648e3983
This file contains 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
#from os import urandom | |
from random import randint | |
from time import * | |
__author__ = 'mlavrynenko' | |
smal_rsa_primes = [ | |
2 , 3 , 5 , 7 , 11 , 13 , 17 , 19, | |
23 , 29 , 31 , 37 , 41 , 43 , 47 , 53, | |
59 , 61 , 67 , 71 , 73 , 79 , 83 , 89, | |
] |
OlderNewer