|
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
|
|
|
|
|
accept two string in java and compare both string remove matching character and count remaining character now accept another string suppose total remaining character is 7 and third string length is 6 then count from one in remaining character and every 7 character last reaming character will be answer. Thanks
|
|
|
|
|
OK, I have done that; what's your next question?
Seriously, no one here is going to do your homework for you.
|
|
|
|
|
Send me $1000 and I will create the design document for that API.
|
|
|
|
|
Hi could any1 resolve me this issue. We are making a final year project to develop a system security application. 90% coding is done and now we need to get access of folders which means to link with dll file. So could any1 guide me on how to link java code to dll file. I'll be really kind to u.
|
|
|
|
|
Hari Kiran B M wrote: how to link java code to dll file. What exactly are you trying to do? If this is a C/C++ dll then you (probably) need to look at using the Java Native Interface[^].
|
|
|
|
|
This is what my all about. I need to encrypt folders ex. u've an idea of how the lock folder using lock folder software. In same way our project works but we'r trying to secure entire system. So do u've any idea on how to link our java program to windows folders. few told we need to access dll file. But our code is in java. I've become numb not getting anything. Could u pls help me.
|
|
|
|
|
You cannot encrypt folders at the application level, which is where Java apps run. This sort of activity has to be done at the driver/filter level.
|
|
|
|