|
Apart from the fact that you've not actually posted a question, this is JavaScript[^], not Java. Despite the similar names, these are two completely different technologies.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
hi,
in jsp i will create one button.now if i click on that button .exe file has to execute please can any one help on this.
advance thanks
|
|
|
|
|
How about this:
Runtime rt=Runtime.getRuntime();
String cmd[]={"cmd.exe", "/C", "c:\\WHAT\\EVER\\APPLICATION\\YOU\\WANT\\TO\\START.exe"};
rt.exec(cmd);
|
|
|
|
|
thanks Torsten!!
its working very well and one more query if v have to run .sh file in linux how v can do.
plz can u help me on this
|
|
|
|
|
It's surprisingly pretty much the same:
Runtime rt=Runtime.getRuntime();
String cmd[]={"ls -l"};
rt.exec(cmd);
You can run (kind of) any command you want.
Please take a look at the Description:
Java.lang.Runtime[^] @ docs.oracle.com
regards Torsten
I never finish anyth...
|
|
|
|
|
how to implement multiple languages and multiple themes in spring mvc
|
|
|
|
|
First I want to ask if this the right place for a very beginner.
I can write a program that displays a paragraph, and I can write a program that asks a question and you can fill in the answer. Now I need to have the answer go in the paragraph. Any ideas on what I need to look up in order to do that.
Thanks
|
|
|
|
|
I'm not sure what you mean by "have the answer go in the paragraph", but I would assume some sort of text manipulation. Your best bet would be to go to http://docs.oracle.com/javase/tutorial/java/index.html[^] and work through the tutorials, especially the section on Strings.
|
|
|
|
|
I am new to Java & J2EE , i want to start learning the language from a secure coding point of view .. Please help me with this here..
Is the implementation correct .. will this style of coding be sufficient to prevent SQL injection attacks ?
SQLQuery q = session.createSQLQuery("update tbl_files set orderLevel = orderLevel - 1 where meeting_id="+tbl File.get Tbl Meeting().getId() + " AND order Level>"+ tbl File.getOrder());
q.executeUpdate();
Thanks in advance
|
|
|
|
|
|
Thanks for the quick reply ..
|
|
|
|
|
Hi,
I have the following situation:
- read .XML files
- extract some info
- write the extracted info in .XML file
- display the .XML content in .html and create charts/bar
For the first 3 steps, I used DOM to parse the .XML file and to write info.
What do you suggest for charts/bar?
Thanks
|
|
|
|
|
|
Do you have experience with barchart java?
Somebody recommended SVG --what do you know about it?
Thanks!
|
|
|
|
|
Anca Zara wrote: Do you have experience with barchart java? Sorry, no; you will have to do your own reading.
|
|
|
|
|
If somebody else can help me with more details, it will be great!
|
|
|
|
|
i am trying to write to file from database where i stored coordinates values. The file i want to save to is SVG file, the code i was confused with how to replace moveTo coordinates and curveTo coordinates ? plus how to repeat C command in each line ? The data are stored in database as String in this form
355.22 632.0771 355.574 631.338 315.228 632.077
455.22 632.0771 355.574 631.338 335.228 632.077
555.22 632.0771 355.574 631.338 375.228 632.077
655.22 232.0771 355.574 631.338 385.228 632.077
755.22 332.0771 355.574 631.338 365.228 632.077
255.22 432.0771 355.574 631.338 395.228 632.077
155.22 532.0771 355.574 631.338 355.228 632.077
the last 2 values are for move variable i.e: move="355.228 632.077";
and each line is considered as a curve, the curve variable i.e: curve="355.22 632.0771 355.574 631.338 315.228 632.077"; there are 7 curves in my example.
for example :
public class WriteToSVG {
private Formatter f;
public void openFile(){
try{
f=new Formatter("C:\\demo.svg");
}
catch(Exception e){
System.out.println("Error occured");
}
}
public void addRecords(){
try{
String str="<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n" +
"<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->\n" +
"\n" +
"<svg\n" +
" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n" +
" xmlns:cc=\"http://creativecommons.org/ns#\"\n" +
" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n" +
" xmlns:svg=\"http://www.w3.org/2000/svg\"\n" +
" xmlns=\"http://www.w3.org/2000/svg\"\n" +
" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\"\n" +
" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n" +
" version=\"1.1\"\n" +
" id=\"Layer_1\"\n" +
" x=\"0px\"\n" +
" y=\"0px\"\n" +
" width=\"850px\"\n" +
" height=\"1219px\"\n" +
" viewBox=\"0 0 850 1219\"\n" +
" style=\"enable-background:new 0 0 850 1219;\"\n" +
" xml:space=\"preserve\"\n" +
" inkscape:version=\"0.48.4 r9939\"\n" +
" sodipodi:docname=\"001_001_008.svg\"><metadata\n" +
" id=\"metadata9\"><rdf:RDF><cc:Work\n" +
" rdf:about=\"\"><dc:format>image/svg+xml</dc:format><dc:type\n" +
" rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs\n" +
" id=\"defs7\" /><sodipodi:namedview\n" +
" pagecolor=\"#ffffff\"\n" +
" bordercolor=\"#666666\"\n" +
" borderopacity=\"1\"\n" +
" objecttolerance=\"10\"\n" +
" gridtolerance=\"10\"\n" +
" guidetolerance=\"10\"\n" +
" inkscape:pageopacity=\"0\"\n" +
" inkscape:pageshadow=\"2\"\n" +
" inkscape:window-width=\"1606\"\n" +
" inkscape:window-height=\"1028\"\n" +
" id=\"namedview5\"\n" +
" showgrid=\"false\"\n" +
" inkscape:zoom=\"21.48647\"\n" +
" inkscape:cx=\"1014.7893\"\n" +
" inkscape:cy=\"780.14409\"\n" +
" inkscape:window-x=\"-8\"\n" +
" inkscape:window-y=\"-8\"\n" +
" inkscape:window-maximized=\"1\"\n" +
" inkscape:current-layer=\"Layer_1\" />";
f.format(str);
String space=" ";
String fill="003399";
String fill_opacity="1";
String strock="none";
String move = null;
String line="1026.677,438.66868";
String curve="1022.9594,426.89007 1022.7136,426.30999 1022.5051,425.84922";
String id="path4044-3";
String nodeType="cccccccccccccccccc";
f.format("<path%s"+"style="+"\"fill:#%s;fill-opacity:%s;stroke:%s\""+"\nd=\"M%sC%sz\""+"\nid=\"%s\""+"\ninkscape:connector-curvature=\"0\""+"\nsodipodi:nodetypes=\"%s\""+"/>",space,fill,fill_opacity,strock,move,curve,id,nodeType);
f.format("</svg>");
System.out.println("Data added to the File successfully");
}
catch(Exception e){
System.out.println("Error occured");
}
}
public void closeFile(){
f.close();
}
public static void main(String[
] args) {
WriteToSVG w=new WriteToSVG();
w.openFile();
w.addRecords();
w.closeFile();
}}
the above example the move,line and curve variables are declared by given some values, but i want to get those values from database, What's the thought behind that ?
java
|
|
|
|
|
Read the values from the database then transform them into the format you want for your output file. What exactly is the problem?
|
|
|
|
|
the problem i stuck with , i want to get the values of move,line and curve variables from database, they are stored in that form i posted above ?
|
|
|
|
|
So what's the problem? If it is a simple string then use the split [^] method to separate the fields.
|
|
|
|
|
when im upload file i want, file path save into database and file save into project folder with file name rename in java
how to passable
|
|
|
|
|
|
My code is like this
$jq('#<portlet:namespace/>PNLanguage'+ languageId).ddslick({
data : parsedLanguageData,
width:200,
Height:300,
selectText: "Select Language",
Which is working fine. But when we select the value and go for another dropdown, it is showing the empty space if the list size is less than the height.
When I change the value of height parameter to max-height=300 then works fine. How to give this in ddslick in above code.
Please help me on this.
|
|
|
|
|
|
sorry that was by mistake
|
|
|
|