How do I generate SWX data files serverside? - database

By storing data in SWX files on the server, it can be interpreted automatically like loading one SWF into another.
Now I'd like this data to be modified by server side code, how can I do this? Are there any SWX libraries for PHP that I can use?

If you only want store images or other assets I would suggest swfmill.
The project swx-format seems to have all the things you need.
Maybe also interesting for you: Haxe (programming language, generating PHP, swf, neko, js, AS3) has a library hxformat to create swf and abc code on the server side.

Related

What would be the best way to store JSON files for use within a React application?

I have a python script that fetches data twice a day from a server of mine. The script returns around 40 JSON files containing various data. The files aren't particularly big and the combined size of all the files is around 250KB.
Alongside my script I am developing a dashboard in React that renders the data from each file into a table, allowing me a visual representation of the data.
I have been looking at what would be the best way to store these files, something that allows me to upload and fetch them twice a day.
Someone mentioned to me about using MongoDB to store the files, but after some research I feel like Mongo is better at storing the contents of the file rather than the file itself. I tried to develop a solution but I couldn't figure out how it could be done when each object is stored as a document with no clear way (to me) which document came from which file.
Other options I have considered are:
Storing the files on the server that is hosting my React project and rendering them locally as I am doing now during development
Storing the files using a provider such as AWS/Firebase
Storing them in a different database (I see SQL now support the storing of JSON files)
Are there any other solutions that you think would work best for this scenario? If so, why?
Hello,
Check about use of FTP server.
We have clients that send us data every 10 min via FTP that is inside XML files, then I have NodeJS back-end which read these files.
You can use it for your scenario with JSON files.

Android studio how to access server files?

I want to make an app as my final project for my teacher. I will have images of homework assignments and the date of homework assigned in text format in the server. And I want to make an app where it will access it and put it in an activity.
So I need to know what kind of server do I need, if I could just use google drive somehow or not?
Save it as JSON, you save the images on your database and call it in your JSON.
But for what you intend to do I think FireBase will work just file because it is free for small projects like this.

Using X3D and Javascript

I'm supposed to develop a project using X3D. I have an idea to create a conversor of DXf file to X3D. however, to do that, I have to use Javascript to manage this properly, but I haven't found a way to integrate Javascript with X3D. Does someone know some way to do that?
Previously, I though in loading the dxf file, get the data I need, and save this as a X3D file, like writing the XML.
thanks in advance
X3D supports JavaScript natively in the Script node (and it is sometimes referred to via the standardization name EcmaScript). Script events are connected to a scene via ROUTE statements. This provides a bridge between declarative 3D models and programmatic events/computation. Lots more online:
http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter09EventUtilitiesScripting
http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter30Scripts
http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Scripts
http://www.web3d.org/x3d/content/X3dTooltips.html#Script
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/scripting.html#Script
In VRML you can integrate javascript using the Script node.
Here's an example:
DEF SCRIPT Script {
url ["javascript:
here goes your javascript code
"]
}
Considering that X3D started as the XML representation of VRML then I suppose there is support in X3D for the Script node.
Edit: Yes I can confirm the above.

How save text, svg, html, css all together efficiently

In an application, I am using Fabric.js, which lets users write text, draw SVG's, insert images etc.
I want to know, what is the best way to store this data.
Requirements are:
Ability to query the data(text), which tells me that i should store it in DB (MySQL as of now)
I have images, and I am targeting IPad as well, so the images are important, as to how they are stored.
SVG's and HTML/CSS to be saved as well.
I also want to do versioning of the content, as Quora does it, so that a user can see the changes from the past version to the current version. This also includes the versioning of images and SVG's.
I am wondering how Google Docs does it, because they also store our documents, drawings etc.
What is the best way of doing this?
i dont known if it helps but, Opera browser offer an option to save the webpages to an unique file { mht extension }, this stores all the files { css, images, scripts, etc } in base64 encoded text for a later use { when the document is opened }... maybe this can be a way to store data :P
I manage a webapp where users generate reports, and found it more efficient to store images and binary files in the filesystem, and link to them from the database. Elements that are in xml or text are kept in the database for easier searching - in your case this would include css/html and svg (which is xml). Use the database for managing revisions.
Might also check out this thread on storing images in a database.
It looks like Frabic.js is using the node.js javascript webserver on the backend - haven't used this before, but you might investigate which databases are easiest to use with node.js:
node.js database
nodejs and database communication - how?
nodejs where to start?
If you want to query the text efficiently, then perhaps putting all bits of information into the DB separately is the most efficient. Maybe you with to play with OOXML or ODF, that may serve as container for all information you require, and then XML-storage (e.g. eXist) to store it and query (e.g. the text). As these standards are XML-based, you can transform them into HTML (e.g. here or here) but writing an online editor for this is something that monster like Google can do.
You can take a look at NoSQL databases like MongoDB or
CouchDB
See also Storing images in NoSQL stores

How do I put and replace a file using in a client machine in a Silverlight app?

I'm trying to make a Silverlight app which has a local sqlite file to search some data when the app gets offline. I found the following library, http://code.google.com/p/csharp-sqlite/ and it seems pretty nice.
So, what I want to know is, what is a good approach to have and place a file which might be replaced by automatically when the data in a server gets updated at some points?
I've tried to put a file into a folder under the app, but I couldn't access to the file by using csSQLite.sqlite3_open (This method is from the library above). Sorry, I'm pretty new to Silverlight, so my question might be very odd.
Thanks in advance,
yokyo
It doesn't look like this library has been specifially coded for Silverlight. Despite being a pure C# implementation its still likely to assume the full .NET API is available. This is not true in Silverlight.
Specifically Silverlight cannot ordinarily access the local file system. The SQLLite code would need to be modified to understand Silverlight's IsolatedStorage. It would also have to limit its file operations to those that are supported by the streams available Isolated Storage.
The creation of a DB-esq. data source in Silverlight is typically done by create Classes the represent records and collections of records, using LINQ to query them and Xml serialisation into Isolated storage to persist them.
Here is a hacked version of the SQLite code to work with Silverlight, you can use it for some ideas on what to do: http://www.itwriting.com/blog/1695-proof-of-concept-c-sqlite-running-in-silverlight.html

Resources