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
apply plugin: 'android' | |
buildscript { | |
repositories { | |
maven { url 'http://maven.oschina.net/content/groups/public/' } | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.8.+' | |
// the latest version of the android-apt plugin | |
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.1' |
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
apply plugin: 'java' | |
apply plugin: 'application' | |
mainClassName='path.of.package.MainApp' | |
compileJava.options.encoding = 'UTF-8' | |
version = '1.0' | |
sourceCompatibility = '1.8' |
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
-- http://stackoverflow.com/questions/3800551/select-first-row-in-each-group-by-group | |
--On Oracle 8i+, SQL Server 2005+, PostgreSQL 8.4+, DB2, Firebird 2.1+, Teradata, Sybase, Vertica: | |
WITH summary AS ( | |
SELECT p.id, | |
p.customer, | |
p.total, | |
ROW_NUMBER() OVER(PARTITION BY p.customer | |
ORDER BY p.total DESC) AS rk | |
FROM PURCHASES p) |
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
--分钟实现 | |
select | |
min(OccurTime) as beginTime, | |
max(OccurTime) as endTime, | |
max(RecvReqCount)-min(RecvReqCount) as reqcount | |
from gwserverperfdatas | |
where OccurTime >= utc_date() | |
group by floor(unix_timestamp(OccurTime )/60) |
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
.star_bg { | |
background-image: url(http://www.zhangxinxu.com/study/201308/star.png); | |
height: 20px; | |
width: 120px; | |
overflow: hidden; | |
position: absolute; | |
left: 0; | |
} | |
.star { |