Just Click on logo to return to full home page

 

Your Ad Here

So here's why I haven't been on much

th3n00b
03-05-07, 02:15 AM
I've been doing stuff like this

Public Class Form1

Private Sub exitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles exitButton.Click
Me.Close()

End Sub

Private Sub calcButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles calcButton.Click
Dim result As String

If fahrenheitTextBox.Text <> "" Then
If IsNumeric(fahrenheitTextBox.Text) Then
result = "Fahrenheit to Celsius: " & System.Math.Round(convertFtoC(CSng(fahrenheitTextB ox.Text)), 2).ToString
Else
MsgBox("Fahrenheit value must be numeric")
End If
End If

If celciusTextBox.Text <> "" Then
If IsNumeric(celciusTextBox.Text) Then
If result <> "" Then
result = result & Environment.NewLine()
End If
result = result & "Celsius to Fahrenheit: " & System.Math.Round(convertCtoF(CSng(celciusTextBox. Text)), 2).ToString
Else
MsgBox("Celsius value must be numeric")
End If
End If

resultTextBox.Text = result
End Sub
Private Function convertFtoC(ByVal fahr As Single) As Single
Dim retValue As Single
retValue = (5 / 9) * (fahr - 32)
Return retValue
End Function

Private Function convertCtoF(ByVal cel As Single) As Single
Dim retValue As Single
retValue = (1.8 * cel) + 32

Return retValue
End Function
End Class

yay.

Hyperx
03-05-07, 02:21 AM
:boohoo:

:whogivesafuk:

:eatme:

:nrocks:

:thanks:

CJ
03-05-07, 02:29 AM
You could've at least put it into English, ffs!

Jantheman
03-05-07, 02:33 AM
Well, sir, if your looking for pity you won't find it here. Nice job on your formula, though.F to C or C to F. Ain't metrics wonderful?:icon_oyes:

Mojo
03-05-07, 04:23 AM
dude u screwed up teh punch-line, it shud be


Private Function convertCtoF(ByVal cel As Single) As Single
Dim retValue As Single
retValue = (1.8 * cel) + 32-A

HAHAHA....*sigh*..classic joke!

Fl_Gulfer
03-05-07, 04:59 AM
Where's the Bra?

mAVERICK1
03-05-07, 08:10 AM
I'd recognize that 'IsNumeric' function anywhere. Ever tried writing similar function in C++ for that. I remember trying and it got ugly real quick.

silverdooty
03-05-07, 11:56 AM
whatever happened to just looking at the fookin thermometer

geeks

tamsnod27
03-05-07, 02:29 PM
I feel your pain, I am doing the same thing in JAVA---WORST.CLASS.EVER!

th3n00b
03-05-07, 02:30 PM
I'm trying to make an application that will let me give out 10,000 thanks to all users. I am not good with comutpers :(

Pooka
03-05-07, 03:02 PM
N00by:
I wanted to be... a lumberjack!

Leaping from tree to tree, as they float down the mighty rivers of British Columbia. The Giant Redwood. The Larch. The Fir! The mighty Scots Pine! The lofty flowering Cherry! The plucky little Apsen! The limping Roo tree of Nigeria. The towering Wattle of Aldershot! The Maidenhead Weeping Water Plant! The naughty Leicestershire Flashing Oak! The flatulent Elm of West Ruislip! The Quercus Maximus Bamber Gascoigni! The Epigillus! The Barter Hughius Greenus!

With my best buddy by my side, we'd sing! Sing! Sing!

[singing]
I'm a lumberjack, and I'm okay.
I sleep all night and I work all day.

Noobsters:
He's a lumberjack, and he's okay.
He sleeps all night and he works all day.

N00by:
I cut down trees. I eat my lunch.
I go to the lavatory.
On Wednesdays I go shoppin'
And have buttered scones for tea.

Noobsters:
He cuts down trees. He eats his lunch.
He goes to the lavatory.
On Wednesdays he goes shopping
And has buttered scones for tea.

He's a lumberjack, and he's okay.
He sleeps all night and he works all day.

N00by:
I cut down trees. I skip and jump.
I like to press wild flowers.
I put on women's clothing
And hang around in bars.

Noobsters:
He cuts down trees. He skips and jumps.
He likes to press wild flowers.
He puts on women's clothing
And hangs around in bars?!

He's a lumberjack, and he's okay.
He sleeps all night and he works all day.

N00by:
I cut down trees. I wear high heels,
Suspendies, and a bra.
I wish I'd been a girlie,
Just like my dear Papa.

Noobsters:
He cuts down trees. He wears high heels,
Suspendies, and a bra?!

[talking]
What's this? Wants to be a girlie?! Oh, My!
And I thought you were so rugged! Poofter!...

[singing]
He's a lumberjack, and he's okay.
He sleeps all night and he works all day.

He's a lumberjack, and he's okaaaaay.
He sleeps all night and he works all day. :fly:

th3n00b
03-05-07, 04:43 PM
Where's my fookin parrot sketch!

tamsnod27
03-05-07, 05:09 PM
Here is some of the exciting stuff I have been doing!

public class Time
{
// instance variables
private Integer hour;
private Integer minutes;
private Integer seconds;

/**
* Default constructor for objects of class Time.
*/
public Time()
{
// Use the 3-argument constructor
// to initialize instance variables
this(0, 0, 0);
}

/**
* Constructor for objects of class Time.
*
* @param inHour Hours of time.
* @param inMinutes Minutes of time.
* @param inSeconds Seconds of time.
*
*/
public Time(int inHour, int inMinutes, int inSeconds)
{
// initialize instance variables
hour = inHour;
minutes = inMinutes;
seconds = inSeconds;
}

/**
* set the hours.
*
* @param inHour Hours of the time.
*
*/
public void setHour(int inHour)
{
hour = inHour;
}

/**
* get the hours.
*
* @return int The hour of the time.
*
*/
public int getHour()
{
return hour;
}

/**
* set the minutes.
*
* @param inMinutes Minutes of the time.
*
*/
public void setMinutes(int inMinutes)
{
minutes = inMinutes;
}

/**
* get the minutes.
*
* @return int The minutes of the time.
*
*/
public int getMinutes()
{
return minutes;
}

/**
* set the seconds.
*
* @param inSeconds Seconds of the time.
*
*/
public void setSeconds(int inSeconds)
{
seconds = inSeconds;
}

/**
* get the seconds.
*
* @return int The seconds of the time.
*
*/
public int getSeconds()
{
return seconds;
}

/**
* get the difference between times.
*
* @param endTime The end time.
* @return Time The difference between this time and the end time.
*
*/
public Time getDiff(Time endTime)
{
Time diffTime = new Time();

diffTime.hour = endTime.hour - hour;
diffTime.minutes = endTime.minutes - minutes;
diffTime.seconds = endTime.seconds - seconds;
if (diffTime.seconds < 0)
{
diffTime.seconds += 60;
diffTime.minutes -= 1;
}
if (diffTime.minutes < 0)
{
diffTime.minutes += 60;
diffTime.hour -= 1;
}
if (diffTime.hour < 0)
{
diffTime.hour += 24;
}
return diffTime;
}

/**
* format a String with the time as HH:MM:SS.
*
* @return String The time in HH:MM:SS format.
*
*/
public String toString()
{
String str = "";

if (hour < 10) { str += "0"; }
str += hour + ":";
if (minutes < 10) { str += "0"; }
str += minutes + ":";
if (seconds < 10) { str += "0"; }
str += seconds;

return str;
}
}

th3n00b
03-05-07, 05:28 PM
My eye just exploded.

mAVERICK1
03-06-07, 06:36 AM
You'd get good marks for your 'commenting' tamsnod27 by my former tutors. Remember when I was doing coding all those years ago I kept getting pinged for not 'commenting' enough. Soon realised it was for my benefit and no one elses when I had to revisit my code. Would have taken me ages to remember what the hell I was trying to achieve with some functions if I hadn't written some reminder remarks. :icon_cool:

Jon
03-06-07, 08:12 AM
Here is some of the exciting stuff I have been doing!

public class Time
{
// instance variables
private Integer hour;
private Integer minutes;
private Integer seconds;

/**
* Default constructor for objects of class Time.
*/
public Time()
{
// Use the 3-argument constructor
// to initialize instance variables
this(0, 0, 0);
}

/**
* Constructor for objects of class Time.
*
* @param inHour Hours of time.
* @param inMinutes Minutes of time.
* @param inSeconds Seconds of time.
*
*/
public Time(int inHour, int inMinutes, int inSeconds)
{
// initialize instance variables
hour = inHour;
minutes = inMinutes;
seconds = inSeconds;
}

/**
* set the hours.
*
* @param inHour Hours of the time.
*
*/
public void setHour(int inHour)
{
hour = inHour;
}

/**
* get the hours.
*
* @return int The hour of the time.
*
*/
public int getHour()
{
return hour;
}

/**
* set the minutes.
*
* @param inMinutes Minutes of the time.
*
*/
public void setMinutes(int inMinutes)
{
minutes = inMinutes;
}

/**
* get the minutes.
*
* @return int The minutes of the time.
*
*/
public int getMinutes()
{
return minutes;
}

/**
* set the seconds.
*
* @param inSeconds Seconds of the time.
*
*/
public void setSeconds(int inSeconds)
{
seconds = inSeconds;
}

/**
* get the seconds.
*
* @return int The seconds of the time.
*
*/
public int getSeconds()
{
return seconds;
}

/**
* get the difference between times.
*
* @param endTime The end time.
* @return Time The difference between this time and the end time.
*
*/
public Time getDiff(Time endTime)
{
Time diffTime = new Time();

diffTime.hour = endTime.hour - hour;
diffTime.minutes = endTime.minutes - minutes;
diffTime.seconds = endTime.seconds - seconds;
if (diffTime.seconds < 0)
{
diffTime.seconds += 60;
diffTime.minutes -= 1;
}
if (diffTime.minutes < 0)
{
diffTime.minutes += 60;
diffTime.hour -= 1;
}
if (diffTime.hour < 0)
{
diffTime.hour += 24;
}
return diffTime;
}

/**
* format a String with the time as HH:MM:SS.
*
* @return String The time in HH:MM:SS format.
*
*/
public String toString()
{
String str = "";

if (hour < 10) { str += "0"; }
str += hour + ":";
if (minutes < 10) { str += "0"; }
str += minutes + ":";
if (seconds < 10) { str += "0"; }
str += seconds;

return str;
}
}

I'm not sayin'

...I'm just sayin'


cant wait to see this somewhere with "I'm not sayin'...I'm just sayin" pasted with it....hahaha

blackspy
03-06-07, 11:17 AM
When you're writing video compression and multicast transmission stuff give me a call, then I'll show you a headache.

th3n00b
03-06-07, 02:38 PM
My friend writes programs that tie thousands of different databases together and give users a browser interface. He's laughing his ass off at me.

philemmons
03-08-07, 12:31 PM
here is the real reason...
http://www.stevenwood.org/images/2002/09/14/simp4%20(WinCE).jpg

jod
03-09-07, 10:53 PM
10 print "n00b is the bollox!
20 goto 10
30 run

Pooka
03-09-07, 10:59 PM
10 print "n00b is the bollox!
20 goto 10
30 run

:rotflmao: :rotflmao: :rotflmao: :rotflmao: :rotflmao:

philemmons
03-10-07, 12:19 AM
10 print "n00b is the bollox!
20 goto 10
30 run

damn dude... old-old school, C64

mAVERICK1
03-10-07, 06:50 AM
damn dude... old-old school, C64

Ya don't get them much more BASIC :rotflmao: . S'pose ya could say it's a 1G language;-P

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum