topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday September 19, 2026, 10:31 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 181 182 183 184 185 [186] 187 188 189 190 191 ... 246next
4626
The Wireless Connection Manager has always been in XP (from day one) ... It is only the WiFi API that gives programmers an easier way to futz with it that is new.

Windows 2000 ... Now that was a 3rd party nightmare PITA when it came time to Wirelessly connect.
4627
Developer's Corner / Re: Need Advice on MySQL Server Tuning
« Last post by Stoic Joker on February 03, 2011, 02:05 PM »
Here's the thing... I run one of the problem child queries that I selected for testing purposes while watching Task Manager to see what impact it has on the server's resource usage. While the query is running the server is just chuffing along showing absolutely no sign of a strain.
Does "Task Manager" imply MySQL is running on a Windows server?

Yes.

If that's the case, how old is the MySQL version?

v5.1

Iirc, there was recently something about a new version of MySQL that fixed some Windows performance issues - I was shocked to read the announcement, since it revealed that the Win version had essentially used a "BigLock" and only in 2010 been fixed to use more fine-grained locking. In other words, for years and years and years, whoever were responsible for the Windows port should really have been shot, or at least have had a great big flogging.

Don't have a link to the article (wouldn't be surprised if it was on osdev, or perhaps slashdot), but here's a graph showing the consequences of the 5.5 release.

Holy Shit!

The charts shown are only for the transactional InnoDB (These are basic MyISAM stuff), but either way its got to be an option worth exploring. Maybe I'll give that a shot this weekend.
4628
It's the distinction we're both tripping over from opposite ends. You're looking at it correctly as it is available after SP2. And I'm looking at it (a bit darkly) because it's available to XP only after SP2. I hate mid-year changes (side effect of being a mechanic).

So if somebody does a fresh install, the program isn't going to run until after they get SP2 installed - Which is why I (in a split hairs fashion) said it isn't available in XP. It's not that it didn't run, as I never tested it...It's just that as soon as I saw the conditional SP2 requirement I (started thinking NT4) decided not to open that can of worms.


<Short Answer> ...You ain't nutz, I am.  :D
4629
It's really just different levels of the same thing. The original code used a registry key to enumerate the physical adapters on the machine (and was right on the edge of Quick-N-Dirty). On my dev machine it found 1 Physical Adapter.

The code above is the much more detailed Network Interface list, which is where the more detailed state & status info is kept. On my dev machine it found (roughly) 20 Network Interfaces.

 The nested if's around the for(...) loop are narrowing the list down to less than a dozen items that can/will then be compared (GUID-to-GUID) to the Physical Adapters list to eliminate the disabled adapters from the Drop-Down menu.

From a (Windows) programming standpoint, these kind of shenanigans are normal... ;)

Note: Granted using the WiFi API 4wd mentioned above would have been a more elegant solution (simpler code & faster to pound out), however it also doesn't run on (isn't available in) Windows XP ... Which is (after all) or target platform.
4630
Developer's Corner / Re: Need Advice on MySQL Server Tuning
« Last post by Stoic Joker on February 03, 2011, 06:48 AM »
For indexing in MySQL, you might be surprised at just how much extra performance you can get by indexing fields that you would not normally index. I was working on a largish database and started experimenting with performance there -- additional indexing helped a fair bit.

Actually no, I manage to figure that one out a few years back ... Now I index everything, as it really does make a big difference.



Sounds like a tough nut to crack.

Is it just that the query itself takes a long time? With no resource issues... Bottleneck in there?

Have you tried a query profiler?

Given the scale of what it's being asked to do, sure... It's bound to take a while. It does not however (IMO) need to take that long... :)

Here's the thing... I run one of the problem child queries that I selected for testing purposes while watching Task Manager to see what impact it has on the server's resource usage. While the query is running the server is just chuffing along showing absolutely no sign of a strain.

