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

Reputation: 4470 Guru
Active Posts:
12,439 (4.37 per day)
18-April 07
Profile Views:
Last Active:
User is offline Today, 04:25 PM

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 currently troubleshooting three systems at once.

Posts I've Made

  1. In Topic: hello from kaps

    Posted 30 Jan 2015

    Welcome to Dream.In.Code kaps! I don't think we have ever had a magician here before! Awesome. Now if you just make NeoTifa disappear then we will be all good (she is a regular here you can find in the caffeine lounge forum). But glad you could join us and I hope you find programming as magical as typical magic. If you ever need help, just show us your code and any error messages you get. It helps us answer you question faster and better.

    Thanks for joining up! :)
  2. In Topic: File not reading correctly

    Posted 28 Jan 2015

    I think the problem lies in your mixed use of the getline() function and the >> operator. You see when you use the extraction operator >> you are going to leave a trailing carriage return in the stream. Like when you read a products "numbers bought" value. Then when you go back around the while loop and use getline() (and thinking you are going to read the name of the next item) you are going to end up reading that left over carriage return. That is why you see an item name being blank. Then your second read using getline is actually going to read the item name. This is why you see "cheese" (the item name) being read in for Item Unit.

    So take a second look at how you read in values and think about what is left in the stream before you go around for another pass of the while loop. You may have to "eat up" a carriage return or two along the way. :)
  3. In Topic: My name is Pat, aka Code_Spent

    Posted 27 Jan 2015

    Welcome to Dream.In.Code Code_Spent! Nice to meet you. Sounds like you are well on your way to taking over the world of web development with your team! We are certainly a place for connections with a ton of members and thousands online daily. I hope you find it useful to be here and if you have any questions be sure to post your code along with any error messages and I am sure someone will jump in to answer.

    Thanks again for joining up and telling us about yourself. :)
  4. In Topic: Temperature Logger / Web Interface

    Posted 27 Jan 2015

    Well you can have a central server somewhere on the network which houses a copy of SQL Server or other database software. I would recommend going with a more robust database software system than MS Access. From your various points, assuming they are connected in a LAN configuration, they should all be able to see the database server remotely. Much like any computer on a typical computer network can see other computers on the network. Each station can collect the temperatures and then make a request to the database server over the network and dump in the values. This can typically be done using a small program or background service you create on each temperature station. For a bit of robustness, I would also keep a local copy of your temperatures on each station (in something like a CSV file is fine) just in case the station has trouble connecting to the server from time to time. When it then comes back online it could then send over the data to the database.

    But if you treat each station as a computer on the network, and you also have a server hosting a database solution on the network as well, they should be able to connect to database server through the network and insert the data directly into it. This server could also have a web server setup on it which you can connect to on the web and it will summarize the data from the database to generate your reports. This also gives you the advantages of centralized security and backup capabilities for the database and its data.

    Hope this helps :)
  5. In Topic: Not counting the total of dice rolls

    Posted 26 Jan 2015

    You seem to be all over the place here with your logic. It is rather simple. You have your class which you roll and get a total by calling getTotal(). Awesome great, that is fine. You then take total and use it in an array, your results array as the index...

    for (int rollnum = 0; rollnum < rolls; rollnum++) {
       // Get your totals and put it into total 
       // Be sure to use the same class to get each roll. Don't create a new instance each time.
       // Increment the value located at index "total" where total was the number of pips

    So with this if you rolled all 1's, your total would be 5. It would then go and increment the value located at resultsArray[5]. All is then left is to loop through your resultsArray at the end.

    I am not sure why you do one roll then go into a while loop to create dice for rolls and stuff it in d etc. Don't make much sense if you are just tallying roll counts. :)

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 »