User Profile

Collapse

Profile Sidebar

Collapse
Sick0Fant
Sick0Fant
Last Activity: Jun 5 '08, 04:43 PM
Joined: Feb 29 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Next time, say that you need help with the regular expression itself. I assumed that you had a valid re and merely wanted to know how to validate a string with it. The unix forum is a better place for this question....
    See more | Go to post

    Leave a comment:


  • I know nothing of the RegularExpressi onValidator.

    I've only used the .NET RegEx object. To validate if a string is accepted by your regular expression, first declare a RegEx object:

    RegEx MyRegEx = new RegEx(MyStringR epresentationOf MyRegularExpres sion);

    Then, too see if a string is validated:

    MyRegEx.IsMatch (StringToBeVali dated);...
    See more | Go to post

    Leave a comment:


  • Is this for an assignment? If so, do it to your specs. I'm just saying that you never want to reinvent the wheel. The date-time picker gives you a valid date, so you wouldn't have to validate it yourself. If the idea is that the user will be entering so many dates that the dtp would be cumbersome, you may want to look ate date.TryParse() .

    BTW, why create the controls at run time? Especially if you're doing this in the load event,...
    See more | Go to post

    Leave a comment:


  • Well, you can split the input by newline, then use a for each loop to validate each one. Although, I'd wonder if you shouldn't just use a date-time picker to populate a listbox-- then you wouldn't need to validate it yourself because the date-time picker returns a date data type....
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to Compiler Question
    in C
    I used to like to put in a scanf at the very end, so that it would stay until I hit ctrl+c. :-)...
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to String to array of integers
    in C
    Just free the entire string at the end, if you don't need the data.

    The process you describe seems to be re-reading substrings while the method I gave you reads one char at a time....
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to String to array of integers
    in C
    If you had the string MyString then, you'd do something like

    [Code=c]
    for(int i = 0; i < MyString.Size; i++)
    MyIntArray[i] = MyString[i] - 48;
    [/Code]...
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to String to array of integers
    in C
    Are you allowed to assume that this will run on an ASCII system? If so, I would just use the fact that there is a direct relation between chars and ints. E.G. the char '0' is equivalent to the int 48 . Then you can just go element by element and fill the int array with the char array's equivalent....
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to VB Script
    Tools->Macro->MS VB script editor...
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to String to array of integers
    in C
    The subscript you're using in the atoi call is derefferencing the pointer. You should use pointer arithmetic in order to pass the actual pointer.

    e.g.

    ar[i] is a value while (ar + i) is a pointer....
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to converting char* to wstring
    in C
    Interesting. Are wstrings used to accomodate foreign chars or something? Maybe I'll just google it :-)...
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to converting char* to wstring
    in C
    What's a wstring? If you just mean a C++ string, then you can convert the int to a string and use concatonation.. . More info, please....
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to pointer in VB 2005
    in .NET
    You'll have to follow the website I gave you. VB stopped supporting VarPtr in VB6, and now there's no such thing as a pointer in VB .NET. But, as the article points out, you can still invoke the HeapAlloc API function and then use the memory reading/writing functions the author mentions....
    See more | Go to post

    Leave a comment:


  • As unbelievable as it sounds, you can just open the dll in a different VS, put a breakpoint at wherever you want to step through, start both projects (F5), then when the code calls the method, it will allow you to step through the DLL's code... or at least that's what I remember. Confirmation, anyone?...
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to pointer in VB 2005
    in .NET
    http://www.codeproject.com/KB/vbscri...ual_basic.aspx...
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to Noob, VB2005, .exe saving
    I believe that every time you build a project (F5), its EXE gets saved to the bin/Debug folder of your project. That is the current copy. You never need to "make" the exe as you had to in vb6....
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to Sound in C++
    in C
    Reinventing the wheel, eh? You're in for more than you bargained for. This technology is not easy to write by yourself. Considering the lack of theoretical importance, why do you want to do this?...
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to lint program for windows
    in C
    You can do bare-bones C programming in both gcc and msvc. You can supply gcc the command argument -ANSI (or something similar) to make sure it's compliant. I usually don't bother cuz that means you can't use // to comment (very annoying)...
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to Pixel size of text
    in C
    What graphics library are you using? This is something you should be able to look up in documentation, right?...
    See more | Go to post

    Leave a comment:


  • Sick0Fant
    replied to Cancelling the form to unload in vb .net
    in .NET
    Use the FormClosing eventargs

    [Code=vbnet]
    If MessageBox.Show ("Are you sure?", "Close?", MessageBoxButto ns.YesNo) = Windows.Forms.D ialogResult.No Then
    e.Cancel = True
    Else
    e.Cancel = False
    End If
    [/code]...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...