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 regexMM = new RegExp("[\u1000-\u109f\uaa60-\uaa7f]+"); | |
var text = "မြန်မာ"; | |
if (!regexMM.test(text)) { | |
console.log("not myanmar text"); | |
} | |
else { | |
console.log("myanmar text"); | |
} |
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
<?php | |
$arr[0] ="အဓိပတိ"; | |
$arr[1] = "ဘင်္ဂ"; | |
$arr[2] = "မရဏ"; | |
$arr[3] = "အထွန်း"; | |
$arr[4] = "သိုက်"; | |
$arr[5] = "ရာဇ"; | |
$arr[6] = "ပုတိ"; | |
$n = 5; // modulo |
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
<?php | |
$deviceToken = '0a7d65e6 b621fbf2 7fb43b23 cb673af5 d689fdfa d2f9a8b2 59d2f507 f1e72a9c'; | |
$payload['aps'] = array('alert' => 'push message suppose to be here but not here yet', 'title' =>'Im Title', 'badge' => 1, 'sound' => 'default', 'category' => 'notification'); | |
$payload = json_encode($payload); | |
echo $payload."<br/>"; | |
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> | |
<title>Testing</title> | |
<meta charset="UTF8"> | |
<!-- <link rel='stylesheet' href='http://mmwebfonts.comquas.com/fonts/?font=mon3' /> --> | |
<style> | |
@font-face { | |
font-family:'MON3 Anonta 1'; | |
src:local('MON3 Anonta 1'),url('http://mmwebfonts.comquas.com/fonts/mon3.ttf'); | |
} |
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
NSDictionary* headers = [(NSHTTPURLResponse *)response allHeaderFields]; | |
if ([headers objectForKey:@"Accept-Ranges"]) { | |
_allowResume = YES; | |
} | |
else | |
{ | |
_allowResume = NO; | |
} |
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 request = WebRequest.Create("http://www.ornagai.com/index.php/api/word/q/sample/format/json"); | |
request.ContentType = "application/json; charset=utf-8"; | |
string text; | |
var response = (HttpWebResponse) request.GetResponse(); | |
using (var sr = new StreamReader(response.GetResponseStream())) | |
{ | |
text = sr.ReadToEnd(); | |
} |
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
sudo /etc/init.d/xbmc stop #default password = 'raspberry' | |
sudo su #default password = 'raspberry' | |
echo "/opt/vc/lib" > /etc/ld.so.conf.d/00-vmcs.conf | |
ldconfig | |
sudo chown xbian:xbian .xbmc/userdata/sources.xml | |
sed -i 's/gpu_mem_256=100/gpu_mem_256=128/g' /boot/config.txt | |
sed -i 's/gpu_mem_512=100/gpu_mem_512=128/g' /boot/config.txt |
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
exports.checkingUser = function (req,res,callback) | |
{ | |
.... | |
.... | |
self = this; | |
this.getAllUser(database,function(err,docs) | |
{ | |
if(err) | |
{ | |
return callback(err); |
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
#!/bin/sh | |
# if Xcode , need to install Command Line Tools From Xcode | |
# 初期設定 | |
WORK=$HOME/Builds/build-essential | |
PREFIX=$HOME/local | |
export PATH="$PREFIX/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" | |
# check Build Dir Exist or not | |
if [ ! -d $HOME/Builds ] ; then |
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 form with hidden data called csv_hdr and csv_output. | |
*********************************/ | |
$(document).ready(function(){ | |
$("#btn_challenge_score_details").click(function (){ | |
var csv_hdr = $("#csv_hdr").val(); | |
var csv_output = $("#csv_output").val(); | |
var dataString = 'csv_hdr='+ csv_hdr + '&csv_output=' + csv_output; | |
//alert (dataString); return false; |