A little bit more...

Wednesday, March 21, 2007

Eclipse CDT CPU Usage 100% Solution

Solution

总的来说是把你的Eclipse使用的JRE换成6.0(早就download在机器上居然没有发现,2006.12.12就final release了,改成open source之后发布的速度快多了,现在都build100+了)的或者IBM的5.0实现,看别人的blog说是Sun的实现6.0以下有bug和 CDT不兼容,我试了BEA的Jrockit5,也是有问题。

换成6.0后,Indexer和Content Assist都没有问题了,不会CPU100%了。

另外,不像[1]里面说的CDT3.0才有问题,最新的CDT3.1.2也还是有这个问题。

Bonus Knowledge

Use something like “-vmargs -Xmx256M” when launching eclipse to use more memory.

Resources

  1. Bugzilla Bug 108242 Full Indexer in CDT3.0 extremely slow or does not work
  2. Eclipse3.2.1中使用CDT经常CPU100%问题的解决方法
  3. Eclipse CDT开发C++速度慢的解决方法
  4. CDT Indexer导致CPU 100%的解决办法
  5. Eclipse+cdt+MinGW 建立C++工程問題


Technorati : , ,
Del.icio.us : , ,
Ice Rocket : , ,
Flickr : , ,
Zooomr : , ,
Buzznet : , ,

Friday, March 16, 2007

Workshops of AOSD'07

Refer to here for all the workshops held at AOSD'07.

Below are the ones that I'm sepecially interested in:

The workshop I'm intersted the most, but not appearing at AOSD'07 is Modeling and Analysis of Concerns in Software .

Thursday, March 15, 2007

AOSD'07 "Report" - By others

Blog Posts About AOSD'07:

  • AOSD Demo a success:Can't figure out what exactly the demo is from this post. I guess it is a eclipse plug-in facilitating jps indicating.
  • AOSD Conference Day 1:About Glassbox, overhead of load-time weaving, possible usage of AOP for run-time verification/debugging, comment on the keynote "Building Robust System", etc.
update (22/03/2007):

No more...

It seems the academic people are too busy to blog. There are few posts about the conference.

Blog APIs

Resources:

  1. Getting Started with the MetaWeblog API for Windows Live Spaces
  2. Blogger Data API Developer’s Guide
  3. More…


Technorati : , ,
Del.icio.us : , ,
Ice Rocket : , ,
Flickr : , ,
Zooomr : , ,
Buzznet : , ,

Wednesday, March 14, 2007

URI, URL and Java

This post basically is a collection of resources.

1. What're URI, URN and URL?

A URI is a uniform resources identifier reference. A URL is a uniform resource locator. URNs name resources but do not specify how to locate them. The mailto, news, and isbn URIs shown above are examples of URNs. URLs and URNs both fall into URIs. But normally URNs and URLs doesn't interset. Refer to RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax for the syntax of a URI instance. And the java class description of URI gives a very good summary of URI, besides providing some useful resources.

2. Syntax

Below is a little breakdown on the syntax of URI, which is directly taken from the priviously mentioned JAVA API spec.

At the highest level a URI reference (hereinafter simply "URI") in string form has the syntax:

[scheme:] scheme-specific-part [#fragment]

where square brackets [...] delineate optional components and the characters : and # stand for themselves. With a further breakdown on scheme-specific-part we can get a URI in the string form:

[scheme:] [//authority][path][?query] [#fragment]

where the characters :, /, ?, and # stand for themselves. With a further breakdown on authority we can get a more general form:

[scheme:] [// [user-info@]host[:port] ] [path] [?query] [#fragment]

where the characters @ and : stand for themselves.

Note: a scheme of a URL is called a protocol, such as "http" and "ftp".

3. Examples

An opaque URI is an absolute URI whose scheme-specific part does not begin with a slash character ('/'). Opaque URIs are not subject to further parsing. Some examples of opaque URIs are:

mailto:java-net@java.sun.com /*URN*/
news:comp.lang.java /*URN*/
urn:isbn:096139210x /*URN*/

A hierarchical URI is either an absolute URI whose scheme-specific part begins with a slash character, or a relative URI, that is, a URI that does not specify a scheme. Some examples of hierarchical URIs are:

http://java.sun.com/j2se/1.3/ /*URL*/
docs/guide/collections/designfaq.html#28
../../../demo/jfc/SwingSet2/src/SwingSet2.java
file:///~/calendar

Also URIs are categorized as absolute URIs and relative URIs. An absolute URI specifies a scheme, and a URI that is not absolute is called a relative URI.

Among above examples comments in the form of "/*...*/" tell which are URLs and which are URNs.

4. Character categories

As specified in resources accessible, we quote some that matters:

RFC 2396 specifies precisely which characters are permitted in the various components of a URI reference. The following categories, most of which are taken from that specification, are used below to describe these constraints:
alphaThe US-ASCII alphabetic characters, 'A' through 'Z' and 'a' through 'z'
digitThe US-ASCII decimal digit characters, '0' through '9'
alphanumAll alpha and digit characters
unreservedAll alphanum characters together with those in the string "_-!.~'()*"
punctThe characters in the string ",;:$&+="
reservedAll punct characters together with those in the string "?/[]@"
escapedEscaped octets, that is, triplets consisting of the percent character ('%') followed by two hexadecimal digits ('0'-'9', 'A'-'F', and 'a'-'f')
otherThe Unicode characters that are not in the US-ASCII character set, are not control characters (according to the Character.isISOControl method), and are not space characters (according to the Character.isSpaceChar method) (Deviation from RFC 2396, which is limited to US-ASCII)

The set of all legal URI characters consists of the unreserved, reserved, escaped, and other characters.

Escaped octets, quotation, encoding, and decoding


RFC 2396 allows escaped octets to appear in the user-info, path, query, and fragment components. Escaping serves two purposes in URIs:
  • To encode non-US-ASCII characters when a URI is required to conform strictly to RFC 2396 by not containing any other characters.

  • To quote characters that are otherwise illegal in a component. The user-info, path, query, and fragment components differ slightly in terms of which characters are considered legal and illegal.
These purposes are served in this class by three related operations:
  • A character is encoded by replacing it with the sequence of escaped octets that represent that character in the UTF-8 character set. The Euro currency symbol ('\u20AC'), for example, is encoded as "%E2%82%AC". (Deviation from RFC 2396, which does not specify any particular character set.)

  • An illegal character is quoted simply by encoding it. The space character, for example, is quoted by replacing it with "%20". UTF-8 contains US-ASCII, hence for US-ASCII characters this transformation has exactly the effect required by RFC 2396.

  • A sequence of escaped octets is decoded by replacing it with the sequence of characters that it represents in the UTF-8 character set. UTF-8 contains US-ASCII, hence decoding has the effect of de-quoting any quoted US-ASCII characters as well as that of decoding any encoded non-US-ASCII characters. If a decoding error occurs when decoding the escaped octets then the erroneous octets are replaced by '\uFFFD', the Unicode replacement character.
5. Java Impl.

URI, URL, URLClassLoader, URLConnection, URLDecoder, URLEncoder and URLStreamHandler, which are all located in package java.net.

Resources:
  1. Uniform Resource Identifiers (URI): Generic Syntax

  2. Format for Literal IPv6 Addresses in URL's

  3. JavaTM 2 Platform Standard Edition 5.0 API Specification
Technorati : , , ,
Del.icio.us : , , ,

About Me

My photo
I'm finishing my master degree in Software Engineering, Computer Science. I believe and have been following what Forrest Gump's Mam said: you have to do the best with what god gave you.