In my web app while creating a particular item users can browse and add images.I want to store these images in CVS.Any idea on how to do it??
I want to store these images in CVS.Any idea on how to do it??
To access CVS from within java, you could either start a separate CVS-process using say ProcessBuilder, or use one of the following libraries.
JavaCVS
JCVS
Related
I have a JAVA application that includes creating VM instances in GCP.
I now am attempting to use the new "machine images" functionality in order to be able to replicate whole instances (as opposed to using the images from disk option).
I am using the beta api to create images from instances, however I need to be able to then fetch a list of these machine-images back to my application in order for them to be used to create new instances.
I am looking for some GET api for this purpose, but
I cannot find documentation on this anywhere. any ideas??
As per this doc you can get list of machine images within a project.
I'm creating an app that contains movie quotes,I would like to store somewhere a file (maybe an excel file) that contains both quotes and movie genre.
The file must be local (because the app works offline for now),shold I use an xls file with the quotes in the first column and the genre in the second or should I use some sort of database?
The file is needed only when the app starts because I will load the data inside arrays
You definitely should use database in this case.
Instead of writing database manager for SQLite from scratch I would recommend to use some existing library for this purpose e.g. http://satyan.github.io/sugar/
There are also alternative libraries based on a different model e.g. https://realm.io/docs/java/latest/
It is up to you which library to use or maybe to write your own from scratch, but you definitely should learn how to use databases in Android development.
I'm a beginner in Android development. I'm trying to make an app where you search for name and show the matching results (from a database) in a listview. Since there's a lot of data, I thought it would be best to write a database without using the SQLiteOpenHandler. So now that I have my .db file, I need a way to be able to use it in my app from the assets folder and also to be able to search through it.
I found to links which I thought could be useful.
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
This shows how to use an existing database.
http://developer.android.com/training/search/search.html
And this is Google's information on storing and searching data. I need to know is it possible to somehow combine these two methods together to achieve what I'm looking for?
You can use this extended SQLiteOpenHelper. It helps to copy the db file from assets folder in your application.
My work has tasked me with determining the feasibility of migrating our existing in-house built change management services(web based) to a Sharepoint solution. I've found everything to be easy except I've run into the issue that for each change management issue (several thousand) there may be any number of attachment files associated with them, called through javascript, that need to be downloaded and put into a document library.
(ex. ... onClick="DownloadAttachment(XXXXX,'ProjectID=YYYY');return false">Attachment... ).
To keep me from manually selecting them all I've been looking over posts of people wanting to do similar, and there seem to be many possible solutions, but they often seem more complicated than they need to be.
So I suppose in a nutshell I'm asking what would be the best way to approach this issue that yields some sort of desktop application or script that can interact with web pages and will let me select and organize all the attachments. (Making a purely web based app (php, javascript, rails, etc.) is not an option for me, so throwing that out there now).
Thanks in advance.
Given a document id and project id,
XXXXX and YYYY respectively in
your example, figure out the URL
from which the file contents can be
downloaded. You can observe a few
URL links in the browser and detect
the pattern which your web
application uses.
Use a tool like Selenium to get a
list of XXXXXs and YYYYs of
documents you need to download.
Write a bash script with wget to
download the files locally and put
in the correct folders.
This is a "one off" migration, right?
Get access to your in-house application's database, and create an SQL query which pulls out rows showing the attachment names (XXXXX?) and the issue/project (YYYY?), ex:
|file_id|issue_id|file_name |
| 5| 123|Feasibility Test.xls|
Analyze the DownloadAttachment method and figure out how it generates the URL that it calls for each download.
Start a script (personally I'd go for Python) that will do the migration work.
Program the script to connect and run the SQL query, or can read a CSV file you create manually from step #1.
Program the script to use the details to determine the target-filename and the URL to download from.
Program the script to download the file from the given URL, and place it on the hard drive with the proper name. (In Python, you might use urllib.)
Hopefully that will get you as far as a bunch of files categorized by "issue" like:
issue123/Feasibility Test.xls
issue123/Billing Invoice.doc
issue456/Feasibility Test.xls
Thank you everyone. I was able to get what I needed using htmlunit and java to traverse a report I made of all change items with attachments, go to each one, copy the source code, traverse that to find instances of the download method, and copy the unique IDs of each attachment and build an .xls of all items and their attachments.
I have an excel file that pulls in data via data connection from bunch of CSV files. The CSV files are generated every now so often by a JAVA program.
Is it possible to refresh the data too via. JAVA program? I see JXCELAPI and JOI are there, but briefly looking at their documentation doesn't indicate my use case is even possible.
In short, I need API that could achieve this effect: clicking on menu Data->Refresh All.
Thanks,
_Madhu
You could try XLLoop. This lets your spreadsheet talk directly to a java server (or a number of other languages) via function calls.
So you can have your spreadsheet call eg GetMyData("somedata") and it will load the data directly from your server whenever you re-calc (ie. Shift-F9).
BTW, I work on the project so let me know if you have any questions.
This tutorial sounds like it might help: Accessing Excel from Java
You could also try Obba which is another solution to access a Java library via Excel cell functions (UDFs)...
However, what you describe could also be done by a very small vb/vba macro which checks/polls for modification of these CVS files. I don't know if this is suitable in your situation, but there is an event listener for that: http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.changed.aspx#Y0