Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
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
numbers :: [Int] | |
numbers = zip [1, 2, 3] [4, 5, 6] | |
main :: IO () | |
main = print numbers | |
-- Output: [(1,4), (2,5), (3,6)] |
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
# A Ruby implementation of | |
# the Viterbi algorithm based on the hidden Markov model (HMM) | |
# | |
# An original Python code: a Wikipedia page "Viterbi algorithm" at | |
# http://en.wikipedia.org/wiki/Viterbi_algorithm | |
# | |
# Author: MISHIMA, Hiroyuki | |
# | |
require 'pp' |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" /> | |
<!-- when.js Promises implementation --> | |
<script src="https://raw.github.com/cujojs/when/master/when.js"></script> | |
<!-- Unit testing and mocking framework --> | |
<script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script> |
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
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
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
#Simple ASCII Art | |
puts "What character do you want to make the pyramid out of?" | |
character = gets.chomp | |
puts "How many rows of #{character}'s do you want?" | |
row_count = gets.chomp.to_i | |
character_count = 1 | |
width = 100 |
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
### What? | |
http://en.wikipedia.org/wiki/Demoscene | |
## Demos run real-time on 2d/3d platforms, categorized by executable size. Mostly windows based for the modern ones. | |
## VIDEOS OF DEMOS | |
# my little sample of favs | |
https://www.youtube.com/playlist?list=PL4DMxqSU8zD5Gzt49VRbkU0oL-cJjuJP9&feature=mh_lolz |
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
""" | |
Physics simulation with PyODE followed by a (basic) rendering with Vapory | |
See the result here: http://i.imgur.com/TdhxwGz.gifv | |
Zulko 2014 | |
This script is placed in the Public Domain (Licence Creative Commons 0) | |
""" |
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
angular.module('MyApp') | |
.directive('repeatPassword', function() { | |
return { | |
require: 'ngModel', | |
link: function(scope, elem, attrs, ctrl) { | |
var otherInput = elem.inheritedData("$formController")[attrs.repeatPassword]; | |
ctrl.$parsers.push(function(value) { | |
if (value === otherInput.$viewValue) { | |
ctrl.$setValidity('repeat', true); |
- there is the concept of a trigger in tmux; a key combo that allows you to follow up with other keys to do some tmux specific stuff
- the default trigger is ctrl+b; this is awkward for some people so they use ctrl+a (I do this)
- hitting ctrl+b followed by : will let you go into a mode similar to the vim command mode (where you can type out some commands)
- open a new tab
- trigger (ctrl+b) followed by c
- c stands for create
- go to next tab
OlderNewer