I downloaded my chrome bookmarks to move to a new computer and it saved as a XML instead of HTML - when I try to convert i get an error - html

I tried using several conversions -- I've used Altova and a couple of other free software options. I don't know how to add the XML file for you to view but would really appreciate some help!

When I use the Export Bookmarks option on Chrome browser, by default, the only option it allows is to save as an HTML file. If you did mistakenly save as an XML file, then using an XML editor like use probably used from Altova will most likely create more errors.
1) I'd suggest, you first right-click on the XML bookmarks file and go to Properties tab and see if you can restore the oldest, least-modified version of it.
2) Then simply try renaming the extension of the bookmarks file from .xml to .html to see if it now works.

Related

How to open a database file with no file type in SSMS?

I have a database file with no file type, I need to open it in SSMS first. When I try to open it, it says no editor for it. I tried to open it in a text editor by changing its name with a txt extension, it displayed unreadable code on the whole page. I have searched online it seems the only way is to change the file name with an extension. Is there any way to make SSMS recognize the generic extension file? Thanks
Larnu corrected me to use "Restore" instead of "Open". Thanks
New to database, need to learn everything.

PhpStorm open file in a wrong format

PhpStorm is opening a php as an SQL file. I checked the extension and it is php but PhpStorm insist to open it as an SQL. I've tried to clear the cache but no use.
Go to settings and under Editor>file type.
add a file type that you want to add or may be you remove other file type.

Download dotfile using html5 download preserving name

I have a directory structure, containing a list of directories and files.
I want to give user an option of downloading a file. For downloading, I'm using HTML5 download attribute. It works perfectly.
But the directory structure i have can have dotfiles too, examples: .babelrc, .gitignore, .eslintrc, etc.
When I use the same technique to download such files, file is being downloaded with the same content but the file is no longer a dotfile. After downloading, let's say .gitignore, the file becomes gitignore.txt.
I'm using this for my project github-plus - Chrome extension to display size of each file, download link and an option of copying it's contents.
Any help would be highly appreciated.
I'm using this format:
Download
JSFIDDLE DEMO
Quoting HTML5 specification on downloading resources with the download attribute, about file type/extension :
If the claimed type is known, then alter filename to add an extension corresponding to claimed type.
Otherwise, if named type is known to be potentially dangerous (e.g. it will be treated by the platform conventions as a native executable, shell script, HTML application, or executable-macro-capable document) then optionally alter filename to add a known-safe extension (e.g. ".txt").
It seems that:
the part of the algorithm that finally choses the filename is platform-dependent
if the extension is not recognised, as in the case of dotfiles, the browser will try to determine it by using the file MIME type
dotfiles might be considered anyway as potentially harmful as they are hidden files on various platforms. This seems to be what happens in your case, with the initial dot being removed and the .txt extension appended.

MediaWiki filepath Magic Word doesn't work for some files types

I'm trying to use the MediaWiki filepath magic word` so that I can create some template links that pass a specific MediaWiki file. Unfortunately with certain file types, filepath just returns nothing.
The file I'm trying to get the path for that's failing is a text file in this case. I have confirmed that I am using the correct filename as I can create a regular file link using [[File:Name.txt]], and {{filepath:Image.png}} works properly.
Example of what I'm trying to accomplish:
[http://server/processfile.php?path={{filepath:<filename>}} Process A File]
Is this a known issue? Is there an easy way that I can debug what's happening here?
After digging around a bunch more I was able to resolve the issue. It turns out that even though the MediaWiki would accept the file, it was being assigned a random mime type because it was a .yaml file.
After updating mime.types and mime.info in MediaWiki and adding the mime type (text/yaml) to my IIS configuration, I was able to get the downloads working and the file links showing up.
Full disclosure: I may have been using an incorrectly cased file name even though I said that I was using the correct file name. :P

Is it possible **to change an .sql file extension to like .myname** and still the software like wamp or sqlite can still read it?

Is it possible to change an .sql file extension to like .myname and still the software like wamp or sqlite can still read it??
-I was just thinking of the possibilities that changing the file extension to something custom could add to db security.
Using sqlite3 in Python you can select any arbitrary file extension (as long as [a-zA-Z]{1,...}) without hindering the module in accessing the database-file.
Note, however, that changing a default file-extension to a different arbitrary one does not increase (or decrease for that matter) security of the data stored in the database in any way.
You'd have to test if other (SQLite-)implementations allow custom extensions as well, but either way, it would have not impact whatsoever on security.
So long as the software in question does not limit itself to only recognizing files ending ".sql", it makes no difference whatsoever.
A file extension is just a label - they do not affect the actual physical contents of a file in any way, and an SQL file is just a text file. That .sql extension is really more of a user aid than a software aid - whilst software will use it as a filter (such as only showing .doc files by default on Word's Open dialog), if you tell a program to treat file X as a file of format Y then it will attempt to read it as a Y-formatted file, regardless of extension.
You could change it to .txt and (under Windows) it would open in Notepad instead when double-clicked, or .doc and it would open in Word (probably incorrectly, as Word would attempt to parse it as a Word-formatted file, not a plain text file). The actual contents of the file are completely unaffected.
You could change the .sql to .txt or .doc or .bmp or .wahoo or anything (or even remove the extension entirely), it will still be readable by WAMP etc.
It will have absolutely zero effect on security.