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
[ | |
[ | |
[ | |
{alleles: 'a:a,b:a,a:B,b:B,a:H,b:H,a:w,b:w,a:L,b:l,a:T,b:T,a:F,b:f', sex: 1, name: 'A Mother'}, | |
{alleles: 'a:a,b:a,a:B,b:B,a:H,b:H,a:w,b:w,a:l,b:L,a:T,b:T,a:F', sex: 0, name: 'A Father'} | |
],[ | |
{alleles: 'a:a,b:a,a:B,b:B,a:h,b:H,a:W,b:w,a:L,b:L,a:t,b:t,a:f,b:f', sex: 1, name: 'B Mother'}, | |
{alleles: 'a:a,b:a,a:B,b:B,a:H,b:h,a:w,b:W,a:L,b:L,a:t,b:t,a:F', sex: 0, name: 'B Father'} | |
],[ | |
{alleles: 'a:a,b:A,a:B,b:B,a:h,b:h,a:W,b:w,a:l,b:l,a:T,b:t,a:f,b:F', sex: 1, name: 'C Mother'}, |
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
teachers.each do |t| | |
u = t.user | |
puts "#{t.id}, #{u.id}, #{u.login}, #{u.last}, #{u.first}, #{u.email}, #{t.school.name}" | |
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
Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException | |
at org.concord.sensor.state.SensorDataProxy.start(SensorDataProxy.java:175) | |
at org.concord.datagraph.state.DataGraphManagerStartable.start(DataGraphManagerStartable.java:96) | |
at org.concord.datagraph.state.DataGraphManagerStartable.start(DataGraphManagerStartable.java:88) | |
at org.concord.data.ui.StartableActionProvider$2.actionPerformed(StartableActionProvider.java:36) | |
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028) | |
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351) | |
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) | |
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) | |
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) |
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
<otrunk id="97387f62-d61e-11df-9a9b-0023df83af94" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:lxslt="http://xml.apache.org/xslt"> | |
<imports> | |
<import class="org.concord.otrunk.OTIncludeRootObject"/> | |
<import class="org.concord.otrunk.OTSystem"/> | |
<import class="org.concord.otrunk.OTInclude"/> | |
<import class="org.concord.otrunk.view.OTGroupListManager"/> | |
<import class="org.concord.otrunk.view.OTGroupMember"/> | |
<import class="org.concord.otrunk.user.OTUserObject"/> | |
</imports> | |
<objects> |
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
users = User.find(:all) | |
interfaces = users.map {|u| [u.name, u.login, u.vendor_interface.short_name, u.updated_at] } | |
File.open('/tmp/udl_users.csv', 'w') do |file| | |
interfaces.each { |i| file.write("#{i.join(", ")}\n") } | |
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
test("dragon updates work in rails", function() { | |
var dragons = Geniverse.store.find(Geniverse.DRAGONS_QUERY); | |
statusEquals(dragons, SC.Record.BUSY_LOADING, 'Activities should be loading'); | |
var newName = rndChars(20); | |
var dragon = null; | |
statusQueue([ | |
{ | |
target: dragons, | |
callback: function(){ | |
statusEquals(dragons, SC.Record.READY_CLEAN, "Next state was clean"); |
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 csv(obj, fields) | |
fields = fields.kind_of?(String) ? fields.split : fields | |
obj.each do |o| | |
results = fields.map { |f| o.send(f.to_sym) } | |
puts results.join(", ") | |
end | |
nil | |
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
#! /usr/bin/ruby | |
files = ["udl_otml_2010","udl_reports_2010"] | |
require "cgi" | |
cgi = CGI.new("html4") | |
params = cgi.params | |
# umn... lets do something better... | |
files.each do |file| | |
puts %x|cd ../#{file}| | |
puts %x|git pull| |
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
/** | |
* Arrow 'plugin' for Raphael | |
**/ | |
MySystem.arrow_path = function(startx,starty,endx,endy,len,angle) { | |
var theta = Math.atan2((endy-starty),(endx-startx)); | |
var baseAngleA = theta + angle * Math.PI/180; | |
var baseAngleB = theta - angle * Math.PI/180; | |
var tipX = endx + len * Math.cos(theta); | |
var tipY = endy + len * Math.sin(theta); | |
var baseAX = endx - len * Math.cos(baseAngleA); |
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
*[has-dev][~/lab/ruby/has/vendor/plugins]$ diff -r ./acts_as_list/lib ./acts_as_list.git/lib rvm:ruby-1.8.7-p249@has | |
diff -r ./acts_as_list/lib/active_record/acts/list.rb ./acts_as_list.git/lib/active_record/acts/list.rb | |
42,45c42,49 | |
< if #{configuration[:scope].to_s}.nil? | |
< "#{configuration[:scope].to_s} IS NULL" | |
< else | |
< "#{configuration[:scope].to_s} = \#{#{configuration[:scope].to_s}}" | |
--- | |
> self.class.send(:sanitize_sql_hash_for_conditions, { :#{configuration[:scope].to_s} => send(:#{configuration[:scope].to_s}) }) | |
> end |