bin file in eclipse or notepad - eclipse

Whenever I tried to open the .bin file in Windows, (and also eclipse), it is like this, so I cannot read anything. I am using it to test Buffer Pool, but I cannot read, so I cannot know that is the test was successful or not. It is same when I opened it wil notepad.
I am using U.S. window, but installed Korean language, but I still can read/write English well.

Extension of file name ".bin" stands for "BINARY". That means your file may contain not-printable characters as you saw.
If you want to see the contenst of binary files, you should use 'Hexadecimal Editor', 'hex editor' in short, instead of text editor like notepad.
http://en.wikipedia.org/wiki/Comparison_of_hex_editors shows many hex editors.
Some software may be able to handle your .bin files. It depends that the origin of that file.

Related

Scratch: How do I produce an ascii text program listing?

My nine year old son is applying to participate in a programming contest. Any language is allowed, and he wants to use Scratch. But the application requires an ascii text listing of a program to solve a specified preliminary problem. They will not accept a PNG screenshot, or Scratch's binary format. So how does he get an ascii listing of his program? If it is impossible (as I suspect) then I will just read his program and retype it into an ascii editor.
You have a few options here.
If you're using Scratch 1.4, you can save a text-only project summary. Shift-click the File menu, then Write project Summary.
This functionality is coming soon (hopefully) to Scratch 2.0. UPDATE: It has been added.
You can also get a text-based representation of all the blocks using the Scratchblocks generator.
Or, you can save the 2.0 project as myproject.sb2, rename to myproject.zip, unpack the ZIP, and take the project.json file.
Unfortunately, none of these methods can easily be imported back into Scratch.
http://scratchblocks.github.io will convert your project into scratchblocks format. It is exactly what you are looking for.
You can download and edit the json script for the Scratch project. It can then be uploaded to replace the existing project. (This is also a great way to back-up and deploy projects)
From the "See Inside" screen, File->Download to your computer.
Rename the file to have a ".zip" extension instead of just ".sb2".
Unzip the file to edit the "project.json" file.
Edit the json code as desired.
Reassemble the zip file
Remove the ".zip" extension. (Back to ".sb2")
Update the Scratch project by going to the original project and selecting File->Upload from your computer.

How does my computer know to assign a certain image to .doc files?

Is the icon file for .doc and .docx built-in to Windows, Mac, and Linux because it's so common? Or would the OS only know to associate that extension with the icon image IF Microsoft word/office was installed, which gave the image file to the OS and instructed it to make the association?
I didn't know how to search for this. I also didn't know whether to ask on Superuser, SO, or Programmers.SE.
For windows, when an application is installed, it registers with the OS what file extension it has for the files. So when you install Office or MS Word, it will tell the OS that it's files can be .doc or .docx and what icon to use for those. Then when any files that have that extension are shown, it will open up in that program. It stores the info in the registry.
If you try to open a .docx file that is not registered, meaning Office not installed, it will ask you to choose a program to launch it with, because it doesn't recognize the file.
You can also manually associate files as well to a specific program if it is not registered.
Most of the time, the associations are done when the said application is installed.
Some operating systems such as Mac and Linux can associate files with their mime type e.g. text/plain. That way it would know to use a text editor to open the file.
You can read a little more detail here about file associations.
http://en.wikipedia.org/wiki/File_association
In windows vista/7, go to your control panel, and search for 'assoc'. Under folder options it has a option labeled 'change the file type associated with a file extension'. This will give you a list of all of the files extension (what comes after the '.') and what program/icon they use.
Most programs create these extensions when they are installed. Some very common formats, like .html, will have association made on any modern system.
Files also get associated when you tell the system which program to use to open a type of file. The icon that type of file uses is usually just the icon associated with the program in that case.
Hope that answers your question.

Netbeans file cannot be safely opened

