|
|
This is a SQL question, you should ask it in the SQL forum. You should also explain what you've tried, and where you're stuck. Although it's so trivial that the only place to be stuck would be the place where you refuse to do any research of your own, and have chosen not to own any books on the subject.
getdate()
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
I'm trying to verify a PIN code of an EMV Card using VB.
Thanks
|
|
|
|
|
Good luck with that. What have you tried ? Did you have a question ? Are you stuck somewhere ? Where ? What code do you have so far, and what is going wrong ?
If you have no idea how to do this, you could try posting on the job boards or rentacoder to hire someone to do this for you. Be careful tho, some lazy people bid on jobs there, then post them here without doing any work themselves.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
I have a project contains 10 forms, and in Form3 when I give
Dim Dtb1 as New Datatable
Then it says the error cannot give the "New" instance to the object.
But When I added another few forms, and in Form10, when I give
Dim Dtb11 as New Datatable
Simply It's accepting. What does it mean Am i have any virus? Or any other problem ?
Thanks
|
|
|
|
|
Paramu1973 wrote: I have a project contains 10 forms, and in Form3 when I give
Dim Dtb1 as New Datatable
What is it with people in other countries and illegible variable names ?
Paramu1973 wrote: Then it says the error cannot give the "New" instance to the object.
What is the ACTUAL error message ?
Paramu1973 wrote: Form10, when I give
Dim Dtb11 as New Datatable
Are you TRYING to make your code hard to maintain ?
Paramu1973 wrote: Am i have any virus?
yes, you have a virus that stops datatables from being created on forms called Form3. It's quite common.
Seriously. How could this be a virus ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You sir, have obviously not researched the (apparently) wild virus titled refuse2readAbook.win32/mac
it has something to do with spreading from machine to man. Like the swine flu.
|
|
|
|
|
Oink. I resent that. Swines aren't machines.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Is that related to that virus GoogleNoWorkyOnMyComputer.win32
|
|
|
|
|
|
So the googleNoWorky virus is coded in classic VB? That explains a lot.
|
|
|
|
|
I am trying to get the standard deviation of values that a user enters into a textbox and then will hit a display button, the following is what i have coded so far but For some reason i am getting the wrong answers for stdeviation and the sum of deviations PLEASE HELP
Dim iSum as integer = 0
Dim dFAvg as double = 0
Dim dDev as double = 0
dim dSqDev as double = 0
For count = 0 To strArr.Length - 1
'add user entered values to list box
lstGrades.Items.Add(strArr(count))
lblGrades.Text = lstGrades.Items.Count
iSum += Convert.ToDouble(strArr(count)) 'get sum of values entered and pass to storing variable
lblSum.Text = iSum 'display sum in label box
'***********************
dFAvg = iSum / Convert.ToDouble(lblGrades.Text) 'calculate average
'***********************
'THIS IS WHAT IS NOT CALCULATING CORRECTLY!!!!!!
dDev = ((strArr(count) - dFAvg) ^ 2)
'for each value the user enters it is supposed to be subtracted by the MEAN(dFAvg) and then raised by 2
'then i store each answer into dDev VARIABLE and then find the sum of all the values in dDev and assign it to dSqDev
'but i dont understand what i am doing wrong PLEASE HELP
dSqDev += dDev
Next 'end for
lblSumDev.Text = FormatNumber(dSqDev, 2)
|
|
|
|
|
This at least the third time I have seen you asking the same question. In all of them your code is unformatted and uncoloured. It is therefore very difficult to read, which cuts down on the number of people willing to try to plough through it in order to attempt to help you.
Edit your post (above), put a <pre> tag on the line above your code and a </pre> tag on the line after your code. Then put back the indentation so that people at least have a chance to read and understand it.
Have you tried Googling for this?
I googled on vb.net calculate standard deviation and I got loads of hits with fully working code examples. Why not try that yourself?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
thanks i got it working on my own, i saw what was wrong
and i will remember to post code correctly
next time.
thanks for your help and time
|
|
|
|
|
Good stuff!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Henry is right, your code needs proper formatting.
Use PRE tags and you will probably be able to see what is wrong yourself.
Hint: your calculations are completely wrong.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Luc,
Thank you for your support. I shall wear it always!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
You're welcome.
And don't you worry, there is a great deal of wear in it.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
You keep posting the same crappy code. I ask again, how is dividing the cumulative sum against the number of items what you want ? If you won't fix the most basic of poor decisions based on advice I've given you, then it seems like what you really want is for someone to do your homework for you. I suggest instead that you contact your teacher and tell them you are too dumb for their course.
OR you could try to actually learn programming. Break the task down into steps. Work it out on paper so your steps lead to the right answer. Step through in the debugger and work out at what point your code is not doing what you expect it to.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: Break the task down into steps. Work it out on paper so your steps lead to the right answer. Step through in the debugger and work out at what point your code is not doing what you expect it to.
Excellent point.
Christian Graus wrote: suggest instead that you contact your teacher and tell them you are too dumb for their course.
Another excellent point
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
i got it to work on my own, didnt need ur help but thanks and God bless
hope that you dnt treat all users the way you
disrespected me.
|
|
|
|
|
Reformat your code so it is easier to read (use
code block tag) that aside, relook through the steps you are taking to solve the problem. You do have calculation mistakes and leaving it as an exercise for you to find.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
thanks i will do that next time i place code on the forums.
i got it to work anyways but thanks!
|
|
|
|
|
You are getting the incorrect result because you are trying to get the mean as a running total, and dividing only part of true mean, here is what i mean:
dFAvg = iSum / Convert.ToDouble(lblGrades.Text) 'calculate average
but the way you are calling it in the loop the first time you calculate the mean you are using only one number, then performing your deviation with that. The next loop you have the mean of 2 numbers and use that for your calculations. So what you want to do is load everything and calculate the mean, then use that to loop through and plug into your calculations. The below works:
Dim iSum As Integer = 0
Dim dFAvg As Double = 0
Dim dDev As Double = 0
Dim dSqDev As Double = 0
Dim strArr As Array = {1, 3, 4, 6, 9, 19}
For count = 0 To strArr.Length - 1
iSum += Convert.ToDouble(strArr(count))
lstGrades.Items.Add(strArr(count))
lblGrades.Text = lstGrades.Items.Count
lblSum.Text = iSum 'display sum in label box
dFAvg = iSum / Convert.ToDouble(lblGrades.Text) 'calculate average
Next
For count = 0 To strArr.Length - 1
dDev = ((strArr(count) - dFAvg) ^ 2)
dSqDev += dDev
Next 'end for
lblSumDev.Text = FormatNumber(dSqDev, 2)
End Sub
|
|
|
|
|
Hello,
Does anyone have a code example for vb.net 2008 to locate an email on a windows mobile device (checking the subject) and then read the body of it?
I can find examples in C but not VB. Any help would be great.
Thanks
|
|
|
|