I am working on cloud storage system in ASP.Net MVC5. In which I made a file manager that handles cut,copy,download multiple files,edit and preview of files, but I want to edit documents like word files in real time (collaborative editing)..is there any api that can help me accordingly.
Thank you in advance.
you should use Signal R for real time applications...it may be possible with the help of application user interface but its better to write your own code according to your choice...
[http://signalr.net/][1]
dev_express and syncfusion may be your solution..try these..
This is turning into a huge comment, so I'll just explain my point of view in an answer. I'll remove it, if I see an actual answer appears.
I am suggesting you start writing your own code for collaborative editing and the reason is quite simple. You need at least slightly different processing for almost each file type, which suggests there will never be a single API to support collaborative editing for all file types, unless somebody makes it their goal to maintain it and keep up with every one created.
Start it simple, text (or hex) editing. Define how changes are made and implemented on other clients and then work your way to add as many file types (and methods that go with them) as you need.
You could use source code of 1 of these open source collaborative text editors (you'll have to find download / Github links on their websites) to get a general idea how to do it, but you will still have to put in some work and won't go far without creating your own code.
Collaborative editing requires user 1's (who just started editing) client to send either one of these:
Data pointing to changes made in file
Full file, and user 2's client (or central "server") should be able to calculate the changes made from there and implement them.
One of the problems is to overwrite only that portion of the file changes were made to (and avoid overwriting the other user 2's work).
And the biggest problem (the reason you can't have "1 for all" method/API) is each file type has its own structure meaning that different file types will have different data representing changes in file. If you try to write raw data it might work, but you'd still need to calculate and lock away specific portions of file, that contain general information, rather than data of your file.
Related
I am trying to create a .resource file which will contain all the strings being used in the application. I don't want to do it manually.
I know there are certain ways to do it. But my problem is, I don't want to have it done manually, where I need to add each string resource. Is there a way to do this without I having to put each string, and it automatically detects all the strings resources corresponding to different pages.
Any insights on this would be helpful.
Yes, there is a way to do this.
You can try with R#, although the tool is commercial, there is a 30-days trial period.
As a regular user, I can tell you that it worth every cent.
There are suggestion for every string, and moving to the resource file is accomplished by one click.
C#
TL;DR: I want the user to be able to input text, which is then written to an external file, which then can be called later based on position in the file. What's the easiest way and form to read and write a list of strings to?
Very amateur question, but I can't seem to find an easy anwer on the internet. If I'm missing something obvious, please redirect me. I am writing a very simple program in which the user can input a string which is then written (added) to an external file, from which later a string can be called based on the position in the file. I found things like JSON, Resource file, SQL DB... Problem is that due to my lack of programming experience I have no idea what's the best option to look into.
Example of what I want to achieve:
User inputs strings 'Dog', 'Cat', and 'Horse' into the textbox. Each of these strings are added to the external file. Lateron, the user calls the 2nd number on the list, to which the program returns 'Cat'.
Thanks!
If you already know the kind of data that will be saved I recommend using XML Serialization. This lets you save and read your file very easily. The linked example is from Microsoft and shows a dataset being serialized. If you want to save a generic list instead of a fixed object you might find this link helpful.
Alternatively, you could save data to your application configuration file (search online for "C# application configuration for PROJECT_TYPE" where the project type is winforms/mvc/class library etc..)
I'm currently working on a winforms application that gets information from a user via a textbox. Since this information is not likely to change very often, I would like my application to save the input and load it into the appropriate text box the next time it is run.
I feel confident in my ability to set this up on the form side of things, my question has to do with how to store the values outside of the program. My first instinct is to just use a text file, but the overhead needed to handle IO and reading in the values seems a bit much. I also would rather not have the user editing it outside of the textbox in the program. I tried using string resources, but those are read only. Is there a more elegant solution available?
You need at least a mediocre database client whether it be sql server, mdf, MS Access, SharePoint, Oracle etc. Sounds like a vis studio prog. (winforms). They are designed for IO procedures but requires data architecture knowledge or relational dbs. (RMDBS). Try a lightswitch project (if a VS proj.) to get the basics of db and form data relationships.
I know it's not outside Your program, but you could try settings, it's easy, kinda like the resources ownly in the settings you can change it.
To change settings goto:
Properties and then double click Settings, here you van add strings, bools etc. Make sure you set them to user
To access them through code use:
Properties.Settings.Default.
To save the settings use:
Properties.Settings.Default.Save()
I'm building a trivia game that retrieve questions from XML file using javascript.
But the XML file is available to those who got the full path to the XML file.
How can i prevent users from showing the XML file ?
Thank you.
If it's going to be available to the client via Javascript, it's got to be available to the client in general. Now you could encrypt it, then decrypt it in the Javascript - but that's more of an obfuscation technique than anything else... basically if you need the browser to have the plaintext version of the file at some point, you can't prevent it from being available to users in general.
If the problem is that the file contains both questions and answers - i.e. data that you're happy for users to see and also data that you don't want them to see - you should split the file in two.
If you only want users to be able to see the data at the right time (i.e. when the question is asked) then you can introduce a server-side aspect which will serve one question at a time, when requested, and log that the user has just seen the question. That won't stop users from fetching questions, but it will stop them from doing so in advance without you being aware of it. (Unless, of course, they can log in as a different user, fetch the questions, work out the answers, then log in as their real account and give all the right answers. At that point it's more a matter of authentication and user control than anything else - after all, they could take the test twice, too...)
I don't know your game software flow, but I think you have to write a web service which enforces validation rules over the XML files (stored in non publish web server are).
I am currently working on two programs and both are still in the planning phase but I have one question that I need to answer before I finish planning. Is there anyway to pull a file in and read the properties?
Basically what I want to do is be able to read the properties of image files and pull out the resolution, file size, date taken, and all that. And then do the same with music files (artist, album, length, so on). The closest I've found is a 6 year old project to pull the EXIF information out of images at http://www.codeproject.com/KB/graphics/exifextractor.aspx .
I'd be thrilled if there is one method to pull properties out of both kinds of file types. But I'll also be happy with two separate ways.
Including the one you found, there's also a good one hosted on Google Code named ExifLibrary.
Edit: Found another one here based on Drew Noakes Java MetaData Extractor.
Are you looking for a .NET way to access media metadata properties?