| OT- interesting article in the NY Times |
|
 |
Index ‹ java-programmer
|
- Previous
- 2
- need help with JTabbedPaneHello all
I have a JTabbedPane with 6 Tabs (each Tab contains a JPanel). I want to
separate them into two groups: put 3 Tabs at the top left and 3 Tabs at
the top right of the JTablePane.
If it is possible, please help
Many thanks
S.Hoa
- 3
- wholesale LV shoes(paypal accept)(www.all-wholesaler.com)paypal"Pirce change, Quality not change", we have adjusted price, we have
the best price.
Please visit our website (www.all-wholesaler.com), there are over
10,000pcs products on it, please browse and select what you would like
to order.
All-wholesaler Co., Ltd. is a professional manufacturer and exporter
with Wholesale Styles:Jeans Apparel, Jackets, Coat, Sweater, Suits,
Shirts, Hoody, Jeans, Boot, Shoes, Handbags, Purse, Wallets,
Sunglasses, watches, Scarves, Underwear, Bikinis, Short, Hat, Belt,
Pen, Ipod and etc, our products are Good Price with Excellent
Quality.
Our market includes Southeast Asia, North and South America; Oceania
and European countries. We have been setted up stable and credit-
standing relationship with many customers all over the world, and we
also have many chinese customers such as Guandzhou/Quanzhou/putian
etc.
More choice and surprise, welcome to visit our website, most of
products are marked price, please down load an order form and fill in
it, send product lists (product no. color size quantity etc) to us, we
shall fill in price lists and compute shipping cost, check whether all
products you order are in stock now, reply your email in 24hours.
We accept large & mini small quantity order, mixed order and sample
order. We will give best price to begin business with you. High
quality, hot style and competitive price are the main features of our
products.
We often ship by EMS DHL TNT Fedex AAE UPSetc, EMS/TNT shipping time
is 5-9 working days, DHL/Fedex shipping time is 3-4 working days, We
ship the small order by carrier of EMS. we shall refer to safety/
quantity/weight/speed, then select the best shipping type, of course,
we should ship by that you demand. our terms of payment is paypal
western union or bank wire transfer(TT) before shipping,we prefer
paypal!I hope it is available for you.
Welcome to visit our website (www.all-wholesaler.com) to know more
information. thank you very much!If you have any questions, please
contact us (MSN/Yahoo Messager/Email) or visit “how to order” of our
website, thanks.
MSN: email***@***.com
Yahoo Messanger:email***@***.com
Home Website: www.all-wholesaler.com
Home Website: www.all-wholesaler.com
Home Website: www.all-wholesaler.com
Home Website: www.all-wholesaler.com
Home Website: www.all-wholesaler.com
Home Website: www.all-wholesaler.com
Home Website: www.all-wholesaler.com
Home Website: www.all-wholesaler.com
payment:paypal,western union,moneygram,china bank
we prefer paypal!
sneaker wholesaler(paypal accept)(www.all-wholesaler.com)
hoodie supplier(paypal accept)(www.all-wholesaler.com)
air jordan factory(paypal accept)(www.all-wholesaler.com)
nike seller(paypal accept)(www.all-wholesaler.com)
jeans wholesaler(paypal accept)(www.all-wholesaler.com)
jacket supplier(paypal accept)(www.all-wholesaler.com)
air max 87 wholesaler(paypal accept)(www.all-wholesaler.com)
jeans factory(paypal accept)(www.all-wholesaler.com)
nike wholesaler(paypal accept)(www.all-wholesaler.com)
sneaker supplier(paypal accept)(www.all-wholesaler.com)
gucci seller(paypal accept)(www.all-wholesaler.com)
dunk factory(paypal accept)(www.all-wholesaler.com)
hoody wholesaler(paypal accept)(www.all-wholesaler.com)
bag supplier(paypal accept)(www.all-wholesaler.com)
hat merchant(paypal accept)(www.all-wholesaler.com)
r3 wholesaler(paypal accept)(www.all-wholesaler.com)
r4 factory(paypal accept)(www.all-wholesaler.com)
china sneaker merchant(paypal accept)(www.all-wholesaler.com)
bape wholesaler(paypal accept)(www.all-wholesaler.com)
TN supplier(paypal accept)(www.all-wholesaler.com)
prada merchant(paypal accept)(www.all-wholesaler.com)
women jordan wholesaler(paypal accept)(www.all-wholesaler.com)
air max LTD wholesaler(paypal accept)(www.all-wholesaler.com)
adidas seller(paypal accept)(www.all-wholesaler.com)
shox supplier(paypal accept)(www.all-wholesaler.com)
belt wholesaler(paypal accept)(www.all-wholesaler.com)
air max 90 merchant(paypal accept)(www.all-wholesaler.com)
air max360 wholesaler(paypal accept)(www.all-wholesaler.com)
good quality sneaker(paypal accept)(www.all-wholesaler.com)
- 3
- BufferedReader.readline() behavior with Socketshi !
Here the piece of code that creates my BufferedReader object
--- code ---
Socket socket = new Socket(....);
BufferedReader inSocket =
new BufferedReader(
new InputStreamReader(
m_socketService.getInputStream()));
--- /code ---
My request concerns the method readline() of this object. According to
what I understood of my readings, I expect from this method it blocks
itself until data comes to the socket.
Is that correct? Because in my implementation, this method returns
always null if there is no data to read. So I have to write this
--- code ---
String requete;
if ((requete = inSocket.readLine()) != null)
{
// do something
}
--- /code ---
And that sounds bad to me. It's like an infinite loop...
Thanks a lot for your precious advices.
-o--
- 4
- java cannot call bat filehi all ,
i have a problem . i am trying to call a bat file from java. When i
test using a exe file. I can call the exe file, but when its a .bat. it
just doesnt seem to work. here is the code:-
File[] fdrives = File.listRoots();
Runtime run = Runtime.getRuntime();
try {
frame.dispose();
JOptionPane.showMessageDialog(null,"Start Installation");
Process
pp=run.exec("D:\\EAServer_v4_Developer\\SilentInstall_Win.bat");
JOptionPane.showMessageDialog(null,"Installation Complete");
}
catch (Exception e) {
JOptionPane.showMessageDialog(null,"Error occured");
}
the location of the bat file is correct. Its a silent installation for
EAServer. Does anyone have any idea how come this happen ? Please help
or advice.
@ could mail me at email***@***.com also. :)
Thanks.
marvin.
- 4
- 4
- Finding help on Events and a small asideHi Guys,
I am writing a java application using lots of visual components. The Java
API help is good in that it tells me about all the constructors, methods and
fields associated with a given object but where can I find similar help on
the events that can be implemented.
I know I can probably just ask my question and get an answer on a group but
I am kind of a self help junkie and I tend to dislike bothering people and
sending excess emails.
And now my small aside
The question arises due to the fact that I want to utilize a JTextField but
only allow integers to be entered and I am looking for the right events to
use to do things like the following.
Any hints or other options would be appreciated
Stop people entering letters or invalid characters via key-presses (probably
a key-press event where I can gobble up erroneous keys but I still need to
allow field tabbing and backspace del etc)
Stop people entering letters via pasting (so switch off CTRL+V etc may
encounter cross platform issues on Mac and Unix)
Thanks Guys,
Eamon
- 5
- uri in taglib jsp while developing witheclipseHi,
I build a new JAVA project using New->project->java project in
eclipse.
I added a new JSP file and would like to know how do i declare the uri
of the taglib file and where i should locate it, since i don't have in
that project the web.xml file.
for example:
<%@ taglib prefix="cs" uri="myDir/myFile" %>
where should myFile be located? or what's the beginning point that it
starts searching the file?
- 7
- AppletsHi all,
I'm sure this is old hat to all of you but could someone please tell
me if you can use FileReader to input data into an applet?
I developed this project as an application and am just trying to put
it on my website as an applet but it keeps saying "applet notinited".
I figure it might be because the program needs access to a file
- 7
- Eclipse Plugin- UML Toolbar removalRecently I have uninstalled some Eclipse plug-ins from Eclipse 3.1. These
are from Visual Paradigm and are related with UML Modeling. Though all the
applications have been properly uninstalled from the computer, the toolbars
associated with these plug-ins are still there in the IDE.
How to remove it? How to remove a toolbar from Eclipse?
- 7
- What is the JMF?I just downloaded the Java Media Framework, but it doesn't make much sense
to me. Is it supposed to be an optional API?
If so, I don't see any demos, javadoc, etc....
The file I downloaded was called jmf-2_1_1e-windows-i586.exe.
--
Josef Garvi
"Reversing desertification through drought tolerant trees"
http://www.eden-foundation.org/
new income - better environment - more food - less poverty
- 7
- adding your own styles to Javadoc so that they work automatically?I've managed to get my own styles into the Javadoc
"package.html" file; even though javadoc nukes the
"<head>...</head>" part of the file; this works when
inserted into the _body_ up toward the top, a bit of a
happy surprise to me, I expected it _had_ to go into
the <head>...</head> part:
<style>
span.tbd { font-weight: 700; color: red }
body { background-color: #FFFFFF ; background:
url("http://www.well.com/user/xanthian/images/webback.gif") }
</style>
Well, fine, that's because the original is a *.html
file, making things work fairly naturally.
Things aren't so nice for the *.java files, though.
This definitely does _not_ work at the top of a
*.java file to accomplish the same two style
declarations:
/**
* <style>
* span.tbd { font-weight: 700; color: red }
* body { background-color: #FFFFFF ; background:
url("http://www.well.com/user/xanthian/images/webback.gif") }
* </style>
*/
[Excuse if moronic Google Groups has probably
wrapped the "body" line, that's supposed to be all
one line in both cases.]
Is there some easy way to make this work, so that I
can have my Javadocs pages decorated with my
favorite spiderweb background design, without having
to edit by hand the stylesheet.css that javadoc() emits,
after running javadoc(), _every single time_ I run
javadoc() (which is many times an hour when I'm
working on cleaning up the javadoc output, and so is
an insufferable nuisance)?
IMWTK
xanthian.
- 10
- 11
- Why no compiler-warning at invalid array-initializing ?I was wondering, why doesn't the java-compiler warn
for incorrect initializing of arrays, for example :
int[] myArray = new int[2];
myArray[3] = 1; // Runtime-error : ArrayIndexOutOfBoundsException.
Isn't it very easy for the compiler to detect this
kind of invalid code ?
- 11
- how to get total number of rows contained in a resultsetHi friends
how to get the number of rows contained in filteredrowset or a simple
resultset.
Thanx in advance
praveen
--
praveen homkar
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200508/1
- 12
- Simple Newbie Question? Is This kind of things possible with Java3DHi,
Firts of all, I hope that my English can be understood, I hope so...
I'm very new to Java3D and have been surfing a bit on the net after soms
examples of thing that are possible with Java3D
Now I would like to know if the following is possible.
I would like to know if I can - and how it could be done - to add two simple
beams (rectangles in 3D) to the screen. Can this be done with some simple
xyz-coordainates that I have to give? Because in my final application I
would have to build some model that exists out of multiple beams (not cubes
only, different width, height en depth). I could easyli have the coordinates
of those objects, but is this enough or do I have to knwo some about
clipping (or does Java do that automatically?).
Also, those independant objects could be next to each-other (in 3D). Give
this problems? The only example I have seen so far (that sounds like my
problem) is the colored cube. But my object would have only the frames, I
should be able to look through the objects (damn, don't know the word at the
time...)
So can this be done. Maybe some more experienced people can give me a litlle
bit of code where thera are 2 beams, so that I can see the result, and knwo
if it is possible or not. Ohterwise, I should look for some other
techniques... If the result is acceptable, then I would read a lot of books
of course...
thanks very much
Goethals Frederik
|
| Author |
Message |
solaris804

