
Glenn9999
Platinum SponsorContent Type
Profiles
Forums
Events
Everything posted by Glenn9999
-
Okay I did that, and in the process got the answer to my original question. You have to explicitly set things up to use both processors within the API and within your algorithm in order to get a performance pop out of it. I ended up getting around 12000ms-24000ms on my Quicksort benchmark when I did this. The specific time for each case is dependent on how much the Quicksort kept both processors busy. Question answered.
-
Indeed. I know I've found that misconception rampant within all the "should I get the dual-core machine" threads I've encountered, when I've gone in and tried to explain that they wouldn't get much of a performance increase in anything over an equivalent single-core CPU. While there is a responsiveness bump given that Windows would have multiple processors to call on in thread scheduling, multi-processing only works if a certain set of criteria are met. Most algorithms are dependent & linear, which makes having the multi-processing a moot proposition. But it is a performance boost for those things where all the criteria are met for multiprocessing through the design of the algorithm. Consequently, you do find multi-processing being used where the algorithms meet the criteria, such as image processing and database work. I'm sure it will be headed to games eventually if it hasn't already. But seriously, most applications won't benefit from it. FWIW, I did the benchmark that I was talking about. Truthfully it seems to make no difference (statistically) whether you let Windows send the thread where ever it wants or you isolate it to a specific CPU. I suppose the only advantage in allowing it to go to *any* CPU is to allow the OS some flexibility in thread scheduling. Here's the times in sorting 100M Double Words using Quicksort. ANY: 25234 ms CPU1: 25343 ms CPU2: 25266 ms When I get to it, I plan on trying out a multi-processing version. (I selected Quicksort because the algorithm is almost insanely suited to multi-processing environments) Definitely fun stuff...
-
I suppose this could be the case (and yes I understand all that other stuff) of why a single thread is putting load on two processors. Hopefully I can get some confirmation, but one thing I am realizing quick is that special measures have to be used to get the most out of a multi-core processor, especially since this one thread is only managing a sporadic load on each processor at 50% total. I look to do some benchmarks when I can get around to it when it comes to performance of such things.
-
I understand about the thread processing part and all of that. What I'm not understanding is that it's going to both CPUs with a single-threaded, single process, which has no OS API calls (of course it could have something in the background I'm not thinking of) or any other interaction. The code load is basically: while 1 = 1 do begin i := i + 1; i := i -1; end; Maybe I'm just not seeing something that's going on?
-
How does Windows XP (or any Windows) handle having multiple processors/cores when a program is run? I have a program that places load onto a CPU. I figured that since this program is not thread-oriented that it would pick a processor (the one with the least load from documentation I have read) and then run the program on it. But I'm noticing that when I observe the CPU load under task manager that it's putting load on both CPUs (50% total), and the graphs for both CPUs are bouncing around wildly. So, help me to understand what is happening to cause load on both CPUs from a single process. Is this an OS function, or a CPU function (other CPU isn't busy so shunt instructions to it as appropriate)? Any good references are appreciated as well, since I was unable to find anything with a good answer upon searching. Note #1: I realize this could fit in one of 2 or 3 forums here (Windows XP, Hardware, Programming), so hopefully there isn't a problem that I selected this one. Note #2: I know all about how to set code to run on a specific processor and change its priority, so that's no issue - I rewrote the program to be able to place 100% load on a specific CPU and it does that wonderfully.
-
Can an mp3 converted to WAV still contain a virus?
Glenn9999 replied to titamarus69's topic in General Discussion
Or ease of implementation of the policy. It's easier to say "all audio CDs" than to find out the problem ones that load software and specifically traffic/police those. Especially since most end users won't bother or care. -
Can an mp3 converted to WAV still contain a virus?
Glenn9999 replied to titamarus69's topic in General Discussion
Zero. This is probably a policy put in place after there were commercial CDs manufactured that loaded software (namely root-kits) onto the machine. As I understand, many IT department leads banned the use of audio CDs in their enterprises since it was shown to represent a security risk. Chances are, this IT guy doesn't completely understand why the policy was originally put into place. -
Without seeing it personally, I could only guess. But, likely because it was bundled and installed along with Quickbooks 2005, since it was a prerequisite. If you do not see it listed in the Add/Remove programs, the uninstall reference was likely trashed. Or you are running on a version of Windows that has .NET bundled with it (I believe that applies to anything Vista based or newer, but can also apply to special OEM or custom builds). But regardless, .NET 1.1 is indeed installed globally on your computer. Otherwise Quickbooks 2005 would not run.
-
Automate Installation of Updates
Glenn9999 replied to DickNervous's topic in Windows Updates Downloader
It got broken with the recent website changes. This should be the correct one. http://www.msfn.org/board/index.php?showtopic=96854 -
Those of you who follow the Programming sub-forum might remember that I mentioned writing a program to do the task described. So what kind of demand is there for something like this? This program that runs in the tray that lets you minimize programs to the system tray. If it seems like something good, I can go ahead and throw a copy of it on this thread.
-
Window hider
Glenn9999 replied to Oziyn's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
An interesting side effect: You can hide all the icons at will on the desktop if you minimize "Program Manager". -
Window hider
Glenn9999 replied to Oziyn's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
I just finished writing the basic idea of what I was typing of here (minimize windows to systray, restore them, and so forth). I'm not sure it would be worth releasing the source for it, yet. But my main question to those in group is if there any demand for something like this? If so, I might go ahead and release the app itself as a beta test when it's ready... -
VB Datatype Question
Glenn9999 replied to fishermand46's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Not really. This is a common computer-science problem, though. What you will want to put into your favorite search engine is "expression parser" - you should be able to find a number of them to help you along. -
VB Datatype Question
Glenn9999 replied to fishermand46's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
It doesn't. Any conversion function like Cint has to have a complete integer that is valid in every way on it. To do what you're wanting, you'll have to code a routine that checks for valid characters (and orders of characters if you want to go very far with this), and then pick apart the operators and the numbers, then convert the numbers and perform the proper operation on it. -
If they're reputable, they're usually okay. The flash memory industry is growing in leaps and bounds in terms of both performance and capacity for the price. Couple that with the manufacturer's need to move inventory and people's general need to upgrade technology, and you're going to have a lot of cheap drives every place. Like one of those links, $31 for 16GB? Not too long ago (about a year or two) I put down $20 for 2GB. If I have that kind of money, I would be tempted to upgrade, and then throw the other drive onto e-bay or the like. Since the new technology is about the same price as what I gave for it, I would have to discount my old drive, even if I didn't use it much. Now for some of these suppliers, multiply that by however many they have in inventory, and you get the picture. They're very legit, as long as you know the seller is legit.
-
Window hider
Glenn9999 replied to Oziyn's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
ShowWindow would be what you would need to control the windows, as the link indicated. The icon is set through the systray notification API routine. This is in Delphi, but again it's just nothing but Windows API calls that you can look up on the site I mentioned. It shows my app setting up a systray icon. with TrayIconData do begin cbSize := SizeOf(TrayIconData); Wnd := Handle; uID := 0; uFlags := NIF_MESSAGE + NIF_ICON + NIF_TIP; uCallbackMessage := WM_ICONTRAY; hIcon := Application.Icon.Handle; // get the icon if the app. StrPCopy(szTip, Application.Title); end; Shell_NotifyIcon(NIM_ADD, @TrayIconData); You could realistically do this for each app you would control as the other link described (wasn't too sure of the API to say you could do it in my last post, but I'm very sure now you could completely hide windows and control them through a systray icon), but you would have to keep track of them and keep a handler set up for each one. All control of icons go through Shell_NotifyIcon, either NIM_ADD, NIM_MODIFY, or NIM_DELETE. However, I'm not sure you could make a systray icon respond by an expressed double-clicking it, since it seems to respond only to single mouse-clicks. Generally you would then start a popup menu at the systray icon. Speaking of this, now that I see all of what is required to run windows through a systray icon, I might go try it myself. What may be interesting is if you can modify the standard system menu to include an option to "minimize to tray" or the like. Let me know if you have any more specific questions. -
Window hider
Glenn9999 replied to Oziyn's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
With your app or anyone's app? Having a System Tray icon requires interprocess communication, which means the app in question would need to be set up to handle it. Which means it wouldn't be possible with anyone's app. Your app, however, could do it. Searching for "system tray" with respect to coding/programming should net you the answer on how to do it. -
Window hider
Glenn9999 replied to Oziyn's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
You might want to be a bit clearer. If by "hide" you mean "minimize", then yes it can be done. However, "rename or hide" might be another matter all together and is likely not possible. If you want to find all the active windows, I can dig out a sample of that (it's in Delphi, but it's all Windows API calls anyway). Minimizing them isn't too hard to do from there once you have the window addresses. And it's not necessarily an issue of learning C++ in this case, it's learning the Windows API. Two different things. Okay: Samples. This gets all your window addresses. WinAddr := GetActiveWindow; repeat WinAddr := GetNextWindow(WinAddr, GW_HWNDNEXT); until WinAddr = 0; This tests the kind of window address you have: IsWindowVisible(WinAddr) - is it a visible window? GetParent(WinAddr) <> 0 - is it the main (or parent) window? These get text information about the window address. GetClassName(WinAddr, ClassNamea, 256); - Class Name GetWindowText(WinAddr, WinNamea, 256); - Window Text (what you see in the title of the window) This gets the thread id and process id for a window address. ThreadID := GetWindowThreadProcessID(WinAddr, @processid); All are Windows API commands, if you want to see documentation on them, look them up on Microsoft's Developer site. This is the one for "GetClassName", all the others will appear there as well upon search -
There is no reason that I know of that it shouldn't work on Windows 98 SE. However, I can only claim that it works on something when I tested it and know it works. That happens to be Windows ME and Windows XP. If it happens to work on other things (and it reasonably should) that I can't test it on, great! In fact, it'd be great to know what it works on and doesn't work on outside of what I can test.
-
Or better yet, copy it to a new file with a name consistent with the game, then modify that. DOSBOX.CONF is the default config file, and you don't want to touch that unless you want to change around what you get when you simply run the program without having it auto-load anything else. When you create a short-cut you can either add the path to the exe you want to run on the desktop after the DOSBOX one or specify your new CONF file (with any commands/environment changes in there) by using the -conf switch. http://www.dosbox.com/wiki/DOSBoxShortcuts
-
Is this any more stable than the last one?
-
Is this equivalent to the "basic" thing that came as the OEM version with CD or DVD burners? I remember for most of the OEM versions you could download a thing called "NeroVision Express" that supplied a lot of the more basic functions required to burn media disks. Is there an equivalent for this version or is that it (I wonder if it would work with the older versions?)
-
It's not as bad as trying to find some of the classic PC games as they were on the shelves originally. Given the proliferation of DRM, and the attempts to eliminate the aftermarket through it, a lot of them are now going for $40-$50. Utterly ridiculous, but that's the market. If you want it bad enough, you'll pay.