I know I originally set the thing up conservatively (Instance Configuration Wizard using Developer Machine settings), because I hadn't decided if I could trust it back then. But... Now I gotta give it a bit more freedom to gobble resources because it occasionally needs them. ...Badly...

And that's where the "fun" starts, because there are a ton of different memory caches/buffers/settings which I really need adjust...but  not screw-up.
4631
Okay, nothing real exciting at this point. But I did figure out how to get the adapter status so we can weed out the inactive ones.

I started with some MSDN example code, and beat on it until it started doing what I wanted. Now I just gotta figure out how to combine it with the rest of the project.

While I plan on releasing the code with the finished program, here's is the adapter bit I've been working for the last few days (Which is a bit embarrassing when I thing about it); everything needed to compile & run is below:
Code: C++ [Select]
  1. // GetIfEntry.cpp : Defines the entry point for the console application.
  2. //=============== Created by Stoic Joker: Tuesday, 02/01/2011 @ 6:23:11pm
  3. #include "stdafx.h" //--------------------------------------------+++-->
  4.  
  5.  //================================================================================================
  6. //-------------+++--> Strip \DEVICE\TCPIP_ Off of wszName to Get the Adapter's GUID For Comparison:
  7. void StripOutGUID(WCHAR *szGUID, WCHAR *wszName) { //---------------------------------------+++-->
  8.         WCHAR *p; // Walk the string to find the GUID opening '{' character. Sure There
  9.         int i=0; // Are Easier Ways to do This ... But This Way I Avoid Language Issues.
  10.  
  11.   p = wszName;
  12.   while(*p != '{') {
  13.           *p++; i++;
  14.   }
  15.  
  16.   wsprintf(szGUID, L"%s", p);
  17. }
  18.  //================================================================================================
  19. //------------------------+++--> Get Lst of Network Interfaces Available on Machine for Comparison:
  20. BOOL GetAdapters(WCHAR *szTarg) { //-----------( Much of This is From the MSDN )------------+++-->
  21.         PMIB_IFTABLE ifTable; // Declare and initialize variables.
  22.         PMIB_IFROW pMibIfRow;
  23.         DWORD dwSize = 0;
  24.         DWORD dwRetVal = 0;
  25.  
  26.   // Allocate memory for our pointers.
  27.   ifTable = (MIB_IFTABLE*) malloc(sizeof(MIB_IFTABLE));
  28.   pMibIfRow = (MIB_IFROW*) malloc(sizeof(MIB_IFROW));
  29.  
  30.    // Before calling GetIfEntry, we call GetIfTable to make sure there are entries to get.
  31.   // So... First, make an initial call to GetIfTable to get the necessary size into dwSize
  32.   if(GetIfTable(ifTable, &dwSize, 0) == ERROR_INSUFFICIENT_BUFFER) {
  33.           GlobalFree(ifTable);
  34.           ifTable = (MIB_IFTABLE *) malloc (dwSize);
  35.   }
  36.   // Then make a second call to GetIfTable to get the actual data we want.
  37.   if((dwRetVal = GetIfTable(ifTable, &dwSize, 0)) == NO_ERROR) {
  38.           if(ifTable->dwNumEntries > 0) {
  39.                   for(UINT i=1; i<= ifTable->dwNumEntries; i++) {
  40.                                 pMibIfRow->dwIndex = i;
  41.                           if((dwRetVal = GetIfEntry(pMibIfRow)) == NO_ERROR) {
  42.                                   if(pMibIfRow->dwType == MIB_IF_TYPE_ETHERNET &&
  43.                                           pMibIfRow->dwAdminStatus == MIB_IF_ADMIN_STATUS_UP) {
  44.                                                   WCHAR szGUID[GEN_BUFF] = {0};
  45.                                           printf("\tDescription: %s\n", pMibIfRow->bDescr);
  46.                                           printf("\twszName: %S\n", pMibIfRow->wszName);
  47.                                           StripOutGUID(szGUID, pMibIfRow->wszName);
  48.                                           if(wcscmp(szGUID, szTarg) == MATCH) {
  49.                                                   printf("\tGUID: %S <--+++--> MATCHES REQUESTED ACTIVE TARGET ADAPTER!!!\n", szGUID);
  50.                                           }else{
  51.                                                   printf("\tGUID: %S <-+-> Is Active, But Not the One We're After.\n", szGUID);
  52.                                           }
  53.                                           printf("\tReceived %d, Sent %d\n", pMibIfRow->dwInOctets, pMibIfRow->dwOutOctets);
  54.                                           printf("\t\tNext...\n\n");
  55.                                   }
  56.                           }
  57.                   }
  58.           }
  59.           GlobalFree(ifTable);
  60.           return TRUE;
  61.   }
  62.  return FALSE;
  63. }
  64.  //================================================================================================
  65. //--------------------------------------//---------------------------+++--> Console Program Main():
  66. int _tmain(int argc, _TCHAR* argv[]) { //---------------------------------------------------+++-->
  67.   if(argc < 2) {
  68.           printf("\n\n\tERROR: No GUID Specified, Exiting!\n\n");
  69.           return 0;
  70.   }else{
  71.           printf("\n\n\tSearching for GUID: %S\n\n", argv[1]);
  72.   }
  73.   if(!GetAdapters(argv[1])) printf("\tGetIfTable failed.\n");
  74.  return 0;
  75. }
  76.  
  77.  // ============================================= STDAFX.H <-> Header File Below This Line!
  78. // stdafx.h : include file for standard system include files,
  79. // or project specific include files that are used frequently, but
  80. // are changed infrequently
  81. //
  82.  
  83. #pragma once
  84.  
  85. #ifndef _WIN32_WINNT            // Allow use of features specific to Windows XP or later.                  
  86. #define _WIN32_WINNT 0x0501     // Change this to the appropriate value to target other versions of Windows.
  87. #endif
  88.  
  89. #define GEN_BUFF   128
  90. #define MATCH            0
  91.  
  92. #include <stdio.h>
  93. #include <tchar.h>
  94.  
  95. // TODO: reference additional headers your program requires here
  96. #include <Windows.h>   //--+++--> Also Required by GetIfEntry():
  97. #include <Iphlpapi.h> //---+++--> Required by GetIfEntry():
  98. #pragma comment(lib, "Iphlpapi.lib") //-++-> ^See Above^:

