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 tddjs = tddjs || {}; | |
(function(global) { | |
global.ajax = {}; | |
var ajax = global.ajax; | |
/** | |
* Define ajax.create() | |
*/ | |
var i, l; |
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
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>Ajax integration text</title> | |
</head> | |
<body onload="startSuccessfullGetTest()"> | |
<h1>Ajax Integration Test</h1> | |
<div id="output"></div> | |
<script type="text/javascript" src="ajax.js"></script> | |
<script type="text/javascript" src="successful_get_test.js"></script> |
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 startSuccessfullGetTest() { | |
var output = document.getElementById('output'); | |
if (!output) { | |
return; | |
} | |
function log(text) { | |
if (output && typeof output.innerHTML !== 'undefined') { | |
output.innerHTML = text; | |
} else { |
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
<h1>Remote page</h1> | |
<p> | |
Hello, I am an HTML fragment and I was fetched using <code>XMLHttpRequest</code> | |
</p> |
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($) { | |
var namespace = 'plugin_name'; | |
$.fn[namespace] = function(options) { | |
var elements = this, | |
settings = $.extend({ | |
'param': 'default value' | |
}, options); | |
elements.each(function() { |
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/env python | |
# -*- coding: utf-8 -*- | |
import MeCab | |
import sys | |
mecab = MeCab.Tagger('-Ochasen') | |
result = {} | |
linenum = 0 |
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
/*jslint indent: 4*/ | |
/*jslint node: true */ | |
'use strict'; | |
var Twitter = require('ntwitter'), | |
logger = require('fluent-logger'); | |
logger.configure('td.test_db', {host: 'localhost', port: 24224}); | |
var twit = new Twitter({ | |
consumer_key: 'XXX', |
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
def getdefaultlocale(envvars=('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE')): | |
# 略 | |
import os | |
lookup = os.environ.get | |
for variable in envvars: | |
localename = lookup(variable,None) | |
if localename: | |
if variable == 'LANGUAGE': |