自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(37)
  • 收藏
  • 关注

原创 Basic jpa and hibernate concepts

== SessionFactory vs EntityManagerFactorySessionFactory: Hibernate interfaceEntityManagerFactory: JPA standard interfaceBest practice is to use JPA, the EntityManager. In case you missed f

2015-11-16 15:11:37 332

原创 VirtualBox shared folder setup

As I always forgot how to do it, now let me write it down.==Host machine is Windows. Guest machine is Ubuntu (very old version).1, On host machine, choose a folder to share with guest ma

2015-11-16 08:12:47 532

原创 Some solutions for simple errors/exceptions when setting up Spring

== When setting up a simple Spring project that maps object from/to Json:A simple GET request received a 406 error from Tomcat:The resource identified by this request is only capable of generati

2015-11-04 15:12:30 282

原创 Install postgres in my old ubuntu system

Install postgres in my old ubuntu system: 12.04 (precise) (based on the introduction at http://www.postgresql.org/download/linux/ubuntu/)1, Create a new file at the following location:cd /

2015-03-09 10:44:34 383

原创 db trace

set autotrace on stats;set autotrace trace stat;

2013-06-15 02:15:38 435

原创 install Apache web server on Ubuntu!

What I need is just a simple web server that can serve light load request. Just had a google, and found a good video for a simple install. So simple. Here is my command history:  107  sudo apt-g

2012-12-03 10:35:43 362

原创 Errors I got in django cms configurating process

Just want to find some templates to use in django cms, then I  downloaded "django-cms-themes pluggable app", followed the steps (http://www.djangocmsthemes.com/getting-started/):install the django

2012-09-17 09:05:46 328

原创 The errors I got before seeing the acutal django cms page...

After going through this tutorial (http://docs.django-cms.org/en/2.2/getting_started/tutorial.html), before seeing the cms page, I got erros as followed (in fact, very naive problems, just not much he

2012-09-17 07:22:57 624

原创 some practice with django (still before the real world appears..)

It is hard for beginner to add packages to python. I really did not know where they could be found.http://docs.python.org/install/index.html#modifying-python-s-search-path gives good introdu

2012-09-16 10:36:04 390

原创 Read the value of a cookie in Jmeter

Just found that there is one property of Jmeter that I can set so as to get the value of a cookie.The following is from Jmeter site (http://jmeter.apache.org/usermanual):"Received Cookie

2012-09-16 07:32:57 663

原创 instead of WIN7, switch to Ubuntu...

Since I decided to try django, I found it is so hard to make the work done...In the beginning, I did not get big problem of using Python. This made me feel that quiting Drupal for Django is a

2012-09-10 09:57:44 327

转载 JUnit Test Infected: Programmers Love Writing Tests (zz)

did not get time to read much. keep it here for later reading!==http://junit.sourceforge.net/doc/testinfected/testing.htm

2012-01-12 08:59:07 866

原创 update manifest.mf of a jar file

The command is:jar umf pathinfo.txt test.jarThe option used is "umf", test.jar is an existing jar file, which is created through Eclipse and contains only simple class information (... Using E

2011-10-21 03:44:04 384

原创 pdf creation in unix

Just (just!) learn from my advisor... so tu am I...In Unix:1, just make a ".tex" file, e.g., "my.tex";2, use command "latex my"

2011-08-31 07:34:22 188

原创 xampp's mysql

I want to try drupal again locally. This artical gives good introduction for the installation: http://drupal.org/node/307956. XAMP

2011-07-04 04:06:30 283

原创 Eclipse and Java heap space (plus .dll)!!!

Java heap space in Eclipse.".dll" in Eclipse.

2011-03-12 06:47:00 1323

原创 Merge several pdf files together in Latex!!!

/documentclass{article}/usepackage{pdfpages}/begin{document}/includepdfmerge{summary.pdf,-}/includepdfmerge{me.pdf,-}/includepdfmerge{expectations.pdf,-}/end{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Note that we need to use "pdflatex" to c

2011-02-20 10:35:00 436

原创 Latex: put two separate figures horizontally (not sub figure)

<br />/begin{figure}[h]<br />/begin{minipage}[t]{0.45/linewidth}<br />/centering<br />/includegraphics[width=/textwidth]{name_of_picture1.eps}<br />/caption{your caption /label{your label}}<br />/end{minipage}<br />/hfill<br />/begin{minipa

2010-12-03 04:34:00 813

原创 Latex's subfigure

Tried so hard to merge several figures into one, as required by a reviewer. This should be a easy task if all the figures I wanted to merge together are pictures. I could just follow the easy one shown in wiki:%-----------------------------------/usepackag

2010-08-16 12:25:00 2180

原创 android:id and id are not same...

You need to be careful when defining the xml elements of layout. In the layout, mostly I specified the id by "android:id". When I used "id" mistakenly, "findViewByI()" cannot find the view (e.g.,

2010-05-24 02:17:00 346

原创 presentation tips!

long but very useful tips! ********************  转帖一成功英语演讲的秘诀:开场白、结束语应对问题-I will be pleased to answer anyquestions you may have at the end of the presentation.-Please canyou

2010-05-17 00:14:00 691

原创 Some linux commands I used

quota username ---- to get the quota of current user;rm -r cloud ---- remove the whole file in the folder (cloud is the folder name);find cloud -type f | wc -l ----check the file number inside thi

2010-03-23 00:58:00 257

原创 How Java handles arguments of a class type.

=====suppose such a method: public static void openFile(String fileName, PrintWriter stream) throws FileNotFoundException{   stream = new PrintWriter(fileName);}  =====then we want to

2010-03-16 08:01:00 276

原创 the use of Latex for paper writing

A latex file (.tex) need to have a document type, specified like this "/documentclass{myclass}". Each class has an associated *.cls file in the system directories which is read in at start-up time. If

2010-03-16 05:49:00 607

原创 what is gradient?

I saw the term used in a paper, but really cannot remember what it is and what it means. Forgot too much about those basic mathematic concepts... Here is from wiki: http://en.wikipedia.org/wiki/Gr

2009-10-03 04:44:00 355

原创 Poisson distribution problem

I need to generate a set of numbers with Poisson distribution, given a lambda. I got a piece of code from Internet as follows: ---------------------------------------------------------------------

2009-06-15 11:35:00 418

原创 how to make a JAR file

It is easy when you do not refer any other jar files in your project. You may directly use eclipses Export and ask it to generate the manifest.mf for you. You can get a JAR file directly. But if

2008-12-07 12:04:00 858

原创 manifest.mf writing errors...(crazy!)

by now got three errors, this afternoon. ===============Manifest-Version: 1.0 Class-Path: ...Main-Class: ...=============== "invalid header field":because I need to refer to a lot of j

2008-12-07 09:32:00 430

原创 how to use thread

Just got a problem which wasted me some time. The problem is just: Regarding a procedure A, which mainly implements a work B, I want to use a progress bar to show the progress of the work of B, be

2008-12-06 05:49:00 452

原创 How to do reasoning/inference based on Jena

Just realize how to do real reasoning by Jena.  Before I just used Jena to query the statments expressed explicitly in ontology. That works, but is so simple, and cannot implement the real reasoni

2008-11-16 07:19:00 1332

原创 get the header content from some website, in java

just help one friend for writing some java code to access the meta data of the header of some websites response: =====================================import java.io.BufferedReader;import java.i

2008-11-06 04:16:00 441

原创 cross domain 访问其他网站问题

 有人问我,我再问别人也没看到更好的提示,还是自己google。看到这个例子(http://www.51ajax.com/bbs/viewthread.php?tid=565):   ----------------------------------------------------------------------------------------------------

2008-10-29 05:41:00 522

原创 Elements of ArrayList of java, cloned, not reference

  String s = "haha";  ArrayList x = new ArrayList();  x.add(s);    s = "changed";    String y = (String)x.get(0);    System.out.println(y);  ---------------------------------output haha  =

2008-10-23 07:04:00 236

原创 The use of "." or not for current directory, in Java

Just got one exception when I wanted to use a local file inside a local directory:File f = new File("/data/a.xml");FileReader r = new FileReader(f);I got "java.io.FileNotFoundException". I used "/data

2008-10-21 00:19:00 418

原创 java layout

javax.swing.BoxLayout  =================== java.awt.GridLayout   import java.awt.*; import java.applet.Applet; public class ButtonGrid extends Applet {     public void init() {         s

2008-10-13 08:55:00 1499

原创 Difference between PrintWriter and PrintStream

 Most programs should use readers and writers to read and write information. This is because they both can handle any character in the Unicode character set (while the byte streams are limited to ISO-

2008-10-06 04:54:00 685

原创 override equals() and hashCode() methods

Saw the hashCode() method used in the FarmerWolfGoatState (a state representation) implementation, but do not know why there should be such an overriding. equals() and hashCode() are the default m

2008-10-05 05:00:00 563

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除