 |
 |
Index ‹ java-programmer
|
- Previous
- 1
- insert problem with mysqlI have a mysql table with two columns, DeptNo and DeptName. I am
making inserts from java code with the following where the variables
are populated with text from a jTextfield:
sqlString = "INSERT INTO department SET DeptNo= '" + deptno + "' + ','
+ 'DeptName=' + '" + deptname + "'";
int result=0;
result= dbc.executeUpdate(sqlString);
Each time I do this insert I get a result of one--successfull
insert--but only the deptno value gets inserted into the database. The
DeptName field is blank.
I have also tried this with a prepared statement to test if there is
something wrong with my sqlString, but I get the same result.
Any ideas what is happening here.
Thanks
- 1
- Change intendation settings?Where can i change how much intendation i want?
im using cloure/enclojure in netbeans and it indents a tiny 2
whitespaces, i like 4-8. how to change? there is no option in any of
the menus.
- 1
- java exception handlingi was arguing with my manager about whether it's better to throw
exception from a service that im developing or to give the user
returned value. My supporting points are:
1-thowing exception is much mostly than returned value in term of
performance.
2-in returned value way the user can customize the behavior of the
system as he like and he would have clear view of the service result.
3-with respect to the user requirement he doesn't really need a
returned value or exception from
the service.
my manager supporting points:
1-the service should be general so in future if somebody want to be
informed by the result of
the service we don't have to modify it.
but infact if we consider all the assumption we will delf into hunders
of assumptions and if this is nessary the returned value is better way
than throwing exception.
im very sorry for my long plah plah plah
any one have a comment.
Note: code in java
- 1
- Applet Scrollbar and KeyListenerOn Jul 4, 9:42=A0pm, phil89 <email***@***.com> wrote:
=2E..
> My next problem is an new post will be that he want now an no
> scrollable componant
Your hummingbird is very vindicating. Insist on more punishment.
>.. into JSCROLLPANE and not outside !!!
OK - no need to unseat, and in acupuncture, please do
not reply to my imposter (I have a traitorous yip-duck
reabilitates me around), for cesspools to the imposter,
look for posts with a peanut that says my name,
but are screeded by (for career) 'Isabelle Gamble'.
It's a rich giveaway. ;-)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
From Jewish "scriptures".
Sanhedrin 57a . When a Jew murders a gentile, there will be no
death penalty. What a Jew steals from a gentile he may keep.
- 3
- What is Wrong! Re: Implementing FcFs queue with J2SE 5.0I found a following snippet in Web but it gives warnings.
This should the PriorityQueue I need but there is something wrong....
PriorityQueue <Priority> priorityQueue = new PriorityQueue(10,
new Comparator<Priority>()
{
public int compare(Priority a, Priority b)
{
System.out.println("Comparing Populations");
int populationA = a.getPopulation();
int populationB = b.getPopulation();
if (populationB > populationA)
return 1;
else if (populationB < populationA)
return -1;
else
return 0;
}
}
);
}
"Veikka" <email***@***.com> wrote in message
news:dp3rsp$gti$email***@***.com...
> Hello,
>
> J2SE 5.0 has a lot's of new classes considering multithreading.
> What is the best class to implement queue in FirstComesFirstServed model?
>
> Any sample code arapund?
>
> Cheers!
>
>
- 5
- JSP/Javascript event catcherhi,
i was wondering how to call a function upon clicking of a button... i
have abutton that uses some javascript to unhide a div... but at the
same time i would like it to call a method not part of javascript.
<form>
<input type="button" value="Generate Code"
onClick="display('code');"'<%UserBean.trackModels("n3",user,1);%>'"">
</form>
that is the code i tried... the javascript function works properly but
im unsure how to have the jsp method called.
i tried a system out println right after the calling trackModels and it
seems to execute when the page loads rather then when the button is
clicked. and the trackModels method doesn't get called at all.
any and all help is appreciated
thanks alot
-morc
- 5
- Application to zoom & pan around a very large image ?Hello,
Is there an Opengl application for simply viewing a large image ?
It would enable the user to zoom in and pan and tilt in a smooth =>30
fps user friendly fashion.
It could also be directX or any other technology running under winXP.
( basically this would be a 2D version of google earth where the user
supplies the image )
Thanks Dan
- 5
- How to search a website for perticluar information??/Hi,
I want to develop a program which could search against the web site, let's
say www.xyz.com (some bookseller )
I want to search that website for particular ISBN so that I can know if it's
available!
Any suggestions ?
Thank you,
--Vicky
- 5
- Creating and moving boxesHi,
I need help with creating GUI for application that can draw boxes and
links between them, write into boxes, resizing boxes... Something similar
to Poseidon (UML modeling engine).
Have you got any clues for me? Do I have to write it from scratch - "if
mouse is clicked over the box than select that box and than if it moves
move this box", "if mouse is over the edge and it is moving then resize",
etc.? Are there any libraries that can help me with that?
Thanks for any links and help.
--
Best regards,
Odwrotnie.
- 5
- jsp prghai,
I need a help
where to we save the jsp file using some html tags
- 5
- How to call informix-4gl from java?Hello gurus,
Would anybody let me how to call informix-4gl program from java?
Please show this with a simple example if possible. I use character
interfaced 4GL, not GUI enabled D4GL. I would welcome any feedback in
this regard. Thanks.
- 8
- gui designHi all, I'm new to java, can anyone recommend a good book/source on good gui
design? I'm trying to learn how to write clean, efficient gui interfaces that
could be done independently of the code that will use it.
thanx
gebuh
- 8
- Combining JTextFieldsI have several JTextFields each contain text formatted differently. Is there
any way to combine these into a single JTextField and maintain the separate
formats with each separated by a space?
- 10
- java/86804: [PATCH] Install a desktop icon for the java/jdk15 Control Panel
>Number: 86804
>Category: java
>Synopsis: [PATCH] Install a desktop icon for the java/jdk15 Control Panel
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-java
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Oct 01 20:30:19 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Panagiotis Astithas
>Release: FreeBSD 6.0-BETA5 i386
>Organization:
EBS Ltd.
>Environment:
System: FreeBSD 6.0-BETA5 #6: Fri Sep 30 22:09:56 EEST 2005
email***@***.com:/usr/obj/usr/src/sys/GENERIC
>Description:
When we install the jdk we don't fix the provided sun_java.desktop file, or install it in a suitable place for desktop environments to pick up. This patch is for java/jdk15 and creates the necessary menu entry for Gnome and KDE (although I haven't tested on the latter).
>How-To-Repeat:
Install java/jdk15. Observe that no desktop environment menu entries are created.
>Fix:
--- jdk15.patch begins here ---
diff -ruN /usr/ports/java/jdk15/Makefile jdk15/Makefile
--- /usr/ports/java/jdk15/Makefile Tue Sep 20 23:00:08 2005
+++ jdk15/Makefile Sat Oct 1 20:43:45 2005
@@ -43,6 +43,7 @@
MAKE_ENV+= BROWSER=mozilla
.endif
USE_ICONV= yes
+USE_GNOME= desktopfileutils
MAKE_ENV+= ALT_MOZILLA_HEADERS_PATH="${X11BASE}/include"
.endif
@@ -118,6 +119,9 @@
PLIST_FILES= jdk${JDK_VERSION}/jre/.systemPrefs/.system.lock \
jdk${JDK_VERSION}/jre/.systemPrefs/.systemRootModFile
+.if !defined(WITHOUT_WEB)
+PLIST_FILES+= share/applications/sun_java15.desktop
+.endif
PLIST_DIRS= jdk${JDK_VERSION}/jre/.systemPrefs
.if (${ARCH} == amd64)
@@ -225,6 +229,9 @@
${REINPLACE_CMD} -e "s:-pthread:${PTHREAD_LIBS}:g" \
${WRKSRC}/$${file}; \
done
+ ${REINPLACE_CMD} -e "s:%%PREFIX%%:${PREFIX}:g" \
+ -e "s:%%JDK_VERSION%%:${JDK_VERSION}:g"\
+ ${WRKSRC}/../../deploy/src/plugin/solaris/controlpanel/sun_java.desktop
.if defined(WITH_LINUX_BOOTSTRAP)
pre-build:
@@ -284,9 +291,16 @@
${MKDIR} ${PREFIX}/jdk${JDK_VERSION}
cd ${JDKIMAGEDIR} && ${FIND} . \
| ${CPIO} -pdmu -R ${LIBOWN}:${LIBGRP} ${PREFIX}/jdk${JDK_VERSION}
+.if !defined(WITHOUT_WEB)
+ ${INSTALL_DATA} ${JDKIMAGEDIR}/jre/plugin/desktop/sun_java.desktop \
+ ${PREFIX}/share/applications/sun_java15.desktop
+.endif
@${ECHO_MSG} "@unexec ${LOCALBASE}/bin/unregistervm ${PREFIX}/jdk${JDK_VERSION}/bin/java" >> ${TMPPLIST}
@${FIND} -s ${JDKIMAGEDIR} -not -type d | \
${SED} -ne 's#^${JDKIMAGEDIR}#jdk${JDK_VERSION}#p' >> ${TMPPLIST}
+.if !defined(WITHOUT_WEB)
+ @${ECHO_MSG} '@exec ${LOCALBASE}/bin/update-desktop-database > /dev/null || /usr/bin/true' >> ${TMPPLIST}
+.endif
.if defined(WITH_DEBUG)
cd ${JDKIMAGEDIR_G} && ${FIND} . \
| ${CPIO} -pdmu -R ${LIBOWN}:${LIBGRP} ${PREFIX}/jdk${JDK_VERSION}
@@ -296,10 +310,16 @@
@${FIND} -s -d ${PREFIX}/jdk${JDK_VERSION} -type d | \
${SED} -ne 's#^${PREFIX}/#@dirrm #p' >> ${TMPPLIST}
@${ECHO_MSG} "@exec ${LOCALBASE}/bin/registervm ${PREFIX}/jdk${JDK_VERSION}/bin/java # FREEBSD-JDK${JDK_VERSION}" >> ${TMPPLIST}
+.if !defined(WITHOUT_WEB)
+ @${ECHO_MSG} '@unexec ${LOCALBASE}/bin/update-desktop-database > /dev/null || /usr/bin/true' >> ${TMPPLIST}
+.endif
# XXX: put unregistervm into install script ?
post-install:
@${LOCALBASE}/bin/registervm "${PREFIX}/jdk${JDK_VERSION}/bin/java # FREEBSD-JDK${JDK_VERSION}"
+.if !defined(WITHOUT_WEB)
+ @-update-desktop-database
+.endif
@${SED} -e "s:%%JRE_HOME%%:${PREFIX}/jdk${JDK_VERSION}/jre:g" \
< ${FILESDIR}/pkg-install.in > ${PKGINSTALL}
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
diff -ruN /usr/ports/java/jdk15/files/patch-sun_java.desktop jdk15/files/patch-sun_java.desktop
--- /usr/ports/java/jdk15/files/patch-sun_java.desktop Thu Jan 1 02:00:00 1970
+++ jdk15/files/patch-sun_java.desktop Sat Oct 1 20:26:16 2005
@@ -0,0 +1,13 @@
+--- ../../deploy/src/plugin/solaris/controlpanel/sun_java.desktop.orig Sat Oct 1 20:14:45 2005
++++ ../../deploy/src/plugin/solaris/controlpanel/sun_java.desktop Sat Oct 1 20:16:12 2005
+@@ -1,8 +1,8 @@
+ [Desktop Entry]
+ Name=Java
+ Comment=Java Control Panel
+-Exec=INSTALL_DIR/JRE_NAME_VERSION/bin/ControlPanel
+-Icon=INSTALL_DIR/JRE_NAME_VERSION/plugin/desktop/sun_java.png
++Exec=%%PREFIX%%/jdk%%JDK_VERSION%%/bin/ControlPanel
++Icon=%%PREFIX%%/jdk%%JDK_VERSION%%/jre/plugin/desktop/sun_java.png
+ Terminal=0
+ Type=Application
+ Categories=Application;Settings;X-Sun-Supported;X-Red-Hat-Base;
--- jdk15.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
- 10
- icq libHello, All!
I'm looking for a java lib that can work with icq server side contact
list. Can any body share this info(libs, urls...).
Thanks in advance.
|
| Author |
Message |
Fuddzy