...Crap, I just realized that int i doesn't actually do a damn thing... *Sigh*
4632
Living Room / Re: Google's overweening conceit (anti-Eric Schmidt rant)
« Last post by Stoic Joker on February 02, 2011, 05:45 PM »
I'm always worried when people start thinking that since they (supposedly) know better than me, they have the right to take away my freedom to choose and make decisions for me, for my own good.

Even if they're right, I should still have the freedom to make a bad choice and suffer the consequences.
Damn Straight!

Oh Yeah, and I loved the Wall*E connection...  :Thmbsup:
4633
Developer's Corner / Re: Need Advice on MySQL Server Tuning
« Last post by Stoic Joker on February 02, 2011, 03:03 PM »
You have to determine where most of the report work is being done... the client PC or the server.  Maybe put the SQL as a stored procedure on the server and have the client PC call that rather than doing the SQL reporting stuff on the client PC.

The only thing done client side is Click OK and view. Client connects with a TCP/IP session, spits in query, gets results, and displays. Queries are all structured so that the returned results set can be dropped straight into a ListView control for application use (or are stuffed into a table via either .asp or .php). The only "processing" done client side is input validation ... Which takes about 4ms, and is done prior to query being sent (No used borked queries aloud...).
4634
Living Room / Re: *URGENT* Patch IE security flaw (31 January 2011)
« Last post by Stoic Joker on February 02, 2011, 02:53 PM »
My concern would be users of sites like Twitter, where shortened links are routinely used and you don't really know where they are going. Could one of these specially crafted links be shortened and then posted on Twitter with a catchy headline promising news about current events or other attractive content?

