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
n = 50_000_000 | |
bmp = Proc.new do | |
Benchmark.bm do |x| | |
x.report {n.times do; a = "1"; end} | |
x.report {n.times do; a = "1"; end} | |
x.report {n.times {a = "1"}} | |
end | |
end |
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
class window.MakeUp | |
keyMap: {65:'a', 66:'b', 67:'c', 68:'d', 69:'e', 70:'f', 71:'g', 72:'h', 73:'i', 74:'j', 75:'k', 76:'l', 77:'m', 78:'n', 79:'o', 80:'p', 81:'q', 82:'r', 83:'s', 84:'t', 85:'u', 86:'v', 87:'w', 88:'x', 89:'y', 90:'z', 48:0, 49:1, 50:2, 51:3, 52:4, 53:5, 54:6, 55:7, 56:8, 57:9, 96:0, 97:1, 98:2, 99:3, 100:4, 101:5, 102:6, 103:7, 104:8, 105:9, 190:'.', 8:"delete", 37:"left", 39:"right", 91:"cmd", 9:"tab", 16:"shift"} | |
format: '' | |
constructor: (inputType, @el) -> | |
switch inputType | |
when "phone" then @formatForPhone() | |
when "date" then @formatForDate() | |
when "numbers" then @formatForNumbers() | |
when "numbers-with-decimals" then @formatForNumbers("decimals") | |
when "email" then @formatForEmail() |
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
require 'sequel' | |
DB = Sequel.connect('mysql://root@localhost/macpractice') | |
tables_array = DB["show tables"].all.map {|x| x[:"Tables_in_macpractice"]} | |
tables_array.each {|table_name| instance_variable_set("@#{table_name}", Sequel::Model(table_name.to_sym))} |
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
<head> | |
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> | |
<script> | |
$(function() { | |
$( "#start_date" ).datepicker(); | |
$( "#end_date" ).datepicker(); | |
$( "#start_date" ).datepicker( "option", "dateFormat", "yy-mm-dd" ); | |
$( "#end_date" ).datepicker( "option", "dateFormat", "yy-mm-dd" ); |
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
#View ------------------------- | |
class ReportResults.View.ReportResultsView extends Backbone.View | |
template: _.template($("#ReportViewTemplate").html()) | |
className: "report_view" | |
tagName: "tr" | |
#Model ------------------------- | |
class ReportResults.Model.ReportResultsModel extends Backbone.Model | |
urlRoot: '/reports' | |
idAttribute: 'ticket_id' |
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
class Timer.Model.TimerModel extends Backbone.Model | |
urlRoot: "/adjust_time" | |
idAttribute: 'session_id' | |
defaults: | |
'start' : null | |
'end' : null | |
'time_total' : null | |
'phase_id' : null | |
'ticket_id' : '' | |
'form_id' : '' |
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
// | |
// AppDelegate.h | |
// Bug Viewer | |
// | |
// Created by Sean Larkin on 11/25/13. | |
// Copyright (c) 2013 Sean Larkin. All rights reserved. | |
// | |
#import <Cocoa/Cocoa.h> |
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
// | |
// AppDelegate.h | |
// Bug Viewer | |
// | |
// Created by Sean Larkin on 11/25/13. | |
// Copyright (c) 2013 Sean Larkin. All rights reserved. | |
// | |
#import <Cocoa/Cocoa.h> |
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
Process: Xcode [2575] | |
Path: /Applications/Xcode.app/Contents/MacOS/Xcode | |
Identifier: com.apple.dt.Xcode | |
Version: 5.0.2 (3335.32) | |
Build Info: IDEApplication-3335032000000000~4 | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [278] | |
Responsible: Xcode [2575] | |
User ID: 501 |
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
Code Type: X86-64 | |
Parent Process: launchd [565] | |
Date/Time: 2014-01-06 14:26:02.199 -0600 | |
OS Version: Mac OS X 10.9.1 (13B42) | |
Report Version: 7 | |
Call graph: | |
94 Thread_1191188 DispatchQueue_1: com.apple.main-thread (serial) | |
+ 94 start (in libdyld.dylib) + 1 [0x7fff97a615fd] |
OlderNewer