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
# 1B problem B 2013 Google Code Jam | |
# adapted answer from 'dolphinigle' | |
gets.to_i.times do |ca| | |
my, n = gets.split(" ").map(&:to_i) | |
motes = gets.split(" ").map(&:to_i).sort | |
best = motes.length # all delete | |
if my == 1 | |
puts "Case ##{ca+1}: #{best}" |
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
commit c503be473c95fc5a0f3634bf4a1557e5dd1357ed | |
Author: Derek Zeng <[email protected]> | |
Date: Fri May 10 15:45:54 2013 +0800 | |
save | |
diff --git a/sass/base/_theme.scss b/sass/base/_theme.scss | |
index 1a43a03..9765d08 100644 | |
--- a/sass/base/_theme.scss | |
+++ b/sass/base/_theme.scss |
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
## install json-jruby library | |
# jruby -S gem install json-jruby | |
## create json.rb file which contains code below | |
## generate json.class file | |
# jrubyc json.rb | |
## run | |
# java -cp .:/path/to/jruby-complete-1.7.4.jar json | |
## should see some output | |
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
# awesome print | |
# Awesome Print is a Ruby library that pretty prints Ruby objects in full color exposing their internal structure with proper indentation. Rails ActiveRecord objects and usage within Rails templates are supported via included mixins. | |
# grab zipped gem from https://github.com/michaeldv/awesome_print/archive/master.zip | |
# command to compile | |
# `jrubyc ap.rb` | |
# command to run | |
# `java -cp .:/path/to/jruby-complete-1.7.4.jar ap` |
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
# HAML is a language that can be compiled to HTML | |
# it's syntax is easy to write and read, thus it's very popular among web developers | |
# grab zipped gem from https://github.com/haml/haml/archive/master.zip | |
# also the dependency https://github.com/rtomayko/tilt/archive/master.zip | |
# command to compile | |
# `jrubyc haml.rb` | |
# command to run |
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
# download at https://github.com/nex3/sass/archive/stable.zip | |
# command to compile | |
# `jrubyc sass.rb` | |
# command to run | |
# `java -cp .:/path/to/jruby-complete-1.7.4.jar sass` | |
$:.unshift "D:\\sass-stable\\lib" # replace with your lib path | |
require "sass" |
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
# active support library | |
# Active Support is the Ruby on Rails component responsible for providing Ruby language extensions, utilities, and other transversal stuff. | |
# It offers a richer bottom-line at the language level, targeted both at the development of Rails applications, and at the development of Ruby on Rails itself. | |
# http://guides.rubyonrails.org/active_support_core_extensions.html | |
# examples of functions | |
# blank? and present? |
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
var doopizlist = new DoopizCollection(); | |
doopizlist.fetch({ | |
success: function(collection ) { | |
console.log (collection); // see what's here ? | |
}, | |
error: function(doopizlist , error) { | |
console.log("error") | |
} | |
}); |
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
background: { | |
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAABPCAYAAACqNJiGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NUVFREE2QTFENjc3MTFFMDg0RDg4QURBN0E4NTA4NTUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NUVFREE2QTJENjc3MTFFMDg0RDg4QURBN0E4NTA4NTUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGNTQwMEVFNkQ1OTUxMUU |
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
// mixin 1 | |
var SuperAbility = { | |
dance: function () { | |
console.log (this.name + " is dancing..."); | |
}, | |
talk: function () { | |
console.log ("talking from mixin..."); | |
} | |
} | |
// mixin 2 |
OlderNewer