Now, that is an interesting question... While I'd be inclined to say no - exploit should have no effect if sent to the wrong page processor - I'm not entirely sure. But I've always had an aversion stubby links.

NPR had a talk with the head engineer (or some such title) at bit.ly.  She said that there was inbuilt protection against this, using a combination of whitelists/blacklists and heuristics... if a link is questionable (it's not in either of these lists) it goes to a list to be manually checked... but they only have 20 people *total* so there is a window where a potentially malicious link is waiting to be checked and in the wild.

Oh great, we're screwed...  :D
4635
Developer's Corner / Re: Need Advice on MySQL Server Tuning
« Last post by Stoic Joker on February 02, 2011, 10:45 AM »
@Renegade - Just for the record, I designed and wrote the entire system...From the db, to the UI ... So the shooting option is out... ;)

But to be fair:
I seldom use joins.
all the critical stuff is indexed.
and I haven't a clue what denormalizing is/does. ...And I suspect it's rather unlikely that I've already done it by accident.

------------------

Anyhow, here's the thing... While I could, with agonizing care, try restructuring the report queries. I'm not entirely convinced that that will truly give me net effect I'm looking. I say this because of the following reasons:

  • as I mentioned before 99% of the time everything runs just fine
  • Sometimes a large query really is just that: 5,000+ clients, Several thousand items (seasoned with pricing/quantity info that gets tallied & totaled on multiple levels), data set is for the last many years... (Yada yada) ;)
  • It is only the large reports (that should be CPU hogging, yet are not) that are taking time to run
  • The server the queries are run against never shows more that 20% (per core) usage during the query.
  • There are no hardware based reasons (tons of memory available, no disk contention, etc.) for it to take that long.
  • I know that I used the conservative resource settings back when I originally deployed the rig.

So... I'm looking for more of a "Let Loose the Reins!" type of solution so the MySQL server service can have have a better crack at the CPU's "time". I just don't want to over do it because there are a few other things the box does/needs to be handling also.
4636
Living Room / Re: Google's overweening conceit (anti-Eric Schmidt rant)
« Last post by Stoic Joker on February 02, 2011, 10:12 AM »
I am so much more than any of the technologies I choose to employ.

Why can't  "I'm a Mac" and "I'm a PC" understand that?  :-\

I feel like a number,
I'm not a number,
I feel like a number,
Damnit I'm a man...

(you know the song)
4637
I wonder how long Apple can keep this up.  They make good stuff, but it's only a matter of time before they have to let go of their closed system little by little.  Their userbase is growing a lot, and they are going to be asking for this and that, which means more options and capabilities are going to be demanded.  And Apple will have to satisfy them somehow.  If they want to keep this success they have going on, they have to let it go a little.

Quite to the contrary... I think Apple should clamp down as tightly as they can on their little nut. That way there wont be any chance of them falling of while they ride it straight to hell.

...Afterwhich we can all be free of their foolish money-grubbing nonsense. :)
4638
Developer's Corner / Need Advice on MySQL Server Tuning
« Last post by Stoic Joker on February 02, 2011, 08:04 AM »
Greetings
  A few years back I setup a MySQL server back-end for our company with an Intranet website so everybody could have free access to the same correct up-to-date information. This resolved issues we had been having with people squirreling away copies of stuff and then arguing over who's info was the most(est) current/correct. *Sigh*...

  So... This was good, for awhile. But then another db was added for something else, and another, and another... Now 99% of the time all is still just fine, but there are the odd occasions where large (All of the X, who got X, in the past X years...) reports need to be compiled ... And some of these are taking up-wards of 3-5 minutes to complete.

  Initially, I setup the server config to use resources sparingly; used just the basic many things happening on box (MySQL Instance Configuration Wizard) configuration. But now I'm faced with having to re-think that configuration to speed-up report generation...And the settings available on the advanced (MySQL Administrator) options are considerably more complex...

  Mind you I have considered the possibility that I may just be creating a larger problem instead of solving one ... So thought it best to ask if there were any (succinct) best practice tutorials available for tweaking this puppy up a notch so that the larger report queries don't take quite so close to forever to run...

