QbyYOq ('-' * 6)
Forked from Captain Anonymous's Pen BNjMmp.
inputfile = open(filename) | |
#... | |
# I swear enumerate() makes this faster. | |
for i, line in enumerate(inputfile): | |
if readnext == True: # Previous line started with an '@' | |
# linescounted += 1 # For line count check. | |
for bp in line.rstrip(): | |
if bp == 'G': |
body { margin: 0; padding: 0; zoom: 1; } | |
h1, h2, p { margin: 0; padding: 0; } | |
.strike { text-decoration: line-through; } | |
.avatar img { width: 30px; height: 30px; -webkit-border-radius: 15px; -moz-border-radius: 15px; border-radius: 15px; } | |
.caption { margin: 0 0 60px 20px; } | |
.caption a { font: 14px/16px 'Unica One', Helvetica, Arial, sans-serif; letter-spacing: .1em; color: #999; text-transform: uppercase; text-decoration: none; } | |
.caption a:hover { background-color: #ddd; } |
public class FizzBuzz { | |
public static void main(String[] args) { | |
for (int i = 0; i < 100; i++) { | |
if (i % 3 == 0) { | |
System.out.println("fizz"); | |
} else if (i % 5 == 0) { | |
System.out.println("buzz"); | |
} else if ((i % 3 == 0) && (i % 5 == 0)) { |
// First, checks if it isn't implemented yet. | |
// from http://stackoverflow.com/questions/610406/javascript-equivalent-to-printf-string-format | |
if (!String.prototype.format) { | |
String.prototype.format = function() { | |
var args = arguments; | |
return this.replace(/{(\d+)}/g, function(match, number) { | |
return typeof args[number] != 'undefined' | |
? args[number] | |
: match | |
; |
class Node | |
def initialize(data) | |
@left = nil | |
@right = nil | |
@data = data | |
end | |
def setLeft(leftChild) | |
@left = leftChild |
<div id="first"> | |
This is a first div | |
</div> |
import scala.collection.JavaConverters._ | |
import com.fasterxml.jackson.core.JsonFactory | |
import com.fasterxml.jackson.databind.JsonNode | |
import com.fasterxml.jackson.databind.node.{JsonNodeFactory, MissingNode, ObjectNode} | |
val jf = new JsonFactory(true) | |
val o = new ObjectNode(jf) | |
o.put("yellow","banana") | |
for (v <- o.fields.asScala) { println(v.getKey(),v.getValue()) } |
0xc4d410134bb9e5cd73079604cda6faeafe0e64c0 |
0xb2e9fe08ca9a0323103883fe12c9609ed380f475 |