
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
function putscsv($array) { | |
if (count($array) > 0) { | |
print('"'.str_replace('"', '""', $array[0]).'"'); | |
for ($i = 1; $i < count($array); ++$i) { | |
print(',"'.str_replace('"', '""', $array[$i]).'"'); | |
} | |
} | |
print("\n"); | |
} |
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
#!/usr/bin/ruby | |
require "rubygems" | |
require "RMagick" | |
require "kconv" | |
require "uri" | |
$KCODE = "utf8" | |
name = ARGV[0].toutf8 |
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
#!/usr/bin/ruby | |
require "rubygems" | |
gem "twitter" | |
require "twitter" | |
require "oauth" | |
require "pit" | |
require "httpclient" | |
require "RMagick" |
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
// ==UserScript== | |
// @name fixtext_sssite | |
// @namespace fixtext_sssite | |
// ==/UserScript== | |
function $x(exp, doc, callback) { | |
var result = doc.evaluate(exp, doc, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
if(result.resultType == XPathResult.ORDERED_NODE_SNAPSHOT_TYPE) { | |
for(var i=0;i<result.snapshotLength;++i) { | |
callback(result.snapshotItem(i)); |
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
#include <stdio.h> | |
#include <sstream> | |
#include <stack> | |
#define MEMSIZE 30000 | |
#define CODESIZE 30000 | |
#include "xbyak/xbyak.h" | |
class BFVM : public Xbyak::CodeGenerator { |
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
#include <stdio.h> | |
#include <iostream> | |
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <stack> | |
#define MEMSIZE 30000 | |
#define CODESIZE 30000 |
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
package org.hogel.android.AndroidTest; | |
import junit.framework.Assert; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.Path; | |
import android.util.AttributeSet; | |
import android.widget.RatingBar; |
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 inactiveTextboxes = ["keysnail-prompt-textbox", "urlbar", ...]; | |
let inactiveTextboxes = ["keysnail-prompt-textbox"]; | |
let doc = document; | |
if (doc.getElementById("content")) { | |
for each (let id in inactiveTextboxes) { | |
let box = doc.getElementById(id); | |
let input = doc.getAnonymousElementByAttribute(box, 'anonid', 'input'); | |
if (input) | |
input.style.imeMode = "inactive"; | |
} |
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
#include <stdio.h> | |
int main(void) | |
{ | |
int i; | |
int j; | |
for(i=1; i<=5; i=i+1){ | |
for(j=1; j<=5; j=j+1){ | |
printf("%d x %d = %d\n",i,j,(i*j)); |