I get files from friend who don't use netbeans IDE, when i open file that contain special caracter like 'é','à',... it show me this popup message :
if i say yes it open the file and changes those caracters to '�' like or
Any idea how to open the file safely?
The letters you are mentioning seem to be French. You need to open the file, specifying the original encoding, then save the file as UTF-8
I recently encountered a very similar problem (I have some javascript files in Chinese which translated into similar non-human readable text upon re-opening the file in NetBeans).
My OS: Linux Mint (version 17, Cinnamon; Notepad++ not available and gedit did not solve the problem).
Netbeans Version: 8.0.1
However, I was blessed to have found the history feature! I was able to get a former version of my file restored and backed it up immediately.
To access a file's history simply click on the History button found on the left side of the tool bar between the tabs of open files at the top of the IDE and the actual source code. (You can also right click on the file name and selected History -> Show History). Then Double click on a *Timestamp representing a valid version of your file. Just below the table of Timestamps the old 'backup' file and the current 'corrupted' file should appear side-by-side. (You can preview several historical versions of the file until you find one that works best for you; of course, when choosing a file I suggest one which is still usable and has the most current Timestamp associated with it!) ). Right click again on the 'backup' version of your choice -> Revert from History. Click back on the Source button found right next to the History button.
Finally, to change the default encoding, I applied the fix suggested by Sebas and Danny here:
How to change file encoding in NetBeans?
Please note that the path to the netbeans.conf file is different (at least with version 8.0.1 on my Linux machine). The path on my machine was : ~/netbeans-8.0.1/etc/netbeans.conf.
This saved the day for me and I hope it helps someone else out there! Bonne chance.

Eclipse .properties file disable escaping of UTF-8 characters

I'm using *.properties files in my java/android applications for my translations files. My problem is that .properties files in eclipse escape utf-8 characters that are out of the ISO-8859-1 charset so I see the escaped characters. So I decided to make my own library that reads the file in utf-8 format. BUT eclipse still escapes characters. Is there any way to make eclipse handle *.properties files as normal text files??
Right Click on the file, properties. Under "resource" tab , check for "Text File Encoding" at the bottom right and change that to UTF-8.
Don't call them .properties files, give them another file extension and they will be handled by the text editor only, instead of the properties file editor.
Even without the editing issue you should not call them .properties, as they are not compliant to the Java properties file standard, which might confuse other developers on that project, other tools and so on.
The best solution however is yet another one: Throw away your selfmade implementation and get yourself a better editor for properties files, which shows you the characters as you want to read them, independent of how they are encoded in the file.

Large text file editor with compare feature?

I'm trying to compare 2 large text files around 500MB each, I've tried to use Notepad++, Textpad, VIM etc and couldn't get them to even open the text file. Either that, or the editors that DO work don't have the compare feature.
I need to see what changes are made in those 2 text files, that's why I need to compare them. Does anyone have any suggestions?
diff file1 file2
Are the files supposed to be very similar? Use a diff program instead of an editor; since they specialize in showing the differences, they are often more capable of handling large files.
The page at http://drupal.org/node/324 has a list of diff programs for Windows. If you are using Unix or Linux, you probably already have diff installed.
If you need an editor, I know that Emacs can be configured for files as large as this, but I haven't tried it myself. More info at http://www.emacswiki.org/emacs/EmacsFileSizeLimit
Winmerge at http://winmerge.org/
exactly what you want.
Using UNIX/LINUX diff file1 file2 is not practical with large text files.I spent some time looking into solutions today and i wanted to share my finding with you. There is Open Source Project Meld http://meldmerge.org/. It is available on OS X, Linux and Windows platform as well.
If you prefer using notepad++ there is plugin available to download:
Open notepad++ -> Plugins -> Plugin Manager -> Show Plugin Manager -> Find plugin named "Compare".
JujuEdit opens large file and it does not load them into memory. It does not compare features.
I opened a file 1G byte in 2 seconds or less.
It has binary mode.