CT GunZ Server
Would you like to react to this message? Create an account in a few clicks or log in to continue.
CT GunZ Server

CT GunZ EN-Forums
 
HomeHome  PortalPortal  Latest imagesLatest images  SearchSearch  RegisterRegister  Ger Forums  GunZ Register  Server  VOTE please  Be Donator  Download CTGunZ  Log inLog in  

 

 My first program

Go down 
4 posters
AuthorMessage
Torrentspy
Administrator
Administrator
Torrentspy


Male

Number of posts : 843
Location : hidding
Points : 574
Character : Torrent_Spy
GunZ Exp (nub/pro) :
My first program Left_bar_bleue90 / 10090 / 100My first program Right_bar_bleue

Registration date : 2009-01-15
Reputation : -2


My first program Empty
PostSubject: My first program   My first program EmptySun Apr 19, 2009 7:36 am

Hi,
well I made a seeming simple coded program, but the code needs somewhat knowlege about second equations & imagination numbers!
this program may help you when you solve second degree equations, example, solve : x^2 -3x+5 =0
what should be 'X' ?
well my program gets it in 1 click so easy xD
I coded hard on it, not to code it was hard, to converte the maths to code was pretty not easy! I had some problems with imagination numbers, for those who don't know what imagination numbers are, ... what is the square root of -1 ?? well you will say, no square roots for negative numbers, so they are called imagination (not real), we just put square -1 as i, I mean square root -1 = i, and square root of -9 = (square root 9) * (square root -1) = 3 * i
so we can continue solving, that was a kinda hard part to make this known for visual baisc xD

anyway ok I will stop talking too much ^^ and here is the program xD
Version 2
http://www.zshare.net/download/58890535f579bbc7/

unpack it, and open torrentspy.exe
have fun =)


Last edited by Torrentspy on Sun Apr 19, 2009 3:01 pm; edited 1 time in total
Back to top Go down
Tittenfee
Retired Staff
Tittenfee


Warnings : 2.99
Male

Number of posts : 2522
Age : 30
Location : Austria, Vienna
Points : 2583
Character : Tittenfee, _NPC_
GunZ Exp (nub/pro) :
My first program Left_bar_bleue69 / 10069 / 100My first program Right_bar_bleue

Registration date : 2009-01-22
Reputation : 22


My first program Empty
PostSubject: Re: My first program   My first program EmptySun Apr 19, 2009 8:12 am

rofl ur programm can solve quadratic equations! which formula does it use? the PQ or the other one?
Back to top Go down
Snake
Retired Staff
Snake


Male

Number of posts : 3572
Age : 31
Location : UK
Points : 3473
Character : My first program Snake11copy-1
GunZ Exp (nub/pro) :
My first program Left_bar_bleue99 / 10099 / 100My first program Right_bar_bleue

Registration date : 2009-02-02
Reputation : 27


My first program Empty
PostSubject: Re: My first program   My first program EmptySun Apr 19, 2009 10:45 am

Hmmm this is pretty random...lol Good job nevertheless.
Back to top Go down
TheGod
Kore
Kore
TheGod


Male

Number of posts : 1194
Location : Behind you
Points : 1087
Character : Demantor
God
GunZ Exp (nub/pro) :
My first program Left_bar_bleue60 / 10060 / 100My first program Right_bar_bleue

Registration date : 2008-11-19
Reputation : -9


My first program Empty
PostSubject: Re: My first program   My first program EmptySun Apr 19, 2009 1:05 pm

Nice, but:

1) This is not your first program. Shocked
2) This is based on the very basics in Visual Basic programming. Sad
3) Btw, mathematical solvers are the easiest things which can be coded and that's the first thing you should learn when you start. Razz
4) + I hate Torrents way in witting a program, its based too simple, nothing complicated. Laughing
5) Torrent made this program in minutes, why saying that's your first program? rabbit

/owned, xD Twisted Evil


Stay cool, it's still nice = ) but don't say it's your first program tongue
Back to top Go down
Torrentspy
Administrator
Administrator
Torrentspy


Male

Number of posts : 843
Location : hidding
Points : 574
Character : Torrent_Spy
GunZ Exp (nub/pro) :
My first program Left_bar_bleue90 / 10090 / 100My first program Right_bar_bleue

Registration date : 2009-01-15
Reputation : -2


My first program Empty
PostSubject: Re: My first program   My first program EmptySun Apr 19, 2009 1:09 pm

