27. August 2011

Try to create aux.h file on Windows 7

Try it :-)

I was playing with one package from Linux. I grab source code of package using Cygwin. This source code contained one funny file: aux.h.

Windows version of Vim refused to open this file with error message: Permission denied.

Even Notepad refused to open this file.

Finally Visual Studio gave me interesting hint about this aux.h file name:

 

I tried to zip this file by 7Zip and extract it back. Result was that 7Zip decompressed file as _aux.h.

Interesting issue. :-)

6. May 2011

HTML5 API – File.slice changed

Firefox and Google Chrome implemented File API for manipulating with files. It contained very useful function slice.

Slice allowed you to read part of file content. This was quite handy when dealing with big files.

Poorly chosen name for API function caused split in browsers unity. Here is explanation:

This method was removed in Gecko 5.0 (Firefox 5.0) because its syntax differs from that of Array.slice() and String.slice(). Work is ongoing on standardizing its replacement, but for now you can use the mozSlice() method on Gecko-based browsers.

Nice.

Method was replaced by:

  • mozSlice – in Firefox
  • webkitSlice – in Google Chrome

There is one important difference in the second parameter of function:

  • In case of slice it was length of block that should be loaded.
  • In case of *Slice it is the end position of block (length + start position).