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 | |
PROC_HOME=$(cd "$(dirname "$0")"; pwd) | |
PID_FILE=$PROC_HOME/hello.pid | |
function alive() { | |
if [ -f ${PID_FILE} ] && ((`ps awux | grep -v grep | grep -c chrome`)); then | |
echo "the process is running" | |
exit 1 | |
fi |
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
import java.sql.CallableStatement; | |
import java.sql.Connection; | |
import java.sql.PreparedStatement; | |
import java.sql.SQLException; | |
import java.sql.Types; | |
import com.mchange.v2.c3p0.ComboPooledDataSource; | |
public class InsertingDataWithPS { |
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
CREATE TABLE `str_test` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`name` varchar(50) DEFAULT NULL, | |
`ats` text, | |
`dor` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 | |
delimiter $$ |
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
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Random; | |
public class RecursionMethodDemo { | |
public static void main(String[] args) { | |
List<String> list = new ArrayList<String>(); |
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/python | |
#encoding: utf8 | |
from flup.server.fcgi import WSGIServer | |
def myapp(environ, start_response): | |
start_response('200 OK', [('Content-Type', 'text/plain')]) | |
return ['Hello World!\n你好,世界!'] | |
if __name__ == '__main__': |
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.xkit.android.demo; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.database.sqlite.SQLiteDatabase; |
NewerOlder