Thank you,
Stoic Joker
4639
Half of all respondents in 2010 reported a failure due to DDOS, which could have been avoided with either more selective router configuration or by adding a layer of security at the edge of the network that can shed bogus DDOS or other unauthorized traffic before it gets to the firewalls.
-bottom page 1 2nd article

So... Now "we" need a firewall for the firewall? This almost sounds like they're trying to conjure up the electronic version of the safest way to get shot in the face.
4640
Living Room / Re: A Funnier IE6 Story
« Last post by Stoic Joker on February 02, 2011, 07:15 AM »
...You mean that silly InterWeb fad/thing ain't blown over yet??? Damn kids these days...

 :D
4641
  • This weekend the company announced new "Starter" editions of C++ Builder and Delphi, priced at about $200.
...or you could get the (IMHO superior) Express editions of Visual C++ and C# instead, for free. Hard decision, hard decision.

I made that switch years ago (I really just wanted smaller code), and have never regretted it.
4642
Living Room / Re: Why does the Mayan calendar end on....?
« Last post by Stoic Joker on February 02, 2011, 07:07 AM »
Oh Great, now I have 3 possible cake timing dilemmas...

Hay, how about a countdown clock with a configurable Apocalypse? ...I could add an EoW (End of World) label to T-Clock... *Shrug* ...To dark maybe..? :-\
4643
Living Room / Re: *URGENT* Patch IE security flaw (31 January 2011)
« Last post by Stoic Joker on February 02, 2011, 06:50 AM »
My concern would be users of sites like Twitter, where shortened links are routinely used and you don't really know where they are going. Could one of these specially crafted links be shortened and then posted on Twitter with a catchy headline promising news about current events or other attractive content?

Now, that is an interesting question... While I'd be inclined to say no - exploit should have no effect if sent to the wrong page processor - I'm not entirely sure. But I've always had an aversion stubby links.
4644
Living Room / Re: *URGENT* Patch IE security flaw (31 January 2011)
« Last post by Stoic Joker on February 01, 2011, 11:01 PM »
From the MS Security Advisory (Mitigating Factors and Suggested Actions):

In a Web-based attack scenario, a Web site could contain a specially crafted link (MHTML:) that is used to exploit this vulnerability. An attacker would have to convince users to visit the Web site and open a specially crafted URL, typically by getting them to click a link in an e-mail message or Instant Messenger message that takes users to the attacker's Web site, and then convincing them to click the specially crafted link.

So once again it's only those who blindly click away at anything that are (actually vulnerable) affected.

Microsoft Security Advisory (2501696)
4645
You would still have to manually dredge up the Adapter's ID string for devcon to (target) use.
4646
I once disabled the NIC on a Production Server I was working on via Terminal Services - ::) - That went rather badly...
4647
Hm... That looks like a Windows (error) message. Can you disable the NIC in question from the Network Connections folder?

(Bing seems to think this is a common Windows issue)
4648
That error message is (should only be) displayed when you hit the cancel button.

yes, that's what i did. was just testing on a PC with non-wifi component to see what happens.
Okay, my intention was to give the user feedback regarding the programs intentions. So they weren't waiting for it to do something else, and/or were not sure it had completely closed. If it is actually causing more confusion I can pull it out of the next build.
4649
That error message is (should only be) displayed when you hit the cancel button.
4650
Well I'll be damned! (me too)

I've been doing most of the testing on my XP laptop(which just exits on LAN), so hadn't noticed this rather interesting behavior.

Strangely my 32-bit Win7 machine at the office didn't do this (or I didn't notice it)...But x64 here does.

The C# Native WiFi API thing didn't pan out as it's Vista/7 only (I'm not ready to give-up on XP just yet), so I'm polking around looking for options.
Pages: prev1 ... 181 182 183 184 185 [186] 187 188 189 190 191 ... 246next