Martyr2's Profile User Rating: *****

Reputation: 4739 Guru
Active Posts:
12,994 (4.29 per day)
18-April 07
Profile Views:
Last Active:
User is online 13 minutes ago
Viewing Topic: character strings

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Who Cares
Dream Kudos:
Expert In:
C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

Latest Visitors

Icon   Martyr2 is most definitely the real life Tony Stark.

Posts I've Made

  1. In Topic: hey guys

    Posted 1 Aug 2015

    Welcome to Dream.In.Code Frank! Betsemes makes a great point. If you want to get a head start on your schooling then start with the languages that your class is going to begin with. The real trick to programming that you just need to start with some kind of language and get use to writing some code, testing it, compiling it and finding errors and fixing them. Exposing yourself to as much of a language as you can will help you solve problems that you will find universal in the industry and across the languages.

    Great languages you can try for web development is PHP, javascript, HTML and CSS. For desktop and mobile development you can try Java or Objective-C (for iOS). Other great languages include C# and VB.NET, Python, Ruby and C++. Look through some books and see what pops out at you. You can also read my blog article on tips for helping you learn programming...


    Put those resources together and you can break into the industry no problem. :)
  2. In Topic: error: expected initializer before 'int'

    Posted 1 Aug 2015

    Lines 86 and 88 in your code there are square brackets, not curly braces. :)
  3. In Topic: sounding the system bell

    Posted 1 Aug 2015

    How are you running it? Are you running the command from in IDLE? IDLE won't work for it on Windows that I know of. If you are windows, put the statement into a text file and save it as a python file like "". Open up a command prompt (Go to start >> command prompt) and in there navigate to the folder where you put your file. From the command prompt you should be able to run python using the python command. So you can type "python" and have it run the script. Then it will beep.

    But if you try to do this through some text editor, it may just interpret it as the bell character which is the dot I believe in most fonts.
  4. In Topic: Download LARGE file in SEPARATE chunks

    Posted 1 Aug 2015

    Sure you could store it in a variable... or even make sure that the stream you are reading from has enough data in it before you attempt to fread it. With video (or any kind of streams for that matter) you often have to buffer before you can work with the data because of the random nature of the data coming in. It is like trying to get a clean stream of water from a faucet that has air in it and sputters. Put that water into a bucket, let it fill enough and then you can stream the water from the bucket.

  5. In Topic: Help understanding Arrays and Random

    Posted 1 Aug 2015

    Remember that deduct is going to be accumulative. So each time they ask for a hint, you are going to add one to deduct, not set deduct = 1. You want something like deduct++ or deduct = deduct + 1; Either way does the same thing.

    THEN after the word is guessed correctly you are going to figure out the score. That is when you do your point deductions for the hints. Right now you are trying to figure out the score before you even let the user guess. Let them guess and keep guessing and only when they get the word does the deduct variable come into play...

    if (guess == theWord)
       cout << "\nThat's it! You guess it!\n";
       cout << "You scored: " << (score - deduct) << " points.\n";


My Information

Member Title:
Programming Theoretician
Age Unknown
Birthday Unknown
Vancouver, Canada
I love programming and science (almost became a chemist). My favorite languages are C#, Java, Python and PHP. While I am not programming I enjoy movies that feature something medieval (Gladiator, Braveheart etc) or high tech (like Hackers or Swordfish).

I have a diploma in computer science and another in arts and science. My favorite sciences are astronomy, chemistry and geology.

If you have any questions regarding programming, you will find I live and breathe the stuff and should prove an invaluable asset.

Winner of 28 2008-2014 DIC Community Awards including Blog of the Year, Mentor of the Year, DIC Head of the Year, Most helpful Programming Category, Most Helpful in Web Development Category and overall Nicest Member of the year.

You can now catch me on Twitter! Follow me as I talk about technology and specifically programming and answer questions like the best book to learn from or how to organize your code. :)
Years Programming:
Programming Languages:
C/C++/VC++/C#, VB6/VB.NET, Java, JavaScript, Ruby, HTML/CSS, PHP, ASP/.NET, Python, mIRC Scripting

Contact Information

Website URL:
Website URL


  • (8 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  1. Photo

    Dogstopper Icon

    05 Dec 2013 - 14:39
    Have a 6-year badge good sir!
  2. Photo

    mostyfriedman Icon

    12 Oct 2013 - 21:07
    I am good, busy as well.
  3. Photo

    Martyr2 Icon

    07 Oct 2013 - 12:16
    Good mosty, you? Been busy lately.
  4. Photo

    mostyfriedman Icon

    07 Oct 2013 - 11:26
    Martyr2 my man, how's it going??
  5. Photo

    ishkabible Icon

    22 Aug 2013 - 15:58
    O ah, didn't even realize it. No prob. much deserved!
  6. Photo

    balloon1 Icon

    18 May 2013 - 14:57
    Hi can you help me with one of my questions!
  7. Photo

    groovmuffn Icon

    24 Apr 2013 - 10:10
    Greetings! Newish coder here. I came across your php histogram equalization code the other day and figured I'd try and draft something similar up in javascript. I feel like my code is sound, though something has to be wrong as the output of the image is black with some faint greens. I'm wondering if I am missing something from your original code. Consider perusing a jsFiddle?
  8. Photo

    Martyr2 Icon

    31 Dec 2012 - 12:48
    Thanks lucky3! Winning these types of things always energizes me to continue my work to help everyone I can here. I am a firm believer that we should always provide more than just a quick answer, but teach as well. :)
  9. Photo

    lucky3 Icon

    31 Dec 2012 - 02:23
    Congratulations for the "Mentor of the Year" 1st place, "Nicest Member of the Year" 1st place, "Most Helpful- Web Development" 1st place, and "DIC Blog of the Year" award 3rd place awards! Really impressive, and well deserved.
  10. Photo

    xwordgrl Icon

    27 Dec 2012 - 14:26
    Martyr2, I’m a reporter for the Wall Street Journal and would like to ask you a question about your post on Code Academy. Please email me at Thanks!
  11. Photo

    MsParnel Icon

    16 Sep 2012 - 23:17
    Thank you very much for the project list :).
  12. Photo

    ishkabible Icon

    19 Feb 2012 - 20:19
    "This is Chris's basement!!!"
  13. Photo

    Martyr2 Icon

    19 Feb 2012 - 12:47
    Very very true. echo "THIS IS SPARTA!!!";
  14. Photo

    no2pencil Icon

    19 Feb 2012 - 11:51
    It's like the movie 300. 10 times.
  15. Photo

    Martyr2 Icon

    31 Jan 2012 - 16:48
    Thanks macosxnerd! I am glad someone noticed. :)
  • (8 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »