- It's easy to get tuple where you wanted to have string and vice-versa,
In [1]: x = (
...: "a",
...: "b",
...: "c",
...: )
| "use strict" | |
| ;(function($) { | |
| $(function() { | |
| var bookmarks = [ | |
| {url: "http://google.com/", title: "Google", category: "Search engines"}, | |
| {url: "http://duckduckgo.com/", title: "DuckDuckGo", category: "Search engines"}, | |
| {url: "http://twitter.com/", title: "Twitter", category: "Social networks"}, | |
| {url: "http://facebook.com/", title: "Facebook", category: "Social networks"}, | |
| {url: "http://dagrevis.lv/", title: "daGrevis.lv", category: "Blogs"} | |
| ] |
| "use strict" | |
| ;(function($) { | |
| $(function() { | |
| var UrlUtil = { | |
| to_url: function(url) { | |
| return url.replace(/\s/, "-") | |
| }, | |
| from_url: function(url) { | |
| return url.replace(/-/, " ") | |
| } |
| (?=[!-~])(?=[^a-zA-Z0-9]) |
| "use strict" | |
| ;(function($) { | |
| $(function() { | |
| var UrlUtil = { | |
| to_url: function(url) { | |
| return url.replace(/\s/, "-") | |
| }, | |
| from_url: function(url) { | |
| return url.replace(/-/, " ") | |
| } |
| jQuery -> | |
| class MyModel extends Backbone.Model | |
| parse: (response) -> | |
| response.objects | |
| class ItemModel extends MyModel | |
| class ItemsCollection extends Backbone.Collection | |
| url: "/api/v1/item/" |
| jQuery -> | |
| class MyModel extends Backbone.Model | |
| parse: (response) -> | |
| x = response.objects | |
| console.log x | |
| x | |
| class ItemModel extends MyModel |
| import base64 | |
| from Crypto import Random | |
| from Crypto.Cipher import AES | |
| BLOCK_SIZE = 16 | |
| pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * chr(BLOCK_SIZE - len(s) % BLOCK_SIZE) | |
| unpad = lambda s: s[0:-ord(s[-1])] |
| import requests | |
| import json | |
| import envelopes | |
| import time | |
| DATA_URL = "http://blockchain.info/ticker" | |
| EMAIL_ADDR = "dagrevis@gmail.com" | |
| INTERVAL_S = 60 * 60 |
| (println | |
| (reduce + | |
| (filter | |
| #(or (zero? (mod % 3)) (zero? (mod % 5))) | |
| (range 1000) | |
| ))) |