Tittenfee wrote:
rofl ur programm can solve quadratic equations! which formula does it use? the PQ or the other one?
I used the basic : [(-b+(b^2-4ac))^(1/2)]/(2a)
and [(-b-(b^2-4ac))^(1/2)]/(2a)
thats for real numbers, when imagination numbers I used some other tricks, I can explain it, and release it if u want^^
Demantor wrote:
Nice, but:

1) This is not your first program. Shocked
2) This is based on the very basics in Visual Basic programming. Sad
3) Btw, mathematical solvers are the easiest things which can be coded and that's the first thing you should learn when you start. Razz
4) + I hate Torrents way in witting a program, its based too simple, nothing complicated. Laughing
5) Torrent made this program in minutes, why saying that's your first program? rabbit

/owned, xD Twisted Evil


Stay cool, it's still nice = ) but don't say it's your first program tongue

1- my first program that I release
2- I said code is simple, but to converte maths to code was not easy
3- True, but not when u work with imagination numbers, I helped u once with imagination numbers problem, remember*
4- Simple and working is the secret of success, and it is not so simple as u think coz of its size^^
5- Minutes, but needed to fix many things, and btw: u made something like that but failed I remember? xD ya I gave u the code and some fixes now I think u got it?



Edited my post : I made a new version2, with something fixed^^ edited main post link
Don't forget thanks button Razz
Back to top Go down
Snake
Retired Staff
Snake


Male

Number of posts : 3572
Age : 31
Location : UK
Points : 3473
Character : My first program Snake11copy-1
GunZ Exp (nub/pro) :
My first program Left_bar_bleue99 / 10099 / 100My first program Right_bar_bleue

Registration date : 2009-02-02
Reputation : 27


My first program Empty
PostSubject: Re: My first program   My first program EmptySun Apr 19, 2009 4:39 pm

There is no thanks button Very Happy
Back to top Go down
Torrentspy
Administrator
Administrator
Torrentspy


Male

Number of posts : 843
Location : hidding
Points : 574
Character : Torrent_Spy
GunZ Exp (nub/pro) :
My first program Left_bar_bleue90 / 10090 / 100My first program Right_bar_bleue

Registration date : 2009-01-15
Reputation : -2


My first program Empty
PostSubject: Re: My first program   My first program EmptyMon Apr 20, 2009 4:23 am

here is it^^ My first program Ty_bn10
Back to top Go down
Snake
Retired Staff
Snake


Male

Number of posts : 3572
Age : 31
Location : UK
Points : 3473
Character : My first program Snake11copy-1
GunZ Exp (nub/pro) :
My first program Left_bar_bleue99 / 10099 / 100My first program Right_bar_bleue

Registration date : 2009-02-02
Reputation : 27


My first program Empty
PostSubject: Re: My first program   My first program EmptyMon Apr 20, 2009 9:31 am

Here it isn't Very Happy

My first program 10drsr5
Back to top Go down
Tittenfee
Retired Staff
Tittenfee


Warnings : 2.99
Male

Number of posts : 2522
Age : 30
Location : Austria, Vienna
Points : 2583
Character : Tittenfee, _NPC_
GunZ Exp (nub/pro) :
My first program Left_bar_bleue69 / 10069 / 100My first program Right_bar_bleue

Registration date : 2009-01-22
Reputation : 22


My first program Empty
PostSubject: Re: My first program   My first program EmptyMon Apr 20, 2009 10:40 am

yea, i cant see it too
Back to top Go down
Torrentspy
Administrator
Administrator
Torrentspy


Male

Number of posts : 843
Location : hidding
Points : 574
Character : Torrent_Spy
GunZ Exp (nub/pro) :
My first program Left_bar_bleue90 / 10090 / 100My first program Right_bar_bleue

Registration date : 2009-01-15
Reputation : -2


My first program Empty
PostSubject: Re: My first program   My first program EmptyMon Apr 20, 2009 11:27 am

rofl then just test the program Razz

Try to get any bug, I mean like stopped responsing/awsome error message -- because I don't think u can find one!
btw: the error message saying u have entered value 'a' as zero or left empty........ this I wrote if the value a is 0, so find another one^^
I release my source code Razz for those who are noobs I am ready to explain it lol