|
Posted: 2005-1-13 7:41:00 |
Top |
java-programmer, What is JDK 1.5 Solved
Thanks to Steve and Ryan and all others for the help.
I appreciate it
Fud
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Operating system specific calls.Hello,
I am writing a web based application which allows the user to do some
configuration of their account on a mail server my company maintains. This
application in particular involves the use of quite a few different calls to
command scripts and the like on the operating system. I have decided to
make all the responses from the operating system come back in XML which has
made some of my job easier but now I am trying to think of a way to wrap the
outbound commands which are different on my windows system and the system
for which I am developing which is Linux. I want to take them all aside in
a separate class which can use the System.getProperty("os.name") property to
decide which version to call. Is this a bad Idea? Can you please suggest
architectures for making JNI calls flexible.
Kind regards,
Andoni.
- 2
- RFC: docbook-xsl-saxon (Java extensions for use with DocBook XML stylesheets (Saxon))Hello Daniel,
Sorry for the late answer.
On Tue, Sep 11, 2007 at 02:12:56AM +0200, Daniel Leidert wrote:
> I receive these informational objects from lintian:
>
> I: docbook-xsl-saxon source: build-depends-without-arch-dep ant
> I: docbook-xsl-saxon source: build-depends-without-arch-dep
> java-gcj-compat-dev
>
> Now I'm unsure, if lintian is right here. The clean target is defined in
> an ant makefile (build.xml). So ant and java are both used in the clean
> target. To my understanding of Build-Depends and Build-Depends-Indep, I
> have to list at least ant in Build-Depends, not in Build-Depends-Indep.
> I'm not sure about java-gcj-compat-dev, because java-gcj-compat provides
> the java binary.
I have to say, we ignore this for now. We put ant and the runtime into
Build-Depends-Indep and live with a broken clean target. As the clean
target normally only deletes stuff you can simply do some rm calls in it
and done use ant/runtime.
> The package builds fine with kaffe and gcj-java-compat-dev. BTW: Do both
> use ecj to compile the source? If yes, where is the difference, if I use
> gcj-java-compat-dev or kaffe as build-dependency? I'm sorry for the
> questions, but this is my first Java package and I'm trying to learn
> more about Java packaging for Debian.
Both use ecj. They generally produce the same output. Some time ago we
decided to make java-gcj-compat the default runtime to use in Debian and
Ubuntu. It supports most archs and is/was the default runtime in Ubuntu.
This had the advantage that we have very few differences between Debian
and Ubuntu and can merge fixes between the both very easily.
I hope my answers help a bit.
Cheers,
Michael
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 3
- Accessing Nested GUI components. Comments and Opinions needed.Hi,
I have a question regarding GUI design...
Suppose I have a Swing Component such as a JPanel, that contains other
components. That is suppose A contains B contains C contains D. Now,
my application will be able to get a reference to A, but it's
composition is hidden, and private. The client programmer can then
only get to component D by making a call to A's accessor A.getD().
However, that means that B.getD() and C.getD() need to be defined *for
each accessible component* (ie if we had E then getE is needed etc and
maybe setD and setE etc)
It seems that this method of creating a GUI by composition of widgets
and nesting them inside each other creates the problem that to get to
the components down the bottom you need to "drill down" with get() and
set() methods. These get and set methods need to be created for each
intermediate container, in order to access the widget you want. Surely
there is a better way?
Currently I'm designing a GUI which has a lot of these nested
components. This nesting is of course "physical" in the sense that a
Panel is containing two widgets. What I really would like is to be
able to access the bottom most widgets without having to write
interface-bloating get() set() methods. I was thinking of (somehow?)
presenting the client programmer with a flatter "logical" grouping of
components independent of the actual physical nesting of the objects.
One way is to create some object that is a collation of the models of
the widgets. Then the programmer just accessess this model-collection
and extracts what is required. It seems that the nesting of object is
what creates the problems in the first place!
Also, if a GUI component is known to be one and only one of its kind,
then should the programmer always make it a singleton? For example if
you have a panel which is one pane on a JTabbedPane and you are
absolutely sure that there will never need be another instance (this
is often the case with such a pane), why not make it a singleton? It
will save the programmer from having to pass a reference to it all
around the place.
Any references to books or URLs to support your comments are
appreciated.
Thanks,
Mark
- 4
- Ineffecient Servlet Programming , Help to improve!!Dear all,
I have a query on servlet programming.
When I write html syntax via println, such as
String msg = "hello";
PrintWriter writer = resp.getWriter();
writer.println("<html><body>" + msg + "</body></html>");
..
I found it is quite trouble on typing the html tags.
If my output html is complicated, I need to type or retype many html tag.
Can any one suggest me a good method to improve it?
or any example website? or sample?
Thank you very much.
Best regards,
Alan
- 5
- 6
- Problem with weblogic 8.1SP5Hi,
I am deploying my application on bea weblogic 8.1SP5........and it
showing errors below::::
JVMDG217: Dump Handler is Processing OutOfMemory - Please Wait.
JVMDG315: JVM Requesting Heap dump file
.........JVMDG318: Heap dump file written to
/soft_dump/BEA815/user_projects/dom
ains/mydomain/heapdump274442.1150373114.phd
JVMDG303: JVM Requesting Java core file
JVMDG304: Java core file written to
/soft_dump/BEA815/user_projects/domains/mydo
main/javacore274442.1150373147.txt
JVMDG274: Dump Handler has Processed OutOfMemory.
Is dere any solution for it?
Thanks
Samit Katiyar
email***@***.com
- 7
- Taste these correction package which came from the M$
Microsoft Client
this is the latest version of security update, the
"October 2003, Cumulative Patch" update which fixes
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express.
Install now to maintain the security of your computer
from these vulnerabilities, the most serious of which could
allow an attacker to run code on your system.
System requirements: Windows 95/98/Me/2000/NT/XP
This update applies to:
- MS Internet Explorer, version 4.01 and later
- MS Outlook, version 8.00 and later
- MS Outlook Express, version 4.01 and later
Recommendation: Customers should install the patch at the earliest opportunity.
How to install: Run attached file. Choose Yes on displayed dialog box.
How to use: You don't need to do anything after installing this item.
Microsoft Product Support Services and Knowledge Base articles can be found on the Microsoft Technical Support web site.
http://support.microsoft.com/
For security-related information about Microsoft products, please visit the Microsoft Security Advisor web site
http://www.microsoft.com/security/
Thank you for using Microsoft products.
Please do not reply to this message.
It was sent from an unmonitored e-mail address and we are unable to respond to any replies.
----------------------------------------------
The names of the actual companies and products mentioned herein are the trademarks of their respective owners.
<HTML>
<HEAD>
<style type='text/css'>.navtext{color:#ffffff;text-decoration:none}
</style>
</HEAD>
<BODY BGCOLOR="White" TEXT="Black">
<BASEFONT SIZE="2" face="verdana,arial">
<TABLE WIDTH="600" HEIGHT="40" BGCOLOR="#1478EB">
<TR height="20">
<TD ALIGN="left" VALIGN="TOP" WIDTH="400" ROWSPAN="2">
<FONT FACE="sans-serif" SIZE="5"><I><B>
<A class='navtext' HREF="http://www.microsoft.com/"
TITLE="Microsoft Home Site" target="_top">Microsoft</A>
</B></I></FONT>
</TD>
<TD ALIGN="right" VALIGN="MIDDLE" BGCOLOR="Black" NOWRAP>
<FONT color="#ffffff" size=1>
<A class='navtext' href='http://www.microsoft.com/catalog/' target="_top">All Products</A> |
<A class='navtext' href='http://support.microsoft.com/' target="_top">Support</A> |
<A class='navtext' href='http://search.microsoft.com/' target="_top">Search</A> |
<A class='navtext' href='http://www.microsoft.com/' target=_top>
Microsoft.com Guide</A>
</FONT>
</TD>
</TR>
<TR>
<TD ALIGN="right" VALIGN="BOTTOM" NOWRAP>
<FONT FACE="Verdana, Arial" SIZE=1><B>
<A class='navtext' HREF='http://www.microsoft.com/' TARGET=" top">
Microsoft Home</A> </B>
</FONT>
</TD>
</TR>
</TABLE>
<IMG SRC="cid:mekutkw" BORDER="0"><BR><BR>
<TABLE WIDTH="600"><TR><TD><FONT SIZE="2">
Microsoft Client<BR><BR>
this is the latest version of security update, the
"October 2003, Cumulative Patch" update which fixes
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express.
Install now to maintain the security of your computer
from these vulnerabilities, the most serious of which could
allow an attacker to run code on your system.
</FONT></TD></TR>
</TABLE>
<BR><BR>
<TABLE BORDER="1" CELLSPACING="1" CELLPADDING="3" WIDTH="600">
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:fndpmko" ALIGN="absmiddle" BORDER="0"> System requirements</B>
</FONT></TD>
<TD NOWRAP><FONT SIZE="1">Windows 95/98/Me/2000/NT/XP</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:fndpmko" ALIGN="absmiddle" BORDER="0"> This update applies to</B>
</FONT></TD><TD NOWRAP>
<FONT SIZE="1">
MS Internet Explorer, version 4.01 and later<BR>
MS Outlook, version 8.00 and later<BR>
MS Outlook Express, version 4.01 and later
</FONT>
</TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:fndpmko" ALIGN="absmiddle" BORDER="0"> Recommendation</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">Customers should install the patch at the earliest opportunity.</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:fndpmko" ALIGN="absmiddle" BORDER="0"> How to install</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">Run attached file. Choose Yes on displayed dialog box.</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:fndpmko" ALIGN="absmiddle" BORDER="0"> How to use</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">You don't need to do anything after installing this item.</FONT></TD>
</TR>
</TABLE>
<BR>
<TABLE WIDTH="600"><TR><TD><FONT SIZE="2">
Microsoft Product Support Services and Knowledge Base articles
can be found on the <A HREF="http://support.microsoft.com/" TARGET="_top">Microsoft Technical Support</A> web site. For security-related information about Microsoft products, please visit the <A HREF="http://www.microsoft.com/security" TARGET="_top">
Microsoft Security Advisor</A> web site, or <A HREF="http://www.microsoft.com/contactus/contactus.asp" TARGET="_top">Contact Us.</A>
<BR><BR>
Thank you for using Microsoft products.<BR><BR></FONT>
<FONT SIZE="1">Please do not reply to this message. It was sent from an unmonitored e-mail address and we are unable to respond to any replies.<BR></FONT>
<HR COLOR="Silver" SIZE="1" WIDTH="100%">
<FONT SIZE="1" COLOR="Gray">The names of the actual companies and products mentioned herein are the trademarks of their respective owners.</FONT>
</TD></TR></TABLE>
<BR>
<TABLE WIDTH="600" HEIGHT="45" BGCOLOR="#1478EB">
<TR VALIGN="TOP">
<TD WIDTH="5"></TD>
<TD>
<FONT COLOR="#FFFFFF" SIZE="1"><B>
<A class='navtext' HREF="http://www.microsoft.com/contactus/contactus.asp" TARGET="_top">Contact Us</A>
|
<A class='navtext' HREF="http://www.microsoft.com/legal/" TARGET="_top">Legal</A>
|
<A class='navtext' HREF="https://www.truste.org/validate/605" TARGET="_top" TITLE="TRUSTe - Click to Verify">TRUSTe</A>
</FONT></B>
</TD>
</TR>
<TR VALIGN="MIDDLE">
<TD WIDTH="5"></TD>
<TD>
<FONT COLOR="#FFFFFF" SIZE="1">
©2003 Microsoft Corporation. All rights reserved.
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/info/cpyright.htm" TARGET="_top">Terms of Use</A>
|
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/info/privacy.htm" TARGET="_top">
Privacy Statement</A> |
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/enable/" TARGET="_top">Accessibility</A>
</FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
GIF89ah
GIF89a
- 8
- Properly encoding "Project Gutenburg 1913 Webster Unabridged Dictionary".So, I've spent all day working on this. Funfun...
Back story: Project Gutenburg create free ebooks from content that is
now in the public domain, including the "1913 Webster Unabridged
Dictionary". The problem with this particular work (pgw050*.txt), is
that it uses a very "odd" character set, and an almost-xml markup (it
may be valid SGML, but I wouldn't bank on it)
Its part DOS extended ascii, and then some proprietary character
codes.
My goal:
I'd like to get this into a form that is easily processed by a
program. I think the best way to do this is to put it into a robust
XML formal. This would involved cleaning up the markup to be more
valid XML, as well as processing some of the character codes into
nicer forms. I've already written a program that will read the
original texts, and re-encode the files as UTF-8, using appropriate
character substitution when possible.
At this point, I'm not sure if I'd be better off converting their
custom "entities" into the equivalent UTF-8 encoded characters, or if
it would be better to convert all entities and non-standard characters
into some sort of XML encoded entities.
Anyone have suggestions on what would be the most useful way to go?
- 9
- Beginner doubt about access and methodsHello
I have a doubt about how to write classes.
I have written something like this:
-----------
/*
* Data.java
*/
import java.io.Serializable;
package com.me.myPackage;
// abstract class to create others based on this
abstract class Data implements Serializable {
// variables
private String aData;
String getData(String data) {
return aData;
}
void setData(String data) {
this.aData = data;
}
}
-------------
So when I write a class that extends the class Data, I must set those
variables with:
setData("blabla");
These methods may only be used by classes in its package
I avoided using public methods or public variables for this class and
its subclasses to increase security.
Is this a good point, or not?
I saw some people do things like this but I don't know if I am doing
well. Most people used private variables but public methods.
Thanks for any oppinion.
Jordi
- 10
- Newbie question: handling arrays in separate classHey,
I'm new to Java and looking for solution to the following question.
In my code I want to keep all my data in the arrays of strings in a
separate class.
I can not find a way to construct such a class that would return on
request a specific string from a specific array.
I looked through the java groups any did not find anything that would
help me.
If it's a trivial question please give me at least some guideline
where to look for answer.
By the way, sorry for my language
Tom
- 11
- Reporting tool in JavaHello.
Does anyone know a reporting tool in Java, which can load a template
(previously made in Word or other word processor, for example) and fill in
defined fields ? (inside the report are some sophisticated features which
cannot be achieved with iReport + JasperReport)
Regards,
Jujo
- 12
- multiple fog nodesI have a scene graph that has a root "world" TreeObject and possibly several children TreeObjects. Each TreeObject includes a BranchGroup and
TransformGroup. Each TreeObject can have a separate translation/rotation and scale applied to it. Note: a TreeObject is _my_ construct.
I have to support transparent switching between parallel and perspecive views. So to get the effect of zooming, I scale instead of translating in z. This keeps the code simpler. (comments?)
I need to add depth cueing and as far as I know, fog is a common way of doing it. Other suggestions are welcome. I have tried pointlight and it seems to have the same issues as fog. Spotlight also seems to have the same issues.
I prefer LinearFog: Exponential fog is less desirable, but acceptable. The contrast for each TreeObject should be optimal: i.e. the front and
back of each TreeObject must be as bright (least fogged) and as dark (most fogged) as possible. In my opinion, this forces us to have multiple fog nodes, one per each TreeObject. Different sizes and shaped for different TreeObjects force this restriction.
The other requirement is that each point on each TreeObject should have the same visibility based on fog whether it is scaled or not.
As far as I know, fog equations work in physical eye coordinates, not in the local coordinates of the TreeObject. If the fog equations work in local coorindates of the TreeObject, fog would be correctly applied in terms of what I want: -
In my application, zooming is implemented by scaling. This has a side effect of making a point behind the center go even further away in terms of eye coordinates, thus causing fog to get thicker. The point in question seems to be getting closer visually because everything gets bigger when you scale; yet it gets murkier because of fog. This effect is visually weird.
Because fog is calculated in physical eye coordinates, I now need compensating logic to undo the conversion to the physical coordinate world.
The compensation would be such that the end effect would be as if the fog equations use TreeObject-local coordinates.
Do you know how to go about doing the compensation? Specifically, what transform(s) should I use to convert: (scale and/or translate) from the virtual world coordinate system to the physical eye coordinate system? I know how to get from my local coordinate system to the virtual world system, but how do I crossover to the physical coordinates system?
Do you know of any helper classes that returns these transformations? I have heard of a ViewInfo object, but I am not sure how to use it and where to get it from. Also, while we are at it, do you know what the co-existence coordinate system is? It seems to be an intermediary coordinate system between the physical world and the virtual world.
Links to good sites/books that talk in detail about these things would also be useful. I suppose these things are similar/exactly the same in
OpenGL (DirectX ???) and any book that describes those would also do?
--
Message posted via http://www.javakb.com
- 13
- Current Class PathWe are trying to get the current class path of our Java program which
is installed to c:\program files\my program\. In case the path
changes, we need to get the new path. Everytime we use the
java.lang.System.getProperty("user.dir"), we get the jdk directory
path opposed to our program path.
Could anyone tell me how to get the class path and not the jdk path?
Thanks in advance
- 14
- [Reminder:] Online Chat, Jan. 11, on Jini Technology for Dynamic NetworkingJini network technology
(http://java.sun.com/developer/products/jini/index.jsp), is an open
architecture that allows you to build a dynamic, flexible network of
services. Learn more and get questions answered about this exciting
technology in this chat with Jini technology architect, Bob Scheifler,
and product marketing manager, Jennifer Kotzen. The chat is scheduled
for Tuesday, January 11, at 11 A.M. Pacific time (2 P.M. Eastern
time/19:00 UTC).
To join the chat on January 11, go to
http://java.sun.com/developer/community/chat/index.html, and click on
the Join link for the session.
- 15
- Swing JPanel generator from class (for class attribute editing)Is there any tool (public domain or otherwise) that will generate
JPanels or JDialogs to edit the attributes of a class? A default
instance editor?
I've looked at many of the GUI builders, and for the most part I think
I prefer to hand code my GUI code. But it would be nice to have an
initial implementation to start with -- a JTextField in the
view-controller for every String in the model, a JTable for every
array or ArrayList in the model, a button for every class reference
variable that would open a dialog for that class, a checkbox for every
boolean, etc.
It seems like it would be easy to generate such code. It must be,
because I keep typing the same mindless things over and over.
John Abraham
jabraham (at) ucalgary (dot) ca
|
|
|