|
dilkonika wrote: But I think a forum is a place for discussion. It is, but this is hardly a discussion.
SQL Server and Excel were not built at the same time, nor by the same people.
dilkonika wrote: Or why don't use integers that you suggest You are making assumptions without reading, kicking against the structure claiming it is bad without taking the time to ask why it was built like that. What WHERE they thinking.
Well, you ain't gonna find out.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
The difficulty appears to be arising because you are comparing speed with accuracy - two things that by their very nature cannot be compared.
So you need to decide - do you want speed or accuracy?
If you really want more information regarding why floating point is used you will need to read up on computer hardware and architecture.
Basically computers are not decimal counting machines but binary counting machines. In order to maintain a decent processing speed numbers are stored as floating point,. The consequence is that repeated arithmetic operations on large numbers(numbers with many digits either side of the decimal point) can cause precision errors. Most people not running repeated arithmetic calculations with large numbers requiring a high degree of precision - Excel works perfectly well with floating point numbers.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Quote: So you need to decide - do you want speed or accuracy?
I think any programmer in the world , try to find a way to have both of them at the better level that can be possible.
|
|
|
|
|
"If you really want more information regarding why floating point is used you will need to read up on computer hardware and architecture."
Did you read and understand that sentence?
Let's reword it - there are physical limitations to a computer that make speed and accuracy a trade-off.
You can have more speed or more accuracy but you cannot have both.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
You're really not thinking or listening.
I challenge YOU to come up with a scheme to represent a number of INFINITE size and precision on a computer with FINITE resources. There in lies the problem.
You don't mind if we don't wait around, do you? We have other things to do.
|
|
|
|
|
I have created a program, ready to deploy. I will deploy this program from a CD.
As part of the install I want to create a desktop shortcut for the program.
I am using vb2010 express and I don’t know where to start.
Thanks
Jay
|
|
|
|
|
|
I am iteration thought the row in order to insert/update/select.
How can I make Async call so it will be run faster
For Each myRow As DataRow In gobjImportDS.Tables(TABLENAME).Rows
.... If FindGIASPROVMSTR(myRow) > 0 Then
' if exists update
If GIASUpdateProviderMasterCommand(myRow) = True Then
Update(myRow)
else
Insert(myRow)
End
Next
|
|
|
|
|
Making it "async" doesn't make it run faster; it just makes it execute independently of the UI-thread. The simplest way to start something on a different thread is by queuing it in the ThreadPool[^].
Sub RunStuffAsync()
Threading.ThreadPool.QueueUserWorkItem(Sub() Bla())
End Sub
Sub Bla()
End Sub
Be carefull not to touch any UI-stuff from that new piece of code; it would crash the application, unless you wrap it nicely in an Invoke-pattern (to invoke the running of the next code on the UI-thread).
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
not sure what I have done incorrect.but I it won't go to my sub.
Threading.ThreadPool.QueueUserWorkItem(Sub() modGenelco.ProcessAddChangeInGIASAsync())
Module modGenelco.....
Sub ProcessAddChangeInGIASAsync()...end sub
End Module
|
|
|
|
|
Create a new console application, and add below code;
Module Module1
Sub Main()
Console.WriteLine(Threading.Thread.CurrentThread.ManagedThreadId)
Threading.ThreadPool.QueueUserWorkItem(Sub() modGenelco.ProcessAddChangeInGIASAsync())
Console.ReadKey()
End Sub
End Module
Module modGenelco
Sub ProcessAddChangeInGIASAsync()
Console.WriteLine(Threading.Thread.CurrentThread.ManagedThreadId)
End Sub
End Module Do confirm that you have the correct module, and that the solution is rebuilt.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi all,
I'm having a problem on my code that's throwing me the following error:
'Class does not support Automation or does not support expected interface'
What I'm doing is, we have lot of ActiveX exe and we want to migrate them to .net, but as visual studio doesn't support ActiveX exe migration, I'm following this article ActiveX EXE Wrappers[^] I did one test project and after this worked I tried to migrate a working project.
So I was migrating my ActiveX exe to a Windows forms Application and I adde the following com class to my projec:
clsCom.vb
<ComClass(clsCom.ClassId, clsCom.InterfaceId, clsCom.EventsId)> _
Public Class clsCom
#Region "COM GUIDs"
Public Const ClassId As String = "5f6daa91-519d-4db0-a71a-83a2cc5980cc"
Public Const InterfaceId As String = "dfc3f83c-38a8-43e5-98d1-6914983a9df1"
Public Const EventsId As String = "5ed06d44-d6b6-431b-8804-2ef2a0fb1b70"
#End Region
Public Sub New()
End Sub
Public Shared Sub Main()
End Sub
Public Sub Amend(ByRef lPOSID As Integer)
Dim clsentry As New clsEntry
clsentry.Amend(lPOSID)
End Sub
Public Sub View(ByRef lPOSID As Integer)
Dim clsentry As New clsEntry
clsentry.View(lPOSID)
End Sub
Public Sub Add(ByRef lPOSID As Integer)
Dim clsentry As New clsEntry
clsentry.Add(lPOSID)
End Sub
Public Sub Delete(ByRef lPOSID As Integer)
Dim clsentry As New clsEntry
clsentry.Delete(lPOSID)
End Sub
End Class
After this I created my VB6 to call my Com Object:
Option Explicit
Public placeOfSet As gdcPlaceOfSettlement.clsCom
Public Sub Main()
Set placeOfSet = New gdcPlaceOfSettlement.clsCom
placeOfSet.Amend (5654)
End Sub
The error is ocurring at: Set placeOfSet = New gdcPlaceOfSettlement.clsCom
I don't know what's going on, I've checked few websites and none of them matches with my thread.
Does anyone had the same problem or knows how to fix it?
Thanks in advance.
|
|
|
|
|
If you download the code from the article, and use
Dim MyMsgNet
Set MyMsgNet = CreateObject("MsgNet.ComExpose")
MyMsgNet.StartApplication to instantiate your .NET class from VB6, does it work?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
hey Eddy,
I'm using this test as a template, but still geting the same error
|
|
|
|
|
Have you registered the assembly using REGASM ?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
hi how are u guys, im a begining in the world of the programmation and i like to know how to sum two columns in a truedbgrid, i have one column charge with data from a dataset, then i write the data in the second column, finish the result appear in a third columns that contains data from the same dataset
|
|
|
|
|
What's a "true dbgrid"?
Outside of that, it'd be more efficient to do that when building the dataset; have the database-server determine the sums for the third column.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Before I make this request, I would like to express my profound gratitude to the codeproject bodies, whom with thier aids, I can be proud to call myself upcoming programmer. Once again, thank you all for sources codes, advice etc.
I would like to get my hands sweat by writing advance applications. I saw a software that can read out security code of mobile phones connected to the PC via USB cable, and will display security code on a label. I was doubting the application and I tried it with my own phone and it was my private security code it reads out. So, am wondering how I can write such application using vb6.0 or vb.net. I tried google but no match and am not even sure of the right keywords to use. Any advice, source code, guideline is welcome. Thanks!!!
|
|
|
|
|
The issue is not really about programming, but about mobile phones. What you need to research is sites that explain the internal workings of mobile phones and how you can read from them via the USB interface.
|
|
|
|
|
With VS 2008 VB.Net; I need to create a label (Avery 8161, 1" x 4") that is very involved. 1st line is 12pt, 2nd line 16pt, 3rd line is 14pt, 4th line is 11pt followed by 12pt on the same line. There is a rotated text box that is 20pt and to top it off, there is an area that has filled in shapes (rectangle with 1pt black border and two filled triangles inside that border. I've got the table and can place text but cannot change the font except entire table wide. I haven't found any guidance in doing this in the word tables. Of course, this is the format for all 20 labels on the page. (Don't see any way I can include a picture of the label)
Louis James
|
|
|
|
|
How do I set up connection string for Microsoft OLE DB Provider for DB2?
Dim connection As ??????
|
|
|
|
|
|
|
See: http://www.connectionstrings.com/ibm-db2/[^]
Dim connection As New System.Data.OleDb.OleDbConnection("Provider=DB2OLEDB;...")
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi
I need to serialize a php named array in vb.net 2010 (Desktop app). I believe that the only easy way might be with jquery.
How do you implement a jquery function in vb.net 2010?
If there is an easier way to covert the php named array string to a .net supported object i.e. array, dictionary or collection, etc. PLEASE LET ME KNOW.
|
|
|
|