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

Reputation: 4573 Guru
Active Posts:
12,660 (4.32 per day)
18-April 07
Profile Views:
Last Active:
User is offline Yesterday, 11:28 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: Selected Row get single cell value

    Posted 25 Apr 2015

    There is a Cells collection attached to the Row object. You get the row, then you can use the cells collection to access each cell...

    ' Grab the first cell (cell 0) of the first selected row (selectedrow 0)
    Dim cellValue as String = DataGridView1.Rows(DataGridView1.SelectedRows(0).Index).Cells(0).Value.ToString();

    This is assuming indeed that is a DataGridView control you are using there. :)
  2. In Topic: GPA calculator in Java using loops and switch

    Posted 25 Apr 2015

    Ok well you should probably start looking into making a list of objects here then. That is going to be your cleanest and safest bet here. For instance if you create a class like...

    class Course {
      public String coursename;
      public String grade;

    Then create a list of these courses...

    ArrayList<Course> courses = new ArrayList<Course>();

    Then each time you collect the info you can build a course class, put it in the list...

    Course c = new Course();
    c->coursename = coursename;
    c->grade = grade;

    What this is going to do for you is allow you to simply loop through the list at the end and print what you like from each object. You can print everything on a single line or print per line etc. Format to your heart's content.

  3. In Topic: GPA calculator in Java using loops and switch

    Posted 25 Apr 2015

    Well I suspect it is because of this line...

    grade = keyboard.nextLine()+"\n";

    Here this line is going to mean a grade is "A\n" which is not going to equal any of your case statements. Meaning it will go to default which is zero and leads to totalpts ending up being zero (because anything times zero is zero).

    That would be my first guess.

    Edit: After running it, that is indeed the problem. :)
  4. In Topic: Where does your motivation come from?

    Posted 24 Apr 2015

    View Postno2pencil, on 24 April 2015 - 11:18 AM, said:

    I've been posting here for years & you just got here. Don't blame me for your shortcomings.

    Ok now I cried on my keyboard. Then I realized you weren't talking to me. This made me change my motivation and code a happy app.
  5. In Topic: Where does your motivation come from?

    Posted 24 Apr 2015

    I have various motivations really. Sometimes I am happy and want to help, sometimes people piss me off and I have to write code to get even, sometimes I code something to make my job easier (laziness), sometimes I code because I am curious and adventurous and sometimes I code because I have to make up for someone else's incompetence. Other times I code because I feel "leet". I don't think I have ever coded when I have been crying though. Would hate to get water on my brillant RGB mechanical keyboard.

    All in all I get motivation to code because I was born to do it. It consumes my mind. :)

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 »