|
Posted: 2004-1-28 0:39:00 |
Top |
java-programmer, OT- interesting article in the NY Times
New York Times
http://www.nytimes.com/2004/01/26/opinion/26HERB.html
----------------------------------------------------------------------
----------
January 26, 2004
OP-ED COLUMNIST
Education Is No Protection
By BOB HERBERT
The conference was held discreetly in the Westin New York hotel in
Times Square last week, and by most accounts it was a great success.
The main objections came from a handful of protesters who stood
outside in a brutally cold wind waving signs that said things
like "Stop Sending Jobs Overseas" and "Put America Back to Work." No
one paid them much attention.
The conference was titled "Offshore Outsourcing: Making the Journey
Work for Your Corporation." Its goal was to bring executives up to
speed on the hot new thing in corporate America, the shipment of
higher-paying white-collar jobs to countries with eager, well-
educated and much lower-paid workers.
"We basically help companies figure out how to offshore I.T.
[information technology] and B.P. [business process functions]," said
Atul Vashistha, the chief executive of NeoIT, a California consulting
firm that co-hosted the conference.
Several big-name corporations had representatives at the conference,
including Procter & Gamble, Motorola, Cisco Systems and Gateway.
Because the outsourcing of white-collar jobs is so controversial and
politically charged (especially in a presidential election year),
there was a marked reluctance among many of the participants to speak
publicly about it. But Mr. Vashistha showed no reluctance. He was
quick to proselytize.
"These companies understand very clearly that this is a very painful
process for their employees and for American jobs in the short term,"
he said. "But they also recognize that if they don't do this, they
will lose more jobs in the future and they won't have an ability to
grow in the future."
He said his firm had helped clients ship about a billion dollars'
worth of projects offshore last year.
Noting that he is an American citizen who was born in India, Mr.
Vashistha said he is convinced that outsourcing will prove to be a
long-term boon to the U.S. economy as well as the economies of the
countries acquiring the exported jobs.
Whether it becomes a boon to the U.S. economy or not, the trend
toward upscale outsourcing is a fact, and it is accelerating. In an
important interview with The San Jose Mercury News last month, the
chief executive of Intel, Craig Barrett, talked about the integration
of India, China and Russia ?with a combined population approaching
three billion ?into the world's economic infrastructure.
"I don't think this has been fully understood by the United States,"
said Mr. Barrett. "If you look at India, China and Russia, they all
have strong education heritages. Even if you discount 90 percent of
the people there as uneducated farmers, you still end up with about
300 million people who are educated. That's bigger than the U.S. work
force."
He said: "The big change today from what's happened over the last 30
years is that it's no longer just low-cost labor that you are looking
at. It's well-educated labor that can do effectively any job that can
be done in the United States."
In Mr. Barrett's view, "Unless you are a plumber, or perhaps a
newspaper reporter, or one of these jobs which is geographically
situated, you can be anywhere in the world and do just about any job."
You want a national security issue? Trust me, this threat to the long-
term U.S. economy is a big one. Why it's not a thunderous issue in
the presidential campaign is beyond me.
Intel has its headquarters in Silicon Valley. A Mercury News
interviewer asked Mr. Barrett what the Valley will look like in three
years. Mr. Barrett said the prospects for job growth were not
good. "Companies can still form in Silicon Valley and be competitive
around the world," he said. "It's just that they are not going to
create jobs in Silicon Valley."
He was then asked, "Aren't we talking about an entire generation of
lowered expectations in the United States for what an individual
entering the job market will be facing?"
"It's tough to come to another conclusion than that," said Mr.
Barrett. "If you see this increased competition for jobs, the
immediate response to competition is lower prices and that's lower
wage rates."
We can grapple with this problem now, and try to develop workable
solutions. Or we can ignore this fire in the basement of the national
economy until it rages out of our control.
E-mail: email***@***.com
|
| |
|
| |
 |
