Yin Ming

Ranch Hand
+ Follow
since Oct 12, 2001
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Yin Ming

how deep?
[ February 01, 2002: Message edited by: Yin Ming ]
19 years ago
I sa some samples in IBM's site, they use servlet to parse form params, invoke actions, query data from data services, and construct the data object, put them to the session or context. then forward to jsps, jsps get data object from session and context, and format them to page. someone said this is the mvc module, I want to know more about it. is there a red or white book for it?
19 years ago
anyone have tested it? does it realy provide "high" performance
graphics? how "high" it is? (under Windows and Linux)
but the doc says:
Nevertheless, this mode is critical for performance and is necessary
for enabling hardware page-flipping on Windows.
what is it meaning? my display card is Permedia II, it supports
DirectX and openGL,(it is a professional 3D card, well, at least it
was) so it suports this "full screen mode", right?
btw: that says "hardware page-flipping on Windows" does it mean that
only Windows support "double buffering on hardware level"? what about
linux(redhat7) and openGL? doesn't them support hardware
Best Regards,
Yin Ming
19 years ago
thanks Michael, but my question is just how to "must explicitly coordinate with the supertype to save its state.
I know if the supertype also implements Externalized, I can call <code>super.writeExternal();</code> in sub class's writeExternal() method (is this right?). but if the supertype doesn't implements Externalized? if it implements Serialized, how to write the instance of supertype? I can't refer it
19 years ago
hi all. something about Externalized. If I construct a class which implements Externalized interface, and serialize not only this's data members but also the base class's in the read/writeExternal(), what shall I do?
I know an answer is make the base class implements Externalized too. then call super.read/writeExternal() within this.read/writeExternal(). if the base class inherit another class, and so on, so I must write read/writeExternal method for each class?
19 years ago

Originally posted by ravish kumar:
I think the only type which is unsigned is 'char'.
so there is nothing like "unsigned byte".

yes that's the core of problem.
[This message has been edited by Yin Ming (edited November 15, 2001).]

Originally posted by ravish kumar:
Hi Yen
Thanks!! but I wanted to know why after integral promotion 0x91 becomes 0xffffff91 instead of 0x00000091.
Thanks in advance
sorry , becoz my badly speaking in English, I cannot explain it clearly. the binary form of 0x91 is :
U see the highest bit is 1. this is where the negative sign sits. Java thinks that it's a negative number so parses it as a -111. then why does the -111 represent 10010001? its not easy to explain, let me have a try:
the binary form of negative is calculated by these step:
1.first, the positive 111's bit pattern is: 01101111
2.then do the binary not: ~01101111=10010000
3.add 1: 10010000+1=10010001. this is the binary form of -111
this is a fundamental subject of computer. hope this can help

thanx to jain. that's a good idea.
follow your point, I find this is better:
b & 0x000000ff that clear the hight 24 bits but remain the lower 8 bits.
your second post seid the "readUnsignedByte()", do you mean return a int such as 0x00000091? that's good too. what a clever guy!
thanx alot.

Originally posted by ravish kumar:
Why 0x91 is treated as -111 ??
Thanks in advance

try this:
<code>byte b=(byte)0x91;
0x91 = 10010001
this is the binary form of -111.
hi all:
I read RHE and met the problem: how to shift a unsigned binary byte?
Suppose I am reading unsigned bytes from a IO port, then I want to right shift them 1 bit, since this is a device application, I must use byte(8 bits) to interact with binary bits. but the integal promotion break this. Java treat the 0x91 as a -111 and fills the high 24 bits with 1.(0xffffff91) so :
<code>byte buf=(byte)IOPort.read();//such as 0x91, so explicity cast
becoz of the integal promotion, the 0x91 firstly be converted to 0xffffff91, after right shifting it 1 bit, I get the 0x7fffffc8, cast it to byte, I get a 0xc8 finally. it is not the 0x48 what I expect.
10010001byte buf=0x91;
1111111..110010001integal promotion, buf to int
0111111..111001000right shift 1 bit
11001000cast to byte.
this is what I expect:
10010001a unsigned binary byte
01001000after right shift
what can I do if I must deal with 8bits data?
yes Ragu is right. I heard that the finally is always executed regardless of whether there is any return or exception been thrown before. and if there is a return in the finally , the exception thrown before will be lost. becoz Java throw the new exception at the end of try-catch-finally block, so the return in finally will break this.
correct me plz
yes I cannot reach the www.geocities.com too. I'm in china. but the others are OK, like here and the Sun. are u in china now?
if a frame been disposed, can it restort again?
hi all. I post this here becoz I have not been a scjp even. but I am interested on the scjd and more programing experience with java.
I can pass the scjp (though i have not jet ), I can write a program now, but I cannot write a actual application. I cannot design whole application with OO. so my codes are "write once, litter at once". I read some OO books, but cannot get the practical experience. so can the scjd school me with practical programming?
could anyone show me a scjd assignment to let me know what its training?
hi all, could anyone explain the painting mechanism of awt or swing plz? i am confused on that. i's like to know what happened one by one.