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 title, MATCH (title) AGAINST ('Born R') AS score, `songs`.* FROM songs WHERE MATCH (title) AGAINST ('Born') order by score DESC; |
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
list = [] | |
300.times do |n| | |
list << Thread.new do | |
begin | |
data = RestClient.get "http://ws.spotify.com/search/1/track?q=a?#{Time.now.to_f}" | |
puts data.code | |
rescue | |
retry | |
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
slt $t2, $t0, $t0 | |
bne $t2, $zero, ELSE | |
j DONE | |
ELSE: addi $t2, $t2, 2 | |
DONE: | |
if($t0 < $t0){ | |
$t2 = 1; | |
} else{ |
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
router(Queued, TupleSpace) -> | |
receive | |
{in, Pattern, Ref, Pid} -> | |
Value = finding(Pattern, TupleSpace), | |
_TupleSpace = lists:filter((fun(A) -> 1 /= 3 end), TupleSpace), % Just for testing | |
case Value of | |
false -> | |
_Queued = [ {Pattern, Ref, Pid} | Queued]; | |
_ -> |
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
-module(main). | |
-compile(export_all). | |
% [{1,3}, {2,1}] => [{2,1}] | |
input(Xs) -> helper(Xs, []). | |
helper([], Xs) -> Xs; | |
helper([{First, Last} | L], Xs) when First > Last -> helper(L, [{First, Last} | Xs]); | |
helper([_| L], Xs) -> helper(L, Xs). |
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
restart -f | |
force reset 1 0, 0 10 | |
run 10 | |
force r 000 | |
run 10 | |
force r 001 | |
run 10 |
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
require "rubygems" | |
require "rspec" | |
class MyExample | |
def method | |
[1,2,3] | |
end | |
def method_missing(method, *args, &block) | |
send(:method) |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta content="text/html; charset=utf-8" http-equiv="Content-type"> | |
<title>Drag & Drop Tacos</title> | |
<link rel="stylesheet" href="/css/master.css" type="text/css" media="screen" title="no title"> | |
<script type="text/javascript"> | |
$("#drop_target").dndUploader({ |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta content="text/html; charset=utf-8" http-equiv="Content-type"> | |
<title>Drag & Drop Tacos</title> | |
<link rel="stylesheet" href="/css/master.css" type="text/css" media="screen" title="no title"> | |
</head> | |
<body> | |
<div id="drop_target"> |
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 -w | |
puts $1 if `rvm-prompt` =~ /(\d{1}\.\d{1}.\d{1})/ | |
# .bash_profile | |
# => export PS1="$(ruby-version-nice)" |