Psyguy's Profile User Rating: -----

Reputation: 75 Whiz
Group:
Authors
Active Posts:
325 (0.23 per day)
Joined:
12-January 11
Profile Views:
10,179
Last Active:
User is offline Dec 15 2014 02:16 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
250

Latest Visitors

Icon   Psyguy I reject your reality and replace it with my own...

Posts I've Made

  1. In Topic: ASP.NET Reports viewer

    Posted 18 Sep 2014

    http://www.aspsnippe...th-example.aspx

    This seems to be pretty comprehensive.
  2. In Topic: Date Validation - Working out if something has expired

    Posted 18 Sep 2014

    I don't know if this makes a difference to you, but using implicit conversion to compare a string of a date doesn't seem very good practice (to me). You should be comparing dates, not text of dates. You also use both "<=" and ">=" when only one can occur if the two dates are equal. You must select one that will occur if the dates are equal or the code will just select the first one in your "if" statement. You also have an "if", an "else if", but no "else". Is there a third option? If there are only two options you could simplify the code to an "if (code) else (code) end if" See below:

    Sub ValidateDate()
        dtp_CourseStartDate.Text = Today
        Try
            If dtp_CourseEndDate.Text >= Today Then
                txt_ValidationResponse.Text = "Validated"
            Else
                txt_ValidationResponse.Text = "Course Expired"
            End If
        Catch ex As Exception
            MsgBox("Error: " & Err.Description, MsgBoxStyle.Critical, Title:="Status")
        End Try
    End Sub
    
    


    EDIT: There is also an argument to be made about why you would need a try/catch on this. There is some overhead associated with a try/catch block and I would question exactly what exception could occur on this block of code.
  3. In Topic: listview populating multiple columns with different code

    Posted 18 Sep 2014

    Is there a reason you want to use a ListView instead of a DataGridView with three columns? Seems it would be much easier since the DGV is set up for a grid style. Just a thought.
  4. In Topic: Where to begin? (website application)

    Posted 14 Aug 2014

    You have to think of several things when you are starting to get into web development:

    1. What server side language will I use? (C#, Java, etc.)
    2. What database will I use to store the data and where will it be hosted? (SQL Server, MySQL, etc.)
    3. Where will the web app be hosted? (do you have a server, will you rent a server, etc.)
    4. Do I know all of the languages involved? (CSS, HTML, javascript/jQuery, XML)
  5. In Topic: ArrayList Displaying same item repeadly

    Posted 14 Aug 2014

    It appears that you are only using ONE object to add to the list, then changing the values of that object and adding it to the list over and over. You should create a new StudentData, populate the data, and add it to the list all in the addBtnActionPerformed method.

    EDITED for example:

    private String name;
       private String  number;
       private int year;
       private int count;
       private ArrayList<StudentData> myList;
       
       public StudentGUI()
       {
           initComponents();
           name = new String();
           number = new String();
           year = 0;
           count = 0;
           myList = new ArrayList<>();
       }
    
    private void addBtnActionPerformed(java.awt.event.ActionEvent evt)                                       
       {        
           StudentData myData = new StudentData();
                                       
           name = nameTf.getText();
           number = numTf.getText();
           year = Integer.parseInt(yearTf.getText());
           
           myData.setName(name);
           myData.setNumber(number);
           myData.setYear(year);
           
           myList.add(myData);
           
           nameTf.setText("");
           numTf.setText("");
           yearTf.setText("");
           
           count++;
           
       }        
    
    

My Information

Member Title:
D.I.C Regular
Age:
37 years old
Birthday:
October 14, 1977
Gender:
Location:
Eugene, OR
Full Name:
Joel M. Priddy
Years Programming:
3
Programming Languages:
VB.NET, C#, ASP/ADO.NET, C++, Java, XML, SQL

Contact Information

E-mail:
Click here to e-mail me
LinkedIn:
http://www.linkedin.com/pub/joel-priddy/12/49/7b5/
Twitter:
joel_priddy

Friends

Comments

Psyguy has no profile comments yet. Why not say hello?