Skip to content

Instantly share code, notes, and snippets.

import math
f = open('./mandrill.pgm', 'r')
# format
f.readline()
# size
width, height = f.readline().rstrip().split(' ')
# max
max_value = int(f.readline().rstrip())
var questions = [
<div class="question-content">
<p>
<img alt="" src="https://c1.staticflickr.com/9/8594/16054902599_6966b2db21_h.jpg" />
</p>
<p>
<img alt="" src="https://c1.staticflickr.com/9/8569/16646420366_6e0a53ac28_b.jpg" />
</p>
</div>,
<div class="question-content">
#include <stdio.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <assert.h>
#include <emscripten.h>
#include <unistd.h>
int testImage(SDL_Surface* screen, const char* fileName) {
SDL_Surface *image = IMG_Load(fileName);
if (!image)
int plus_one(int i) {
return i + 1;
}
int main(void) {
for (int i = 0; i < 10; ++i) {
printf("%d\n", plus_one(i));
}
return 0;
}
(function() {
TS.registerModule("format", {
testing_with_generic_tokens: false,
theme_rx: /((?:#[A-Fa-f0-9]{6} {0,1}, {0,1}){7})(#[A-Fa-f0-9]{6})(\b)/g,
onStart: function() {
if (TS.boot_data.feature_at_here) {
b.push("here")
}
},
cleanMsg: function(e) {
<link rel="import" href="./bower_components/polymer/polymer.html">
<polymer-element name="my-marquee" noscript>
<template>
<style>
div {
position: absolute;
-webkit-animation: background-animation 3s ease 0s infinite alternate;
}
@-webkit-keyframes background-animation {
[Desktop Entry]
Type=Application
Name=Mikutter
GenericName=Twittter client
Icon=/home/tyage/apps/mikutter/core/skin/data/icon.png
Exec=/home/tyage/.rbenv/shims/ruby /home/tyage/apps/mikutter/mikutter.rb
Terminal=false
import "babel/polyfill";
import prominence from "prominence";
import fs from "fs";
(async () => {
let text = await prominence(fs).readFile("async-convert.js", "UTF-8")
console.log(text);
})();
"use strict";
var _this = this;
var timer = function (sec) {
return new Promise(function (done) {
setTimeout(function () {
done(sec);
console.log("done");
}, sec);