Prevent PHPStorm IDE From Corrupting Images - phpstorm

Ever since I switched from Eclipse PDT to PHPStorm, I've been having problems on my site where images won't display correctly, especially the little icons in TinyMCE. My favicon also seems to be corrupted.
I'm sure the problem is that PHPStorm is doing a newline character substitution and not respecting my image files as Binary files. When I compare an image from the server with what I have stores locally, I see that it's doing newline substitution.
Any thoughts on how to solve this?
Here's the example of what one should do in Eclipse. I think I'm looking for something similar in PHPStorm.

Settings
IDE Settings
File Types
Upper half of the dialog select Image Files. Below click on Add and type *.ico, or whetever the file extension of your files is.
Should do it

I finally got it to work!
Just before checking your project out, you need to check "change keyword substitution to" and choose "binary".

Related

How to avoid download file rename?

I have a file named <h1>test.zip on my webspace. When i try to download it, it get renamed as
__h1_test.zip
Is there a way to leave the original filename to the downloaded file?
I'd like the downloaded file to keep the name <h1>test.zip once downloaded.
I'm using ubuntu at the moment and i can rename files as <h1>test.zip on my device.
"<" this tag is coverted into "_"
so i suggest you , don't use "< >" tag , add another name.
No. The browser does that to prevent the user from accidentally overwriting an existing file with the same name and you have no control over this.
You have a few options to change it. None of them are perfect.
Go to chrome settings in your browser bar chrome://settings/, scroll down to advanced, click it, scroll down to downloads and check the box to prompt. You can then specify the same name so it isn't auto-renamed but it will prompt every time, even if there isn't a duplicate. You get used to it fast, so it isn't as big of a deal as it sounds like.
If that isn't what you want check out a Chrome extension that attempts to address this issue (not sure if it works with ubuntu though). There are numerous forums out there where people are asking for the same functionality and have been for years so don't expect Chrome to change default behavior... Here's one (untested by me) -> https://chrome.google.com/webstore/detail/downloads-overwrite-alrea/lddjgfpjnifpeondafidennlcfagekbp?hl=en-US
Finally, depending on what you are doing (always downloading the same set of files for example) you could configure an FTP client or something else to pull the files and set the name instead of using a browser to pull them... you would be able to configure that more easily to overwrite. If you are downloading random things and just want to save bandwidth/etc when accidentally downloading the same file, then you likely need an extension/different browser/etc. to resolve it.

How to open a heavy html file

I have recently downloaded my facebook archive, which is a very old account I started in 2009.
There is some conversations I would like to read, the main problem is that messages.html inside the zip weights 98 mo.
Unfortunately,neither mozilla or google chrome can open those 21109 lines of codes in a webview without crashing.
I could open the document with Notepad++, but it's just like searching for a needle in a haystack.
Could you help me please ?
Further to the LINUX comments, we can only assume you are trying to look (or search) inside the html file. You can use any good, text editor like: TextPad, EditPad, etc. You can also download "Unxutils" (not it is not mis-spelled) and use the Windows ports of grep/sed/awk/head/tail/cut etc. There maybe comments or answers posted to use Cygwin which work fine, but require the use of DLL libraries and such. The UnxUtils are stand-alone exe files are work right out of the box with no installation required.
If you are interested in getting some readable files for each conversation you can use the first part of this tutorial which generates csv files which are easily searchable.
http://openmachin.es/blog/facebook-messages

Capitalized "JPG" extension different from lowercase "jpg"?

