BigchainDB support .json file format. Is there any possible way to store digital asset like images, documents?
You can convert any file (seen as a sequence of bits) into JSON, for example, by converting it to base64, which can then be included as the value in a JSON document.
While that is possible, it's not a good idea. BigchainDB is more for storing metadata (which you might want to search or query), not for storing big files.
BigchainDB allows interoperability with IPFS. Use the unique hash returned by the IPFS, as when files are added to it, to store as an asset information or as a metadata of the asset in BigchainDB which then can be queried to view the file from IPFS.
Related
I am new to XML. I have an XML document that I am inserting data manually. I wanted to know if it is possible to include an image in an XML file and not by using the file path. I have found something about encoding but I do not understand how this work and the option is not even available in the XML editor. After storing the images in the XML file, I will access it using javascript. Please provide further information on this matter.
An image is binary data, and the usual way to store binary data in an XML document is by encoding it in base64 (which turns it into ASCII characters). Libraries to convert from binary to base64, and back, are widely available, but the details depend very much on your programming environment. There are also online services where you can upload an image and get back its base64 representation: an example is here https://www.base64encode.net/base64-image-encoder
I am trying to do some declarative programming in javascript, where I create a spec and a chart should be rendered based on the spec. I was wondering if I should store the spec which defines the chart in a json file or a js file?
Are there any best practices for doing this?
I was also wondering(out of curiosity) why package.json is not a js file?
At the risk of stating the obvious, a .js file contains javascript code. A .json file contains a JSON data structure, made up of a hierarchy of name:value pairs. See: http://www.json.org/
I can't comment on your use case without further information, particularly regarding the contents of your 'spec'; but if it contains a JSON data structure, it would be a .json file.
package.json is a great example. The structure is JSON format, so it's a .json file. It is made up of a set of name:value pairs describing the package dependencies of a .js program. See: https://docs.npmjs.com/files/package.json
When creating and testing your spec, this will be a useful tool: https://jsonlint.com/
I am not sure if the title is appropriate description of what i intend to do. However, below is the url from where I want to parse the csv file in python (the csv handle is visible on the top right corner of the interactive table).
https://www.mcxindia.com/market-data/bhavcopy
I have parsed files before using Requests and lxml but in those cases the address (or location) of the csv file was rather straightforward. In this case, I am not able to ascertain the actual url location of the file. Although rudimentary, my assessment is that it is embedded in javascript code. My question is whether I can indeed parse files such as this? if yes, how usingrequests and lxml
This is public data and a very inefficient alternative is to download the data daily and than parse the locally stored csv file but that is no automation. Any suggestion on how can i automate this task will be very valuable.
I've Protocol buffer (protoBuf) files which has models (c# class) and WADL files which has functionality for the WebAPIs controllers (controllers and methods in xml format). Now, I want to convert both (protobuf and wadl) it to Json standard format in 1 file. This json can be used by swaggerUI, SoapUI or any other tool which take json. And, when one modifies the Json in Swagger then it must also update corresponding protobuf and wadl.(I know it seems lot of work here, any easy way?) Can any one please let me know, How do I make it?
Am very new to alfresco and I am tasked to upload alot of images with their respective metadata. The metadata is in xml format. For example the first batch have 10,000 files with the following naming, for the image is a imagename.Tiff(employee1.tiff,employee2.tiff etc), the xml contains metadata of the employee e.g employee no,name, department, date employeed etc. I have created custom aspects that corresponds to the metadata but my problem is how to index the metadata into alfresco.
I have already created a listening folder where when i drop my files thy are been picked and placed in the right space. The remaining issue is to index the metadata for each uploaded image.
Kindly assist.
An easy way to ingest in bulk, with metadata, is to use Alfresco's Bulk Import Tool
If you are on Alfresco Enterprise, then I recommend that you use the In-place Bulk Import. However, if you do use the In-place Bulk Import, you'll want to distribute the files efficiently on the filesystem and also keep children limited to a few thousand as recommended by Alfresco.
Regarding the metadata in XML - you'll need to transform the XML into the format the tool is looking for. Details available here: http://docs.alfresco.com/4.2/topic/com.alfresco.enterprise.doc/concepts/bulk-import-prepare-filesystem.html