How to store images in ArangoDB? - java

I want to store images in ArangoDb as image file. I want to know if there is any API or Java API for the same. Thanking You in advance.

Storing binary data inside ArangoDB has been a long standing feature request.
Currently its not possible out of the box.
One can however do this by creating a foxx service that handles the data.
The recommended way is to create a file and reference that file name inside the database.
A detailed description and an example foxx app can be found in the cookbook

Related

Saving Things to local storage in java/javafx?

I don't know if this is a super noob question, but I'm currently building an app from scratch with the knowledge i've gained so far, and I'm making a "Notes" app where You can create notes, delete, edit(update), etc etc.
The question I'm having is that I know I can use a database to store data from my input, and I know i can use A Database to save, open the data, but Just incase, does Java have a LocalStorage, like JavaScript/JSON where you can save things and open them up later?
If there is LocalStorage for applications to save data, and open it up after running again, what would be some good resources to read about it and learn it so I may integrate it into my application?
If there is no localstorage, I wan't to be able to perhaps allow the user to add images when creating notes, how would I be able to do that using a database?
As far that I know of there packages that allow you to store data as you intend, but following on your next question, you could possibly store the address/file name of the image you wants to add to the database. You could then use it to retrieve the image file and display it.
If you have any questions on image implementing images in java, reference this documentation and tutorial
If you have any more questions on working with databases, reference this documentation
I hope this helps.

How to get data from XML feed URL in Java

There is a betting exchange website which offer their data in XML from the following link:
http://odds.smarkets.com/oddsfeed.xml
I would like to access this link to retrieve the latest data (in java). Previously I have had to download the (very large) file and add it to my project and get the data from there. What is the best way to achieve this without having to download the file every time I want to access the data?
I plan on storing the returned data into a database.
Thanks
Well this seems to be very tricky question .I would suggest you to create a simple web service application[Client/server architecture] to get the contents from this url. You can use REST to call this url. But what contents you need to read depends on the functionality that you want to achieve.You need to write your custom logic to read the data.Here in you will be acting as client and the url would be your service.
You can refer following link
https://community.atlassian.com/t5/Confluence-questions/Access-page-content-via-URL/qaq-p/163060

Read a file in azure wasbs through scala application

My cluster should read some input files that are located in my azure storage. I am submitting my .jar to the cluster through livy but it always dies because I cannot locate my files -> User class threw exception: java.io.FileNotFoundException. What am I missing? I dont want to use sc.textFile to open the files because it would make them into RDD structures and I need their structure correct.
val Inputs : String = scala.io.Source.fromFile("wasbs:///inputs.txt").mkString
I believe that I am trying to read from the wrong locationo or with the wrong method, any ideas?
Thanks!
According to your description, based on my understanding, I think you want to load the plain text file on Azure Storage using Scala running on HDInsight.
Per my experience, there are two ways which you can try to implement your needs.
Just using Scala within Azure Java Storage SDK to get the content of the text blob, please refer to the tutorial How to use Blob storage from Java, and I think using Scala to rewrite the sample code in the tutorial is very simple.
Using Hadoop Filesystem API within Hadoop Azure Support library to load file data, please refer to the hadoop example wiki https://wiki.apache.org/hadoop/HadoopDfsReadWriteExample to write your code in Scala.

Putting media into an Access Database using Java

I'm making an email system in Java using an Access database as connectivity. What would be the best way to get and upload media/files (.gif, .au, .mpeg and .txt) attachments to the access database? What datatype would the field in the database have to have? I think that i have to convert the file to binaries to be able to store them, i have no idea how i would retrieve them so i can open them in the Java GUI. Could any body explain how to do this so i can add it into my program, or explain any alternatives?
OLE OBJECT is really the only option you have if you want the actual binaries to be stored in an Access Database.
You'll probably be able to use setBlob and getBlob to work with it.

Holding Information in Android App

I've only just started to write in Java on Android, so please bear with me.
I have some settings I want to hold in my app, normally I would have used an xml file. Trouble is i'm not sure how to load it into the xml parser to read it.
I thought I might be able to drop it into /res/values/Info.xml and open it from there but it does'nt find the file.
I have also read that people are starting to use a SQLite database to hold information in, is this more the standard way to go?
thanks a lot
Luke
It sounds like what you want are Shared Preferences. Its a simple way of storing key value pairs, along with a UI for letting the user change them.
You could try storing to External Files (that way they can save settings on an SD card if they have 2.2). You wouldn't be able to modify the files in the res folder like you tried because these files get compiled into the app package. You could also try Internal Files found on the same page. SQLite might be a bit much for config settings.

Categories

Resources