So, We pull solutions from TFS. The solution files on TFS are fine. However, when I edit them on my computer sometimes the code will turn to gibberish (particularly, I'll edit them, save them, close them, and open them later when this happens). It's happened with both .NET files and classic ASP files. When I go "Save As" it says is a binary file. Does anybody know how to prevent this? I'm tired of losing work.
Your problem is the encoding of the file that you or member of your team save the file with.
The encoding should be matched and better to be UTF - unicode.
Stand on some file -> goto file-> save as -> on the save button you'll have a little black triangle on the side -> press it -> you'll see with which encoding you are saving the files.
Make sure that all the members of the team set the defaults of saving to the unicode encoding.
Related
Suddenly (at about the same time as upgrading to 0.9.0) my machine seems to be deleting older versions of Meteor-based apps, from anywhere on the machine including Dropbox. Thousands of files are disappearing. It is a little terrifying. Am I doing something wrong? Can I get them back?
You can retrieve deleted files from dropbox.com . There is a small trash bin icon "Show deleted files" and you can recover them.
I don't know what your files are, but if a program is deleting them according to their format for instance, you may want to zip/rar them prior to put them into the box. This can also save space if the goal is to archive them.
I have an out of memory error on access. My DB is approx 20mb and holds approx 100,000 lines in different tables.
It started this afternoon, whenever i go in the VBA editor, i can't edit anything, because it will delete the text i just typed, and popup "Out of memory".
If i try to use a OnUpdate event on a DropDown list, it will say the same error, and will do nothing. I can't even setup a break point on my code, because it will never go in the code.
I tried compacting it, separating the back and front end. but nothing works, same error. I'm on Windows Xp Sp3
Strange errors like this are sometimes caused by a corrupt form in your database. I would recommend trying to decompile the database file.
You can get more information about the /decompile switch from the following:
How to Decompile a Database
Decompile Your Microsoft Access Database
I would make a backup copy of the database, then do a decompile, and then a compact. Then open up the database and open your VBA Editor and Compile your code. Then test it.
The /decompile switch has fixed many strange problems with Microsoft Access databases for me in the past.
Before I attempt to program the following function myself, I wonder if something already exists.
What I would like to do is click an edit link on my website for a given document, and have that document launch in the native editor on my local machine (via a temporary file mechanism).
When I save the document in the native editor, the document is HTTP PUT back to the website. This can be accomplished by watching the file for writes, or watching the editor process for exit.
This way I can more easily edit documents on the web (instead of going through the download / edit / upload cycle).
My design would work as follows:
Register .webedit files on the local machine.
When a .webedit file is downloaded, launch webedit.exe with the file.
The file contains a URL (http://server/document) which is checked against a security database to ensure we're only opening allowed URLs.
The URL is downloaded to a temporary location.
The temporary file is launched in the native editor.
The file is watched for changes, and uploaded (HTTP PUT) on change detection (or when the editor is closed, if it's not a single-instance multiple-document editor).
Lots of FTP / SCP GUIs have this type of functionality, but I have not been able to find it for the web in general, or a shared library that allows you to plug in to this function.
Has anyone seen a program that does this?
SharePoint works like this.
It's great for managing shared documents in corporate environments.
Users can even checkout/checkin documents & the features are very extensible..you can customize pretty much anything if you know how.
Edit:
Since you're on Linux..i've heard that Alfreco is a great alternative.
I've never used it, but I know a couple organizations using it instead of SharePoint.
It integrates with Microsoft Office as well.
Also, it will definitely be cheaper.
In an AIR app you can use SQLite via the flash.data classes. It appears that by default the encoding of the database created is set to UTF-16le, which means that textual data is stored with two bytes per character, resulting in a nearly 100% overhead for ASCII-heavy database content.
The default for a SQLite database is UTF-8, assuming the shell program (sqlite3) is indicative. Presumably Adobe has decided to override this for some reason, but I'd prefer not to suffer the wasted storage space if possible.
A PRAGMA encoding = "UTF-8"; statement prior to writing anything to the database would normally resolve the issue, but it appears that's not allowed in AIR either.
My workaround for now is to use a "template.db" that I create ahead of time and bundled into the application. In this template.db I've set the encoding to UTF-8 manually. If the database file does not exist already when my program starts, I create it by copying that template to my database file, then proceed to open and use it normally. I've confirmed that TEXT data is then stored as UTF-8, as desired.
I haven't seen any ill effects yet, but this is hackish. Is there a better way to set the encoding to UTF-8? Or is it a Bad Idea for some reason?
With no other workarounds or answers found, I'm posting my workaround as the Answer. It worked fine in a PlayBook app for the last two years, so presumably has no unforeseen side-effects, at least in that environment:
My workaround for now is to use a "template.db" that I create ahead of time and bundled into the application. In this template.db I've set the encoding to UTF-8 manually. If the database file does not exist already when my program starts, I create it by copying that template to my database file, then proceed to open and use it normally. I've confirmed that TEXT data then now stored as UTF-8 as desired.
you may check the execution source file of the project like /bin/debug in C# Visual Studio projects.
The changed committed is not necessarily be executed in your db located in other folders.
I am downloading an xml string from ASP.Net and want it to open in MS Office Infopath. I set the ContentType to "application/ms-infopath.xml" (not sure where I got that from).
On some machines it is fine, on others the xml opens in the browser, or in Visual Studio or some other xml editor, even though Infopath is present.
Who keeps the list of valid content types?
What does the OS or browser do with it?
How can I force this XML to open in the program of my choice (Infopath)?
I know this question is really old, but I had the same problem.
I trolled through all the file types on windows trying to find one that only opens in infopath - and there actually is one! Every default install of office has the file extension ".infopathxml" set to open with infopath. So just set your file= part of content_disposition header to "whatever.infopathxml".
xml does not map to any program by default, but will tend to open in whatever someone last used (usually IE's viewer or visual studio), while almost no one will change what .infopathxml files open in.
As I understand it, its still left to the end user. Content-type specifies how the data should be read and verified, but its up to the end user which extension is mapped to which program. You can't force xml to open in one program anymore than you specify which zip program a zip file should open in... the only thing you can do is use a file extension that is almost certain to be unique for that program, such as .infopathxml in this case.