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> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" /> | |
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script> | |
<script src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script> | |
<script src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script> | |
</head> | |
<body> | |
<!-- NOTE: How to replicate bug --> |
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> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" /> | |
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script> | |
<script src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script> | |
</head> | |
<body> | |
<div data-role="page" id="page1"> | |
<div data-role="header"><h1>One</h1></div> |
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
function reverse(arr) { | |
var start = 0, end = arr.length - 1; | |
while(start < arr){ | |
var tmp = arr[start] | |
arr[start] = arr[end] | |
arr[end] = tmp; | |
++start, --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
MigrationSet migrations = new MigrationSet(){{ | |
version(1); | |
add( new CreateTable("table1", "c", "d", "e") ); | |
version(2); | |
add( | |
new AlterTable() | |
{{ | |
table("table1"); | |
addColumn("f"); | |
}}); |
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
(function(Spine, $){ | |
if( typeof Spine.Model.Ajax === "undefined") { throw "This plugin is really intended for use with Ajax driven models"; } | |
var Model = Spine.Model; | |
Model.extend({ | |
find: function(id) { | |
record = this.records[id]; | |
if( !record) { | |
var self = this; | |
self.ajaxPrefix = self.singletonPrefix(); | |
$.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
(defn get-lists | |
"Calls the rtm api to retrieve lists, returning the attributes from the xml" | |
[state] | |
(if-let [list-xml (xml/to-xml (api/rtm-lists-getList state))] | |
(for [x (xml-seq list-xml) :when (= :list (:tag x))] | |
(:attrs x)))) |
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
LinearLayout roundedCell = new LinearLayout(this); | |
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); | |
int drawableId = -1; | |
if(rounded.equals("top")) { | |
drawableId = R.drawable.list_view_heading_list; | |
layoutParams.setMargins(0, 0, 0, 1); | |
} else if(rounded.equals("bot")) { | |
drawableId = R.drawable.list_view_footer_list; | |
layoutParams.setMargins(1, 0, 0, 0); | |
} |
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
prod = ShopifyAPI::Product.find(6) | |
before = prod.variants.collect{|v| "#{v.position} - #{v.option1}"} | |
prod.variants[0].position = 3 | |
prod.variants[2].position = 1 | |
prod.variants.collect(&:save) | |
prod = ShopifyAPI::Product.find(6) | |
after = prod.variants.collect{|v| "#{v.position} - #{v.option1}"} |
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
# Apply to Shopify API # | |
Interested in working at Shopify? Don't use that form, you're a | |
developer and can clearly do better than that! | |
Instead you can apply to Shopify via our application API. Of course, | |
for the extra effort you will be given a higher priority than those | |
who simply apply via the webform. | |
# How? # |
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
-- kick them to the curb unless they look like mick jagger | |
delete from measurements as m where m.id | |
in | |
( | |
-- This finds all of our duplicate measurements | |
select id from measurements | |
inner join ( | |
select min(id) minid, keg_id, volume from measurements | |
group by keg_id, volume | |
having count(1) > 1 |
OlderNewer