Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

speedpacer

@speedpacer
About
Posts
9
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Memory or Disk?
    S speedpacer

    There seems to be a lot of articles written which promote the use of storing DHTML data from a C++ application in memory, rather than reading/writing temporary files to disk. However, there doesn't appear to be a lot of support backing this "best-practices" theory, other than disk caching seems slower or more sloppy (for lack of a better word) than memory caching, and that the temporary files will need to be deleted afterwards. I'm going to have to raise a brow on this one and get some others thinking about it before we all start writing a bunch of applications based on this memory usage theory. The idea is that by initially navigating to "about:blank" and insuring that the document is loaded, we can then write directly to the HTML document as it sets in memory. The alternative approach obviously, is to write to a temporary file that is stored on the hard disk, "C:\\temp\\temp.htm" for example. I've looked deeply into both of these methods and I have to say that I'm leaning a little towards the disk caching but maybe someone can raise a point that I haven't considered. Firstly, most of the articles claim that there'd be a need to write temporary "files" (plural), which is a little misleading. If you can write your entire DHTML document to one "about:blank", then you should be able to write the same content to one "temp.htm". In terms of clean-up, deleting a temporary file is no different than releasing values stored in memory and Microsoft has confirmed that there are issues with releasing BSTR's from memory, even in Internet Explorer, which is causing memory leaks in most of these memory-based solutions. Simply put, a rebel file will cause far less damage than an orphaned memory block. After all and in most cases, we have Gig's worth of free and available disk space to work with and only a few hundred Meg's worth of memory, not to mention the fact that that few hundred MB's is being shared with the operating system and all of the other applications that are running on the desktop and using memory. Additionally, the nature of a Microsoft OS is to buffer memory in an out of a paging file, so the data is eventually going to be written to the disk anyway, and into a space that is restricted by the amount of memory that is available to the system. True, the OS will "take care of it for you" but when you let something else take care of something for you, you give up the control you have over how it's handled. And does your file need to be temporary? Do you even need to delete the file? In so

    C / C++ / MFC c++ html css performance tutorial

  • Explain to me Net Bios Names!
    S speedpacer

    Are you trying to do this programmatically or do you just want to find out the MAC address of your network adapter? I haven't done this programmatically but the first one looks like the best solution, which was basically just copied from this Microsoft link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netbios/netbios_8d82.asp[^] Note that a MAC address is specific to a network adapter and not the system itself, so if you have more than one NIC, you'll have more than one MAC address, so you'll want to make sure that you're obtaining the correct one and it could change should someone replace the NIC. If you're just looking for a MAC address on your computer, from a command prompt, type "ipconfig /all" and it will list information for all of your NIC's. The MAC address is the "Physical Address". Cheers, Don

    C / C++ / MFC database algorithms

  • Please Guide me ,need urs suggestions !! :)
    S speedpacer

    Depending on your level of experience, a college degree may not even be necessary for a technical position, so the popularity of your college is really not an issue. What they're really looking for is someone who'll be able to go in and do the job for which they've applied with little or no training. A college degree will help you later in your career should you decide to work your way into a management position. The best way to get into a large corporation, sadly enough, is to make a contact within the organization that can pass your resume onto one of the recruiters. It's that "not what you know but who you know, good ol' boy network". That's how I've gotten interviews with these big companies (Microsoft, Computer Associates, etc.). You should be aware that there are certain drawbacks when working for these large companies however, especially if you're just starting out. If you're just starting out, you may consider working for a smaller company first and building up your level of experience. The reason for this is that the large companies will offer very low salaries for recent college grads and it's very difficult to get large pay increases (without threatening to leave usually). It's been my experience that it's best to build up your resume first and then target the larger companies who'll be willing to pay you more when you walk through the door. When you've reached this level of experience on the other hand, you may naturally demand a little more respect than what a large company can provide to you as they see you as just another little fish in a big ocean. Best of luck!

    IT & Infrastructure c++ oracle com collaboration tutorial

  • Explain to me Net Bios Names!
    S speedpacer

    I'm not sure exactly what you're trying to accomplish but I'm familiar with NetBios names. It sounds like you're overcomplicating it! But isn't that usually the case? ;) A Netbios name is basically just the short name of a computer, whereas the DNS name includes the short name plus the domain suffix's. For example, if your computer name is BOB and you're in the Microsoft domain, then your Netbios name is "BOB" and your fully qualified DNS hostname would be bob.microsoft.com. If you go to a command prompt and enter "hostname", it will return your NetBios name. You can use "nbtstat -c" to view a list of Netbios names that are in your local cache. Throw a "/?" switch to see how to refresh, clear, and reload your Netbios cache. When a computer starts up, it will typically attempt to fill your cache with netbios names that is needed to map drives, log into domains, run login scripts, locate exchange servers on the LAN etc., first through your local cache (LMHOST), then WINS (which is nothing more than a Netbios to IP name resolver), router tables if they're set up for it, and then by broadcasting. This is how networks are usually set up by default and where the node types come into play. You can modify the node type (broadcast, hybrid, etc.) to tell your computer in which order you'd like to resolve Netbios names and/or whether or not you want to use those various methods of resolution. As long as DNS is set up properly, there should be no need to modify the LMHOST file on a workstation. The only time you should need to modify this file is in cases between two domain controllers where you've established a trust relationship, or for "tricking" a workstation into locating specific domain controllers for authentication to an NT domain (or Active Directory" by hardcoding it into the local cache for purposes of load balancing. Or if WINS is hosed, or your router tables are refreshing too quickly, etc., but again, on a well-planned network, you shouldn't need to make adjustments to the LMHOST file and doing so can result in an maintenance nightmare for network administrators. They'll sometimes use this file to get someone connected to a network resource as a quick-fix, rather than correcting the source of the problem, which will usually lead to even more problems later. Hope that helps. If I can answer anything more specific, let me know. Cheers, Don

    C / C++ / MFC database algorithms

  • Custom Scrollbars in WebBrowser Control
    S speedpacer

    Hello, Has anyone tried to create custom scrollbars for the ActiveX WebBrowser control? I've managed to disable the default scrollbars using the IDocHostHandler Interface but I'm having a little trouble drawing on the custom ones. I've found some articles that describe custom scrollbars in listboxes and other controls, but nothing for ActiveX (IDispatch) controls. I know that you can change the colors through HTML, but there doesn't appear to be a way to use bitmaps in this fashion. Any help will be greatly appreciated. Cheers, Don

    C / C++ / MFC html com graphics help question

  • TrimLeft() question
    S speedpacer

    Thanks for your response. I've got it now. TrimLeft() (after a little RTFM'ing) removes ALL characters from the left that you specify, not the string as it appears. So, what I did was subtract the length of the current directory from the length of the entire string, and then use that number to extract only the data I wanted from the string, like so:

    CString m_Fairbanks = _T("C:\\Project\\Final\\Data\\Fairbanks, AK");
    int FairbanksLength = strlen(m_Fairbanks);
    TCHAR SourcePath[MAX_PATH+1] = {0};
    GetCurrentDirectory(MAX_PATH,SourcePath);
    int DirLength = strlen(SourcePath);
    int DataLength = FairbanksLength - DirLength;
    CString string = m_Fairbanks.Right(DataLength-1);
    MessageBox(string,NULL,MB_OK);

    I'm actually loading the data from an XML file and overriding an OnBeforeNavigate2() message from a WebBrowser Control, so it thinks it's a URL (VARIANT) and adding the local path to the element, which isn't what I wanted. It seems to be working now though. Thanks again, Wolf

    C / C++ / MFC question tutorial

  • TrimLeft() question
    S speedpacer

    Still have a question though... I thought CString::Left() would work, but it's not working the way I expected either. So, how do I trim off the first part of this string, to get only the city and state? Better yet, how can I get the current directory, pass that to a CString, and then strip that value out of another string, as per the example above? Thanks, Wolf

    C / C++ / MFC question tutorial

  • TrimLeft() question
    S speedpacer

    Sorry, nevermind. I get it. :sigh:

    C / C++ / MFC question tutorial

  • TrimLeft() question
    S speedpacer

    I don't know what I'm doing wrong here but I'm getting some strange results from TrimLeft(). Take the following code for example:

    CString m_Anchorage = _T("C:\\Project\\Final\\Data\\Anchorage, AK"));
    CString m_Fairbanks = _T("C:\\Project\\Final\\Data\\Fairbanks, AK"));

    CString sAnchorage = m_Anchorage;
    CString sFairbanks = m_Fairbanks;

    sAnchorage.TrimLeft(_T("C:\\Project\\Final\\Data\\"));
    sFairbanks.TrimLeft(_T("C:\\Project\\Final\\Data\\"));

    MessageBox(sAnchorage,NULL,MB_OK);
    MessageBox(sFairbanks,NULL,MB_OK);

    The code doesn't really look like this, just showing it this way for simplicity's sake. In this case, "sAnchorage" will return properly, "Anchorage, AK". However, "sFairbanks" will return "rbanks, AK". As a matter of fact, anything that starts with the letter "F" is causing this. Anyone know why? :confused: Thanks in advance, Wolf

    C / C++ / MFC question tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups