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
| - (void)cursorUpdate:(NSEvent *)theEvent { | |
| [self.cursor set]; | |
| } | |
| - (void)resetCursorRects | |
| { | |
| // ... | |
| } | |
| - (NSImage *)cursorImage |
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
| SELECT count(*) | |
| FROM drug_order | |
| INNER JOIN drug ON drug_order.drug_inventory_id = drug.drug_id | |
| INNER JOIN concept_set as arv_drug_concepts ON | |
| arv_drug_concepts.concept_set = 460 AND | |
| arv_drug_concepts.concept_id = drug.concept_id | |
| WHERE drug.concept_id IS NOT NULL; | |
| => | |
| +----------+ | |
| | count(*) | |
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
| I want to JOIN only the last item | |
| table_1 | |
| ------------ | |
| id | Name | | |
| ============ | |
| 1 Bob | | |
| ============ | |
| table_2 |
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 say_hello | |
| name = yield # runs the block and captures the output | |
| puts "Hello #{name}" | |
| end | |
| say_hello do | |
| "ellisTAA" | |
| 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
| DROP TABLE IF EXISTS patient_prescription_totals; | |
| CREATE TABLE patient_prescription_totals ( | |
| `id` int(11) NOT NULL auto_increment, | |
| `patient_id` int(11) NOT NULL, | |
| `drug_id` int(11) NOT NULL, | |
| `prescription_date` DATE NOT NULL, | |
| `daily_consumption` int(11) NOT NULL, | |
| PRIMARY KEY (`id`), | |
| KEY `patient_id_drug_id_presciption_date` (`patient_id`, `drug_id`, `prescription_date`) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
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
| njero@alexandria:/var/www/bart$ rake db:migrate:reset RAILS_ENV=test | |
| (in /private/var/www/bart) | |
| == 20080711115602 CreateSessions: migrating =================================== | |
| -- create_table(:sessions) | |
| -> 0.0022s | |
| -- add_index(:sessions, :session_id) | |
| -> 0.0087s | |
| -- add_index(:sessions, :updated_at) | |
| -> 0.0048s | |
| == 20080711115602 CreateSessions: migrated (0.0171s) ========================== |
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> | |
| <title>This is a test</title> | |
| </head> | |
| <body onload="doit()"> | |
| <h1>You are my favorite person, okay?</h1> | |
| <script type="text/javascript"> | |
| function window_click(x, y) { | |
| try { | |
| netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); |
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 AddPrescriptions < ActiveRecord::Migration | |
| def self.up | |
| # Good chance this should be in the fixtures | |
| ActiveRecord::Base.connection.execute <<EOF | |
| DROP TABLE IF EXISTS prescription_time_periods; | |
| EOF | |
| ActiveRecord::Base.connection.execute <<EOF | |
| CREATE TABLE prescription_time_periods ( | |
| `id` int(11) NOT NULL auto_increment, |
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 Thing | |
| def say_hi | |
| puts "Hi" | |
| end | |
| end | |
| thing = Thing.new | |
| thing.say_hi | |
| # "Hi" |
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
| # Aws and static site rendering | |
| gem 'aws-sdk', '< 2.0' |
OlderNewer