1,206 reputation
38
bio website
location
age
visits member for 2 years, 2 months
seen 12 hours ago

Jul
29
comment Get the last line from each of a large number of files, transform them, and write all results to a single new file
SetStreamPosition will take a negative number, meaning "position backwards from the end." You don't have to call FileByteCount to compute it.
Jul
17
comment Mathematica 10 doesn't support path containing Chinese characters
What kind of computer are you using: Macintosh, Raspberry Pi, Linux, or Windows?
Jul
1
awarded  Yearling
May
27
comment Can I read Chinese characters with ReadList correctly?
ReadList does not currently support character encodings. You can use it to read the data as a sequence of pure bytes and then convert (using ToCharacterCode and FromCharacterCode), but you can't get it directly from ReadList.
Apr
27
comment Real and/or improved CForm of expressions
CForm has always seemed to be one of those cases where somebody at Wolfram Research once said "this design we came up with for output formatting is so general, it would be easy to make it generate C, or TeX, or Fortran, so let's go ahead and document it!" -- and after a few years they realized that it's a lot harder problem than it looks, and quietly let it drop. (Another example would be the idea that users can write their own Front End and hook it up to the Mathematica kernel by using standard, documented MathLink calls.)
Apr
12
answered Is it possible to get AltGr key to work in Math.exe?
Apr
12
awarded  Enlightened
Apr
12
awarded  Nice Answer
Apr
11
comment What kind of check does DirectoryQ exactly perform?
Is the problem just that DirectoryQ returns the right answer except in the one case that its argument is a root directory of a drive that isn't mounted? In that case, you could try verifying the result by (1) checking if the path is a root directory (maybe using FileNameSplit?), then (2) calling SetDirectory or FileExistsQ to see if you can actually go there.
Apr
11
revised What kind of check does DirectoryQ exactly perform?
added 1 characters in body
Apr
10
answered What kind of check does DirectoryQ exactly perform?
Mar
31
awarded  Citizen Patrol
Nov
7
revised Using Read for calling external command does not release file handle
added 2 characters in body
Nov
7
revised Using Read for calling external command does not release file handle
added 51 characters in body; added 4 characters in body; added 1 characters in body; added 2 characters in body; added 9 characters in body
Nov
7
comment Using Read for calling external command does not release file handle
Good call on the file descriptors, but by changing Read to Run, you've gotten rid of the actual cause of the bug! (By the way, Run doesn't need the initial !, but that's a special syntax for input and output streams that creates a process and opens an I/O pipe to it.)
Nov
7
answered Using Read for calling external command does not release file handle
Sep
8
comment Change character encoding for file read using OpenRead
CharacterEncoding is not supported for the low-level input streams which OpenRead works on. It is not in the Options.
Aug
28
awarded  Commentator
Aug
28
comment How to resolve a Unix symlink?
FileInformation with AbsoluteFileName works on Windows as well, resolving Windows Vista/7 symlinks, NTFS junction points, and SUBST drive links.
Aug
28
answered How to resolve a Unix symlink?