createTree(1, orgNodeTree, sameOrgNodes, 0);@NoArgsConstructor
@AllArgsConstructor
@Getter
@Setter
public class NodeTree {
private String pName;
private String name;
private int level;
private List<NodeTree> children;
}
private void createTree(int leave, int ind, Map<String, NodeTree> pIndexNodeNameMap, List<NodeVo> childNodes) {
Map<String, NodeTree> cIndexNodeNameMap = new HashMap();
//構建樹
int treeNo = pIndexNodeNameMap.size();
if (treeNo == 0) {
return;
}
int group = 0;
for (int i = ind; i < childNodes.size(); i++) {
NodeVo node = childNodes.get(i);
long index = node.getId() % treeNo;
NodeTree pNode = pIndexNodeNameMap.get(index + "");
List<NodeTree> children = pNode.getChildren();
if (CollectionUtils.isEmpty(children)) {
children = new ArrayList();
}
if (children.size() > 2) {
leave++;
createTree(leave, i, cIndexNodeNameMap, childNodes);
break;
} else {
NodeTree child = new NodeTree();
child.setLevel(leave);
child.setPName(pNode.getName());
child.setName(node.getNodeName());
children.add(child);
pNode.setChildren(children);
cIndexNodeNameMap.put(group + "", child);
group++;
}
}
}private boolean createTree(int level, List<NodeTree> parentNodes, List<NodeVo> childNodes, int beginIndex) {
//構建樹
List<NodeTree> nextLevelNodes = new ArrayList<>();
for (int i = beginIndex; i < childNodes.size(); i++) {
int parentCount = 1;
for (NodeTree pNode : parentNodes) {
List<NodeTree> children = pNode.getChildren();
if (CollectionUtils.isEmpty(children)) {
children = new ArrayList();
pNode.setChildren(children);
}
if (children.size() >= 3) {
if(parentCount >= parentNodes.size()){
return createTree(++level, nextLevelNodes, childNodes, beginIndex);
}
} else {
if (beginIndex >= childNodes.size()) {
return true;
}
NodeTree child = new NodeTree();
child.setLevel(level);
child.setPName(pNode.getName());
NodeVo node = childNodes.get(beginIndex);
child.setName(node.getNodeName());
pNode.getChildren().add(child);
nextLevelNodes.add(child);
beginIndex++;
}
parentCount++;
}
}
return true;
}
2013年5月8日 #
git pull github master --allow-unrelated-histories
執行結果如下:
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 3
Unpacking objects: 100% (3/3), done.
From https://github.com/abocode/jfaster
* branch master -> FETCH_HEAD
* [new branch] master -> github/master
Merge made by the 'recursive' strategy.
.gitattributes | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 .gitattributes
進入“控制面板”——“用戶賬戶”-憑據管理器——windows憑據
找到了git的用戶名密碼。修改正確后ok
元注解:
元注解的作用就是負責注解其他注解。Java5.0定義了4個標準的meta-annotation類型,它們被用來提供對其它 annotation類型作說明。Java5.0定義的元注解:
1.@Target,
2.@Retention,
3.@Documented,
4.@Inherited
以下為一個簡單場景的應用:
1.定義注解:
@Target(TYPE)
@Retention(RUNTIME)
public @interface Table {
/**
* (Optional) The name of the table.
* <p/>
* Defaults to the entity name.
*/
String name() default "";
}
@Target({METHOD, FIELD})2、定義實體類:
@Retention(RUNTIME)
public @interface Column {
/**
* (Optional) The name of the column. Defaults to
* the property or field name.
*/
String name() default "";
}
@Table(name = "t_s_user")
public class User {
@Column(name="name")
private String name;
@Column(name="pwd")
private String pwd;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
}
3、運行:
public static void print() {
System.out.println("table's name:" + User.class.getAnnotation(Table.class).name());
Field[] fields = User.class.getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
Field field = fields[i];
System.out.println("field's type:" + field.getType().getName());
System.out.println("field's columnName:" + field.getAnnotation(Column.class).name());
}
}
關于注解的詳細介紹:http://www.cnblogs.com/peida/archive/2013/04/24/3036689.html
2.左上角選擇添加,選擇添加java(還提供了添加maven項目),然后選擇所需要的目錄:
3.idea 會提示選擇添加什么類型的文件,我們是單純的文件,所以選擇classes
nginx 反向代理到 tomcat
server {
@SpringBootApplication2、修改pom文件:
@ComponentScan
@Import({DBConfiguration.class, ResourceConfiguration.class,AppConfiguration.class})
public class Application extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
}
修改packaging
<packaging>war</packaging>
加入打包到tomcat的配置:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-legacy</artifactId>
<version>1.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
3、如果不需要JMX在application.properties文件中加入配置項:
或者直接關閉:
Spring Data JDBC generic DAO implementation
The purpose of this project is to provide generic, lightweight and easy to use DAO implementation for relational databases based on JdbcTemplate
from Spring framework, compatible with Spring Data umbrella of projects.
Design objectives
- Lightweight, fast and low-overhead. Only a handful of classes, no XML, annotations, reflection
- This is not full-blown ORM. No relationship handling, lazy loading, dirty checking, caching
- CRUD implemented in seconds
- For small applications where JPA is an overkill
- Use when simplicity is needed or when future migration e.g. to JPA is considered
- Minimalistic support for database dialect differences (e.g. transparent paging of results)
Features
Each DAO provides built-in support for:
- Mapping to/from domain objects through
RowMapper
abstraction - Generated and user-defined primary keys
- Extracting generated key
- Compound (multi-column) primary keys
- Immutable domain objects
- Paging (requesting subset of results)
- Sorting over several columns (database agnostic)
- Optional support for many-to-one relationships
- Supported databases (continuously tested):
- MySQL
- PostgreSQL
- H2
- HSQLDB
- Derby
- MS SQL Server (2008, 2012)
- Oracle 10g / 11g (9i should work too)
- ...and most likely many others
- Easily extendable to other database dialects via
SqlGenerator
class. - Easy retrieval of records by ID
API
Compatible with Spring Data PagingAndSortingRepository
abstraction, all these methods are implemented for you:
public interface PagingAndSortingRepository<T, ID extends Serializable> extends CrudRepository<T, ID> {
T save(T entity);
Iterable<T> save(Iterable<? extends T> entities);
T findOne(ID id);
boolean exists(ID id);
Iterable<T> findAll();
long count();
void delete(ID id);
void delete(T entity);
void delete(Iterable<? extends T> entities);
void deleteAll();
Iterable<T> findAll(Sort sort);
Page<T> findAll(Pageable pageable);
Iterable<T> findAll(Iterable<ID> ids);
}
Pageable
and Sort
parameters are also fully supported, which means you get paging and sorting by arbitrary properties for free. For example say you have userRepository
extending PagingAndSortingRepository<User, String>
interface (implemented for you by the library) and you request 5th page of USERS
table, 10 per page, after applying some sorting:
Page<User> page = userRepository.findAll(
new PageRequest(
5, 10,
new Sort(
new Order(DESC, "reputation"),
new Order(ASC, "user_name")
)
)
);
Spring Data JDBC repository library will translate this call into (PostgreSQL syntax):
SELECT *
FROM USERS
ORDER BY reputation DESC, user_name ASC
LIMIT 50 OFFSET 10
...or even (Derby syntax):
SELECT * FROM (
SELECT ROW_NUMBER() OVER () AS ROW_NUM, t.*
FROM (
SELECT *
FROM USERS
ORDER BY reputation DESC, user_name ASC
) AS t
) AS a
WHERE ROW_NUM BETWEEN 51 AND 60
No matter which database you use, you'll get Page<User>
object in return (you still have to provide RowMapper<User>
yourself to translate from ResultSet
to domain object). If you don't know Spring Data project yet, Page<T>
is a wonderful abstraction, not only encapsulating List<T>
, but also providing metadata such as total number of records, on which page we currently are, etc.
Reasons to use
-
You consider migration to JPA or even some NoSQL database in the future.
Since your code will rely only on methods defined in
PagingAndSortingRepository
andCrudRepository
from Spring Data Commons umbrella project you are free to switch fromJdbcRepository
implementation (from this project) to:JpaRepository
,MongoRepository
,GemfireRepository
orGraphRepository
. They all implement the same common API. Of course don't expect that switching from JDBC to JPA or MongoDB will be as simple as switching imported JAR dependencies - but at least you minimize the impact by using same DAO API. -
You need a fast, simple JDBC wrapper library. JPA or even MyBatis is an overkill
-
You want to have full control over generated SQL if needed
-
You want to work with objects, but don't need lazy loading, relationship handling, multi-level caching, dirty checking... You need CRUD and not much more
-
You want to by DRY
-
You are already using Spring or maybe even
JdbcTemplate
, but still feel like there is too much manual work -
You have very few database tables
Getting started
For more examples and working code don't forget to examine project tests.
Prerequisites
Maven coordinates:
<dependency>
<groupId>com.nurkiewicz.jdbcrepository</groupId>
<artifactId>jdbcrepository</artifactId>
<version>0.4</version>
</dependency>
This project is available under maven central repository.
Alternatively you can download source code as ZIP.
In order to start your project must have DataSource
bean present and transaction management enabled. Here is a minimal MySQL configuration:
@EnableTransactionManagement
@Configuration
public class MinimalConfig {
@Bean
public PlatformTransactionManager transactionManager() {
return new DataSourceTransactionManager(dataSource());
}
@Bean
public DataSource dataSource() {
MysqlConnectionPoolDataSource ds = new MysqlConnectionPoolDataSource();
ds.setUser("user");
ds.setPassword("secret");
ds.setDatabaseName("db_name");
return ds;
}
}
Entity with auto-generated key
Say you have a following database table with auto-generated key (MySQL syntax):
CREATE TABLE COMMENTS (
id INT AUTO_INCREMENT,
user_name varchar(256),
contents varchar(1000),
created_time TIMESTAMP NOT NULL,
PRIMARY KEY (id)
);
First you need to create domain object User
mapping to that table (just like in any other ORM):
public class Comment implements Persistable<Integer> {
private Integer id;
private String userName;
private String contents;
private Date createdTime;
@Override
public Integer getId() {
return id;
}
@Override
public boolean isNew() {
return id == null;
}
//getters/setters/constructors/...
}
Apart from standard Java boilerplate you should notice implementing Persistable<Integer>
where Integer
is the type of primary key. Persistable<T>
is an interface coming from Spring Data project and it's the only requirement we place on your domain object.
Finally we are ready to create our CommentRepository
DAO:
@Repository
public class CommentRepository extends JdbcRepository<Comment, Integer> {
public CommentRepository() {
super(ROW_MAPPER, ROW_UNMAPPER, "COMMENTS");
}
public static final RowMapper<Comment> ROW_MAPPER = //see below
private static final RowUnmapper<Comment> ROW_UNMAPPER = //see below
@Override
protected <S extends Comment> S postCreate(S entity, Number generatedId) {
entity.setId(generatedId.intValue());
return entity;
}
}
First of all we use @Repository
annotation to mark DAO bean. It enables persistence exception translation. Also such annotated beans are discovered by CLASSPATH scanning.
As you can see we extend JdbcRepository<Comment, Integer>
which is the central class of this library, providing implementations of all PagingAndSortingRepository
methods. Its constructor has three required dependencies: RowMapper
, RowUnmapper
and table name. You may also provide ID column name, otherwise default "id"
is used.
If you ever used JdbcTemplate
from Spring, you should be familiar with RowMapper
interface. We need to somehow extract columns from ResultSet
into an object. After all we don't want to work with raw JDBC results. It's quite straightforward:
public static final RowMapper<Comment> ROW_MAPPER = new RowMapper<Comment>() {
@Override
public Comment mapRow(ResultSet rs, int rowNum) throws SQLException {
return new Comment(
rs.getInt("id"),
rs.getString("user_name"),
rs.getString("contents"),
rs.getTimestamp("created_time")
);
}
};
RowUnmapper
comes from this library and it's essentially the opposite of RowMapper
: takes an object and turns it into a Map
. This map is later used by the library to construct SQL CREATE
/UPDATE
queries:
private static final RowUnmapper<Comment> ROW_UNMAPPER = new RowUnmapper<Comment>() {
@Override
public Map<String, Object> mapColumns(Comment comment) {
Map<String, Object> mapping = new LinkedHashMap<String, Object>();
mapping.put("id", comment.getId());
mapping.put("user_name", comment.getUserName());
mapping.put("contents", comment.getContents());
mapping.put("created_time", new java.sql.Timestamp(comment.getCreatedTime().getTime()));
return mapping;
}
};
If you never update your database table (just reading some reference data inserted elsewhere) you may skip RowUnmapper
parameter or use MissingRowUnmapper
.
Last piece of the puzzle is the postCreate()
callback method which is called after an object was inserted. You can use it to retrieve generated primary key and update your domain object (or return new one if your domain objects are immutable). If you don't need it, just don't override postCreate()
.
Check out JdbcRepositoryGeneratedKeyTest
for a working code based on this example.
By now you might have a feeling that, compared to JPA or Hibernate, there is quite a lot of manual work. However various JPA implementations and other ORM frameworks are notoriously known for introducing significant overhead and manifesting some learning curve. This tiny library intentionally leaves some responsibilities to the user in order to avoid complex mappings, reflection, annotations... all the implicitness that is not always desired.
This project is not intending to replace mature and stable ORM frameworks. Instead it tries to fill in a niche between raw JDBC and ORM where simplicity and low overhead are key features.
Entity with manually assigned key
In this example we'll see how entities with user-defined primary keys are handled. Let's start from database model:
CREATE TABLE USERS (
user_name varchar(255),
date_of_birth TIMESTAMP NOT NULL,
enabled BIT(1) NOT NULL,
PRIMARY KEY (user_name)
);
...and User
domain model:
public class User implements Persistable<String> {
private transient boolean persisted;
private String userName;
private Date dateOfBirth;
private boolean enabled;
@Override
public String getId() {
return userName;
}
@Override
public boolean isNew() {
return !persisted;
}
public void setPersisted(boolean persisted) {
this.persisted = persisted;
}
//getters/setters/constructors/...
}
Notice that special persisted
transient flag was added. Contract of [CrudRepository.save()
](http://static.springsource.org/spring-data/data-commons/docs/current/api/org/springframework/data/repository/CrudRepository.html#save(S)) from Spring Data project requires that an entity knows whether it was already saved or not (isNew()
) method - there are no separate create()
and update()
methods. Implementing isNew()
is simple for auto-generated keys (see Comment
above) but in this case we need an extra transient field. If you hate this workaround and you only insert data and never update, you'll get away with return true
all the time from isNew()
.
And finally our DAO, UserRepository
bean:
@Repository
public class UserRepository extends JdbcRepository<User, String> {
public UserRepository() {
super(ROW_MAPPER, ROW_UNMAPPER, "USERS", "user_name");
}
public static final RowMapper<User> ROW_MAPPER = //...
public static final RowUnmapper<User> ROW_UNMAPPER = //...
@Override
protected <S extends User> S postUpdate(S entity) {
entity.setPersisted(true);
return entity;
}
@Override
protected <S extends User> S postCreate(S entity, Number generatedId) {
entity.setPersisted(true);
return entity;
}
}
"USERS"
and "user_name"
parameters designate table name and primary key column name. I'll leave the details of mapper and unmapper (see source code). But please notice postUpdate()
and postCreate()
methods. They ensure that once object was persisted, persisted
flag is set so that subsequent calls to save()
will update existing entity rather than trying to reinsert it.
Check out JdbcRepositoryManualKeyTest
for a working code based on this example.
Compound primary key
We also support compound primary keys (primary keys consisting of several columns). Take this table as an example:
CREATE TABLE BOARDING_PASS (
flight_no VARCHAR(8) NOT NULL,
seq_no INT NOT NULL,
passenger VARCHAR(1000),
seat CHAR(3),
PRIMARY KEY (flight_no, seq_no)
);
I would like you to notice the type of primary key in Persistable<T>
:
public class BoardingPass implements Persistable<Object[]> {
private transient boolean persisted;
private String flightNo;
private int seqNo;
private String passenger;
private String seat;
@Override
public Object[] getId() {
return pk(flightNo, seqNo);
}
@Override
public boolean isNew() {
return !persisted;
}
//getters/setters/constructors/...
}
Unfortunately library does not support small, immutable value classes encapsulating all ID values in one object (like JPA does with @IdClass
), so you have to live with Object[]
array. Defining DAO class is similar to what we've already seen:
public class BoardingPassRepository extends JdbcRepository<BoardingPass, Object[]> {
public BoardingPassRepository() {
this("BOARDING_PASS");
}
public BoardingPassRepository(String tableName) {
super(MAPPER, UNMAPPER, new TableDescription(tableName, null, "flight_no", "seq_no")
);
}
public static final RowMapper<BoardingPass> ROW_MAPPER = //...
public static final RowUnmapper<BoardingPass> UNMAPPER = //...
}
Two things to notice: we extend JdbcRepository<BoardingPass, Object[]>
and we provide two ID column names just as expected: "flight_no", "seq_no"
. We query such DAO by providing both flight_no
and seq_no
(necessarily in that order) values wrapped by Object[]
:
BoardingPass pass = boardingPassRepository.findOne(new Object[] {"FOO-1022", 42});
No doubts, this is cumbersome in practice, so we provide tiny helper method which you can statically import:
import static com.nurkiewicz.jdbcrepository.JdbcRepository.pk;
//...
BoardingPass foundFlight = boardingPassRepository.findOne(pk("FOO-1022", 42));
Check out JdbcRepositoryCompoundPkTest
for a working code based on this example.
Transactions
This library is completely orthogonal to transaction management. Every method of each repository requires running transaction and it's up to you to set it up. Typically you would place @Transactional
on service layer (calling DAO beans). I don't recommend placing @Transactional
over every DAO bean.
Caching
Spring Data JDBC repository library is not providing any caching abstraction or support. However adding @Cacheable
layer on top of your DAOs or services using caching abstraction in Spring is quite straightforward. See also: @Cacheable overhead in Spring.
Contributions
..are always welcome. Don't hesitate to submit bug reports and pull requests.
Testing
This library is continuously tested using Travis (). Test suite consists of 60+ distinct tests each run against 8 different databases: MySQL, PostgreSQL, H2, HSQLDB and Derby + MS SQL Server and Oracle tests not run as part of CI.
When filling bug reports or submitting new features please try including supporting test cases. Each pull request is automatically tested on a separate branch.
Building
After forking the official repository building is as simple as running:
$ mvn install
You'll notice plenty of exceptions during JUnit test execution. This is normal. Some of the tests run against MySQL and PostgreSQL available only on Travis CI server. When these database servers are unavailable, whole test is simply skipped:
Results :
Tests run: 484, Failures: 0, Errors: 0, Skipped: 295
Exception stack traces come from root AbstractIntegrationTest
.
Design
Library consists of only a handful of classes, highlighted in the diagram below (source):
JdbcRepository
is the most important class that implements all PagingAndSortingRepository
methods. Each user repository has to extend this class. Also each such repository must at least implement RowMapper
and RowUnmapper
(only if you want to modify table data).
SQL generation is delegated to SqlGenerator
. PostgreSqlGenerator.
and DerbySqlGenerator
are provided for databases that don't work with standard generator.
Changelog
0.4.1
0.4
- Repackaged:
com.blogspot.nurkiewicz
->com.nurkiewicz
0.3.2
- First version available in Maven central repository
- Upgraded Spring Data Commons 1.6.1 -> 1.8.0
0.3.1
- Upgraded Spring dependencies: 3.2.1 -> 3.2.4 and 1.5.0 -> 1.6.1
- Fixed #5 Allow manually injecting JdbcOperations, SqlGenerator and DataSource
0.3
- Oracle 10g / 11g support (see pull request)
- Upgrading Spring dependency to 3.2.1.RELEASE and Spring Data Commons to 1.5.0.RELEASE (see #4).
0.2
- MS SQL Server 2008/2012 support (see pull request)
0.1
- Initial revision (announcement)
License
This project is released under version 2.0 of the Apache License (same as Spring framework).
一、常用快捷鍵:
1.常用操作:
Ctrl+E,可以顯示最近編輯的文件列表
二、常用配置:
/**
2、編寫shell腳步:
#/bin/bash
3、 執行腳本:
備注:
Java多線程技術 --作者:楊帆 文章連接:http://express.ruanko.com/ruanko-express_6/webpage/tech4.html | |||||||
|
2、子查詢刪除:
3、子表刪除:
感謝廖雪峰為大家提供這么好的免費教程,主要目錄如下:
Git教程
gooole瀏覽器內核已經有webkit內核移步到Bilnk開發屬于Chromium Projects 的版本,下面為完整教程。
目錄
一、常用sql一:
select
二、常用sql二:
http://poi.apache.org/spreadsheet/quick-guide.html
Index of Features
- How to create a new workbook
- How to create a sheet
- How to create cells
- How to create date cells
- Working with different types of cells
- Iterate over rows and cells
- Getting the cell contents
- Text Extraction
- Files vs InputStreams
- Aligning cells
- Working with borders
- Fills and color
- Merging cells
- Working with fonts
- Custom colors
- Reading and writing
- Use newlines in cells.
- Create user defined data formats
- Fit Sheet to One Page
- Set print area for a sheet
- Set page numbers on the footer of a sheet
- Shift rows
- Set a sheet as selected
- Set the zoom magnification for a sheet
- Create split and freeze panes
- Repeating rows and columns
- Headers and Footers
- Drawing Shapes
- Styling Shapes
- Shapes and Graphics2d
- Outlining
- Images
- Named Ranges and Named Cells
- How to set cell comments
- How to adjust column width to fit the contents
- Hyperlinks
- Data Validations
- Embedded Objects
- Autofilters
- Conditional Formatting
- Hiding and Un-Hiding Rows
現階段JAVA操作Excel的JAR主要有apache 的POI及jxl.Jxl方便快捷,POI用于對復雜Excel的操作。
Jxl官網:http://www.andykhan.com/jexcelapi/index.html
一、Jxl的API
Jxl的API主要有三個包,jxl,jxl.format,jxl.write。如果單獨的分析API,可能對于更明確的了解此API沒有太多的幫助,我們還是從Excel文件的層次來剝離此API吧。
一個excel文件由一個工作簿組成,一個工作簿又由n個工作表組成,每個工作表又由多個單元格組成。對應于Jxl中的結構為
讀文件(包jxl) | 寫文件(包jxl.write) | 說明 |
Workbook | WritableWorkbook | 工作簿 |
Sheet | WritableSheet | 工作表 |
Cell/Image/Hyperlink | WritableCell/WritableImage//WritableHyperlink | 單元格/圖像/超鏈接 |
單元格(此處指文本單元格,圖像及鏈接和單元格做為一個層次)分為好多種,所以在API的設計中將Cell作為一個接口而存在。 對應的jxl中的結構為:
讀文件(包jxl) | 寫文件(包jxl.write) | 說明 |
Cell | WritableCell | 單元格 |
BooleanCell | Boolean | 布爾值單元格 |
DateCell | DateTime | 時間單元格 |
ErrorCell |
| 形式錯誤的單元格 |
LabelCell | Label | 文本單元格 |
NumberCell | Number | 數字單元格 |
FormualCedll | Formual | 公式單元格 |
| Blank | 空格單元格 |
BooleanFormualCell |
| 布爾公式單元格 |
DateFormualCell |
| 時間公式單元格 |
ErrorFormualCell |
| 錯誤公式單元格 |
StringFormualCell |
| 文本公式單元格 |
NumberFormualCell |
| 數字公式單元格 |
而有的時候,我們可能將幾個單元格作為一個整體來處理,在API中對應的則是:
jxl.Range
雖然數據是電子表格的核心,但是同時其也需要一些輔助類,比如文件格式設置,工作表設置與顯示效果,單元格設置與顯示效果等。按照其層次,則依次有以下接口或類。
讀文件(包jxl) | 寫文件(包jxl.write) | 說明 |
WorkbookSettings | WorkbookSettings(包jxl) | 設置workbook屬性的bean |
SheetSettings | SheetSettings(包jxl) | 設置具體sheet的屬性的bean(比如表頭表底等) |
HeaderFooter | HeaderFooter(包jxl) | 表示表頭表底類 |
HeaderFooter.Contents | HeaderFooter.Contents(包jxl) | 具體表頭表底設置 |
CellFeatures | WritableCellFeautres | 表格內容相關設置(驗證) |
CellReferenceHelper |
| 得到引用單元格相關屬性 |
CellType |
| 表格相關類型 |
CellView | CellView(包jxl) | 表格視圖相關設置 |
CellFormat | WritableCellFormat | 表格顯示樣式設置 |
| BoldStyle | 邊框枚舉 |
| DateFormat | 時間格式 |
| DateFormats | 時間格式枚舉 |
| NumbreFormat | 數據格式 |
| NumbreFormats | 數字模式枚舉 |
| WritableFont | 字體設置 |
| WriteableFont.Fontname | 靜態字體內部類 |
最后,關于Jxl.format包,此包主要是一些與具體樣式有關的接口和枚舉,不進行具體描述。
文章摘自:http://blog.csdn.net/surgent/article/details/5836580
一、小米盒子的最新功能:
1、觀看各種大片電影、電視劇。
2、各種手游、教育培訓。
二、小米盒子的缺陷:
1、用戶直觀搜索相關的視頻太困難,搜索功能太局限。
2、網絡電視不支持,不過現在可以安裝其他視頻軟件來觀看網絡電視。
3、對手機端的安卓apk支持不好。
三、小米盒子的潛力:
1、小米盒子的操作系統采用andriod操作系統,以后可以包含手機上有的一切功能。
2、以后在游戲、教育、影院、購物比手機更有發展潛力。
四、小米盒子的使用技巧:
1、小米盒子最新miniui已經支持root,所以可以安裝一切安卓應用(安裝方法類似手機)。
2、小米盒子系統更新保持網絡暢通。
4、可以將手機片源用電視播放,也可用手機玩游戲。
簡單寫幾個小文字睡覺,希望幫電視盒子打打廣告,以后希望盒子發展得更好,豐富用戶余業觀看在客廳的娛樂體驗。
JSON轉換的四種各種情況:
1. //把java 對象列表轉換為json對象數組,并轉為字符串
2.//把java對象轉換成json對象,并轉化為字符串
String str=object.toString());
3.//把JSON字符串轉換為JAVA 對象數組
4.//把JSON字符串轉換為JAVA 對象
JSONObject jsonobject = JSONObject.fromObject(str);
str = "{\"lendperson\":\"李四\",\"lendcompany\":\"有限公司\",\"checkperson\":\"李四\",

CriteriaQuery cq = new CriteriaQuery(MsgRecordEntity.class, datagrid);
update a_locationservice al,t_kxt_executor_info t
2、修改級聯表:
轉自:http://www.zhishihai.net/diannaowangluo/biancheng/bianchengsixiang/145.html
2、下載附件:
多學一點:劃服務器下載附件
2).struts2下載Excel:
http://blog.csdn.net/weinianjie1/article/details/5941042
myeclipse中的字體看上去比較舒服,但是忽然使用eclipse找不到該字體。具體介紹及解決辦法如下:
myeclipse用Courier New這個字體,但是這個字體在Eclipse中默認是選不出來的。到Eclipse preference--->colors and fonts中 找到選擇字體的地方(選擇字體的下拉菜單中是找不到Courier New的),在左下方有一行藍色的字“顯示更多字體”,點擊后會出現一個新的界面,這里會顯示你機器上所有的字體。找到Courier New后點擊右鍵選擇[顯示],然后關閉這個界面。回到更改字體的界面后你會發現下拉菜單中已經可以選擇Courier New這個字體了。然后將該字體默認即可!
select sp.singer_name as singerName,sp.fans_value as fansValue
From singer_publish sp
where 1=1
order by (case when (sp.fans_value is null or sp.fans_value='' or sp.fans_value<1) then 1 else 0 end ),sp.fans_value;
人們常說程序員的生活枯燥為人刻板,其實這是你不懂程序員,代碼之外,這些高智商的人幽默有趣,論壇常常是他們展現才華的地方,BLOG是他們分享技術的地方,BBS等地方有問題他門總是熱心幫助解答,處理程序異常,修改程序錯誤等。
程序員也是很懂得品味人生的,因為工作影響他門也許會對生活感慨,傷感自己沒足夠或是更多的時間去做工作之外的別的事。陪朋友,親戚,家人、甚至陪女朋友去買套漂亮的衣服的時間都沒有等。但是我個人意見認為,程序員是最誠實、最實用主義及最愛恨分明的,平日工作雖然單調但不乏味。
程序員是最誠實從何談起?
程序員在學習和工作期間幾乎天天和機器打交道,壓根就沒有受欺負或是欺負別人的機會,勤奮的程序員在調試無窮多的程序BUG時,已經深深地接受了“誠實”的教育,不誠實的人,他肯定不想做、也做不好程序員。
為何說程序員是最實用主義?
在10年前我第一次聽說電腦,后來初中文化課程中也開設了叫《計算機信息技術》這么一門課程,當時老師不停的在講臺上給我們講計算機是如何的厲害,但他在我門心里一直只是個神話傳說,上一年的計算機課還沒曾見過真正的計算機的廬山真面目,只是從老師的口中聽說過他是如何的神。從我聽說計算機到后來我學習計算機甚至是現在我從事的計算機的工作,已經過去了10個春夏秋冬了,但是目前最先進的計算機也不具備智能,他其實是笨的他也需要人員去操作,當我成為程序員的那刻我意識到計算機的神話是眾多程序員的汗水堆積起來的。
程序員如何的愛恨分明?
程序員大都喜歡技術挑戰,不喜歡搞測試與維護。高水平的程序員喜歡和高水平的程序員一起工作,我也是這樣的一個人,我怕“與臭棋佬下棋,棋越下越臭”。
也許是因為工作影響,休閑太少吧,程序員大都不喜歡拉幫結派、耍政治手腕。不信,你數數你認識的程序員,有幾個人黨派人士?又有幾個是政府官員?說到這里我想到了窮人,因為我也是窮人之一。窮人為什么總是窮,很難變為富裕的人呢?因為窮人怕,怕付出沒回報,怕投資得不到利益。怕高官怕大人物以至于不趕去和異類人群接觸,始終活動在窮人堆里,又怎么會變得富裕呢?出非出現奇跡,麻雀巢里飛出個金鳳凰。呵呵,說遠了。
何解工作單調卻不乏味?
程序設計的真正含義是什么?
要塑造一個程序員又需要多少時間和經歷呢?又有那些過程呢?學習過程的天空是黑暗的,記得以前在大學的時候,每天起床后的第一件事就是打開電腦,然后洗溯吃飯,接著就是看書寫代碼這些,餓了又去吃飯然后又面對電腦,當困了的時候就倒下睡覺。醒了又爬起來,很少和朋友家人聯系,每天都過著這樣的單調的循環生活,但很遺憾的是我和電腦這么的親密接觸到現在還是不能達到人機合一的境界。
我記得我曾經說過,我最好的朋友是我的電腦,無論我是高興還是煩惱,無論我是興奮還是疲倦,一直陪伴著我的始終是他。但這句話是針對不同的時間到,如果參加工作了,或許工作中的任務、同事之間的友誼、個人生活中的感情等等都將會成為我們的最愛。總的來說是因事而異、因人而異。
餓了就吃,困了就睡,只要時機恰當就進行程序設計。生活、學習及工作融為一體,盡管單調卻不乏味,還能獨享孤獨。
原文連接:http://blog.sina.com.cn/s/blog_883c46a60101a8ez.html
1、程序猿最煩兩件事,第一件事是別人要他給自己的代碼寫文檔,第二件呢?是別人的程序沒有留下文檔。
2、程序猿的讀書歷程:x 語言入門 —> x 語言應用實踐 —> x 語言高階編程 —> x 語言的科學與藝術 —> 編程之美 —> 編程之道 —> 編程之禪—> 頸椎病康復指南。
3、還沒上大學的時候,高三暑假,跑到家那邊的圖書城想買傳說中的C++的書,然后看到一本C#,我一看,嘿,這個++還寫得挺藝術的,重疊起來了,于是把C#買了回來……
4、問:程序猿最討厭康熙的哪個兒子。答:胤禩。因為他是八阿哥(bug)
5、有一天,程序猿們突然發現他們要漲的工資掉到井里啦!大家都很害怕,連忙一個吊著一個,從樹上伸到井里去撈工資。正好他們摸到工資的時候,一個老程序員忽然興奮的大叫:別蠢了,要漲的工資還好好的掛在天上呢!
6、諸葛亮是一個優秀的程序猿,每一個錦囊都是應對不同的case而編寫的!但是優秀的程序猿也敵不過更優秀的bug!六出祈山,七進中原,鞠躬盡瘁,死而后已的諸葛亮只因為有一個錯誤的case-馬謖,整個結構就被break了!
7、生活中程序猿的真實寫照、一款游戲一包煙,一臺電腦一下午。一盒泡面一壺水,一頓能管一整天。
8、程序猿要了3個孩子,分別取名叫Ctrl、Alt 和Delete,如果他們不聽話,程序猿就只要同時敲他們一下就會好的…
9、憲法頂個球!中國的法律都是.txt文件,不是.exe文件。
10、同事說,他在寫i++的時候總覺的自己寫的是 我艸.........有木有同感????
11、程序員,年二十有二,始從文,連考而不中。 遂習武,練武場上發一矢,中鼓吏,逐之出。 改學IT,自撰一函數,用之,堆棧溢出。
12、《桃花庵--程序員版》寫字樓里寫字間,寫字間中程序員; 程序人員寫程序,又將程序換酒錢; 酒醒只在屏前坐,酒醉還來屏下眠; 酒醉酒醒日復日,屏前屏下年復年; 但愿老死電腦間,不愿鞠躬老板前; 奔馳寶馬貴者趣,公交自行程序員; 別人笑我太瘋癲,我笑自己命太賤; 但見滿街漂亮妹,哪個歸得程序員;
13、有一天某程序員去買肉,要了一公斤, 拿到公平電子秤上一稱:"額。。怎么少了24克。。"
14、檢驗代碼質量的唯一標準 = 代碼review時罵的次數 / 代碼review時間 。
15、殺一個程序員不需要用槍,改三次需求就可以了。
16、C++程序員看不起C 程序員, C 程序員看不起java程序員, java程序員看不起C#程序員,C#程序員看不起美工。周末了,美工帶著妹子出去約會了,一群SX程序員還在加班。。。
17、問:如何生成一個隨機的字符串?答:讓新手退出VIM 。
18、“我給你出個腦筋急轉彎,你說達芬奇密碼的上面是什么?” “這。。太難了吧。。不知道。。。” “笨!達芬奇密碼的上面就是達芬奇帳號啊,那達芬奇密碼的下面是什么?”“我。。。這。。。還是不知道。。。”“是達芬奇驗證碼”。
19、隨機函數可以幫你實現家庭和諧: Talk(){:top word(1)="恩!"; word(2)="好的!";word(3)="然后呢?";word(4)="有道理";i=random(4); say word(i) goto top;}
20、程序員愛情觀:愛情就是死循環,一旦執行就陷進去了;愛上一個人,就是內存泄漏--你永遠釋放不了;真正愛上一個人的時候,那就是常量限定,永遠不會改變;女朋友就是私有變量,只有我這個類才能調用;情人就是指針用的時候一定要注意,要不然就帶來巨大的災難。
21、女同學們紛紛表示,這年頭不找個程序員老公,還真是連節日低價購物權都沒了。
22、Delphi象吉普車,什么路上都能開,卻在啥路上也開不好;PB就象卡丁車,只能在固定線路上開,到室外就有些不穩;VC象跑車,你開得起卻買不起,而且一旦發生故障,想修都找不到毛病在哪;Java象敞棚車,不管刮風下雨還是艷陽高照,都能照開不誤;VB就是摩托車,騎的時間越長,你越痛恨它!
23、上聯MYSQL明月三千里 下聯: XHTML.信號他媽爛!
24、程序員的四大理想:南極有套房,澳大利亞有群羊,全世界電腦死光光,孩兒有個娘。
25、有一種崩潰叫密碼輸入有誤;有一種驚慌叫做賬號異地登陸;有一種感情叫隱身對其可見;有一種誤會叫人機離線;有一種失落叫沒有訪問權限;有一種感情叫站點訪問失敗;有一種無奈叫bug無法復現。。。
26、黑體的鋸齒,宋體的滄桑,崩潰的避頭尾集。美工永遠糾結于網站程序員的粗獷,就像MAC永遠不懂PC的憂傷。。。。
27、程序猿追求MM不成,含淚追問:我在你眼里算什么?!MM答曰:真人版的windows優化大師……極客哥們莫傷心,小戴安慰遞紙巾。
28、 據說有一位軟件工程師,一位硬件工程師和一位項目經理同坐車參加研討會。不幸在從盤山公路下山時壞在半路上了。于是兩位工程師和一位經理就如何修車的問題展開了討論。硬件工程師說:“我可以用隨身攜帶的瑞士軍刀把車壞的部分拆下來,找出原因,排除故障。” 項目經理說:“根據經營管理學,應該召開會議,根據問題現狀寫出需求報告,制訂計劃,編寫日程安排,逐步逼近,alpha測試,beta1測試和beta2測試解決問題。” 軟件工程說:“咱們還是應該把車推回山頂再開下來,看看問題是否重復發生。”
29、【高效的程序員】當世界末日還有5分鐘就要到來的時候。程序員: 讓我們在這最后的時刻作些什么吧!女友: 那好,讓我們在做最后一次吧!程序員: 那剩下的4分50秒做什么啊?
30、【開發時間】項目經理: 如果我再給你一個人,那可以什么時候可以完工?程序員: 3個月吧!項目經理: 那給兩個呢?程序員: 1個月吧!項目經理: 那100呢?程序員: 1年吧!項目經理: 那10000呢?程序員: 那我將永遠無法完成任務。
31、一個程序員對自己的未來很迷茫,于是去問上帝。“萬能的上帝呀,請你告訴我,我的未來會怎樣?”上帝說:“我的孩子,你去問Lippman,他現在領導的程序員的隊伍可能是地球上最大的”。于是他去問Lippman。Lippman說:“程序員的未來就是駕馭程序員”。這個程序員對這個未來不滿意,于是他又去問上帝。“萬能的上帝呀,請你告訴我,我的未來會怎樣?”。上帝說:“我的孩子,你去問Gates,他現在所擁有的財產可能是地球上最多的”。于是他去問Gates。Gates說:“程序員的未來就是榨取程序員”。這個程序員對這個未來不滿意,于是他又去問上帝。“萬能的上帝呀,請你告訴我,我的未來會怎樣?”。上帝說:“我的孩子,你去問侯捷,他寫的計算機書的讀者可能是地球上最多的”。于是他去問侯捷。侯捷說:“程序員的未來就是誘惑程序員”。這個程序員對這個未來不滿意,于是他又去問上帝。“萬能的上帝呀,請你告訴我,我的未來會怎樣?”。上帝搖搖頭:“唉,我的孩子,你還是別當程序員了”。
32、面試官:“熟悉哪種語言”。應聘者:“JAVA”。面試官:“知道什么叫類么”。應聘者:“我這人實在,工作努力,不知道什么叫累”。面試官:“知道什么是包?”。應聘者:“我這人實在
33、IT工程師=加班狂+程序員+測試工程師+實施工程師+網絡工程師+電工+裝卸工+搬運工+超人,有同感的轉走。
34、
35、我是個程序猿,一天我坐在路邊一邊喝水一邊苦苦檢查bug。這時一個乞丐在我邊上坐下了,開始要飯,我覺得可憐,就給了他1塊錢,然后接著調試程序。他可能生意不好,就無聊的看看我在干什么,然后過了一會,他幽幽的說,這里少了個分號。。。分號。。。分號。。。
36、女友對程序員說:“紫禁城占得地方好大呀!”程序員:“殺死那個子進程……”
37、從前有個全國管理系統,是孫中山做的設計,老蔣做的實現,結果老毛寫了個病毒,趁著日本黑客對系統做攻擊的當口,拿到了管理員權限,把原來那批程序員給隔離了。老鄧接手以后,重構代碼,出了個2.0版,為了開發速度,遺留了一堆BUG沒處理。人們紛紛質疑:是不是核心構架太單一,雙核會不會好點?
38、一程序員家的水管壞了,他打電話叫來一個水管工修理。 水管工鼓搗了一個小時,終于把管子修好了,他遞給程序員一張600元的帳單。 “600元!”程序員憤怒地說:“我當程序員一天都賺不了這么多錢!” “是啊。”水管工平靜地說,“我當程序員的時候也是。”
39、十年前,女:“對不起,我不會喜歡你的,你不要再堅持了,就好比讓 Linux 和 Windows 同時運行在一臺PC機上,可能嗎?”男生聽后默默走開,十年后,在一次虛擬技術大會上,我聽到一名虛擬技術開發程序員給我講述了這個故事。
40、程序猿問程序媛:"為什么要離開我,我做得還不夠好嗎?" 媛說:"別傻了,我們根本就是兩個世界里的人,就像在JS里永遠都無法調用JAVA類一樣,我們之間也是不可能的。" 猿沉默了很久,轉身離開了。一個月之后,他在開源社區公布了dwr的完整代碼。
41、【程序員被提bug之后的反應】1.怎么可能; 2.在我這是好的,不信你來看看; 3.真是奇怪,剛剛還好好的; 4.肯定是數據問題; 5.你清下緩存試試; 6.重啟下電腦試試; 7.你裝的什么版本的類庫(jdk) 8.這誰寫的代碼; 9.尼瑪怎么還在用360安全 瀏覽器 ; 10.用戶不會像你這么操作的。
42、敲一夜代碼,流兩行老淚;用三種語言,唯四肢受罪 ; 待五更雞鳴,遇驟雨初歇;遂登門而去,佇十里長亭;欲望穿淚眼,無如意郎君;借微薄助力,愿尋得佳偶;成比翼雙鳥,乃暢想云端;卷情網之內,做爬蟲抓取;為連理桂枝,容數據分析;思千里子規,助框廣天地; 念茫茫人海,該如何尋覓?
43、早晨一女生抱著一堆書進了閱覽室,結果警報響了,大媽讓女生看看是哪本書把警報弄響了,那女生把書倒出來,準備一本一本的測。大媽見狀急了,把書分成兩份,第一份過了一下,響了。又把這一份分成兩份接著測,三回就找到了,大媽用鄙視的眼神看著女生,仿佛在說O(n)和O(log2n)都分不清。
44、發現程序員經常熬夜有三個弊端:第一,記憶力越來越差;第二,數數經常會數錯;第四,記憶力越來越差。
45、醫院回來的程序猿一臉的苦逼樣。程序媛:怎么了?程序猿:得了類風濕性關節炎了,我怕會遺傳給下一代啊。程序媛:誰說類風濕性關節炎能遺傳的?程序猿一臉詫異:類不是繼承的嗎?
46、知道JAVA程序員和C程序員的差別嗎?食堂里,吃完飯就走的是JAVA程序員,吃完飯還要自己 收拾的那就是是C程序員。至于為什么會這樣、大家都明白(因為JAVA自帶垃圾回收機制、、、C需要手動釋放內存)←這就是原因
47、計算機系的男同學追班里一女同學,結果此女總是躲躲閃閃。 男的看沒戲,就另找了一個去追,結果這女的不滿意了,質問這男的為啥拋棄她。 男的問:“請教一個電腦問題,如果你點擊一個程序,總是提示‘沒有響應’,怎么辦?” 女的說:“馬上結束任務。” 男的:“對,我也是這樣想的。”
48、一個程序員的吐槽:即要被當做修電腦的,也要被當作做網站的;即要被當作殺毒的,也要被當作盜號的。我要告訴大家,其實我們只是寫代碼的。
49、如果一個足球界的人“猝死”了,會被懷疑和賭球有關;如果一個官員“猝死”了,會被懷疑和貪腐有關;如果一個農民"猝死"了,會被懷疑和拆遷有關;而如果一個程序員猝死了,那他真的猝死了。
50、老婆是操作系統,一但安裝卸載十分麻煩;小秘是桌面,只要你有興趣可以天天更換;情人是互聯網,風光無限花錢不斷;小姐是盜版軟件,用時記著先殺毒。
51、前臺美女三寶:你好,找誰,倒飲料。產品經理三寶:山寨,改版,再推倒。項目經理三寶:進度,流程,做報表。團隊經理三寶:團建,開會,評績效。數據分析師三寶:SQL,Excel,PPT。人事經理三寶:畫餅,忽悠,挖墻腳。設計師三寶:修改,重做,飛機稿。程序員三寶:悶騷,加班,修電腦。
52、對于程序員來說、沒老婆不悲催。悲催的是、沒老婆、控制臺還不停的提示你Error:could not find the object
53、假如生活欺騙了你,不要悲傷不要心急。《代碼大全》會一直陪伴著你……
54、有時候真覺得有些事情如同char*一般,從開始就注定,無法改變。
55、洛陽親友如相問,就說我在敲代碼。
56、"如果你ctrl+alt+del,蹦出任務管理器,你從上到下掃一眼,所有的進程你都認識,知道他們是干什么的,并且知道關掉有什么后果,而且你還能從CPU和內存占用的數字跳動上清楚的知道電腦現在什么狀態,那么你應該沒有女朋友"...........你妹啊
57、用IE6的吃方便面都沒有調料包,你知道不知道......
58、普通青年用IDE(Visual Studio, Eclipse, XCode);文藝青年用VIM, Emacs;二逼青年將IDE設置成VIM模式。
59、程序員換IDE相當于搬家,換主力語言相當于改嫁,換操作系統相當于參加FBI證人保護計劃…
60、有兩個程序員釣魚,其中一個釣到一條美人魚,這個美人魚上半身是美女,下半身是魚,于是這個程序員
61、阿里小米皆自主,百度排名最公平;京東全網最低價,當當愛國很理性;用戶體驗看新浪,網易從來少憤青;豆瓣從來不約炮,人人分享高水平;從不抄襲數騰訊, 開放安全三六零。
62、編程夜當午,手握小滑鼠。誰知編程辛,行行皆“心”苦;頭昏不覺曉,使勁揉眼角。夜夜太辛苦,睡眠知多少;
63、熱火朝天的辦公室,一精壯青年一邊啃著饅頭,一邊看著眼前產品,愁眉緊鎖的他陷入了沉思:產品下一步應該怎么走?如何保證代碼質量?如何縮短項目時間?如何控制項目成本?一個個難題需要他思索,抉擇。此時,傳來項目經理的吆喝:“程旭元,先別敲代碼了!給我修下電腦……”
64、原來《人月神話》不是本奇幻小說! 原來《代碼大全》不是一堆開源代碼!
65、文藝程序員寫代碼追求讓別人看懂,普通程序員追求讓自己看懂,2B程序員則追求讓編譯器能看懂;半年后看自己當初寫的代碼,文藝程序員不知道是自己寫的但很容易看懂,普通程序員知道是自己寫的但是不太容易看懂,2B程序員埋頭看了半天后拍著桌子吼到:“這是哪個SB寫的程序!”
66、我真的想讓這個世界變得更好,但是他們不給我源代碼……
67、【夢醒時分(程序員版)】你說你寫了不該寫的代碼,搞得程序全是bug。你說你定義了不該定義的接口,架構只能重寫。你說你走查過了所有代碼,找不到正確的地方。你說你感到萬分沮喪,甚至開始不打算編程。
68、曾經有很多次機會可以避免bug,將項目按時,保質保量交付給客戶,但我沒有珍惜,等到世界末日,我才意識到,程序員界最痛苦的事莫過于此。如果瑪雅人能給我一次重新選擇的機會,讓22號的太陽依然升起,我會重新做程序員,用代碼改變世界!
69、據一位不愿透露姓名的程序員說,基本上所有客戶的所有要求都能總結為下面這樣一幅對聯,上聯:簡單易用界面好,下聯:穩定高效花錢少,橫批:立馬就要。
70、某女:你能讓微博的人都吵起來,我今晚就跟你走。 某軟件工程師:PHP是最好的語言! 某論壇炸鍋了,各種吵架...。某女:服了你了,我們走吧,你想干啥都行。某軟件工程師:今天不行,我一定要說服他們,PHP是最好的語言。
71、“我愛你”三個字,講出來只要三秒鐘,解釋要三小時,證明卻要一輩子。 “bug”三個字母,發現需要三秒,找到需要三小時,debug卻要一輩子…...
72、生活不僅只是敲代碼,還有...調bug..。
73、本人擅長Ai、Fw、Br、Ae、Pr、Id、Ps等軟件的安裝與卸載,精通CSS、JavaScript、PHP、C、C++、C#、Java、Ruby、Perl、Lisp、Python、Objective-C、ActionScript等單詞的拼寫,熟悉Windows、Linux、Mac OS、IOS、Android等系統的開關機,求一份月薪上萬的工作!
74、剛在公交車上,一小朋友拿著一本英語書,問她爸爸:xxxxxx for 100 years,這里為什么用for呢?她爸說:你看,100 years時間很長很長,要循環100次才行,當然用for呀!我聽到后,恍然大悟!
78、男朋友寫代碼不理我,于是我悄悄改掉了web.xml的一個配置,他搞了兩天都沒調通,我告訴了他,結果他要和我分手,我很傷心,但他的朋友告訴我,他沒砍死你才說明他真的愛你…” “樓主別tm編了,程序員哪來的女朋友!” “SB,誰告訴你我是女的了。”
79、產品經理被綁,蒙眼,驚問:“想干什么?”,對方不語,鞭笞之,產品經理求饒:“別打,要錢?”,又一鞭,“十萬夠不?”,又一鞭,“一百萬?”,又一鞭。產品經理崩潰:“你們TMD到底要啥?”“要什么?我幫你做項目,寫代碼的時候也很想知道你TMD到底想要啥!”
80、某男是程序員,每天半夜三更才回家。某女抱怨:“你就不能提早點回家么?” 某男:“好,一定。” 于是下次某男一直寫代碼到天亮提著油條豆漿才回家。
81、有人說,女程序員再淑女,一旦編程就會暴露自己的身份,習慣性的把前額的頭發往上捋,露出大大的額頭。因為CPU高速運作時需要良好的散熱。
82、兩個程序員在聊天:“我昨天碰到個辣妹。我把她帶回家,馬上就開始如饑似渴地親吻,她就坐在我的鍵盤上,然后……” “你家里也有臺電腦?啥配置啊?”
83、【如何夸程序員?】通用:你這代碼寫得真好看。夸C程序員:你這代碼不看注釋就能懂,寫得真好。夸Ruby程序員:我艸,太神奇了,你怎么做到的!夸Perl程序員:這個正則表達式碉堡了。夸Python程序員:Pythonic!夸Java程序員:你寫的代碼一點都不像Java!
84、昨晚去KTV找小姐。 美女:請問先生需要什么類型的? 我:學過編程的都給我出來! 美女:我就是啊! 我:兩個小時,把Bug給找出來,我著急要! 美女:客官請自重,小女子賣身不賣藝……
85、某程序猿,一直不為女朋友家人所待見。過完年回來,突然宣布說他們準備今年結婚,這讓人很是詫異女方家里何以松口了。本著八卦的心態打聽之后才知道——程序猿春節前自己搞了個小軟件,把女方家的七姑媽、八大姨的春運火車票都給解決了……他真得感謝12306!
86、對于各種凌亂的電腦問題,其他行業的人,以為程序員們什么都會;程序員中的女程序員,以為男程序員什么都會;男程序員中一般程序員,以為技術好的程序員什么都會;技術好的程序員每次都在網上苦苦找答案。。。
87、程序員跟產品經理一起看電視。每個節目看到一半程序員就換臺,看到一半就換臺,幾次之后產品經理終于忍無可忍的咆哮:老子剛看出點意思你就換、剛看出點意思你就換,到底還讓不讓人看啦?!程序員淡定的盯著電視道:你半路改需求的時候我可沒吱過聲!
88、菜鳥:“我該怎么學習WEB編程呢?”大牛:“WEB編程就是一個程序員帶著兩個MM(MSSQL與MYSQL),玩3P(JSP,PHP,ASP),然后學著How to make love(HTML)..”
89、兩程序員向同一個MM求愛,MM說"去環游世界后再來找我!"。碼農A立即收拾行李出發。碼農B繞MM一圈,然后說"hello world!",立即感動了MM。其實他只是習慣在做任何新事情前先確定hello world能跑通而已。
90、【世界上最沒用的幾句話】 1、警察:不要跑! 2、國足:必勝! 3、老師:同學們不要睡了! 4、病人:醫生,您輕點兒! 5、父母:孩子,不要鬧了 !6、罪犯:我是冤枉啊!7、女人:不要嘛!8、男人:我發誓!9、程序員:這個不能實現。
原文連接:http://blog.sina.com.cn/s/blog_883c46a60101a8ex.html
Map<String, Object> rootMap = new HashMap<String, Object>();
package com.microcorecn.common.utils;
2、<數據庫導出>
3、<數據庫導入>
下載地址:http://developer.android.com/sdk/index.html
安裝程序及安裝相應的組建。
2、環境變量的配置:
3、安裝Eclipse插件(Eclipse中安裝配置ADT插件):
http://developer.android.com/sdk/index.html
下載地址:http://dl.google.com/android/adt/adt-bundle-windows-x86-20130219.zip
4、java環境變量的配置:
http://m.tkk7.com/17learning/archive/2013/03/01/395884.html
1、改變eclipse 中代碼字體大小,就是我打進去的java文件的字體大小(colors and fonts)
wiondow--preferences--general--appearance--colors and fonts--java--java editor text font設置為:Courier New