原创 cross domain 訪問其他網站問題

 有人問我,我再問別人也沒看到更好的提示,還是自己google。看到這個例子(http://www.51ajax.com/bbs/viewthread.php?tid=565):     ------------------------

原创 override equals() and hashCode() methods

Saw the hashCode() method used in the FarmerWolfGoatState (a state representation) implementation, but do not know why

原创 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 ba

原创 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

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

by now got three errors, this afternoon.   =============== Manifest-Version: 1.0 Class-Path: ... Main-Class: ... ======

原创 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 th

原创 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 dir

原创 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 i

原创 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);    Sy

原创 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 c

原创 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 f

原创 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 eclipse's Export and ask it

原创 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 asso

原创 presentation tips!

long but very useful tips!   ********************     轉帖一 成功英語演講的祕訣: 開場白、結束語 應對問題 -I will be pleased to answer any ques

原创 How Java handles arguments of a class type.

=====suppose such a method:   public static void openFile(String fileName, PrintWriter stream) throws FileNotFoundExcep