This question already exists:
Closed 11 years ago.
Possible Duplicate:
version to folder using java programming
In my Java web application project,I need to add versioning to one of my Images folder,if user done any modification to image and updated then it should maintain new version on recently updated image(similar as svn), to do this i decided to integrate svnkit in my project please tell me how to do this programming or implementation.
This is similar to a question posted earlier... Anyway, SVN is not a very good choice in my humble opinion as it is suppose to be used with text-based files. Why do you want to call a 'diff' on binary files? ...and why? I would recommend one of the following:
Store the images as blobs in a database, that included an MD5 sum of the file, date modified, etc.
If you don't like blobs, store the images in a folder with a time extension (i.e myimage.jpg.20111112_092311_1) and store the md5 sum of the image somewhere else so that you know it got modified.
I have worked with SVN in java apps before. I do not find SVN particularly trustworthy. I would recommend you think carefully before going that route. Your own implementation may actually be better here.
(For md5 sums, search for MessageDigest)
Related
I have really low knowledge on Java and JasperReports, barely used those to play around, nothing too serious. A friend of mine has been trying to get someone to develop him an application that will generate PDFs with information from an access database for each of his clients, however, after 6 months and 7 developers who ditched him, he has found none, so he asked me if I could help him to which I said I'd give it a try.
What I have been able to do so far:
So far I've managed to successfully (Everything has been done separately, I have like 8 projects in total so far):
Use Jaspersoft Studio/iReport to create a single PDF with the required client information on each sheet.
Create a separate JasperReports project with a input field to get a pdf with a single client information.
Create a Java App with a JFrame to launch the report generation.
Create a Java App to connect to the access database through ucanaccess and validate the search criteria
Questions:
Now, after a few days on Google up and down I havnt managed to successfully achieve everything that I'd like to achieve, and I'd love if someone could either point me into good noob-proof guides or (if willing) provide a noob-proof answer so I can continue to move on.
Create a Java App where you can choose to generate all client's report or a single report for a specified client (I am assuming this isn't too complicated since it'd just be a matter to embed both Jasper reports into the java app), however I'd need to pass the input value into jasper report field to generate a single report (Not sure if this one was clear enough), and run the query for the data-set based on that field's value.
Ideally though not highly needed, pass yet another variable as a field to set a date range.
Since this is being done on a MS Access Database -*.accdb- (Don't blame me, I've been telling him to move to MySQL/SQL for quite a while now), I'd love to know if its possible to make JasperReports do a query based on a UCanAccess JDBC connection (Tried a few options, none worked).
Finally, I need to generate in the report a date range (Something like: "Between 1/Jan/2014 and 1/Feb/2014")
I feel like I've made a decent amount of progress so far, but since I am no pro on either JasperReports nor Java, I am getting stuck in a point where more knowledge is required to create a more decent and practical piece of software and I'd love if someone could point me into a better direction (Either if something is impossible or just a few links to help me get thru)
-Remeber to add ucanaccess jar and all dependencies jars in the Driver Classpath, while creating the Data Adapter
-You have to set Showschema=true:
e.g.
jdbc:ucanaccess://c:/db/database.accdb;Showschema=true
In this way Jasper Studio will be able to navigate the metadata of your database, and you'll find your tables under the PUBLIC schema.
Then you'll be able to create your reports as usual.
This question already has answers here:
SQLite with encryption/password protection
(9 answers)
Closed 9 years ago.
My desktop Java app uses several read-only SQLite databases, which I would prefer people not be able to open up and look at. Normally, this might be accomplished through encryption, but I'm currently using the sqlite4java library, which does not support encryption and doesn't easily allow other SQLite encryption libraries (e.g. SEE) to be used.
What I'm trying to do is make it as difficult as possible for a "casual hacker" to just find one of these database files and open them up. For instance, someone threw out the idea of sticking them in a password-protected ZIP file, then using a library like the ones suggested here to decrypt it on the fly as either an InputStream or a temporary file.
Would this be something that is worth doing?
EDIT: I realize that this isn't going to be perfectly secure, and a hacker dedicated enough might be able to still find a key and decrypt it (this seems like a vulnerability with any such programs).
"What I'm trying to do is make it as difficult as possible."
You are probably just making it as difficult as possible for yourself.
Regular users don't open application binaries. People that open application binaries have tools to find your encryption key.
If you want to engage in security through obscurity, just name the database file "commons-io-3.2.1.jar" instead of "mydb.sqlite3". No trouble for you, still throws off the "casual hacker".
Instead of password protecting your SQLite DB, you can choose not to ship it with the application APK, rather download the content on first run, so that you don't have to encrypt and decrypt and your APK is lighter.
Also remember, your DB can still be hacked by intense hacker.
I have a application which is created on ZK Framework , i want to give user a functionality where user can open a saved file in edit mode and then again saved the changed in database can any one know which API can help me to do this?
You could use Google Apps to do so and set Google Docs to edit your DOC, PDF or even XLS extension files. For more help on setting it up, feel free to ask again. :)
The problem you're posing doesn't have a simple answer, unfortunately.
There are two general approaches you could take..
The low hanging fruit is to provide an interface for the user to download a file and upload it after they make edits using whichever editing software they choose / is appropriate.
The other approach would be to provide a GUI to edit files. Regardless of the web framework you are using, this is a daunting task to say the least. As #userRandom mentioned, this is a large part of what Google Drive (formerly Google Docs) is attempting to solve.. but even Google's solution is not perfect and very much a work in progress.
I would strongly suggest evaluating the scope of your project before proceeding.
If you choose to move forward, consider a simple solution that works for .txt files. Then, consider how you might handle .doc files. Then, PDF files, XLS files, etc.
Folks here will be able to answer specific questions.
I want to create a .dst embroidery file using Java. Are there any supporting libraries available? Or is it possible to convert any kind of image file to the .dst embroidery file format using Java?
Can anyone suggest any algorithms, encoding-decoding methods, etc?
I am the developer at Embroidermodder working on formats (the link mentioned by theJollySin).
I don't have any Java code, but I can point you to some preliminary documentation of the format (http://www.achatina.de/sewing/main/TECHNICL.HTM).
What are you trying to create in DST? I can assist you with whatever issues you have getting your Java code running.
The short answer to your question is, no. There are currently no popular libraries for generating .dst embroidery files with Java. My guess is that you will have a lot more luck trying to convert other file types to the .dst formats. The only option there (that I know of) is Corel Draw.
In the end, the best solution I can think of is to use the Tajima Ambaasador website. You have to register, but I believe most of their design/DST services are free.
(After some searching around online I also found this website, which has some more free software and seems like the best place to start if you're looking for information.)
Yes. I've written exactly such a library for python (pyembroidery) and trancoded that to java. It will work for both Android and Oracle Java and has fully fleshed out reading and writing of most major embroidery formats.
https://github.com/EmbroidePy/EmbroideryIO
As part of a parallel project I've also done a considerable amount of work documenting various formats for a wiki on the topic. Located here:
https://edutechwiki.unige.ch/en/Embroidery_format
Which also has all the known technical details for DST file formats:
https://edutechwiki.unige.ch/en/Embroidery_format_DST
As for the second part of the question, embroidery files are vector-like files which provides a series of commands to be issued to an embroidery machine. You cannot directly convert raster-based image files to embroidery because the pixel information does not directly convert to any sort of embroidery machine command instruction structure.
I'm currently trying to recover some old code that was developed using IBM Visual Age for Java. Unfortunately I do not have an installation anymore, and the only thing I have is just a ".dat" file containing the repository.
Is there any way to get my code back? Otherwise, is there any way to get an old Visual Age for Java install so that I can try to recover my code directly?
It appears that IBM.com does not have the Visual Age Developer Domain online anymore, and hence not the trial downloads which would have been perfect for your purpose.
I would suggest that you call your local IBM branch, and explain your problem and ask if you can get access to one of the old distributions to see if your problem can be fixed.
If not, you might consider decompiling the current class/jar files before looking into purchasing from IBM or finding an old copy on ebay or similar.