Skip to content

Clever Code

Showcase your best code, your most elegant solution, or your most hard fought subtle bug you've found and fixed

This category can be followed from the open social web via the handle clever-code@forum.codeproject.com

361 Topics 3.2k Posts
  • Downloading a file - and why it sometimes doesn't work

    database com security help
    6
    0 Votes
    6 Posts
    2 Views
    A
    You could try using the content-disposition header to set the filename. We had some similar problems and this seemed to resolve them. Additionally, are the failing cases on Windows Vista/Ie7? I believe there are security features that prevent some downloaded files types from being opened in certain cases (think it's something to so with the user the isolation tricks IE7 uses).
  • Errors on the 31st day

    help database csharp design business
    15
    0 Votes
    15 Posts
    7 Views
    P
    Liam O'Hagan wrote: The developer made a few assumptions, namely every month had 30 days, including February :eek: Every month has at least 28 days :laugh: "I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
  • 0 Votes
    5 Posts
    2 Views
    P
    OK - I don't know why this was 1 voted. I'll 5 it to raise it up - oops perhaps GridViewGuy did the driveby. Deja View - the feeling that you've seen this post before. My blog | My articles
  • Lazy initialization of a singleton

    csharp html asp-net com sysadmin
    16
    0 Votes
    16 Posts
    4 Views
    P
    Damn my memory - I was sure this was the case. It's been so long since I've used .NET 1 that some things are hazy, but I was pretty damned sure of this. Oh well. Deja View - the feeling that you've seen this post before. My blog | My articles
  • If it were not an operator

    c++ database help question
    5
    0 Votes
    5 Posts
    3 Views
    CPalliniC
    Rage wrote: Maybe the , operator ? Of course, with default parameter complicity. :) If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile. [my articles]
  • DLL, STL and CRT linking

    c++ help database asp-net mysql
    14
    0 Votes
    14 Posts
    6 Views
    M
    Yeah, they're running out of time to get "C++0x" done. :rolleyes: --Mike-- Visual C++ MVP :cool: LINKS~! CP SearchBar v3.0 | C++ Forum FAQ Dunder-Mifflin, this is Pam.
  • System Tray Iconised App Under Aero

    c++ wpf graphics help
    3
    0 Votes
    3 Posts
    2 Views
    J
    Clearly those particular coders don't pay attention to the world outside of Microsoft, then, as every person I've heard talk about it has called it the SysTray, including myself. Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan Portland, Oregon, USA www.defaultn.com
  • Optimizer bug [modified]

    help question csharp com learning
    16
    0 Votes
    16 Posts
    5 Views
    L
    Ahh, now I get it :) xacc.ide IronScheme a R5RS-compliant Scheme on the DLR The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
  • Too subtle, in fact it doesnt even err

    php visual-studio com
    11
    0 Votes
    11 Posts
    5 Views
    D
    ObjectDataSource is not to be used only from C# :P But then again, there is no Integer in CLR either. [My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - RĂ¼diger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
  • This one again - when comparison attacks!

    csharp workspace
    2
    0 Votes
    2 Posts
    2 Views
    P
    Shog9 wrote: writing VB while thinking C#. There you have it in a nutshell; VB. You know that the thinking one is C#, yet you insist on doing this VB stuff. Go and stand in the corner for 10 minutes (act ashamed while you're there). Deja View - the feeling that you've seen this post before.
  • no printing any more

    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Skipping an iteration, not the loop

    sharepoint
    15
    0 Votes
    15 Posts
    8 Views
    CPalliniC
    Mike Hankey wrote: "Theres no place like home....." No, there is home itself, at least. :-D If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
  • Strange comma in Request.Form

    javascript docker help question
    3
    0 Votes
    3 Posts
    2 Views
    K
    I didn't knew that and yes, your right. There are two controls with same name, I just checked. Thank you for solving the mystery ;).
  • The Joke is "on" Me.

    csharp json help question
    5
    0 Votes
    5 Posts
    4 Views
    C
    Shog9 wrote: nothing gets sent back when it isn't. Reminds of the time in the old green screen days, when someone wanted know what the escape sequence was to make the 'spaces' in a field, blink. That was funny. :-D Chris Meech I am Canadian. [heard in a local bar] Donate to help Conquer Cancer[^]
  • Converting code from C#.NET to VB.NET

    csharp help
    33
    0 Votes
    33 Posts
    20 Views
    U
    Good explaining. Every language has its own set of features and nuances. When we learn (and teach) a language, it is esseential to know how the language came about. As many agree, VB came as a quick tool to enable windows programming. Way back in 1995, just when Win95 was being pushed in to the work station area, I had a question, how do I implement my shell scripts in Windows. Some one from Microsoft answered, try VB. That was how I got interested in VB. In fact, Microsoft it self learnt many things about inter process communication after the success of VBX(OCX). Remember, Microsoft talked so much about embedded documents earlier. VBX proved a new way of looking at data exchange. I worked on C for almost 10 years and then shifted to VB. I have been with it for the last 11 years! Recently I started learning C# and find it a good tool to overcome some of the problems I face in VB. I have font servers written in VB, IPC protocol implementations in VB, printer driver like things in VB. But I see fresh air in C# (my company is named C-Quad, named way before C# was conceived). The network centric orientation of C# is unparalleled in any other language, with its roots deep in XDR specs from SUN! I dont know if Microsoft talks about it. I see a connection. I have moved from Fortran IV to Pascal to C to VB but skimmed over Java and VC++. Display Postscript, Motif and may other things inclusive. I still have a heart to learn C# for what it is worth. Of course most of my work will be done in VB. UVW
  • Insidious Bug

    visual-studio debugging help announcement workspace
    14
    0 Votes
    14 Posts
    5 Views
    N
    David Kentley wrote: I miss it Me too. Programming Blog utf8-cpp
  • The if that wouldn't

    help question announcement
    8
    0 Votes
    8 Posts
    3 Views
    J
    Thank you, I was wondering how that even compiled. INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
  • The Blind Spot

    c++ database com debugging architecture
    13
    0 Votes
    13 Posts
    5 Views
    N
    ;) If you're struggling developing software, then I'd recommend gardening.
  • Confusing Documentation

    8
    0 Votes
    8 Posts
    4 Views
    M
    No, I'm not sure. :) --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ "That's what's great about doing user interface work. No matter what you do, people will say that what you did was idiotic." -- Raymond Chen
  • Spot the error

    algorithms help css graphics performance
    8
    0 Votes
    8 Posts
    6 Views
    E
    :laugh::laugh: The Advantage in work-from-home is that... we can blame the dog -Mark Salsbery Best wishes to Rexx[^]