| Recursion / Iteration (was Re: Increasing the stack?) |
|
 |
Index ‹ java-programmer
|
- Previous
- 2
- Tv Need Extra Money for anything ?! Work for Top $ Tv/ I found this on a bulletin board and decided to try it: A little while back, I was browsing through news groups and e-mails, just like you are now, and came across an article similar to this that said you can make thousands of dollars within weeks with only an initial investment of $6.00!! So, I thought, "Yeah right, this must be a scam," but like most of us, I was curious, so I KEPT reading. Anyway, it said that you send $1.00 to each of the six names and addresses stated in the article. You then place your own name and address in the bottom of the list at $6.00, and post the article in at least 200 news groups. (There are thousands) No catch, that was it. So after thinking it over, and talking to a few people first, I thought about trying it. I figured, "What have I got to lose; except six stamps and $6.00 right, right?" Then I invested the measly $6.00.
WELL GUESS WHAT!!!
Within seven days, I started getting money in the mail!! I was shocked!! I figured it would end soon, but the money just kept coming in. In my first week, I made about $25.00. By the end of the second week I had made a total of more than $1000.00!! In the third week I had more than $10,000.00 and it's still growing!! This is now my fourth week and I have made a total of $42,000.00 and it's still coming rapidly. It's certainly worth $6.00 and six stamps, and I have spent more than that on the lottery without ever winning!!!
Let me tell you how this works and most important, why it works.......... also make sure you print this out NOW, so you can get the information off of it, as you will need it. I promise you that if you follow the directions exactly that you will start making more money than you thought possible by doing something so easy!!
Suggestion: Read this entire message carefully!! (Print it out or download it)
Follow the simple directions and watch the money come in!! It's easy. It's legal. And, your investment is only $6.00 (Plus postage)!!!
IMPORTANT:
This is not a rip-off, it is decent; it's legal; and it is virtually no risk - it really works!! If all the following instructions are adhered to, you will receive extraordinary dividends.
PLEASE NOTE:
Please follow the directions EXACTLY, and $50,000 or more can be yours in 20 to 60 days. This program remains successful because of the honesty and integrity of the participants. Please continue its success by carefully adhering to the instructions. You will now become apart of the Mail Order business. You are in the business of developing Mailing Lists. Many large corporations are happy to pay big bucks for quality lists. However, the money made from the mailing lists is secondary to income, which is made from people like you and me asking to be included in that list. Here are the four easy steps to success.
STEP ONE: Get six separate pieces of paper and write the following on each piece of paper "PLEASE PUT ME ON YOUR MAILING LIST." Now get 6 U.S. $1.00 bills and place ONE inside of EACH of the six pieces of paper so the bill will not be seen through the envelope (to prevent thievery). Next, place one paper in each of the six envelopes and seal them. You now should have six sealed envelopes, each with a piece of paper stating the above phrase, your name and address, and a $1.00 bill. What you are doing is creating a service.
THIS IS ABSOLUTELY LEGAL!!!!!
You are requesting a legitimate service and you are paying for it!! Like most of us I was a little skeptical and little worried about the legal aspects of it all. So I checked it out with the U.S. Post Office (1-800-238-5355) and they confirmed that it is indeed legal!!
Mail the six envelopes to the following addresses:
1) W. Edens
4829 Bud Ln
Lexington, KY 40514
2) L.Lessard
40 Martins Ferry Rd
Hooksett,NH 03106
3) J. Safian
6950 W. Forest Presrv. Dr., #115
Norridge, IL 60706-1324
4) G. Takla
690 Adelaide Avenue East
Oshawa, Ontario, L1G 2A8
5) Q. Huda
1212- 1315 Bough Beeches Blvd.
Mississauga, Ontario, L4W 4A1
6) T Ryan
275 Rt 10E Ste 220-301
Succasunna, NJ 07876
STEP TWO: Now take the #1 name off the list that you see above, move the other names up (six becomes 5, 5 becomes 4, and etc.) and add YOUR NAME as number 6 on the list.
STEP THREE: Change anything you need to but try to keep this article as close to original as possible. Now post your amended article to at least 200 news groups. :
(I think there are close to 24,000 groups) All you need is 200, but remember, the more you post, the more money you make!! This is perfectly legal!! If you have any doubts, refer to Title 18 Sec. 1302 & 1341 of the Postal Lottery laws. Keep a copy of these steps for yourself and whenever you need money, you can use it again, and again. PLEASE REMEMBER that this program remains successful because of the honesty and integrity of the participants and by their carefully adhering to directions. Look at it this way. If you were of integrity, the program will continue and the money that so many others have received will come your way.
NOTE: You may want to retain every name and address sent to you, either on a computer or hard copy and keep the notes people send you. This VERIFIES that you are truly providing a service. (Also, it might be a good idea to wrap the $1 bill in dark paper to reduce the risk of mail theft). So, as each post is downloaded and the directions carefully followed, all members will be reimbursed for their participation as a List Developer with one dollar each. Your name will move up the list geometrically so that when your name reaches the #1 position you will be receiving thousands of dollars in CASH!!! What an opportunity for only $6.00 ($1.00 for each of the first six people listed above) Send it now, add your own name to the list and you're in business!!!
*****DIRECTIONS FOR HOW TO POST TO NEWS GROUPS!!!*****
STEP ONE: You do not need to re-type this entire letter to do your own posting. Simply put your cursor at the beginning of this letter and drag your cursor to the bottom of this document, and select 'copy' from the edit menu. This will copy the entire letter into the computer's memory.
STEP TWO: Open a blank 'notepad' file and place your cursor at the top of the blank page. From the 'edit' menu select 'paste'. This will paste a copy of the letter into the notepad so that you will add your name to the list.
STEP THREE: Save your new notepad file as a text file. If you want to do your posting in different settings, you'll always have this file to go back to.
STEP FOUR: You can use a program like "postXpert" to post to all the newsgroups at once. You can find this program at <http://www.download.com>. If you don't understand how it works you can email me at: mailto:email***@***.com (this is only when my name is in the list, so send a copy of my address as well. put this in the header: make millions very easy + my full name)
Use Netscape or Internet Explorer and try searching for various new groups (on- line forums, message boards, chat sites, discussions.)
STEP FIVE: Visit message boards and post this article as a new message by highlighting the text of this letter and selecting paste from the edit menu. Fill in the subject, this will be the header that everyone sees as they scroll through the list of postings in a particular group, click the post message button. You're done.
Congratulations!!!!!!
THAT'S IT!! All you have to do, and It Really works!!!
Best Wishes
$A
- 2
- Eclipse PakageWhen we create a pakage in java you make it creating several folders one
inside the other in an organized way.
In Eclipse I can create pakages, but I cann't create a pakage inside
another. (left mose button, new|pakage)
Any ideias on how to create inside pakages via IDE ?
- 4
- swing - styled document - paragraph attributeHello,
1) I assign a document style by
style = myDefaultStyledDocument.addStyle("myStyle" , null);
StyleConstants.setAlignment(style, 1); //1 for center
myDefaultStyledDocument.setLogicalStyle(pos, style);
2) Then, I try to read the style :
AttributeSet attributeSet = myDefaultStyledDocument.getAttributes();
Enumeration attrEnum = attributeSet.getAttributeNames();
while ( attrEnum.hasMoreElements() ) {
Object attrObj = attrEnum.nextElement();
System.err.println("attrObj:"+attrObj.getClass());
}
I read only classes of StyleConstants.ResolveAttribute!...
Strange no ?
For all other StyleConstants that's ok !!
Is there something special to do with Alignment ?
FLD
- 5
- 6
- Detect if Sun plugin is installed (in IE) EVEN if not set as default in plugin?I've looked everywhere and havent found a way to do what I need to do,
so I'll try posting this:
We have a need to sent users to one of 2 webpages depending on whether
they are using the MS JVM/1.1 or the Sun plugin/1.2+
What we did is create a simple applet that checks the java.version
property and forwards to the appropriate page depending on its value.
This should work fine except for one case:
If the user has the plugin installed but it is not set as the default
for IE, then IE will use the MS JVM when it encounters the applet tag,
and the user will get the 1.1 page even though they have the plugin
installed - we don't want that. Other requirements are that we only
need to support IE and we don't want the user to have to download the
plugin if they dont have it.
Can anyone think of anyone to do this? Can I use the OBJECT tag somehow
for this? Maybe nesting the OBJECT and APPLET tags? Also, if there was
anyway to detect the installation of the plugin using javascript it
would help.
Any ideas?
Thanks
Aaron
- 7
- 7
- automatic apache + tomcat installationHi,
i hope someone can help me with my problem concerning the installation
of apache + tomcat:
i need to set up an installation of apache + tomcat under Windows by
script (unattended).
Any idea?
Thanks for Help in advance.
Michael
- 8
- Deadlock... i thinkI apologize in advance for the length of the note, and the source code
included.
I posted earlier under the title "Double streams", where i wanted to
use an RMI object as a sort of proxy for two clients to exchange data
via streams. I kinda failed, but now i'm trying something new. This
doesn't work either, but this time i think someone might be able to
solve it, since i'm not adept at using threads and i think that's
where the problem is. :)
The source for ByteHolder and RemoteByteHolder is included below. A
server is run, making a ByteHolder, BH, available via RMI.
Client A obtains the reference to BH, and passes this on to its
FooOutputStream, which extends OutputStream and implements the
write(int b) method by calling putByte(b) on BH.
Client B also gets BH, passes this to FooInputStream, which extends
InputStream and implements read() by calling getByte() on BH.
What i did to test was:
- run the server
- client A wraps the FooOutputStream in a PrintWriter, and
println("foo") is called on it
- client B wraps FooInputStream in a InputStreamReader, which is
then wrapped in a BufferedReader, and readLine() is called on that
The data then goes, one byte at the time, from client A to client B.
Client A stops running, but Client B just sorta hangs around... in a
deadlock i presume. I can make it return and print out the read line
by doing one of two things:
- kill the server
- manually send a -1 to client B
When i've used streams before, i didn't have to send a -1 in order to
get the reading side to get on with it - it just happened magically. I
also don't understand why killing the server make things better...
Can anyone explain this or, as an alternative, suggest a better way to
exchange bytes via RMI. I just really wanted to make streams work. :)
Oh, another thing. To make the server available, i've made it Runnable
and in the run i have a while(true) loop, that makes the thread sleep
for a chunk of time. Maybe that is a problem, too?
Regards,
Carsten H. Pedersen
----------- SOURCE BELOW -------------
package streams.holder;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface RemoteByteHolder extends Remote {
int getByte() throws RemoteException;
void putByte(int b) throws RemoteException;
}
...
package streams.holder;
import java.rmi.RemoteException;
public class ByteHolder implements RemoteByteHolder {
private int theByte;
private boolean stored = false;
public synchronized int getByte() throws RemoteException {
while(!stored) {
try {
wait();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
System.out.println("hb: get: "+theByte);
int i = theByte;
stored = false;
notifyAll();
return i;
}
public synchronized void putByte(int b) throws RemoteException {
while(stored) {
try {
wait();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
System.out.println("bh: put: "+b);
stored = true;
theByte = b;
notifyAll();
}
}
- 8
- inner classes and other stuff...from latest oreilly Learning Java, pg 623:
www.francesdelrio.com/java/TextEntryBox.java (SSCCE)
I have a few questions about this example:
1. a second class gets created (TextEntryBox$1.class) when this is
compiled, even though there's no inner class here..
2. it seems like a new instantation of ActionListener is being passed
in a meth arg.....
( field.addActionListener(new ActionListener( ) { )
when in fact ActionListener is an interface and as such cannot be
instantiated, only implemented.. (as far as I know...;)
3. and this ActionListener interface is not implemented anywhere here
that I can see....;)
could someone pls explain these things that seem contrary to what I have
read... (i.e., what I THOUGHT I understood... oh brother....)
thank you...
(PS: also, pls, why do some methods have a ');' after end of method
declaration?)
- 9
- major version 49?It looks like the JRE classes that come with the 1.5.0 beta have their
major version set to 49. Does anyone know of any documentation
available for this new version of the class file format? It appears
that the signatures can now have "+" prepended to them, which I am
assuming has something to do with generics. I have no idea what other
changes may be in there.
- 10
- Who specifies Java? We know that Java is specified by Sun Microsystems, Inc.
On the other hand, a language is specified by its specification
and in the case of Java this is the JLS. The specification is
specified or written by its authors. The authors of the JLS are:
http://images.pearsoned-ema.com/jpeg/large/0321246780.jpg
James Gosling, Bill Joy, Guy Steele, and Gilad Bracha.
So then, is Java being specified by James Gosling, Bill Joy,
Guy Steele, and Gilad Bracha or by Sun Microsystems, Inc.?
- 10
- Oracle Procedure out parameterHi,
I use a Oracle procedure with some out parameters.
How can I get it from a JSP/JSTL ?
I don't find any samples ....
Regards
Michael
- 12
- Trap and write out error to fileI am using the following borrowed code to run unix commands.
Occasionally it returns 3, apparently without actually running the
command and I do not know why.
I would like to get more info on the error and write it to a file.
As I am not a java programmer can someone help me amend the code to
write the error details of the t object to a file?
Thanks in advance.
Runtime rt = Runtime.getRuntime();
Process p = rt.exec(Command);
try {
rc = p.waitFor();
} catch (InterruptedException intexc) { rc = 2; }
rt.gc();
} catch (Throwable t) { rc = 3; }
- 14
- JaveHi
I need some help, I need to learn about java. What books, authors are the
best.
- 15
- manipolazione pdfSul server ho 3 .pdf come posso via codice unirli in un unico .pdf ?
Magari qualcuno di voi conosce qualche framework per la manipolazione
dei documenti pdf ?
|
| Author |
Message |
Michael Voss

|
Posted: 2003-11-3 22:48:00 |
Top |
java-programmer, Recursion / Iteration (was Re: Increasing the stack?)
Hi !
"bm" wrote the following:
> All recursions can be rewritten as iterations. Though it may not be as
> elegant.
> But not all iterations can be written as recursion.
I always thougt, it was just the other way round, but I might well be wrong
! Can you show one example for your last statement (an iteration that cannot
be expressed as a recursion) ?
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Static class - one per JVM or one per app?I have a class called MyClass that contains a static variable (myVar).
I have two J2EE apps running on WebSphere under the same JVM,
MyFirstApp and MySecondApp. From MyFirstApp i set the value of myVar by
doing MyClass.setMyVar(3).
....what will be the value of MyClass.getMyVar() when run from
MySecondApp?
ie - will the static var have scope across the whole JVM or just the
web app?
Thanks
David Bevan
http://www.davidbevan.co.uk
- 2
- Memory issueHi All,
I have a problem with memory when I use a connection to a database. I have
also posted the question in the database group but as I suspect that it has
to do with garbage collection I also post the question here.
I have a problem with memory using SQLserver on a server running WIN2K
Advanced Server with 2 GB! of internal memory. We limmited the SQLserver
memory to 1 GB and 512 MB for JVM (version 1.4.2_01). The OutOfMemory error
is always at the same place in the jdbc driver as shown below.
java.lang.OutOfMemoryError
at com.microsoft.util.UtilPagedTempBuffer.compressBlockList(Unknown Source)
at com.microsoft.util.UtilPagedTempBuffer.getBlock(Unknown Source)
at com.microsoft.util.UtilPagedTempBuffer.write(Unknown Source)
at com.microsoft.util.UtilPagedTempBuffer.write(Unknown Source)
at com.microsoft.util.UtilByteArrayDataProvider.receive(Unknown Source)
at com.microsoft.util.UtilByteOrderedDataReader.receive(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.submitRequest(Unknown
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.openCursor(Unknown
Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown
Source)
at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown
Source)
.............................................. Truncated from here
.................................................
If I run (using same database & JVM) on a computer (W2K prof.) with 512 MB
internal memory and no limmit set for MS-Sqlserver but for JVM 128 MB doing
the same stuff, there is no problem at all.
I suspect it has something to do with a late "kicking in" of the Garbage
Collection causing memory segmentation. So when a big chunk of memory is
required (a large result-set from the database) no contigouis memory block
of memory is availble in the current heap. The JVM claims more memory to
expand the heap, grows and grows until it cosses the limmit. But I also
tought that garbage collection takes care of that too.
I hope some one has seen this behaviour and can point me in the right
direction.
TIA.
Frank.
--
Met vriendelijke groet,
Frank Brouwer
_________________________________________________
Trimergo BV
Project Manufacturing Software
Amersfoortseweg 15 C
7313 AB Apeldoorn, Nederland
Telefoon: 055 - 577 7373
Telefax: 055 - 577 7370
www.trimergo.com
- 3
- reading a skingle key without pressing ENTER afterDenis wrote:
> Maybe I could write my own read() function
> deal with all backspace pressed etc...
>
> How do I read then a single key in Java?
> So it'll get just one keystroke and return key value
> without presing ENTER ?
You can't - that's the source of the problem and where
all attempts at a solution will fail.
- 4
- Searching and replacing multiple strings in textSuppose I have a String like:
"The quick brown fox jumped over the lazy dog's back."
Suppose I wanted to make the following multiple replacements in the
String:
"quick" -> "slow"
"brown" -> "red"
"jump" -> "walk"
"over" -> "under"
"back" -> "stomach"
After making the replacements, the String becomes:
"The slow red fox walked under the lazy dog's stomach."
It would be easy to just scan the string N times if we're replacing N
words but I'd like a way that scans the string only once regardless of
how many words we're replacing. I'm sure tons of programmers have had
need for this and I'm wondering if there's already some existing code
on the net for it.
If not, then what are the best data structures and classes to use for
this? For example, should the collection of words to replace just be a
String[] and the collection of replacements just be a String[], so
that e.g. wordsToReplace[i] is replaced by replacement[i], and then
you do the search and replace algorithm something loosely along the
idea of:
0. assume an input String, an output StringBuffer
1. set c = current input text character
2. if c is the first character of any of the words in wordsToReplace[]
then
2a. check if the next input character is the next character of
any of the words in our input string and so forth....
if the input word is a match, append the replacement
to the output StringBuffer.
otherwise, append the character c from step 1 to the
StringBuffer and
go back to step 1. with the input character
advanced to the next character.
I'm being very sloppy and crude here and only trying to illustrate the
idea, because actually programming the above function while making
sure you handle all the out-of-bounds cases, etc., would be tricky and
time-consuming, and I want to post here for a pre-canned solution or
something easy I haven't thought of yet before going to all the
trouble.
Thanks very much for any replies.
Chris
- 5
- Webservice from a servletHi,
I have an existing application uses Servlets and hosted on Websphere6.
Now we have a requirement to meke the same functions which we have in
JSPs and Servlets existing as Webservices.
Can any one have idea how to achieve this.
At this movement what i am looking is atleast how to use the existing
servlet as a webservice? A Simple example.
Thanks for the help in advance.
regards,
Ravi
- 6
- Multiline JLabelHi, I want to use a JLabel but I want it to be shown in several lines.
Otherwise the JDialog is very very wide when the text is long.
How can I do that?
- 7
- 8
- array initilization and memory usageI'm a little new here, so please bear with me if this sounds like a
goofy
question!...
let's say that I have an class with 15 or so members, each taking up a
fair
amount of space - we'll call this class bars
If I create an array of 400 empty bars objects, but only instantiate
the
first five or so then am I still setting aside the memory for the other
395?
I hope that made sense!
Thanks
- 9
- Creme 3.27 and AWT framesHi!
I working on a problem. We have an application in which a signature can
be captured. This works perfectly on a PDA (Windows CE, Creme 3.25) but
since the upgrade to Windows CE Second Edtion, Creme 3.27 it fails to
work.
The problem is, the created frame will not be shown after the
frame.show() method. It looks like this thread is killed because the
code after the frame.show() isnt executed.
The (partial) code:
frame = new Frame();
frame.setBackground(Color.white);
frame.setSize(dimension);
saveButton.setLabel("Save");
saveButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e)
{
saveButton_actionPerformed(e);
}
});
frame.add(saveButton, BorderLayout.NORTH);
clearButton.setLabel("Clear");
clearButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e)
{
clearButton_actionPerformed(e);
}
});
frame.add(clearButton, BorderLayout.SOUTH);
frame.show();
frame.addMouseMotionListener(this);
frame.addMouseListener(this);
frame.addWindowListener(this);
}
//////////////////
frame.pack() before frame.show() doesnt help, frame.setVisible(true)
instead of frame.show() doesnt help. Anyone an idea ?
- 10
- Waiting For A Synchronized MethodSay thread1 begins executing a synchronized method.
While it's executing, both thread2 and thread3 call the synchronized
method, in that order.
When thread1 ends executing and gives up its lock, is thread2
guaranteed to execute next (because it's been waiting longer than
thread3), or is it possible that thread3 executes first?
My experiments seem to point to thread2 always running first in the
above situation, but I'd like to verify this.
Thanks,
John
- 11
- Changing the value of Boolean?Sure I've read somewhere (but can't find it now) that you cannot change the
value of a Boolean tyep variable. You have to set it each time like this -
////////////////////////////////////////////////////////////
Boolean b = new Boolean(true);
b = new Boolean(false);
////////////////////////////////////////////////////////////
Is this correct?
thanks
harry
- 12
- A constructive debate: Eclipse or NetBeans?On Mon, 15 Oct 2007, Jon Harrop wrote:
> > Anyway, I agree partially that Eclipse workspace creation should be
> > easier. I even filed a bug about the fact that you cannot create a fully
> > working workspace programmatically and then just use it. Eclipse writes a
> > lot of workspace-specific caches that don't work even inside the same
> > workstation, let alone after porting them to another user. (And it's even
> > an error to call them caches if Eclipse won't invalidate them when they
> > are outdated.)
>
> Ugh. Just me trying it here for the time being though. :-)
I didn't quite understand. Let me clarify what I said, just in case you
thought I was talking about something people do every day with Eclipse:
I meant it's virtually impossible to create a _whole_ workspace (with
Eclipse, plugins, projects, settings, just press play on tape...)
programmatically. Individual project settings (and a lot of them) can be
commited to version control and many typical settings work out of the box
after checking them out.
> I'll give it a go. I've read a lot of conflicting advice about installing
> libraries though. A lot of people say just copy the .jar's
> into .../jre/lib/ext/ and the .so's into .../jre/lib/amd64/ but the
> official documentation warns against this for non-specific reasons. In the
> end, I ignored the advice of the official JOGL docs and installed it by
> hand. Compiling and running JOGL demos is easier now but most of them still
> don't work.
I have never written anything under the jre/jdk directory. The whole
thought of stabbing installed software makes me feel sick :)
Fortunately, I don't think there's ever any need for that, either.
- Ville Oikarinen
- 13
- JSP upload - detecting file type by mime type? what is application/octet-stream?I'm uploading a file via servlets or JSP, using the O'Reilly
MultipartWrapper, and was hoping that to be able to determine the file
type (eg. Excel spreadsheet, Word document, Powerpoint, PDF) depending
on the Mime Type.
Simple enough using the O'Reilly servlet package ~
<%@ page import="com.oreilly.servlet.*" %>
<%
if (request instanceof MultipartWrapper) {
try {
// Cast the request to a MultipartWrapper
MultipartWrapper multi = (MultipartWrapper)request;
// The file upload field on the submitting form is called
'upfile'.
String mimeType = multi.getContentType("resourcefile");
...
%>
Strange thing though is that I'm not getting the expected Mime Type.
For example, I just uploaded a Microsoft Word document and the
mimeType String is "application/octet-stream" instead of the expected
"application/msword".
However, uploading Excel spreadsheets and PDF files provided the
expected results of "application/vnd.ms-excel" and "application/pdf".
(see http://www.bc.edu/bc_org/tvp/email/helpers.shtml or
http://www.yolinux.com/TUTORIALS/LinuxTutorialMimeTypesAndApplications.html
for lists of mime types)
So, does anybody know why the Microsoft Word documents send the wrong
mime type ? Should I instead just use the file extension to determine
file type perhaps ?
Thanks in advance,
Stephen
- 14
- Ant multi OS <exec> adviceHi,
I have the following Ant code which I would like to also use on Linux:
<target name="build.XmlJaxb">
<exec dir="${checkout.dest}/XmlJaxb" executable="cmd">
<arg line="/C ant -logger org.apache.tools.ant.XmlLogger
-logfile ant_log_dist.xml dist" />
</exec>
</target>
For Linux I woul dneed to replace "cmd" and "/C" with "bash" or something?
I know there is the <exec> OS option but then I would need to copy the
<exec> tags with a Windows and Linux version. Gives maintenance errors.
I know I could make variables for "cmd" and "/C" and use the <if>
contrib to look at the os Java system property.
I cannot use <ant> task because I do not seem to be able to specify the
Xml logger and the output file.
any ideas?
thanks,
Peter
- 15
- Changing fonts in a JTable header I've been trying to figure out how to change the font in a JTable column
header to bold. I've been accessing the TableColumnModel().getColumn(x) for
the column I want, but i don't see any getFont or setFont methods which are
available.
Can someone point me in the right direction on how to change the header
text to bold in a JTable?
Thanks!
[Tim]
|
|
|