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
local array = {["key1"] = 1, key2 = 2; 3, 4, 5; key3 = 6; 7, 8} | |
print("array size=" .. #array) | |
for i,v in ipairs(array) do | |
print("index=" .. i | |
.. " value=" .. v) | |
end | |
print("value of key1=" .. array.key1) | |
print("value of key2=" .. array.key2) | |
print("value of key3=" .. array.key3) |
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.path = package.path .. ";../?.lua" | |
require "module1" | |
require "module2" | |
module1.showDate() | |
showGrobalVal() |
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
imageMap.remove(strUserId); | |
if (!ImageIO.getUseCache()) { | |
ImageIO.setUseCache(true); | |
} | |
BufferedImage image = null; | |
try { | |
imageMap.put(strUserId, ImageIO.read(url)); | |
} catch (IOException e) { | |
imageMap.put(strUserId, null); | |
} |
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
public boolean isEquals(File file1, File file2) { | |
FileInputStream fis1 = null; | |
FileInputStream fis2 = null; | |
try { | |
byte[] ba1 = new byte[(int) file1.length()]; | |
byte[] ba2 = new byte[(int) file2.length()]; | |
fis1 = new FileInputStream(file1); | |
fis1.read(ba1); | |
fis2 = new FileInputStream(file2); | |
fis2.read(ba2); |
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
public static void main(String[] args) throws Exception { | |
String inFilePath = args[0]; | |
int targetColumn = Integer.parseInt((args[1])); | |
String outFilePath = args[2]; | |
File inCsv = new File(inFilePath); | |
File outCsv = new File(outFilePath); | |
BufferedReader br = null; | |
FileInputStream fis = null; |
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 | |
App::uses('TransactionManager', 'Model'); | |
class DBMainTransactionManager extends TransactionManager { | |
public $name = 'DBMainTransactionManager'; | |
public function __construct($id = false, $table = null, $ds = null) { | |
parent::__construct(); | |
$this->useDbConfig = Configure::read('Datasource.mysql.master.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
<?xml version="1.0"?> | |
<root> | |
<list> | |
<item> | |
<name>x5gtrn's Original Setting</name> | |
<list> | |
<item> | |
<name>Enable xHHK compatible Arrow Key Mode (Using Mac)</name> | |
<identifier>remap.xhhkmacmode</identifier> |
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
<?xml version="1.0"?> | |
<!DOCTYPE module PUBLIC | |
"-//Puppy Crawl//DTD Check Configuration 1.3//EN" | |
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> | |
<!-- | |
Checkstyle configuration that checks the sun coding conventions from: | |
- the Java Language Specification at |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>background</key> | |
<data> | |
BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm | |
ZmZmAAAAg65HYT+G | |
</data> | |
<key>border</key> |
OlderNewer