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

Reputation: 4885 Guru
Active Posts:
13,302 (4.13 per day)
18-April 07
Profile Views:
Last Active:
User is offline Feb 08 2016 12:21 AM

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: What would be a proper way to store transactions?

    Posted 4 Feb 2016

    What you are describing is not a transaction per say it is an order detail line item scenario. You have an order, which ties to the customer and has an order ID and date, it then joins to another table which lists the details describing each item purchased (usually through a third table).

    Think of it like this...

    Table 1 - Order

    Table 2 - Products

    Table 3 - OrderItems

    Notice how the third table ties back to orders and to products. It then talks about the date the item was purchased, qty and the price. You would then assemble such an order by querying the order by its id and tying it into the products through that third table. This is going to give you maximum flexibility for queries and can service many queries to tie products purchased all the way back to the customer that ordered them, look up orders by date, look up orders by product_ID etc.

  2. In Topic: What are you working on today?

    Posted 1 Feb 2016

    View PostTreze, on 01 February 2016 - 10:41 AM, said:


    I am making a Snake Game in VS 2015 Community, with c#.

    Hi Treze, sounds pretty cool. Can wait to see it. Be sure to post it in our "Share your project" forum when it is nearly done. :)

    As for what I am doing today, I was just whipping up a little file handler in ASP.NET and realized that due to the way I structured this project it has the potential to become a cool and useful platform feature with little effort. I love great design and I love it more when I am the one who designed it!

    My employer will probably like it to. I had to create it for something I was doing anyways, I just make it kick ass at the same time.
  3. In Topic: Dungeon Crawler Scope Error

    Posted 30 Jan 2016

    Your code is very hard to follow because it jumps everywhere, but it looks like you may be calling to create the room BEFORE you call to setup player.

    initialize() calls for a new Dungeon() first, which in turn calls upon the Room class, but you don't create player until after Dungeon is created. Try creating the player first and then create the Dungeon. To do this, just switch the statements in initialize(). Create the player and then the Dungeon. :)
  4. In Topic: how do max function

    Posted 30 Jan 2016

    Well you left out the one piece that would have been useful, the type of database you are using. Either way, have you checked out the MAX() function in your database?


    It is designed to find the maximum value in a column. :)
  5. In Topic: How to display a paged list

    Posted 29 Jan 2016

    Well it is all about the index and where you start counting. For this I would suggest trying to go from a foreach to a standard for loop. But what is the starting index for page 1? 0 right? Page 2? the start index is 5. Page 3? The start index is 10 etc. See a pattern?

    startIndex = (PageNumber - 1) * itemsperpage

    With this start index then you can do your loop...

    int startIndex = (PageNumber - 1) * itemsperpage;
    for (int i = startIndex; i < (startIndex + itemsperpage); i++) {
       int inventoryId = StoreInventory[i].Id;
       // etc...

    So the first time it will start at 0 and go to 4. Next it will go from 5 to 9. etc etc


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 31 (yes 31!) 2008-2015 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

    rooster24 Icon

    21 Oct 2015 - 09:03
    I bought your Programmers Idea Ebook. Do you have Java solutions to some of the Projects that I can reference as needed?
  2. Photo

    Dogstopper Icon

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

    mostyfriedman Icon

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

    Martyr2 Icon

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

    mostyfriedman Icon

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

    ishkabible Icon

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

    balloon1 Icon

    18 May 2013 - 14:57
    Hi can you help me with one of my questions!
  8. 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?
  9. 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. :)
  10. 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.
  11. 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 [email protected] Thanks!
  12. Photo

    MsParnel Icon

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

    ishkabible Icon

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

    Martyr2 Icon

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

    no2pencil Icon

    19 Feb 2012 - 11:51
    It's like the movie 300. 10 times.
  • (8 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »