Re: [OT] Bill gates on our energy futures - some tech miracles needed
I may be reading this wrongly, but here is the argument as I see it (and btw I do believe in AGW): Ken: I believe in science and the scientific process. I believe that there is a great deal of peer-reviewed science supporting AGW. David: Agreed. David: Despite the above, I am not convinced that we are being told the whole story due to [insert Climategate/email issues/etc]. These things show that some people disseminating the data/science have vested interests and are choosing not to reveal anything contrary to their view. Ken: I don't find the issues you raise relevant. The science stands completely independently of the people disseminating it. David: I believe that we are being told the truth, I'm just not sure if it's the whole truth, so I remain sceptical. Ken: I am not sceptical. I have seen enough supporting evidence and nothing that disproves the existence of AGW. It seems to me that both paths are legitimate choices. Ken/David - what am I missing? Happy Friday Dave
Problem with GetFiles() or me?
Back to a programming topic...(rare for me). I've knocked up a small console application to process a folder structure with hundreds of thousands of small text files, read each file, strip off some headers and append the resulting data into a single large file. The all worked fine until I needed to do it on a different path (mapped drive). If I specify the path (first argument) as a drive letter (of a mapped drive) only, and that drive has a current working directory other than the root, it fails because GetFiles() returns an absolute path which is incorrect - it prepends the filenames with a \. eg: H:\CD Z:\data_to_process H:\GetFilesTest.exe Z: Processing file Z:\file1.txt Processing file Z:\file2.txt ... This isn't correct. While it correctly enumerates the files within the folder structure as specified, the path should be Z:file1.txt, etc. Surely? Tried with VS2008 .Net 3.5 as well as VS2010 RC .Net 4 - same behaviour. A quick Google didn't turn up anything obvious. So I'm thinking I've missed something in the documentation (which I must admit, I didn't read until it didn't work as expected) or am clueless about the vagaries of DOS working/current directories because this seems so simple. --8K---8K---8K-- using System; using System.IO; namespace GetFilesTest { class Program { static void Main(string[] args) { if (args.Length != 1) { Console.WriteLine(Please specify a path); return; } // enumerate all files in the supplied path and subfolders string[] files = Directory.GetFiles(args[0], cdr*.*, SearchOption.AllDirectories); Console.WriteLine(String.Format(Getting files from {0}, args[0])); // iterate over the files, displaying the full path foreach (string file in files) { Console.WriteLine(String.Format(Processing file {0}, file)); } } } } --8K---8K---8K-- -- Richard Carde
Re: Problem with GetFiles() or me?
Workaround: D:. Adding the explicit current directory causes the returned strings to be valid paths. Do you want to add the bug to Connect? -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.) (BTW Typos fixed below.) On Sat, Mar 6, 2010 at 1:35 AM, Mark Hurd markeh...@gmail.com wrote: On Sat, Mar 6, 2010 at 12:21 AM, Richard Carde rich...@carde.id.au wrote: snip If I specify the path (first argument) as a drive letter (of a mapped drive) only, and that drive has a current working directory other than the root, it fails because GetFiles() returns an absolute path which is incorrect - it prepends the filenames with a \. eg: H:\CD Z:\data_to_process H:\GetFilesTest.exe Z: Processing file Z:\file1.txt Processing file Z:\file2.txt ... This isn't correct. While it correctly enumerates the files within the folder structure as specified, the path should be Z:file1.txt, etc. Surely? I agree (and can confirm with DotLisp and .NET 2.0) and I think you've found a bug. Note that files in the current folder don't have the \ inserted. That is your example above is wrong, at least for me: T:windows-gcl-saved_acl2.zip.txt T:\lu\README.TXT The above is a sample of the output from (Directory:GetFiles T: *.txt System.IO.SearchOption:AllDirectories) Tried with VS2008 .Net 3.5 as well as VS2010 RC .Net 4 - same behaviour. I think I can see the problem using Reflector in Directory.InternalGetFileDirectoryNames: Where it says: If (data.userPath.Length 0) Then ch = data.userPath.Chars((data.userPath.Length - 1)) flag2 = ((ch = Path.DirectorySeparatorChar) OrElse (ch = Path.AltDirectorySeparatorChar)) End If I believe it should be flag2 = ((ch = Path.DirectorySeparatorChar) OrElse (ch = Path.AltDirectorySeparatorChar) OrElse (ch = Path.VolumeSeparatorChar)) But InternalGetFileDirectoryNames is quite complex... snip -- Richard Carde -- Regards, Mark Hurd, B.Sc.(Ma.)(Hons.)
MAPI with Unicode support
Is the MAPI + CDO v1.2.1 the only free-standing / downloadable available from Microsoft? It doesn't support Unicode - which is what I need in order to properly access some PST files. (v6.5.8153.0, date published 1/12/2010) Anyone know an alternative? (apart from installing a version of Outlook on the machine) Ian Thomas Victoria Park, Western Australia
RE: MAPI with Unicode support
Some digging finds that the PST file format has been published, and there's a new MAPI on Codeplex (MFCMAPI) - but they're still struggling with Unicode! (ref - Stephen Griffin's MAPI Internals blog) _ Ian Thomas Victoria Park, Western Australia _ From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Ian Thomas Sent: Saturday, 6 March 2010 12:40 AM To: 'ozDotNet' Subject: MAPI with Unicode support Is the MAPI + CDO v1.2.1 the only free-standing / downloadable available from Microsoft? It doesn't support Unicode - which is what I need in order to properly access some PST files. (v6.5.8153.0, date published 1/12/2010) Anyone know an alternative? (apart from installing a version of Outlook on the machine) Ian Thomas Victoria Park, Western Australia
RE: Splash Screen..thread safe
splashThread.Abort(); Don't do that. The Thread must be told to terminate gracefully. Greg
RE: vb.net switching between debug and release in VS2008
Kirsten, in a VB.NET project in VS2008 I can see the Configuration combo at the top of the Compile sheet in project properties (Debug|Release). I also have a Build Configuration Manager menu. I can also right-click the solution node and get the Configuration Manager menu. From what I recall, none of these were present in your VS2008, is it still like that? Greg