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
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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
@media only screen and (-webkit-device-pixel-ratio: .75) { | |
/* CSS for Low-density Android screens goes here * | |
* Ex: HTC Evo, HTC Incredible, Nexus One */ | |
} | |
@media only screen and (-webkit-device-pixel-ratio: 1) and (max-device-width: 768px) { | |
/* CSS for Medium-density Android screens goes here * | |
* Ex: Samsung Ace, Kindle Fire, Macbook Pro * | |
* max-device-width added so you don't target laptops and desktops */ | |
} |
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
render: function() { | |
var source = $("#round").html(); | |
var template = Handlebars.compile(source); | |
var context = JSON.parse(this.model.toJSON); | |
console.log(context); | |
var html = template(context); | |
$(this.el).html(html); | |
return this; | |
}, |
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
/* Glass effect */ | |
.box { | |
background: none repeat scroll 0 0 rgba(255, 255, 255, 0.6); | |
border-radius: 3px; | |
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4); | |
display: block; | |
margin: 10px 5px; | |
padding: 20px; | |
} |
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
SELECT t.id, COUNT(r.id) AS redeemsCount, r.offerId, t.offerTypeId, r.price, t.discountPercentage, t.discount, | |
CASE | |
WHEN t.offerTypeId = 1 | |
THEN SUM(r.price) | |
WHEN t.offerTypeId = 2 | |
THEN SUM((r.price * t.discountPercentage) / 100) | |
ELSE SUM(t.discount) END | |
AS redeemsValue | |
FROM `Offer` `t` | |
LEFT JOIN `Redeem` r ON r.offerId = t.id |
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
fn main() { | |
println!("Hello, world!"); | |
} |
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
├── Cargo.toml | |
└── src | |
└── main.rs |
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
├── Cargo.toml | |
└── src | |
└── lib.rs |
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
let a = true; | |
let b: bool = true; | |
let (x, y) = (1, 2); | |
let mut z = 5; | |
z = 6; |
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
const N: i32 = 5; |
OlderNewer