Ads 468x60px

Smaller time frame always follow the bigger time frame. It's better wait be patience to enter in position than risk with BIG SL. Having strong trading discipline and taking losses when necessary is a sign of serious trading approach

Saturday, August 11, 2012


Looking for a way to convert a binary (or even a text) file into a Perl, Pascal/Delphi, C/C++, or Java source code array? For example, you may want to do this to include a GIF or other binary file directly inside your Perl CGI script, rather than reading the data from a file to reduce file access. If you're writing Windows programs, you could use the same method to store resource files in your executable files. 
The script will take a binary file name and output a source code array, in the specified language, necessary to recreate the input data inside a program.
To run the script, first make sure that you have a Perl interpreter installed on your system and download the script. Then execute the following command from your command prompt (assuming you want to convert a file named banner.gif to a Perl string):
perl banner.gif 0 >source.txt
Listing #1 : TEXT code. Download demo1.bat (0.17 KB).
You will end-up with a source.txt file with content similar to the following:
# begin binary data:
$bin_data = # 42
# end binary data. size = 42 bytes
Listing #2 : TEXT code. Download result1.txt (0.27 KB).