Instance | Branch |
---|
This file contains hidden or 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
public class VNCharacterUtils { | |
// Mang cac ky tu goc co dau | |
private static char[] SOURCE_CHARACTERS = { 'À', 'Á', 'Â', 'Ã', 'È', 'É', | |
'Ê', 'Ì', 'Í', 'Ò', 'Ó', 'Ô', 'Õ', 'Ù', 'Ú', 'Ý', 'à', 'á', 'â', | |
'ã', 'è', 'é', 'ê', 'ì', 'í', 'ò', 'ó', 'ô', 'õ', 'ù', 'ú', 'ý', | |
'Ă', 'ă', 'Đ', 'đ', 'Ĩ', 'ĩ', 'Ũ', 'ũ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ạ', | |
'ạ', 'Ả', 'ả', 'Ấ', 'ấ', 'Ầ', 'ầ', 'Ẩ', 'ẩ', 'Ẫ', 'ẫ', 'Ậ', 'ậ', | |
'Ắ', 'ắ', 'Ằ', 'ằ', 'Ẳ', 'ẳ', 'Ẵ', 'ẵ', 'Ặ', 'ặ', 'Ẹ', 'ẹ', 'Ẻ', | |
'ẻ', 'Ẽ', 'ẽ', 'Ế', 'ế', 'Ề', 'ề', 'Ể', 'ể', 'Ễ', 'ễ', 'Ệ', 'ệ', | |
'Ỉ', 'ỉ', 'Ị', 'ị', 'Ọ', 'ọ', 'Ỏ', 'ỏ', 'Ố', 'ố', 'Ồ', 'ồ', 'Ổ', |
This file contains hidden or 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
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; | |
SET time_zone = "+00:00"; | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; | |
-- |
This file contains hidden or 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
FacebookClient facebookClient = new DefaultFacebookClient(token, secretKey); | |
FacebookClient.AccessToken extendedAccessToken = facebookClient.obtainExtendedAccessToken(appId, secretKey, token); | |
String extendedToken = extendedAccessToken.getAccessToken(); |
This file contains hidden or 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
import java.util.concurrent.ThreadPoolExecutor; | |
public class MyMonitorThread implements Runnable | |
{ | |
private ThreadPoolExecutor executor; | |
private int seconds; | |
private boolean run=true; | |
public MyMonitorThread(ThreadPoolExecutor executor, int delay) | |
{ |
This file contains hidden or 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
$ git fetch | |
Connection to bitbucket.org closed by remote host. | |
fatal: Could not read from remote repository. | |
Please make sure you have the correct access rights | |
and the repository exists. | |
$ ssh-add -l | |
The agent has no identities. | |
$ ssh-add ~/.ssh/id_rsa |
This file contains hidden or 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 | |
# Authenticate an facebook application directly from shell. | |
# Make sure to modify the EMAIL and PASS below and just run it as: | |
# sh facebook-login.sh "<your facebook url>" | |
# | |
# It's possible to script and run the script in a while loop (In my case this is necessary hence | |
# the facebook-sdk api for php causes random crashes and my script needs to run for a loooong time. | |
# | |
# for a in a b c d e f g i j k l m n o p; do while (true); do START=`date +%s`; sh facebook-login.sh "<your app url>"; expr `date +%s` \< \( $START + 20 \) > /dev/null && break; done; sleep 30; done |
This file contains hidden or 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
import java.nio.file.Paths; | |
Paths.get(".").toAbsolutePath().normalize().toString(); |
This file contains hidden or 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
import sys | |
reload(sys) | |
sys.setdefaultencoding("utf-8") |
This file contains hidden or 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
╔════════════════╦═════╦═════╦══════╦═════╗ | |
║ DDBS ║ P+A ║ P+C ║ E+L ║ E+C ║ | |
╠════════════════╬═════╬═════╬══════╬═════╣ | |
║ DynamoDB ║ Yes ║ ║ Yes ║ ║ | |
║ Cassandra ║ Yes ║ ║ Yes ║ ║ | |
║ Riak ║ Yes ║ ║ Yes ║ ║ | |
║ VoltDB/H-Store ║ Yes ║ ║ Yes ║ ║ | |
║ Elasticsearch ║ Yes ║ ║ Yes ║ ║ | |
║ Bigtable/HBase ║ ║ Yes ║ ║ Yes ║ | |
║ MongoDB ║ ║ Yes ║ ║ Yes ║ |