*'Calculate' button code :
-------------------------------------------------------------------------------------------------------------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a, b, c, x, y, j, jx, js As Double 'some characters to handle them
a = Val(text1.Text) 'a in aX^2 value
b = Val(text2.Text) 'b in bX value
c = Val(text3.Text) 'c in +c value
x = -b / (2 * a) 'real number part
j = (b ^ 2 - 4 * a * c) ^ (1 / 2) ' the normal sqr (real)
js = (b ^ 2 - 4 * a * c) 'real/imagination checker
jx = -1 * (b ^ 2 - 4 * a * c) ' the sqr with changed sign (from '-' to '+') to use in imagination numbers
y = ((-js) ^ (1 / 2)) / (2 * a) 'imagination number half
If Val(a) = 0 Then 'checks if the value 'a' is 0 or empty, val means value
MsgBox("You have entered value box X² for 'a' zero or left it empty, so this equation is nomore a second-degree one, please rewrite the correct information", MsgBoxStyle.Critical, "Error message!")
Beep()
ElseIf js >= 0 And a <> 0 Then 'checks if the roots are real, and if the equation is a second degree one
text4.Text = (-b + j) / (2 * a)
text5.Text = (-b - j) / (2 * a)
Label11.Text = "Roots are real"
ElseIf js < 0 And a <> 0 And x <> 0 And y <> 0 And y <> -1 And y <> 1 Then 'roots are imagination, real part is not=0, imagination part is not=0
text4.Text = x & "+" & y & "i"
text5.Text = x & "-" & y & "i"
Label11.Text = "Roots are not real, i=√-1"
ElseIf js < 0 And a <> 0 And x = 0 And y <> 0 And y <> 1 And y <> -1 Then 'roots are imagination, real part=0, Imagination part is not=0 and not=-1 and not=1
text4.Text = y & "i"
text5.Text = "-" & y & "i"
Label11.Text = "Roots are not real, i=√-1"
ElseIf js < 0 And a <> 0 And x <> 0 And y = 1 Then 'roots are imagination, real part is not=0, Imagination part is=1
text4.Text = x & "+i"
text5.Text = x & "-i"
Label11.Text = "Roots are not real, i=√-1"
ElseIf js < 0 And a <> 0 And x <> 0 And y = -1 Then 'roots are imagination, real part is not=0, Imagination part is=-1
text4.Text = x & "+i"
text5.Text = x & "-i"
Label11.Text = "Roots are not real, i=√-1"
ElseIf js < 0 And a <> 0 And x = 0 And y = 1 Then 'roots are imagination, real part is=0, Imagination part is=1
text4.Text = "i"
text5.Text = "-i"
Label11.Text = "Roots are not real, i=√-1"
ElseIf js < 0 And a <> 0 And x = 0 And y = -1 Then 'roots are imagination, real part is=0, Imagination part is=-1
text4.Text = "i"
text5.Text = "-i"
Label11.Text = "Roots are not real, i=√-1"
End If '1 thing: 'y' which is the imagination part never gets value=0 when js<0, because y(numerator) is not=0 then!
End Sub

--------------------------------------------------------------------------------------------------------------

well any thing begins with ' means this is not code, its explanition without apply(can remove it or let it will not matter)

*About button code :
------------------------------------------------------------------------------------------------------------------------------------------
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
MsgBox("This program was made by : Torrentspy, E-mail address : torrent_spy_12@yahoo.com" + vbCrLf + "Version: 2", MsgBoxStyle.Information, "About Information!")
Beep()
End Sub

------------------------------------------------------------------------------------------------------------------------------------

'+vbcrlf+' is like when u press enter


*clear all button code :
---------------------------------------------------------------------------------------------------
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
text1.Text = ""
text2.Text = ""
text3.Text = ""
text4.Text = ""
text5.Text = ""
Label11.Text = ""

End Sub

---------------------------------------------------------------------------------------------



I knowwwww, all vb coders will say this program is so fux basic coded, but ya it's bug free! and imagination numbers work on it Razz
Back to top Go down
TheGod
Kore
Kore
TheGod


Male

Number of posts : 1194
Location : Behind you
Points : 1087
Character : Demantor
God
GunZ Exp (nub/pro) :
My first program Left_bar_bleue60 / 10060 / 100My first program Right_bar_bleue

Registration date : 2008-11-19
Reputation : -9


My first program Empty
PostSubject: Re: My first program   My first program EmptyTue Apr 21, 2009 3:10 am

I know your program is simple, but i will start fixing some of your code bugs = ) and make it a bit better lol
Back to top Go down
Sponsored content





My first program Empty
PostSubject: Re: My first program   My first program Empty

Back to top Go down
 
My first program
Back to top 
Page 1 of 1
 Similar topics
-
» wut program do i use 4 a ctgunz video ???

Permissions in this forum:You cannot reply to topics in this forum
CT GunZ Server :: Basket-
Jump to: