Kevin's University Adventures
A Small Personal Weblog documenting my University Adventures, Hacks, Opinions, Gripes, Random Drunken student antics and bad spelling.
Wednesday, 8 February 2012
Automatically generate function header comments in netbeans
Oh Netbeens how we love you, today's tip comes from a question asked in IRC that was.
" Excuse me my good sir but is there a way to generate the phpdoc function headers? I'm using Netbeens 7"
Well yes little Tim there is, this code complete tool works in all the supported languages Java, PHP, C++,C ,and of course plenty of others, it's so so ridiculously simple to use.
Saturday, 4 February 2012
Wednesday, 1 February 2012
Java Tips and Hints: Comparing Strings in Java with examples.
This might seem like an ever so obvious thing to most users of the good old Java, however it comes up in IRC and the /r/java subreddit all the time. so this brief post is to help them all out and me so I don't have to keep typing it.
OK so you should be reasonably familiar with the "if" statement well here is a program that uses it:
Instead of using "==" we need to be comparing for value equality, So we do that like this:
OK so now we have that we might find we have another issue you need to type "bob" because if you type "Bob" with a capital letters in it then will return "Your name sucks" and we might not want that.
In that case we can use this ".equalsIgnoreCase" instead of just ".equals" that way we can Ignore the Case of the string.
OK then so now we have them what about more, well there are a lot so why don't you look in the Java documentation and leave a comments with the things you find.
OK so you should be reasonably familiar with the "if" statement well here is a program that uses it:
import java.util.Scanner;
public class Variables {Well there you go that program is syntactically correct it will compile and run, so we did it? well nope, There is a logical error in that code take a second to go compile it. no matter how you type bob it will not tell you that bob is an awesome name this is because we are comparing for a reference.
public static void main(String args[]) {
Scanner input = new Scanner(System.in);
System.out.println("What is your name? ");
String name = input.next();
if(name == "bob")
{
System.out.println("Your name is awesome, " + name);
}
else
{
System.out.println("Your name sucks, " + name);
}
}
}
Instead of using "==" we need to be comparing for value equality, So we do that like this:
import java.util.Scanner;Go ahead and check out the "if" statement now on line 18 you see that is how we compare Strings we are comparing the value equality in that string.
public class Variables {
public static void main(String args[]) {
Scanner input = new Scanner(System.in);
System.out.println("What is your name? ");
String name = input.next();
if (name.equals("t"))
{
System.out.println("Your name is awesome, " + name);
}
else
{
System.out.println("Your name sucks, " + name);
}
}
}
OK so now we have that we might find we have another issue you need to type "bob" because if you type "Bob" with a capital letters in it then will return "Your name sucks" and we might not want that.
In that case we can use this ".equalsIgnoreCase" instead of just ".equals" that way we can Ignore the Case of the string.
OK then so now we have them what about more, well there are a lot so why don't you look in the Java documentation and leave a comments with the things you find.
Saturday, 28 January 2012
Friday, 30 December 2011
Developing The SU:C:
So for my final project the big project that must be completed of i just wasted three years of my life project. I'm bringing out all the guns and developing something big.
The Student Utility Card (SU:C) is a e-learning solution that brings function and utility to an otherwise useless tool , by fully harnessing the power of the cloud and learning applications the SU:C aids in learning, it is calendar system allowing timetable updates to be automatically sent to groups of students and individual students, the card is update by a server/API system.
![]() |
| An instillation of the System |
Implemented in the latest JavaFX standards it can run anywhere on any device deployed on USB enabled ID cards allowing access to utilities that students would not be able to easily access otherwise.
Friday, 10 June 2011
Friday, 20 May 2011
Well ...what a week.
For this blog post I’m going to take a different tacked, Instead of just posting useless things I found around the internet, I’m going to tell you what I’m doing. (yay me)
#1 Learning Blender
This is hard... really hard. I have been working with code for some years now and learning the XNA game studio for C# was a piece of cake but, I have come to the realisation that all 3D animators and asset creators are bat shit insane.
That aside I have finally created the concepts and will be posting them in the coming weeks.
#2 Setting up r/fireworks
I have been a long time Adobe Fireworks advocate, a web prototyping vector and bitmap tool. I’m so nice I have set up a sub reddit to work on my skills and help others.
So you can have some Fireworks tutorials in the coming weeks, how nice am I?
Here is a link if you are interested.
#3 Arguing with the passport office.
So it looks like I’m not going to France next week, due to some inept moron at the passport office. So i don’t get to go to my own brothers wedding.
#1 Learning Blender
This is hard... really hard. I have been working with code for some years now and learning the XNA game studio for C# was a piece of cake but, I have come to the realisation that all 3D animators and asset creators are bat shit insane.
That aside I have finally created the concepts and will be posting them in the coming weeks.
#2 Setting up r/fireworks
So you can have some Fireworks tutorials in the coming weeks, how nice am I?
Here is a link if you are interested.
#3 Arguing with the passport office.
Subscribe to:
Posts (Atom)



