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 modal = { | |
modalWindow : $('#modalWindow'), | |
windowMask : $('#mask'), | |
config: { | |
// maskEffect : 'fadeToggle', | |
// maskSpeed : 'fast', | |
// modalEffect : 'fadeToggle', | |
// modalSpeed : 'fast' | |
}, | |
init: function(config) { |
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
out_file = File.new("/Users/username/column_names-new.csv", "w") | |
File.open("/Users/username/column_names.csv", "r") do |in_file| | |
while line = in_file.gets | |
out_file.write line.tr("\n","") | |
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
#!/usr/bin/env ruby | |
require 'digest/md5' | |
require 'optparse' | |
class RepositoryFile | |
attr_accessor :obj_hash, :file_hash, :file_mtime, :file_name, :file_path | |
def initialize(obj_hash, file_hash, file_mtime, file_name, file_path) | |
@obj_hash = obj_hash | |
@file_hash = file_hash |
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
@_MT = Array.new | |
@_index = 0 | |
@maskUnity = 0xffffffff # 32 bits | |
@maskHighestBit = 0x80000000 # Most significant bit; | |
@maskLowerBits = 0x7fffffff # Last 32 bits | |
def initializeGenerator seed | |
# Set first array value to be the seed | |
@_MT[0] = seed | |
1.upto(623) do |i| |
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/env ruby | |
require 'etc' | |
$currentUser = Etc.getlogin | |
def execute_encode_file | |
%x[sh ./batch_handbrakecli.command] | |
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
javascript:(function(){function b(g){var m=document,k=m.createElement("script"),f=m.body,h=m.location,i="";try{if(!f){throw (0)}i=m.title;m.title="(Saving...) "+m.title;k.setAttribute("src",h.protocol+"//liveclippings.interdev.biz/clipping/create?content_type=html&public="+g+"&url="+encodeURIComponent(h.href));f.appendChild(k);m.title=i;return 0}catch(j){alert("The page has not loaded. Please try again in a moment.")}}function a(e,h){var d=document.createElement("script");d.src=e;var f=document.getElementsByTagName("head")[0];var g=false;d.onload=d.onreadystatechange=function(){if(!g&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){g=true;h();d.onload=d.onreadystatechange=null;f.removeChild(d)}};f.appendChild(d)}function c(d){var f=document.createElement("link");f.href=d;f.rel="stylesheet";f.type="text/css";var e=document.getElementsByTagName("head")[0];e.appendChild(f)}a("http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js",function(){a("http://ajax.googleapis.com/ajax |
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
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.List; | |
/* | |
* Sample application output: | |
* | |
* **** Building Dictionary Start with Isabella **** | |
* |
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/env ruby | |
def compare_filesystem(previous, current) | |
previous_inventory = File.open(previous).readlines | |
current_inventory = File.open(current).readlines | |
# puts "The following files have been added:" | |
# puts current_inventory - previous_inventory | |
# | |
# puts "" |
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
if (jQuery) (function($){ | |
jQuery('img').each(function() { | |
jQuery(this).attr('src', 'http://placekitten.com/g/'+jQuery(this).width()+'/'+jQuery(this).height()); | |
}); | |
})(jQuery); |
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 | |
def factorial n | |
f = n | |
for i in (n - 1).downto(1) | |
f *= i | |
i -= 1 | |
end | |
return f | |
end |