博文

目前显示的是 四月, 2014的博文

Apache POI HSSF, XSSF and EXCEL

Want to use HSSF and XSSF read and write spreadsheets in a hurry? HSSF is for less than 2007 year Excel, XSSF is for more than 2007 year Excel. import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.Date; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.CreationHelper; import org.apache.poi.ss.usermodel.Font; import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; public class testHSSF {        public static void main(String[] args) throws IOException {           Workbook wb = new HSSFWorkbook();  CreationHelper helper = wb.ge...

Oracle function: row_number()

1.       select *         from (select *                 from (select t.*, row_number() OVER(ORDER BY null) AS "row_number"                         from twitter_accounts t) p                where p."row_number" > 0 and p."row_number" <=2) q        where rownum <= 10 2. SELECT department_id, last_name, employee_id, ROW_NUMBER() OVER ( PARTITION BY department_id ORDER BY employee_id) AS emp_id FROM employees;   3. SELECT last_name FROM (SELECT last_name, ROW_NUMBER() over (order by last_name ) R FROM employees) WHERE R BETWEEN 51 and 100;

Send JSONP Cross-domain Requests

From:w w w . j son.com/100-awesome-uses/87-send-jsonp-cross-domain-requests 12.16.2013   Dave Romero   Cross-domain Requests In developing web applications it's commonplace to send and receive data to APIs (Application Programmable Interfaces) that exist on other domains. This cross-domain communication is often performed directly in the browser, on the client-side using JavaScript. Cross-domain communication can be accomplished using a server-side languages like Python, Nodejs, PHP, etc., however for cases where responses from cross-domain requests are utilized in the browser, JavaScript can save time and simplify development. Addintionaly, JavaScript requests are asynchronous— meaning they can be run in parallel with other processes. For example, JavaScript requests to other domains can be processed asynchronously while the page is still loading. Same-origin Policy Same-origin policy is an important security concept in client-side programming languages ...

Maven

1. 'Convention Over Configuration', I like it.  pom.xml  - lifecycle  > mvn install  > mvn site 2-- view a plugin information. Exp., the following command line is what the plugin "help" describes. > mvn help:describe -Dplugin=help -Dfull 3-- Create a simple project and a directory "demo1" including a pom.xml and other directory(src ). > mvn archetype:create -DgroupId=my.demo01 -DartifactId=demo1 -DpackageName=org.demo01.pge 4 > mvn install  equity > mvn resource:resource compiler:compile resources:testResources compiler:testCompile surefire:test jar:jar 5 Repository is at c:\Documents and Settings\USERNAME\.m2\repository or c:\Users\USERNAME\.m2\respository h t t p: / / maven. apache. org / mail-lists . h t m l How to get source codes: mvn dependency:sources  In eclipse, project-> run as -> maven build... ,type "dependency:sources" in goal 6 mvn install:install-file -Dfile="parameters" -Dg...

bootstrap V3 - The Four Different Types of Media

1. The Four Different Types of Media in bootstrap V3 @media ( max-width :767px){ ... } @media ( min-width :768px) and (max-width :991px){ ... } @media ( min-width :992px) and ( max-width :1199px){ ... } @media ( min-width :1200px){ ... } xs: extra small; 767px<=xs; sm:small; 768px<=sm<=991px; md:middle; 992px<=md<=1199px; lg: large;  min-width:1200px; Ref: h t t p : / / g e t bootstrap.com/css/#forms socialme diatoday . com/ ginidietrich /1556276/four-different-types-media q i a n d u a n b l o g . c o m / 3 1 5 0 . h t m l  <!-- tabs -->       <div class="row">             <!-- Left col -->             <section class="col-lg-12 connectedSortable ui-sortable">               <!-- Custom tabs (Charts with tabs)-->               <div class="nav-tabs-custom" styl...

layout css

box-sizing 的CSS属性, 当你设置一个元素为 box-sizing: border-box; 时, 此元素的内边距和边框不再会增加它的宽度。 * { - webkit - box - sizing : border - box ; - moz - box - sizing : border - box ; box - sizing : border - box ;    } .clearfix { overflow : auto ; zoom : 1 ; } //hidden //scroll min-width and max-width     <meta http-equiv="X-UA-Compatible" content="IE=edge"/> //------------------------------ http://learnlayout.com/ fireapp.handlino.com sass-lang.com compass-style.org Webfonts service Typekit.com justfont.com typesquare.com demo.evendesign.tw/014/ .img-wrapper{  position:relative;  width:100%;  height:0;  padding-top:100%/16*9;/*4:3,3:2,16:9*/ } img{   position:absolute;   top:0;   left:0;   width:100%;   height:auto; } border-radius; box-shadow,text-shadow linear-gradient, radial-gradient; .box{  border:1px solid #ccc;  box-shadow:0 5px 10px rgab(0,0,0,...