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
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna! | |
([一-龯]) | |
Regex for matching Hirgana or Katakana (*) | |
([ぁ-んァ-ン]) | |
Regex for matching Non-Hirgana or Non-Katakana | |
([^ぁ-んァ-ン]) | |
Regex for matching Hirgana or Katakana or basic punctuation (、。’) |
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
/* tested on PhantomJS 1.6 */ | |
var page = require('webpage').create(), loadInProgress = false, fs = require('fs'); | |
var htmlFiles = new Array(); | |
// console.log(fs.workingDirectory); | |
// console.log(phantom.args[0]); | |
var curdir = phantom.args[0] || fs.workingDirectory; | |
var curdirList = fs.list(curdir); |
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
static NSString* prettyFloat(CGFloat f) { | |
if (f == 0) { | |
return @"0"; | |
} else if (f == 1) { | |
return @"1"; | |
} else { | |
return [NSString stringWithFormat:@"%.3f", f]; | |
} | |
} |
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
/** | |
* to-hankaku.js | |
* convert to ascii code strings. | |
* | |
* @version 1.0.1 | |
* @author think49 | |
* @url https://gist.github.com/964592 | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
*/ |