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
J

Jack Vanderhorst

@Jack Vanderhorst
About
Posts
32
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Deconstructing a mess
    J Jack Vanderhorst

    Hi all, I've recently inherited a couple of projects that I am having a terrible time getting my head around. As I stare at a method of 600+ lines that is doing all manner of unrelated things, trying to make sense of it I wonder: Is there a formal name for what I am doing here? Surely this has a name, surely thousands of people have done this sort of thing before, surely there are resources to be had. Any pointers I could get here? A generic approach maybe? Point me in a direction? blah, -Jack

    Design and Architecture question

  • Codeproject programming test?
    J Jack Vanderhorst

    Dude that's exactly it, I never would have found it. Thanks muchly -Jack

    The Lounge question career

  • Codeproject programming test?
    J Jack Vanderhorst

    no

    The Lounge question career

  • Codeproject programming test?
    J Jack Vanderhorst

    G'day all, I vaguely remember reading at some point a Programming Interview sort of question for a position working here at Codeproject, I'd like to track it down. It was something to the tune of "Along with your CV, please include an application, as complex or as simple as you like, that does xyz with key-value pairs" Am I imagining this? Could someone direct me to it? Cheers, -Jack Disclaimer: I'm interested in scamming it, or at least an idea from it, for my own purposes :)

    The Lounge question career

  • Issue with threading behaviour ... I think
    J Jack Vanderhorst

    First of all, sorry for the tardy reply. With your suggestion I was able to confirm DoWork was running, the Test Framework was on thread 12, DoWork was on 14. Now I'm wondering, if the BackGroundWorker only knows how to notify the "main" thread, and the Test Framework is not on the main thread, doesn't that mean I'm sort of stuck with testing this BackGroundWorker business? Since I know the DoWork methods are running I suppose I could run a separate set of tests to confirm their results, but ick :) Or, maybe I could ditch the BackGroundWorker and code the necessary threading behaviour myself? Do you think I could work around my issue in this way?

    .NET (Core and Framework) csharp database winforms design help

  • Issue with threading behaviour ... I think
    J Jack Vanderhorst

    I have a class, call it Inventory, it does some basic database tasks using a BackgroundWorker like SaveChanges(), LoadFirstItem() etc. In my RunWorkerCompleted method PropertyChanged events are fired to notify the UI to update itself. This works swimmingly in my WinForms app and the BackGroundWorker is clearly doing it's thing successfully, but I'm having trouble writing [TestMethod()]'s for the class in a test project. In a test project, it seems like after calling RunWorkerAsync the DoWork method doesn't get called, and as a result neither does RunWorkerCompleted, and my tests always fail. Breakpoints in DoWork or RunWorkerCompleted are not hit. I assumed this was because my test method was not waiting for the background thread to finish so I've tried sleeping the main thread to see if the BackgroundWorker can catch up, I've tried the Application.DoEvents() thing, but I'm a bit of a rookie in the threading department... and the authoring of Unit Tests department for that matter! uh oh :) Any pointers on how to please my BackgroundWorker in a [TestMethod()]?

    .NET (Core and Framework) csharp database winforms design help

  • Javascript printing question
    J Jack Vanderhorst

    Good to know, cheers :)

    Web Development question javascript html tools tutorial

  • Javascript printing question
    J Jack Vanderhorst

    Yes sir! Thank you, exactly what I needed

    Web Development question javascript html tools tutorial

  • Javascript printing question
    J Jack Vanderhorst

    In Javascript I am trying to create a new window, write some html into it, and then bring up the print dialog for this newly created window automatically. The follow code demonstrates what I am trying to do, the new window appears and is successfully written to but the print dialog does not show up. What gives?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>Printing Example</title>

    <script type="text/javascript" language="javascript">
    function HelloPrint()
    {
    var winPrint = window.open("", "");
    winPrint.document.write("<H3>Hello World</H3>");
    winPrint.print();
    }

    </script>
    </head>

    <body>
    <a href="" onclick="HelloPrint()">Go</a>
    </body>
    </html>

    Web Development question javascript html tools tutorial

  • Integer conversion for dummies
    J Jack Vanderhorst

    Think I figured it out:

    $objResult = $pdoCmd->fetch(PDO::FETCH_OBJ);
    $intValue = (int)$objResult->MyColumnName;

    Cheers

    Linux, Apache, MySQL, PHP question database mysql

  • Integer conversion for dummies
    J Jack Vanderhorst

    I'm successfully calling a mysql stored procedure using PDO with the following line:

    $pdoCmd->fetch(PDO::FETCH_OBJ)

    It returns an object that I need to get converted into an integer, seems straightforward enough but when the object is say "1000" and I cast to an int I get a value of 1. How can I convert an object to an integer and keep my zeroes?

    Linux, Apache, MySQL, PHP question database mysql

  • Sending E-mail through default settings
    J Jack Vanderhorst

    Hrmph. Thanks very much both of you, I suspected as much. Cheers! -Jack

    .NET (Core and Framework) csharp sysadmin testing tools question

  • Sending E-mail through default settings
    J Jack Vanderhorst

    Morning CPians, dig me out here :) I need to send an E-mail from my app through the default E-mail setup on a client system. (invoices and order confirmations, exciting stuff) I have learned through some Googles that MAPI used to do this (no I haven't tried, it looks pretty old), then MAPI was replaced by System.Web.Mail, which has now been replaced by System.Net.Mail. Great, BUT, these .NET replacements both need to be told the E-mail server's address and/or domain, which my users will definitely not know. The Outlook automation assemblies look like an easy option, but I'd just as soon not limit myself to Outlook, or move outside .NET Is there some way to have System.Net.Mail just send the mail through whatever default E-mail settings exist on a user's machine? Perhaps I can look up the E-mail settings somewhere? Magically impersonate the user? Ideas? Guidance?

    .NET (Core and Framework) csharp sysadmin testing tools question

  • Date formatting issue
    J Jack Vanderhorst

    Well I'll be, thanks.

    .NET (Core and Framework) help question

  • Date formatting issue
    J Jack Vanderhorst

    I'm using

    DateTime.Now.ToString("M/d/yyyy")

    to try and format today's date. I've noticed that when I change my regional settings through control panel, it changes the result I get from this method. When I set my default date format to dd-MMM-yy in Control Panel, it changes the output of my ToString method from containing slashes (as I've specified in my format string) to dashes, which I can only assume are coming from my regional settings. I thought the point of specifying my own format string was so that I could, oh I dunno, specify my own format?! Are my control panel settings really affecting this method call? Why in the heck? I realize I can just code my own cheesey routine to format dates and avoid the issue, but I'd like to understand what's going on here.

    .NET (Core and Framework) help question

  • Leasing and sponsoring .net
    J Jack Vanderhorst

    For the first response, neither did I! I just changed the renewed lease time to 5 days so I could easily see it was working. For the second, I agree it sounds less than ideal, but I'm not sure how else you would do it. Maybe your design could change a little? Perhaps the client-side object can quietly "phone home" asychronously for some new info? Perhaps the client-side object could raise an event that you handle on the server?

    .NET (Core and Framework) csharp dotnet help

  • Leasing and sponsoring .net
    J Jack Vanderhorst

    For the first question, this code runs fine for me and the lease is being successfully renewed. :wtf: For the second question, you already are, when you run this code the client is interacting with the remote (ie. proxy) object and the actual object exists and is even outputting text onto the Server's console. I haven't done much with remoting, but that's my two cents, hope it helps.

    .NET (Core and Framework) csharp dotnet help

  • How to detect when an application is about to exit
    J Jack Vanderhorst

    I think you may be looking for a specific Windows message... You can override PreProcessMessage in your form and basically "hook" all manner of unusual things. I wish I knew which one you were looking for exactly or if it even exists, but whenever I've had to handle unusual user actions that didn't really exist as ordinary events, this has worked for me. It's just been a matter of finding the correct combination of msg.Msg, msg.HWnd, and msg.LParam that you are looking for in the overriden PreProcessMessage routine.

    .NET (Core and Framework) agentic-ai help tutorial

  • Customization of the Installation setup in .net framework 2.0
    J Jack Vanderhorst

    I believe this is what you are looking for: http://msdn.microsoft.com/en-us/library/system.configuration.install.installer.aspx[^]

    .NET (Core and Framework) csharp database dotnet sysadmin testing

  • datagridview
    J Jack Vanderhorst

    If your DataGridView is bound to a DataTable then this may be what you're looking for: http://msdn.microsoft.com/en-us/library/system.data.datacolumn.expression.aspx[^] I love these columns, they're smokin' fast :)

    .NET (Core and Framework) 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