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
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| <button id="record">Record</button> | |
| <button id="stop">Stop</button> | |
| <div id="soundclips"></div> |
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
| #include <string> | |
| #include "stdio.h" | |
| #include "string.h" | |
| int _get_first_string_chunk( | |
| const char *in, | |
| char *out_buffer, | |
| int buffer_length, | |
| char delimiter, |
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
| # Spawn example | |
| spawn(fn() -> IO.inspect(5 * 5) end) | |
| # Spawn extended example | |
| a = fn(x) -> |
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
| import random | |
| PRODUCTION_PRICES = [10, 20, 30] | |
| CYCLE = 0 | |
| class Person(object): | |
| def __init__(self, endowment, productivities, preferences, investmentPref, savingsPref, riskReserve): | |
| self.liquidity = endowment | |
| self.productivities = productivities | |
| self.preferences = preferences |
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
| local M = {} | |
| local N = {} | |
| function N.toggleSelect(self) | |
| if self.isHovering then | |
| self.isHovering = false | |
| if not self.isSelected then | |
| msg.post("SpriteContainer#white_sprite", "enable") | |
| msg.post("SpriteContainer#green_sprite", "disable") |
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
| function init(self) | |
| msg.post(".", "acquire_input_focus") | |
| end | |
| function on_input(self, action_id, action) | |
| if action_id == nil then | |
| local pos = go.get_position() | |
| pos.x = action.x | |
| pos.y = action.y |
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
| (function() { | |
| var context = document.getElementById('canvas').getContext('2d'); | |
| var points = []; | |
| var npoints = 200; | |
| var grid = []; | |
| var gridWidth = 400; |
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
| def ALERT(message): | |
| print("ALERT: " + message) | |
| class Game: | |
| def __init__(self): | |
| self.state = { | |
| "buildQueue": [], | |
| "steel": 100, | |
| "credits": -100000, | |
| "turnsLeft": 100, |
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
| (ns resource.core | |
| (:require [clojure.browser.repl :as repl] | |
| [resource.sprites :as sprites] | |
| )) | |
| ;; (defonce conn | |
| ;; (repl/connect "http://localhost:9000/repl")) | |
| (enable-console-print!) |
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
| (ns counter.core | |
| (:require [clojure.browser.repl :as repl])) | |
| ;; (defonce conn | |
| ;; (repl/connect "http://localhost:9000/repl")) | |
| (enable-console-print!) | |
| (def ctr (atom {:count 0})) |
NewerOlder