SQL Server get/list all tables in the database

Categories: Database; Tagged with: ; @ July 31st, 2012 15:16

SQL Server – 2008 get all tables:

USE database
SELECT * FROM SYS.TABLES ORDER BY NAME;

JRE/JDE related ANT build Errors

Categories: Java; Tagged with: ; @ July 30th, 2012 18:35

I’m trying to build some java project in my new pc, got some error:

build.xml:46: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to “C:\Program Files (x86)\Java\jre7”

or :

cannot access java.util.ArrayList
    [javac] bad class file: C:\Program Files (x86)\Java\jre7\lib\rt.jar(java/util/ArrayList.class)
    [javac] class file has wrong version 51.0, should be 49.0
    [javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
    [javac] import java.util.ArrayList;
    [javac]                  ^
    [javac] 1 error
    [javac] 100 warnings

I have config the Path environment variable, and the JRE installed in Eclipse preferences, I got those Errors also, and I forget there also need to config the ant run configuration:  run as… and switch to ‘JRE’ tab, select the right JDK.

Apache Flex 4.8.0-incubating Released! Flex 4.8孵化版发布

Categories: Flex; Tagged with: ; @ July 27th, 2012 8:26

The Apache Flex community is pleased to announce the release of Apache Flex 4.8.0-incubating!

Apache Flex is an application framework for easily building Flash Platform-based applications for mobile devices, the browser and desktop. This is the first release under the Incubator of the Apache Software Foundation and represents the initial donation of Adobe Flex 4.6 by Adobe System Inc.

Note that because Apache Flex is under “incubation”, Apache Flex is not an official Apache Project, and this is not an official Apache release. For more information see the DISCLAIMER file in the release. This release marks the start of a new era for Flex. The future of Flex is now driven by the community instead of a corporation. Users can have important bugs fixed or new features added by contributing the code themselves. Apache Flex is available in source form from the following download page: http://incubator.apache.org/flex/download.html When downloading from a mirror site, please remember to verify the downloads using signatures found on the Apache site: http://www.apache.org/dist/incubator/flex/KEYS Apache Flex release packages are different from Adobe release packages. For information on how to use Apache Flex with existing IDEs, see: http://incubator.apache.org/flex/packager.html For more information on Apache Flex, visit the project home page: http://incubator.apache.org/flex/ Thank you for using Apache Flex, The Apache Flex Community.

Download: http://incubator.apache.org/flex/download.html

Release Notes:

Apache Flex 4.8.0
=================

This is a parity release with Adobe Flex 4.6.0.

The official Apache distribution is the source kit which can contain only source.
Because of this, and various licensing constraints, there must be a few differences.  

====> Please see the README, especially the "Install Prerequisites" section. <====

  Differences:

  - BlazeDS integration is an optional feature (Adobe license)
  - Adobe embedded font support is an optional feature  

  - the lib directory has been restructured
        -- lib  (jars built from source)
           -- external (other Apache jars or ones with compatible licenses)
              -- optional (optional jars with incompatible licenses)

  - the default linkage is -static-link-runtime-shared-libraries=true

  - there are no longer Adobe signed RSLs (swz files) in frameworks/rsls
  - the frameworks/rsls directory contains unsigned RSL for libraries we build

  - the frameworks/osmf src is not included which means there is not an osmf RSL.  

  - the frameworks/textLayout src is not included which means there is not a textLayout 
    RSL.  We expect this difference to be limited to this release.

  - the ASDoc in the asdoc package no longer has active links for Adobe Flash,
    Adobe Air, the Open Source Media Framework (OSMF) or Text Layout Format (TLF).
    We hope to correct this in a future release.

Please report new issues to our bugbase at:

    https://issues.apache.org/jira/browse/FLEX

                                          The Apache Flex Project
                                          <http://incubator.apache.org/flex/>

Parse EXCEL usint Apache POI-HSSF and POI-XSSF

Categories: Java; Tagged with: ; @ July 27th, 2012 8:24

HSSF is the POI Project’s pure Java implementation of the Excel ’97(-2007) file format. XSSF is the POI Project’s pure Java implementation of the Excel 2007 OOXML (.xlsx) file format. HSSF and XSSF provides ways to read spreadsheets create, modify, read and write XLS spreadsheets.

 

package com.test;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

public class HSSFTest {
	public static void main(String[] args) {
		String xlsName = "D:/justForTest.xlsx";
		FileInputStream fis;
		try {
			fis = new FileInputStream(xlsName);
			Workbook workbook = new XSSFWorkbook(fis);
			
			// Get the first sheet;
			Sheet sheet = workbook.getSheetAt(0);
			
			// for each row
			for(Row row : sheet) {
				Cell cell = row.getCell(0); // get the cell
				// print cell contents.
				System.out.println(cell.getStringCellValue());
			}
			
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}

Flex vs HTML5: After 6 years doing Flex, am I moving to HTML5?

Categories: FlexHTML5; Tagged with: ; @ July 19th, 2012 16:25

Short answer: no. But I’m investing in HTML5.

Checkout:

https://plus.google.com/109047477151984864676/posts/CVGJKLMMehs

Newer Posts <-> Older Posts



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.