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 pubsub = new PubSub(); | |
class DataStore { | |
catalogFiles = null, | |
init: function() { | |
var promise = new $.Promise(); | |
getCatalogFiles(); | |
}, |
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
[mysql] | |
# CLIENT # | |
port = 3306 | |
#socket = /usr/local/var/run/mysqld/mysqld.sock | |
[mysqld] | |
# GENERAL # |
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
name_id = "1234567" | |
time = Time.now | |
Saml.current_provider = Saml.provider("com:localhost") | |
status_code = Saml::Elements::StatusCode.new(value: Saml::TopLevelCodes::SUCCESS) | |
status = Saml::Elements::Status.new(status_code: status_code) | |
partner_id = Saml::Elements::Attribute.new( | |
name: "PartnerId", | |
format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified', | |
attribute_value: 'PartnerVal' | |
) |
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
(defn match-letters? [letters line] | |
(loop [letter-freq (frequencies (clojure.string/lower-case letters)) | |
line-freq (frequencies (clojure.string/lower-case line))] | |
(if (empty? line-freq) | |
(if (not-any? neg? (vals letter-freq)) true false) | |
(if (contains? letter-freq (key (first line-freq))) | |
(recur (update-in letter-freq [(key (first line-freq))] - (line-freq (key (first line-freq)))) (dissoc line-freq (key (first line-freq)))) | |
false)))) |
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
(defn process-file [file-name line-func letters] | |
(with-open [rdr (BufferedReader. (FileReader. file-name))] | |
(into [] (filter #(line-func letters %) (line-seq rdr))))) |
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
(defn main [letters] | |
(println (process-file "/usr/share/dict/words" match-letters? letters))) |
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
(defn -main [& args] | |
(if (empty? (rest args)) | |
((println "Usage: scrabble LETTERS") | |
(System/exit 1)) | |
((main (first (rest args))) | |
(System/exit 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
Uncaught TypeError: Object #<FormTemplate> has no method 'apply' backbone.js:98 | |
Backbone.Events.trigger backbone.js:98 | |
_.extend.set backbone.js:195 | |
_.extend.fetch.options.success backbone.js:257 | |
jQuery.jQuery.extend._Deferred.deferred.resolveWith jquery-1.5.js:864 | |
done jquery-1.5.js:6480 | |
jQuery.ajaxTransport.send.callback jquery-1.5.js:7251 |
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
#1. Read in files, one at a time (remove first 10 junk lines) | |
#2. Start looking at data at 90 ns...strikes start at 100ns | |
#3. Raise flag if output drops below 90% of max (1 V) and record time (t1) | |
#4. If the flag is raised, record time (t2) when output goes back above 90% | |
#5. Reset flag | |
#6. Record t2-t1 | |
#7. Ouput Node name, LET, number of flags in file, duration and time of flags | |
def grab_time(file_name) | |
circuit_info = parse_filename(file_name) |
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
<select id="item-kind" name="item[kind]" class="kind"> | |
{{itemOptions this}} | |
</select> | |
helpers = | |
formItemOptions: (item) -> | |
_.reduce( | |
item.itemKinds | |
(out, itemKind) -> |
NewerOlder