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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script src="storeroom.js"></script> | |
<style> | |
body, html, #allmap { | |
width: 100%; | |
height: 100%; |
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
// 创建文件夹 | |
wasCreated = new File('mydir').mkdir() | |
wasCreated = new File('mydir/subdir').mkdirs() | |
// 写文件 | |
f = new File('myfile.txt') | |
f.write('hello world!') | |
// 写文件2 | |
f = new File(‘myfile.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
//Joda-Time 的一个小例子,计算一天的工作时间, | |
//每天工作8小时,1小时休息: | |
package com.alzhang.workingtime; | |
import org.joda.time.DateTime; | |
import org.joda.time.Duration; | |
import org.joda.time.Hours; | |
import org.joda.time.Period; | |
import org.joda.time.format.DateTimeFormat; |
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 mobi.dzs.util; | |
/** | |
* 16进制值与String/Byte之间的转换 | |
* @author JerryLi | |
* @email [email protected] | |
* @data 2011-10-16 | |
* */ | |
public class CHexConver | |
{ |
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
The boolean logical operators are : | , & , ^ , ! , || , && , == , != , ?: | |
| the OR operator | |
& the AND operator | |
^ the XOR operator | |
! the NOT operator |
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 mop | |
class RowSet { | |
Map map = [:] | |
void update(key,value){ | |
map.put(key,value) | |
} | |
def get(key){ | |
map.get(key) | |
} |
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 extract.excel | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook | |
import org.apache.poi.hssf.usermodel.HSSFSheet | |
import org.apache.poi.hssf.usermodel.HSSFRow | |
import org.apache.poi.hssf.usermodel.HSSFCell | |
import org.apache.poi.hssf.usermodel.HSSFDateUtil | |
/** |
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
//Call a javascript function after 5 sec of last key press | |
var timeout; | |
$(document).ready(function(){ | |
$('input[type=text]').keypress(function() { | |
if(timeout) { | |
clearTimeout(timeout); | |
timeout = null; | |
} | |
timeout = setTimeout(myFunction, 5000); |
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
<script type="text/javascript"> | |
require([ | |
"gridx/Grid", | |
"gridx/core/model/cache/Sync", | |
"gridx/modules/VirtualVScroller", | |
"gridx/modules/ColumnResizer", | |
"gridx/modules/extendedSelect/Row", | |
"gridx/modules/SingleSort", | |
"dojo/store/Memory" | |
], function(){ |
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
rootProject.name = 'project1' | |
archivesBaseName = 'project1' | |
jar.baseName = 'project1' | |
// -- full file | |
apply plugin: 'java' | |
apply plugin: 'maven' | |
archivesBaseName = 'project1' | |
version = '1.0-SNAPSHOT' |
OlderNewer