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
import 'dart:math'; | |
// http://en.wikipedia.org/wiki/Bubble_sort | |
void bubble(List list) { | |
var n = list.length; | |
while (n != 0) { | |
var newn = 0; | |
for (var i = 1; i < n; i++) { | |
if (list[i-1] > list[i]) { |
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: testjsinterop | |
description: A sample web application | |
dependencies: | |
browser: any | |
js: any | |
quiver: any |
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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#core_header_panel { |
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
require 'rubygems' | |
require 'libxml' | |
doc = LibXML::XML::Document.file('test.xml') | |
rs = doc.find('//R') | |
rs.each do |r| | |
u = r.find_first('U') | |
s = r.find_first('S') | |
puts "S: #{s} and U: #{u}" | |
end | |
rs = nil |
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
people = LOAD 'people' USING PigStorage(',') AS (ssn,date,uic); | |
medical_cases = LOAD 'medical_cases' USING PigStorage(',') AS (ssn,data,icd9); | |
joined = JOIN people BY ssn , medical_cases BY ssn; | |
STORE joined INTO 'out' USING PigStorage(','); |
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
~/Development/dses-rails-2.2.2/dses2 $ svn diff | |
Index: vendor/gems/rails-sqlserver-2000-2005-adapter-2.2.16/lib/active_record/connection_adapters/sqlserver_adapter.rb | |
=================================================================== | |
--- vendor/gems/rails-sqlserver-2000-2005-adapter-2.2.16/lib/active_record/connection_adapters/sqlserver_adapter.rb (revision 18159) | |
+++ vendor/gems/rails-sqlserver-2000-2005-adapter-2.2.16/lib/active_record/connection_adapters/sqlserver_adapter.rb (working copy) | |
@@ -1043,7 +1043,7 @@ | |
WHEN COLUMNPROPERTY(OBJECT_ID(columns.TABLE_NAME), columns.COLUMN_NAME, 'IsIdentity') = 0 THEN NULL | |
ELSE 1 | |
END as is_identity | |
- FROM #{db_name}INFORMATION_SCHEMA.COLUMNS columns |
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
ssh gitserver.com | |
mkdir -p /var/data/repos/myrepo.git | |
cd /var/data/repos/myrepo.git | |
git --bare init --shared=group |
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
parse_git_branch (){ | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
export PS1='\[\033[0;33m\]\w\[\033[00m\]\[\033[01;00m\]$(parse_git_branch): ' |
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
export PATH=$PATH:/Users/sladd/.gem/ruby/1.8/bin | |
alias gst='git status ' | |
alias gc='git commit ' | |
alias gca='git commit -a ' | |
alias ga='git add ' | |
alias gco='git checkout ' | |
alias gb='git branch ' | |
alias gm='git merge ' | |
alias gp='git push ' |
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": "YOUR APP NAME", | |
"description": "YOUR APP DESCRIPTION", | |
"version": "1", | |
"app": { | |
"launch": { | |
"local_path": "index.html" | |
} | |
}, | |
"icons": { |
OlderNewer