NickDMax's Profile User Rating: *****

Reputation: 2254 Grandmaster
Active Posts:
9,332 (2.78 per day)
18-February 07
Profile Views:
Last Active:
User is offline Jun 14 2014 06:53 AM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Dream Kudos:
Expert In:

Latest Visitors

Icon   NickDMax "somewhere beneath my feet is a weapon of days honeycombed with neurons come neuroses."

Posts I've Made

  1. In Topic: Calling a .bat in a C console app

    Posted 9 May 2014

    So if "system" does not work for you and you seem to be in some version of visual studio you might consider using the windows API to launch the program.

    ShellExecute should function pretty much like double-clicking the item. Again you have to know the path to the batch file.

    #include "Windows.h"
    int main()
    	HINSTANCE hReturnCode = ShellExecute(NULL, NULL, "example.bat", NULL, NULL, SW_SHOWNORMAL);
    	return 0;

    If you need even more power you can try using CreateProcess
  2. In Topic: converting string of ints to a vector of ints

    Posted 9 May 2014

    Converting a string of numbers into a vector of ints is, in programming parlance: Parsing.

    To parse something you must first understand the input format. Does you input look like "12345" or "1,2,3,4,5" or "1\n2\n3\n4\n5" where \n is a new line?

    You have to be able to kind of "visualize" or understand what to expect as the input as that will define how you interpret the string.

    So if we are asking our user to enter a string like: "123432435" or even "1 2 3 4 5 6" and we want the vector [1,2,3,4,3,2,4,3,5] we can just grab the input one byte at a type and convert that byte to a numeric value:
    #include <iostream>
    using namespace std;
    int main ()
    	char digit;
    	cout << "note: for this example you must press ctrl+c to end program" << endl;
    	cout << "Please enter a series of digits 0-9: ";
    	while(cin >> digit) {
    		cout << ((int)digit - '0') << ", ";
    	cout << endl;
    	return 0;

    The big problem with this program is that it does not know when to quite. Because we are running cin in a loop (and cin is ignoring white space) we can't really tell when we have reached the end of our input. We *could* just ask the user to end the input with a specific character and that would work but that might confuse the user.

    So it would be a little more helpful if we could look at the individual character in the input stream rather than than what >> gives us. cin.get© can do that for us.
    #include <iostream>
    #include <vector>
    #include <cctype>
    using namespace std;
    int main ()
    	vector<int> digits;
    	char digit;
    	cout << "Please enter a series of digits 0-9: ";
    	while(cin.get(digit)) {
    		if (digit == '\n') { break; }
    		if (isdigit(digit)) {
    			digits.push_back(digit - '0');
    		} else if(isspace(digit)) {
    			//no operation
    			//ignore white space...
    		} else {
    			cout << "error in input" << endl;
    	cout << "[";
    	for(vector<int>::iterator i = digits.begin(); i != digits.end(); ++i) {
    		cout << *i << " ";
    	cout << "]" << endl;
    	return 0;

    this little program lets the user enter things like:
    234 3456098 ........0928304986

    when the user presses enter (or inputs an invalid character) the program terminates and displays what input it did read.
  3. In Topic: I want to write some binary code

    Posted 5 May 2014


    One of my main ambitions in life is to refute Godel's theorems. They're so obviously false, I can't believe anyone believes them.

    This literally made me choke! Classic comedy spit-take style!

    While I have read various dubious interpretations and exaggerated claims associated with Gödel's works this is a first for me. Usually people attack the various conclusions drawn rather than the work itself.

    As a mathematics student who worked though Gödel's proof I don't really think you stand much of a chance as Gödel was quite meticulous. He has, without out a doubt, done what he set out to do and no amount of wishful thinking on your part is likely to change that.

    HOWEVER, what Gödel did is actually pretty specific. People often take various degrees of an anarchist view of the implications and I think there is plenty of room to refute various claims on these but attacking Gödel will be difficult.

    In fact I would say that if you were successful you may find that you undermine a great more than just logic's rock-star's Theories. Indeed you may dismantle the very "mathematical hocus-pocus" on which they are based.

    However, to the guy building this upon Excel I warn: Gödel was convincing enough to win over the worlds deepest thinkers. You plan to use Excel to refute him?

    As a brilliant programmer one of the harder things I have to do is admit that the compiler is right. I can not tell you how many time I have been CONVINCED that my logic was infallible that things SO SIMPLE it could not possible be incorrect - the correctness of my program was self evident!!! And yet, the compiler (obviously programmed by a bunch of hacks) tells ME that it is WRONG!

    I have honestly wanted to beat monitors with bats, I have yelled at the screen in frustration, and once or twice I may have hit something or another.

    So far the score is something along the line of: Compiler - 45632, me 3.

    I am not saying that it is not possible that you are right, but I can assure you that if you feel Gödel's theorems are, "so obviously false, I can't believe anyone believes them." Then you had BETTER check your assumptions because I can assure you that there is a 99.999999999999% chance you have made a mistake somewhere in your thinking. You MAY BE RIGHT - but chances are not good. Check your assumptions.
  4. In Topic: I want to write some binary code

    Posted 5 May 2014

    @leibniz76 - While it is perfectly possible to write in binary, for modern PC's it is a bit prohibitive due to compounding complexity of a modern PC.

    Emulators are a good solution as you can strip away the OS level and interact directly with hardware. However modern PCs are still pretty complicated.

    Might I suggest Micro-controllers. #1 you can still use emulators for the bulk of your research and #2 you get a simplified version of what is going on in a PC.

    HOWEVER: While there is much to be learned in low-level programming what it DOES NOT DO is give you a very clear view of what is possible within programming a modern PC. Abstraction layers are extremely powerful and there is generally the idea that if you can't solve a problem you just need a higher level of abstraction - while this may not ALWAYS be true, very often it is. So just because it seems that something is not possible because the underlining system does not "support it" does not mean that the underlying system can not support some abstraction that CAN support it.
  5. In Topic: Job title?

    Posted 5 May 2014

    This is what I did as well. Kind of a general search of requirements for different positions.

    I get the feeling it is kind of a BA+Developer role.

    Analyst is such an overloaded term these days. Our support people are "Application Analysts" -- rather than the former "Support Engineers" -- its all very confusing.

My Information

Member Title:
Can grep dead trees!
Age Unknown
Birthday Unknown
Mathematics, Programming, Calligraphy
Years Programming:
Programming Languages:
VB6, C, C++, IA86 Assembly, Mathematica, Java/JavaEE, Perl, Python

Contact Information



  • (2 Pages)
  • +
  • 1
  • 2
  1. Photo

    mireille4U Icon

    30 Apr 2015 - 05:32
    Greeting from mireille i saw your profile today and i became interested in you and i will like to know more about you and if you can mail an email to my mail address ([email protected]) i will give you my is my mail address i hope we can move from here.above. Mireille
  2. Photo

    ishkabible Icon

    20 Nov 2011 - 20:18
    just getting your attention, lolz
  3. Photo

    NickDMax Icon

    12 Sep 2011 - 22:21
    I don't really check my profile very often. So this is a really poor way to get my attention.
  4. Photo

    NickDMax Icon

    12 Sep 2011 - 22:20
    grep is a function (generally in linux/unix) that searches though files using regular expressions. - The expression "You can't grep dead trees." is a disdain for printed manuals (you of course can grep man pages but not a printed manual).
  5. Photo

    hulla Icon

    08 Sep 2011 - 02:35
    Can you reply so I don't look like a loner, please? :)
  6. Photo

    hulla Icon

    02 Sep 2011 - 01:33
    What does grep mean?
  7. Photo

    hulla Icon

    27 Aug 2011 - 07:33
    Your rep is the year I was born on (1997) :)
  8. Photo

    hulla Icon

    16 Aug 2011 - 01:44
    You should be like, a teacher or a tutor or something because you can Seriously communicate with students . . . Unless you already are one. I wouldn't be surprised if you were a college lecturer or something. :)
  9. Photo

    assert(C) Icon

    21 Jul 2011 - 07:27
    Thanks boss you are great
  10. Photo

    assert(C) Icon

    20 Jul 2011 - 08:18
    hey thanks for the reply in the post
  11. Photo

    hulla Icon

    02 Jul 2011 - 07:43
    Uhh, it's malicious? How?
  12. Photo

    NickDMax Icon

    22 Jun 2011 - 03:05
    @PlasticineGuy -- I don't mean to pick on anyone (usually).
    @ishkabible -- I have only really been posting in one forum so I don't expect it to last.
  13. Photo

    ishkabible Icon

    19 Jun 2011 - 13:33
    hey you topped macosxnerd in rep this month!! no small feat!!
  14. Photo

    PlasticineGuy Icon

    18 Jun 2011 - 06:49
    Every time I see you in a topic I've posted in I feel like I'm about to get a slap on the wrist!
  15. Photo

    shib.paul Icon

    20 Dec 2010 - 05:19
    [spoiler] [code] -- #include<iostream
    using namespace std;
    #define SIZE 10
    int a[SIZE]={2, 10, 87, 1000, 23, 31, 45, 85, 988, 344};
    int cnt=1;
    static int iMax=a[0];
    int getMax()
    iMax = iMax*(iMax>a[cnt]) + a[cnt]*(a[cnt]>iMax);
    return cnt++<SIZE && getMax();
    int main()
  • (2 Pages)
  • +
  • 1
  • 2