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
G

Gerald Schwab

@Gerald Schwab
About
Posts
162
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MS SQL: how to reorganize identity column values?
    G Gerald Schwab

    Turn off logging, switch to simple recovery, then use a SELECT INTO statement to make a copy of the table (but with bigint column instead of int). SELECT INTO is a bulk copy operation which requires minimal resources.

    GO
    SELECT CAST(ColumnName AS BIGINT) AS ColumnName,
    OtherColumns
    INTO NewTable
    FROM Table1;
    GO
    DROP TABLE Table1;
    GO
    -- Use sp_rename to rename NewTable to Table1
    GO
    -- Re-add primary key/constraints/etc.
    GO

    Database database tutorial question

  • Chevron effect not showing Icon in IE6 (Windows XP)
    G Gerald Schwab

    This should work:

    if (pdbi->dwMask & DBIM_MODEFLAGS) pdbi->dwModeFlags = DBIMF_USECHEVRON | DBIMF_BREAK;

    ATL / WTL / STL

  • How to use XSL to get the most common value in XML
    G Gerald Schwab

    How about something like this?

    <xsl:variable name="mostCommonTime">
    <xsl:for-each select="//fixtures/fixture">
    <xsl:sort select="count(time)" order="descending"/>
    <xsl:if test="position() = 1">
    <xsl:value-of select="count(time)"/>
    </xsl:if>
    </xsl:for-each>
    </xsl:variable>

    modified on Wednesday, October 15, 2008 11:31 PM

    XML / XSL xml question javascript algorithms tutorial

  • XML and performance
    G Gerald Schwab

    If you are trying to find 1 record in a list of a million, why not use selectSingleNode() instead of looping through each node yourself?

    XML / XSL question data-structures xml performance

  • 128GB Solid State HDD due in March 08
    G Gerald Schwab

    Keep in mind it's meant for enterprise customers, not the average user. :) The ioDrive™ is designed to deliver 87,500 IOPS (input/output per second @ 8K packets) per PCIe x4 card, while achieving sustained data rates of 700MB/sec (Read) and 600MB/sec (Write) — making the ioDrive™ almost a thousand times faster than any existing disk drive. Fusion-io is targeting a retail price of approximately $30 per Gigabyte for the ioDrive™. http://www.fusionio.com/[^]

    The Lounge architecture

  • Assembly
    G Gerald Schwab

    http://flatassembler.net/[^]

    The Lounge question learning

  • [UPDATE] An XP Installation Question
    G Gerald Schwab

    Sounds like maybe there are some bad sectors on the drive. Try getting the low-level disk utilities from the manufacturer's website, or try another hard drive.

    The Lounge question sharepoint visual-studio help announcement

  • VC6: How do I execute an exe contained in my resources?
    G Gerald Schwab

    http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/resources/introductiontoresources/resourcereference/resourcefunctions/loadresource.asp?frame=true[^]

    C / C++ / MFC c++ question

  • VC6: How do I execute an exe contained in my resources?
    G Gerald Schwab
    1. Extract the exe resource to memory. 2) Write it to the filesystem. 3) Call CreateProcess(). http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp[^] 4) Optionally delete the exe from the filesystem after CreateProcess has been called.
    C / C++ / MFC c++ question

  • [Help] MFC ypelib wrappers for MSXML5
    G Gerald Schwab

    What's the exception your getting?

    C / C++ / MFC c++ data-structures help tutorial

  • Can vectors really hold classes?
    G Gerald Schwab

    If you don't add a constructor, the compiler automatically adds an emtpty one for you. Add an empty constructor to your class, and it should work.

    C / C++ / MFC question graphics game-dev help

  • [Help] MFC ypelib wrappers for MSXML5
    G Gerald Schwab

    I would suggest that you change your code to check the length of the node list on every iteration of the loop.

    if(m_XMLDOMroot.hasChildNodes())
    {
    for(int i = 0; i < RootNodeList.get_length(); ++i)
    {
    CXMLDOMElement childnode = RootNodeList.get_item(i); <- This code sometimes user breaks
    SetChildNode(childnode);
    }
    }

    C / C++ / MFC c++ data-structures help tutorial

  • [Help] MFC ypelib wrappers for MSXML5
    G Gerald Schwab

    Is SetChildNode(...) removing nodes/elements from the NodeList? This causes the length of the NodeList to decrease as your looping which causes 2 errors. 1) If rootchildcount was originally 10, and nodes are being removed, your still comparing against a length of 10, even though there are fewer than 10 nodes in the list. 2) Incrementing i for any iteration where a node was removed from the list, will cause your code to skip over the node (in the nodelist) following the node that was just removed.

    C / C++ / MFC c++ data-structures help tutorial

  • Quicksort algorithm is Causing stack overflow [modified]
    G Gerald Schwab

    Have a look at this implementation. It's optimized for speed and size. http://epaperpress.com/sortsearch/txt/qui.txt[^]

    C / C++ / MFC data-structures database algorithms help

  • C#/SQL Question
    G Gerald Schwab

    Uhh, he asked what he should concatenate to the end of the SQLString string variable in order to generate a SQL statement that would filter by Parts.ID. He didn't ask for a "solution". So, I didn't provide him with "my" solution, I simply demonstrated how to create the SQL string he was interested in creating. I am fully aware of SQL injection attacks and always use typed parameters with stored procedures in "my" solutions. Maybe you should try being less arrogant next time.

    C# question csharp database asp-net sql-server

  • C#/SQL Question
    G Gerald Schwab

    Unless I'm missing something...

    string SQLString = "Select * FROM Costs WHERE costs.PartID = " + strPartNumberInput;

    C# question csharp database asp-net sql-server

  • How access&#12288;Safearray to be quicker?
    G Gerald Schwab

    http://msdn2.microsoft.com/en-us/library/3xzbsee8.aspx[^]

    ATL / WTL / STL c++ question

  • Happiness is ....
    G Gerald Schwab

    That's bad. Okay. Alright, important safety tip, thanks Egon.

    The Lounge com question

  • C++ Web Apps
    G Gerald Schwab

    I do.

    The Lounge c++ question

  • Foreign Keys ease SQL statements?
    G Gerald Schwab

    I can't think of another reason besides referential integrity. Foreign keys are constraints and do not change SQL statements. They just guarantee that Products.CustomerID will match the CustomerID in the Customers table. In other words, you shouldn't be able to delete Customer 1 from the Customers table if Customer 1 exists in the Products table.

    Database database question
  • Login

  • Don't have an account? Register

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