I am working on a personal webpage, a draft version of which I have uploaded to www.kurtpeek.com. One of the bugs I notice, is that one of my jpeg images in the "About Me" section, "MIT_IAP_SAR_smallest.JPG", does not show up on the web, but I can see it just fine if I look at it on my computer. (You can download the directory from http://dl.dropbox.com/u/1396332/kurtpeek.com.rar ).
The only difference I can see with the other pictures is that this one has a capitalized ".JPG" extension instead of a lowercase ".jpg" one. However, if I try to rename the file to a lowercase extension Windows 7 just capitalizes it again.
Any help on this issue would be much appreciated.
Best regards,
Kurt Peek
P.S. This problem seems similar to this one:
php file upload capitalized filename issue
but as far as I can tell that problem was not resolved.
It is very likely that your server is running under a Linux distribution, whose file system is usually case-sensitive.
http://www.kurtpeek.com/img/MIT_IAP_SAR_smallest.jpg - Not found
http://www.kurtpeek.com/img/MIT_IAP_SAR_smallest.JPG - Found

chm viewer unable to show contents

I have a chm file that I can open at home. I use windows XP at home and at work. However, when I open the file at work it doesn't show the contents of the file. It properly shows the TOC for the file though. Any ideas pls?
Try to right-click on your chm file and select properties. You will see an "Unblock" button. Click on it, it should solve your problem.
Other than what Nicolas suggested, you may not be able to see contents of a CHM that you open over a UNC path. If that is the case copy the file to a local drive.
just go to power shell and run it as administrator,
cd your folder
and use the following command
Unblock-File '.\filename.chm'
On Windows 7 copying the file locally and unchecking the file opening warning message worked.
I had the same situation, on a Windows 10 (VMware) system. I had to move the file to a local drive as suggested by another poster AND THEN uncheck the file opening warning message. Opening the file gave a "Open File - Security Warning" message, with a checkbox at the bottom "Always ask before opening this file". Until I unchecked that box, only the TOC showed. After unchecking, the contents showed properly. HTH someone else!
Open command prompt and run as administrator.
Go to file location, input the file name and press enter.
It should open the file and view contents in chm viewer.
More read at: http://langbasics.blogspot.in/2014/12/chm-viewer-unable-to-show-contents.html
Thanks
It appears a lot of people have this problem but were unable to track down a solution. There are apparently different levels of authentication. Most articles I read tell you to set the MaxAllowedZone to '1' which means that local machine zone and intranet zone are allowed but '4' allows access for 'all' zones.
For more info, read this article:
https://support.microsoft.com/en-us/kb/892675
This is how my registry looks (I wasn't sure it would work with the wild cards but it seems to work for me):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"MaxAllowedZone"=dword:00000004
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"UrlAllowList"="\\\\<network_path_root>;\\\\<network_path_root>\*;\\ies-inc.local;http://www.*;http://*;https://www.*;https://*;"
As an additional note, weirdly the "UrlAllowList" key was required to make this work on another PC but not my test one. It's probably not required at all but when I added it, it fixed the problem. The user may have not closed the original file or something like that. So just a consideration. I suggest try the least and test it, then add if needed. Once you confirm, you can deploy if needed. If the 'Unblock' method does not work, or you do not see the option, this should. Good Luck!
P.S. Another method that worked was mapping the path to the network locally by using mklink /d (symbolic linking in Windows 7 or newer) but mapping a network drive letter (Z: for testing) did not work. Just food for thought and I did not have to 'Unblock' any files. Also the accepted 'Solution' did not resolve the issue for me.
Your CHM File Has the "#" Hash Character in the Filename or in the Directory Name. Please remove "#" and you will be able to see the content. If still you are not able to see then please visit following link: https://www.helpsmith.com/chm-cannot-be-displayed.php
Windows block *.chm files came from another computer fore security reason. Click right mouse button on file and set unblock checkbox see.
If someone need, there is a web page: http://topdf.com/ where is possible convert a chm in to pdf. I tested it with a chm of ~18MB and 615 pages. I was able to got a pdf with a hyperlinked contents table.
I was experiencing the same problem.
I read that the .chm file only worked on NTFS.
My file was on a cloud network drive which is not NTFS, so I copied it locally and the problem was gone.
Use SumatraPDF. It opens .chm files.
I had same problem and zipped the file then open it from inside the zip program.(I use 7-zip)

AS3 XML and Line Spacing Problem

Background: I'm building this photo gallery in AS3, when user clicks a thumbnail is displays text gathered from an XML file.
Problem Description: Everything runs wonderful on my local machine, but when I upload the files to the server and preview the site from the server, the line spacing on the description text is way different than when I preview the site local.
Below see two images so you can see the difference
Correct one (Preview from Local Machine)
correct Spacing http://www.olemedia.net/lineSpacing1.jpg
Incorrect One (From the Browser)
incorrect Spacing http://www.olemedia.net/lineSpacing2.jpg
Solution: Any suggestions?
It is indeed a line break issue that depends on what platform you're on, or rather. how the xml document was saved. Line breaks on windows are \r\n (Carriage Return + Line Feed). if I recall correctly. Flash player interprets both as a newline. I usually do something like this:
var text:String = xml.whatever.text().split("\r").join("");
That will get rid of all the \r's (if they're there) and leave only \n's.
Your images don't show up (I think there's a minimum reputation required to post images), but based on the description I'm going to guess that your local machine is windows and the server is unix. It's probably a problem with line-endings being \r\n instead of \n, most editors can do this conversion for you, or there are various tools to convert.
If this isn't right, link to the images so that we can see what's happening.
I found the solution. Is a bug with Flash CS4 (mac and windows).
I place my flash file to a Linux server and also to a windows server. Definitely windows server was the problem. I'm not sure why but it is. I'm working from mac, and possibly this effect also on the type of server you publish you swf files.
Thanks everybody, much appreciate your time and dedication.