POV-Ray : Newsgroups : povray.off-topic : Context switching Server Time
5 Sep 2024 13:12:20 EDT (-0400)
  Context switching (Message 83 to 92 of 222)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Aydan
Subject: Re: Context switching
Date: 22 Apr 2010 04:45:01
Message: <web.4bd00c777093ed243771cd8e0@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> >> ...so how do you actually do this then?
> >
> > That's what the whole COM thing is all about, along with things like
> > "Windows Scripting Host" and "Power Shell".
>
>  From what I've seen, you can't touch COM unless you're programming in C
> or C++.

VBscript, (Iron)Python, VBA, C#, VB.net, ASP(.net) and so on and so on.
All can use COM.


Post a reply to this message

From: Invisible
Subject: Re: Context switching
Date: 22 Apr 2010 04:50:18
Message: <4bd00dca$1@news.povray.org>
>>  From what I've seen, you can't touch COM unless you're programming in C
>> or C++.
> 
> VBscript, (Iron)Python, VBA, C#, VB.net, ASP(.net) and so on and so on.
> All can use COM.

All languages I'm unlikely to ever touch. ;-)

Well, except maybe VBA... As far as I know, if you want custom functions 
in Excel, you *must* use VBA, horrid as it is.


Post a reply to this message

From: scott
Subject: Re: Context switching
Date: 22 Apr 2010 05:29:51
Message: <4bd0170f@news.povray.org>
> Interesting. I thought ICS only works for dialup modems?

LOL, I was using it 10 years ago for sharing my net connection at 
University.  You right clicked on the network adapter and ticked the "share 
this connection" checkbox, then just point your other machine to that one 
and it worked.


Post a reply to this message

From: scott
Subject: Re: Context switching
Date: 22 Apr 2010 05:32:40
Message: <4bd017b8$1@news.povray.org>
> (I'm still having trouble thinking up a use-case for that. About the only 
> thing I can think of is trying to find out which header file defines a 
> particular symbol or something.)

I use the Windows search (which searches within files) quite a lot when 
looking for which source file contains certain code.  Outside of 
programming/development I can't think of many other common cases (maybe you 
are looking for a certain phrase within a letter you wrote?).

> If it's a small file, you can search it just be scrolling through it and 
> looking with your eyes. You don't need an automated search facility. The 
> only real reason to use an automated search is if there's too much data to 
> hunt through manually.

If a file is big enough to need scrolling, it's going to be faster to ask 
the editor to search for it than using your eyes.


Post a reply to this message

From: Invisible
Subject: Re: Context switching
Date: 22 Apr 2010 05:39:49
Message: <4bd01965$1@news.povray.org>
>> (I'm still having trouble thinking up a use-case for that. About the 
>> only thing I can think of is trying to find out which header file 
>> defines a particular symbol or something.)
> 
> I use the Windows search (which searches within files) quite a lot when 
> looking for which source file contains certain code.  Outside of 
> programming/development I can't think of many other common cases (maybe 
> you are looking for a certain phrase within a letter you wrote?).

All I can say is that apparently I don't deal with volumes of data large 
enough to make searching necessary. (Then again, I always thought that 
if you have to *search* your files, you haven't organised them properly...)

>> If it's a small file, you can search it just be scrolling through it 
>> and looking with your eyes. You don't need an automated search 
>> facility. The only real reason to use an automated search is if 
>> there's too much data to hunt through manually.
> 
> If a file is big enough to need scrolling, it's going to be faster to 
> ask the editor to search for it than using your eyes.

I guess it depends on whether you *know* precisely what you're searching 
for, or whether you're looking for "something that might be to do with 
the IP address"...


Post a reply to this message

From: scott
Subject: Re: Context switching
Date: 22 Apr 2010 05:40:06
Message: <4bd01976$1@news.povray.org>
> ...so how do you actually do this then?

Save the text below as "demoScript.vbs" and double-click it.  It will write 
a list of all files in your C: drive to a text file called "FileList.txt". 
Obviously way more complex stuff can be done (like recursing subdirectories 
if you want).  Google "VBscript tutorial".


Set fso = CreateObject("Scripting.FileSystemObject")
sFolder = "C:\"

Set NewFile = fso.CreateTextFile(sFolder&"\FileList.txt", True)
Set folder = fso.GetFolder(sFolder)
Set files = folder.Files

For each folderIdx In files
  NewFile.WriteLine(folderIdx.Name)
Next

NewFile.Close
Wscript.Echo "Done!"


Post a reply to this message

From: scott
Subject: Re: Context switching
Date: 22 Apr 2010 05:48:42
Message: <4bd01b7a$1@news.povray.org>
> All I can say is that apparently I don't deal with volumes of data large 
> enough to make searching necessary. (Then again, I always thought that if 
> you have to *search* your files, you haven't organised them properly...)

Usually it's folders of files which are not from me (eg a programming 
library) which I find I need to search.

Also the folder system used on most file systems only lets you put a file 
into one location (unless you get tangled up with soft and hard links or 
hundreds of shortcuts).  With a proper DMS a file should be filed under 
several different categories (eg "Project A", "General electrical issues", 
"Work done by Scott", "Work for customer X", etc).  As this isn't easily 
possible using Windows Explorer then the only option sometimes is to search.


Post a reply to this message

From: Invisible
Subject: Re: Context switching
Date: 22 Apr 2010 05:51:10
Message: <4bd01c0e$1@news.povray.org>
scott wrote:
>> All I can say is that apparently I don't deal with volumes of data 
>> large enough to make searching necessary. (Then again, I always 
>> thought that if you have to *search* your files, you haven't organised 
>> them properly...)
> 
> Usually it's folders of files which are not from me (eg a programming 
> library) which I find I need to search.

Ah, well maybe that's it then. I never ever work with files that I 
didn't personally create.

> Also the folder system used on most file systems only lets you put a 
> file into one location (unless you get tangled up with soft and hard 
> links or hundreds of shortcuts).  With a proper DMS a file should be 
> filed under several different categories (eg "Project A", "General 
> electrical issues", "Work done by Scott", "Work for customer X", etc).  
> As this isn't easily possible using Windows Explorer then the only 
> option sometimes is to search.

Hee, apparently our DMS isn't "propper". :-D

Then again, our software evaluation process was "Write the spec. 
Research available options. Perform a detailed evaluation on all the 
available products. Determine which one best fits the business need. 
Purchase the cheapest product anyway."


Post a reply to this message

From: Invisible
Subject: Re: Context switching
Date: 22 Apr 2010 05:56:32
Message: <4bd01d50$1@news.povray.org>
scott wrote:
>> ...so how do you actually do this then?
> 
> Save the text below as "demoScript.vbs" and double-click it.  It will 
> write a list of all files in your C: drive to a text file called 
> "FileList.txt". Obviously way more complex stuff can be done (like 
> recursing subdirectories if you want).

Several interesting things happening here...

1. SciTE recognises Pascal and COBOL, but not VB?

2. This script somehow works, even though I haven't installed WSH.

3. It really takes that much code just to do the same task as DIR /B C:\ 
 > C:\FileList.txt?


Post a reply to this message

From: Warp
Subject: Re: Context switching
Date: 22 Apr 2010 06:08:05
Message: <4bd02005@news.povray.org>
scott <sco### [at] scottcom> wrote:
> >  You use your text editor to tell you which files in a directory structure
> > contain a specified string? Talk about being overly complicated. grep is a
> > way, way simpler way to do that.

> Or, in Windows, you can just type the string into the top right of any 
> explorer view, in the box that says "Search".

  I wish it worked. It doesn't.

-- 
                                                          - Warp


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.