Wikipedia:Reference desk/Archives/Computing/2008 October 5

= October 5 =

Searching Process Memory
I made a program in C# that uses Windows APIs (ReadProcessMemory) to search for some bytes inside any process's memory. However, when my program is searching, the target process's memory usage grows to around 3 times its original. Any ideas why? --wj32 t/c 02:26, 5 October 2008 (UTC)


 * hard to tell without seeing the code, but according to the msdn page on ReadProcessMemory one of the parameters supplied to the function is..."lpBuffer [out] -- A pointer to a buffer that receives the contents from the address space of the specified process." so it looks to me like the target process is giving you a copy of its address space which would almost certainly cause new objects to come into existence in the *targets* address space which would therefore explain the memory increase. at some point (one would hope) when those objects go out of scope the garbage collector will kick in and the memory usage would reduce again. cheers Mission Fleg (talk) 05:22, 5 October 2008 (UTC)
 * ...or you might just have uncovered a bug :) as i said, hard to tell without seeing all the code thats involved. cheers Mission Fleg (talk) 07:08, 5 October 2008 (UTC)


 * ReadProcessMemory is handled by the OS, and the target process shouldn't even be aware that it's happening. My best guess is that you're measuring physical RAM usage and reading the virtual address space is causing data to be paged in from disk. This isn't a real increase, it's just a form of caching, and eventually the physical RAM usage will drop back to its former value. -- BenRG (talk) 07:46, 5 October 2008 (UTC)
 * Well, calc.exe uses 4MB before I read the memory, and after I read the memory it uses around 40MB. I am measuring the working set, so you may be right, but other memory searchers don't seem to affect memory usage. --wj32 t/c 07:50, 5 October 2008 (UTC)
 * Actually, you ARE right! My program uses the working set and that displays a big increase, while Task Manager shows very little increase. Thanks! --wj32 t/c 07:55, 5 October 2008 (UTC)

Yahoo Answers
How can you create a Yahoo Answers account if you don't have or want a Yahoo e-mail address? 58.165.15.180 (talk) 04:16, 5 October 2008 (UTC)
 * I don't believe you can. To use Yahoo Answers you must have a Yahoo account or an account with one of their partners, like btinternet. Yahoo email addresses are free so what's the harm in having one? Just don't use it. Abhishek Talk 11:00, 5 October 2008 (UTC)
 * Also, the wikipedia reference desk is much nicer than Yahoo Answers! Just stay here :) 83.250.202.36 (talk) 11:06, 5 October 2008 (UTC)
 * Pretty please? Kushal (talk) 15:08, 5 October 2008 (UTC)


 * But you don't get the same questions every day on Wikipedia's Reference Desk. It is nice to spend each day on Yahoo Answers answering the same two questions: "If everyone can edit Wikipedia, it is full of junk.  Why do people use it?" and "I was arrested for using Wikipedia.  What do I do now?" --  k a i n a w &trade; 13:01, 6 October 2008 (UTC)


 * "Kainaw strikes with sarcasm", said Captain Obvious. Kushal (talk) 07:56, 7 October 2008 (UTC)

Changing colours
Say I have an image all in red tones. Is there an easy way to transform all tones of red into another colour, say green? Digitally, of course, and preferably not too difficult. --217.227.72.192 (talk) 13:55, 5 October 2008 (UTC)


 * In Photoshop or Gimp: 1. desaturate it (make it grayscale), 2. add a layer above it, 3. fill layer with the color you want it to be (say, green), 4. change the blending mode of the layer to "hue" or "overlay" or whatever looks best.
 * Alternatively, Photoshop (and probably Gimp) has an option called "Hue/Saturation" which has a "Colorize" mode which does the same sort of thing but in my experience is harder to control. --140.247.11.44 (talk) 15:24, 5 October 2008 (UTC)


 * ImageMagick, which manipulates images from the command-line, can also do this. The following will roate the hue ~120°, turning red into green, green into blue, and blue into red convert image.png -modulate 100,100,167 newimage.png Reep (talk) 19:24, 7 October 2008 (UTC)

SQL plus 8.0
hey ther! i hav just downloaded an oracle software program to practice SQL.Although when i start the program SQL plus 8, they ask username,password and hoststring.iknow the username and password but i dont know wht to do with Hoststring.Can u tell me what it is exactly??i havnt been acquainted with Oracle much...this is my first time...@_@ —Preceding unsigned comment added by Arya237 (talk • contribs) 14:57, 5 October 2008 (UTC)


 * If you're running it off of your own computer, try "localhost". --140.247.11.44 (talk) 17:31, 5 October 2008 (UTC)

not working!!:( thanks for the help anyway.^^