Newsgroups

|
Posted: 2004-1-31 13:02:00 |
Top |
java-programmer >> OT- interesting article in the NY Times
some years ago a big name in the computer world, Ed Yourdon, wrote a
book "the decline and fall of the american programmer." Part of his
reasoning for this decline and fall was and will be outsourcing.
A few years after that Mr. Yourdon wrote another book "the rise and
resurrection of the american programmer." In it he basically said he was
wrong in his first book. Wrong in part because outsourcing doesn't work.
The big problem is the language barrier. Communicating needs,
requirements, functioning w/in a programming team... when all or part of
that programming team cannot speak and write english sufficiently well,
outsourcing is all of a sudden a problem.
Sol wrote:
> New York Times
> http://www.nytimes.com/2004/01/26/opinion/26HERB.html
> ----------------------------------------------------------------------
> ----------
>
> January 26, 2004
> OP-ED COLUMNIST
> Education Is No Protection
> By BOB HERBERT
>
> The conference was held discreetly in the Westin New York hotel in
> Times Square last week, and by most accounts it was a great success.
>
> The main objections came from a handful of protesters who stood
> outside in a brutally cold wind waving signs that said things
> like "Stop Sending Jobs Overseas" and "Put America Back to Work." No
> one paid them much attention.
>
> The conference was titled "Offshore Outsourcing: Making the Journey
> Work for Your Corporation." Its goal was to bring executives up to
> speed on the hot new thing in corporate America, the shipment of
> higher-paying white-collar jobs to countries with eager, well-
> educated and much lower-paid workers.
>
> "We basically help companies figure out how to offshore I.T.
> [information technology] and B.P. [business process functions]," said
> Atul Vashistha, the chief executive of NeoIT, a California consulting
> firm that co-hosted the conference.
>
> Several big-name corporations had representatives at the conference,
> including Procter & Gamble, Motorola, Cisco Systems and Gateway.
>
> Because the outsourcing of white-collar jobs is so controversial and
> politically charged (especially in a presidential election year),
> there was a marked reluctance among many of the participants to speak
> publicly about it. But Mr. Vashistha showed no reluctance. He was
> quick to proselytize.
>
> "These companies understand very clearly that this is a very painful
> process for their employees and for American jobs in the short term,"
> he said. "But they also recognize that if they don't do this, they
> will lose more jobs in the future and they won't have an ability to
> grow in the future."
>
> He said his firm had helped clients ship about a billion dollars'
> worth of projects offshore last year.
>
> Noting that he is an American citizen who was born in India, Mr.
> Vashistha said he is convinced that outsourcing will prove to be a
> long-term boon to the U.S. economy as well as the economies of the
> countries acquiring the exported jobs.
>
> Whether it becomes a boon to the U.S. economy or not, the trend
> toward upscale outsourcing is a fact, and it is accelerating. In an
> important interview with The San Jose Mercury News last month, the
> chief executive of Intel, Craig Barrett, talked about the integration
> of India, China and Russia ?with a combined population approaching
> three billion ?into the world's economic infrastructure.
>
> "I don't think this has been fully understood by the United States,"
> said Mr. Barrett. "If you look at India, China and Russia, they all
> have strong education heritages. Even if you discount 90 percent of
> the people there as uneducated farmers, you still end up with about
> 300 million people who are educated. That's bigger than the U.S. work
> force."
>
> He said: "The big change today from what's happened over the last 30
> years is that it's no longer just low-cost labor that you are looking
> at. It's well-educated labor that can do effectively any job that can
> be done in the United States."
>
> In Mr. Barrett's view, "Unless you are a plumber, or perhaps a
> newspaper reporter, or one of these jobs which is geographically
> situated, you can be anywhere in the world and do just about any job."
>
> You want a national security issue? Trust me, this threat to the long-
> term U.S. economy is a big one. Why it's not a thunderous issue in
> the presidential campaign is beyond me.
>
> Intel has its headquarters in Silicon Valley. A Mercury News
> interviewer asked Mr. Barrett what the Valley will look like in three
> years. Mr. Barrett said the prospects for job growth were not
> good. "Companies can still form in Silicon Valley and be competitive
> around the world," he said. "It's just that they are not going to
> create jobs in Silicon Valley."
>
> He was then asked, "Aren't we talking about an entire generation of
> lowered expectations in the United States for what an individual
> entering the job market will be facing?"
>
> "It's tough to come to another conclusion than that," said Mr.
> Barrett. "If you see this increased competition for jobs, the
> immediate response to competition is lower prices and that's lower
> wage rates."
>
> We can grapple with this problem now, and try to develop workable
> solutions. Or we can ignore this fire in the basement of the national
> economy until it rages out of our control.
>
>
> E-mail: email***@***.com
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- how change from down to up to up to downHello
sorry for my englisch :-(
Who kan help my.
This is a java bubbles from te bottem tot go's high.
I want to make snow, so the must go from high tot te bottem.
what can i change in the java
thanks for help :-)
<html>
<head>
<meta http-equiv="Content-Language" content="nl">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
<meta name="Microsoft Theme" content="arcs 111, default">
<meta name="Microsoft Border" content="tl, default">
</head>
<body background= bgcolor="#FFFFCC" text="#000000" link="#3399FF"
vlink="#999933" alink="#FF9900">
<!--mstheme--><font face="Verdana, Arial, Helvetica">
<p>
<script language="JavaScript"><!--
MSFPhover =
(((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion) >= 3 )) ||
((navigator.appName == "Microsoft Internet Explorer") &&
(parseInt(navigator.appVersion) >= 4 )));
function MSFPpreload(img)
{
var a=new Image(); a.src=img; return a;
}
// --></script><script language="JavaScript">
<!--
if(MSFPhover) { MSFPnav1n=MSFPpreload; MSFPnav1h=MSFPpreload; }
// --></script>
<script language="JavaScript1.2">
<!-- Begin
var no = 12; // image number or falling rate
var speed = 2; // the lower the number the faster the image moves
var snow = new Array();
snow[0] = "bubbel.gif"
snow[1] = "bubbel2.gif"
snow[2] = "bubbel3.gif"
var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 1800;
if (ns4up||ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
j = 0;
for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ns4up) { // set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\"
left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ snow[j] + "\"
border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\"
left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ snow[j] + "\"
border=\"0\"></layer>");
} } else if (ie4up||ns6up) { if (i ==
0)
{
document.write("<div id=\"dot"+ i +"\"
style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px;
LEFT: 15px; width:1;\"><img src=\"" + snow[j] + "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\"
style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px;
LEFT: 15px; width:1;\"><img src=\"" + snow[j] + "\" border=\"0\"></div>");
}
}
if (j == (snow.length-1)) { j = 0; } else { j += 1; }
}
function snowNS() { // Netscape main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] -= sty[i]; if (yp[i] < -50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = doc_height;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight; }
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i]+pageYOffset;
document.layers["dot"+i].left = xp[i] +
am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", speed);
}
function snowIE_NS6() { // IE main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] -= sty[i];
if (yp[i] < -50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = doc_height;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width =
ns6up?window.innerWidth-5:document.body.clientWidth;
doc_height =
ns6up?window.innerHeight-5:document.body.clientHeight;
}
dx[i] += stx[i];
if (ie4up){
document.all["dot"+i].style.pixelTop =
yp[i]+document.body.scrollTop;
document.all["dot"+i].style.pixelLeft = xp[i] +
am[i]*Math.sin(dx[i]);
}
else if (ns6up){
document.getElementById("dot"+i).style.top=yp[i]+pageYOffset;
document.getElementById("dot"+i).style.left=xp[i] +
am[i]*Math.sin(dx[i]);
}
}
setTimeout("snowIE_NS6()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up||ns6up) {
snowIE_NS6();
}
// End -->
</script>
<!--mstheme--></font>
</html>
- 2
- Problems to calculate sinI must create a program that use trigonometry function.
I know sin(30)=0.5 but when I use Math.sin() I can't get it
Math.sin(30*Math.PI/180)=0.49999999999999994
What's the problem?
Thank you
Stefano Buscherini
- 3
- Third tapestry tutorial availableHi all,
Tapestry is a web app framework (Java) that allows
your web designers to create and edit web pages using
a WYSIWYG editor (DreamWeaver, FrontPage or etc),
while your programmers can still add dynamic contents
to the pages.
I've created my third Tapestry tutorial. You're welcome
to read it
at http://www2.cpttm.org.mo/cyberlab/softdev/tapestry/
Thanks!
- 4
- More on exceptionsHi,
I am looking at the following code. If an UnsupportedEncodingException
is thrown in getDD() how will that be handled by the code. Am I
missing something? what is good practice?
cheers,
//mike
public void myMethod {
try {
incomingDialog.sendStatus(dialog.getDD());
} catch (IOException e) {
logger.severe(e.getMessage());
throw new ScenarioException(Reason.NETWORKERROR, e);
}
}
The code above will call this code:
protected Object getDD() {
if (dd == null) {
try {
this.dd = invite.getContent();
} catch (UnsupportedEncodingException e) {
logger.severe(e.getMessage());
throw new ScenarioException(Reason.MIMEERROR, e);
} catch (IOException e) {
logger.severe(e.getMessage());
throw new ScenarioException(Reason.NETWORKERROR, e);
}
}
return dd;
}
- 5
- JDK 1.5 metadata feature docs?Hi all,
Has anyone come across documentation that thoroughly describes metadata
functionality that will be available in JDK 1.5? I only saw some brief
examples of what it's supposed to do, and I downloaded JDK, but I can't find
any docs. Any pointers?
- 6
- 3D surface plot
timothy ma and constance lee wrote:
> Anyone know anysite teaching 3D mesh plot? Like z = x^2 + y^2
>
<http://www.developer.com/java/other/article.php/3508706>
- 7
- XML Processing Approaches with JavaWhen I want to manipulate and retrieve data from XML file,
I used to use DOM or SAX, and this is JAXP API from Sun.
Some people told me I should use XPath instead, since it's easier for coding.
But we need to use apache's xalan library.
What do u think? please advise. thanks!!
- 8
- tomcat error 500...Hello all, i am trying to load a class file into a JSP page and getting
a few errors...what ive got is a simple form, that reads a username,
password, and submits it to a login.jsp file. my login.jsp looks
like:
<%@ page import="IMASOS.UserInterface" %>
<html><head> ... <body>
<%
String uname=request.getParameter("username");
String passw=request.getParameter("password");
UserInterface ui = new UserInterface();
boolean success = ui.login(uname,passw);
if (success) out.println("<h2>User logged in</h2>");
else out.println("<h2>Login Failure</h2>");
%>
</body>
and the error im getting is...
exception
org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NullPointerException
IMASOS.UserInterface.login(UserInterface.java:92)
org.apache.jsp.login_jsp._jspService(org.apache.jsp.login_jsp:50)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
- 9
- finding total number of bytes an object takes upGiven an object of a Java class, is there some straightforward way to
find out how many bytes of memory it takes up?
In C there exists a <sizeof()> operator, but even if it had a counter-
part in Java (which doesn't appear to be the case) that wouldn't be
exactly what I want because the objects I want to know the sizes of
contain references to objects of other classes, and I need to know the
_total_ bytes taken up by that object, its components, its components'
components, and so on. Can anybody point me to how I can find this
out? Any information would be greatly appreciated.
---Kevin Simonson
"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_
- 10
- problem with ListIteratorHello,
I've read about the listiterator. It allows me to traverse the list in
either direction and modify the list during iteration.
But I've tried to add list elements during the iteration and got the
error message.
-- java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:444)
at java.util.AbstractList$Itr.next(AbstractList.java:421)
Is it possible to add the new elements at the end of the list??
Thanks
Lucia
- 11
- 12
- status bar ticking forwardHi,
I am using a servlet application which when I call up a certain page,
the status bar just keeps on ticking forward, you know the progress
bar at the bottom of the screen.
This is happening only on one page. I am doing nothing differnt to
this page that I think would cause this. Any ideas?
Thanks.
TP
- 13
- jsp page giving error on tomcat 5Hi
i have written a class for database connection. It has two public
functions connect() which return an object of class Connection and
function close which close the connection
I am using that class in a jsp page to connect to database, but I am
getting an error :
Generated servlet error:
[javac] Compiling 1 source file
/usr/tomcat/work/Catalina/localhost/tpr/org/apache/jsp/web/jsp/index_jsp.java:7:
package db does not exist
import db.*;
^
/usr/tomcat/work/Catalina/localhost/tpr/org/apache/jsp/web/jsp/index_jsp.java:51:
cannot resolve symbol
symbol : variable ibDriverTest
location: class org.apache.jsp.web.jsp.index_jsp
Connection con = ibDriverTest.connect();
......
The class is in the package db. Can you please tell why is import db.*
not working.
Thanks is advance
Lalit
- 14
- What to use as HashMap Key?Hi. I'm looking for advice on using keys for a HashMap.
Is it typical to just use a string as a key, e.g., "Item A", "Item B",
etc.? Or are other approaches better? Since the key is just an
Object, I thought there might be some other approach commonly used
that is more efficient/effective.
Thanks for any advice!
Ken
- 15
- What's the point?Here's some thoughts from a Java guy at JavaOne:
http://beust.com/weblog/archives/000388.html
As JavaOne 2006 opens its doors today, the age-old question is bound
to be asked again and again: will Sun open source Java?
I have a fairly straightforward answer: I don't care.
And I suppose that most of the Java developers out there don't care
either.
What exactly is not open source in the Java we use today? I had to
think hard to answer this question because, frankly, everything I need
on a daily
basis is already available in source form, with one exception: the
Java Virtual Machine.
Sun's JVM (and others) is admittedly very good and I'm sure a lot of
developers would be interested in knowing how it works, but let's face
it: the inner workings of a Java Virtual Machine are completely
irrelevant to
most Java developers and not having access to this resource will
probably
never get in the way of writing Java code.
With that in mind, why is the question of open sourcing coming back so
often?
One word: zealotry.
*Posted from the Opera Mini Java browser on my Nokia 9300.
|
|
|