Click here to Skip to main content
15,915,319 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Byref or Byval : which is faster and consume less memory Pin
Dave Kreskowiak22-Jan-15 17:09
mveDave Kreskowiak22-Jan-15 17:09 
GeneralRe: Byref or Byval : which is faster and consume less memory Pin
Dave Kreskowiak22-Jan-15 17:07
mveDave Kreskowiak22-Jan-15 17:07 
QuestionHow to create relationship of 2 tables using OleDbConnection Pin
gwittlock17-Jan-15 11:36
gwittlock17-Jan-15 11:36 
AnswerRe: How to create relationship of 2 tables using OleDbConnection Pin
PIEBALDconsult17-Jan-15 12:02
mvePIEBALDconsult17-Jan-15 12:02 
GeneralRe: How to create relationship of 2 tables using OleDbConnection Pin
gwittlock17-Jan-15 12:12
gwittlock17-Jan-15 12:12 
AnswerRe: How to create relationship of 2 tables using OleDbConnection Pin
gwittlock17-Jan-15 22:45
gwittlock17-Jan-15 22:45 
GeneralRe: How to create relationship of 2 tables using OleDbConnection Pin
AccessDeveloper29-Jan-15 7:01
AccessDeveloper29-Jan-15 7:01 
QuestionClick on "connect" button, the progressbar is filled, a label appears writing if it is connected to the support or not Pin
Member 1138076216-Jan-15 10:12
Member 1138076216-Jan-15 10:12 
AnswerRe: Click on "connect" button, the progressbar is filled, a label appears writing if it is connected to the support or not Pin
Eddy Vluggen16-Jan-15 13:15
professionalEddy Vluggen16-Jan-15 13:15 
AnswerRe: Click on "connect" button, the progressbar is filled, a label appears writing if it is connected to the support or not Pin
Richard MacCutchan16-Jan-15 22:49
mveRichard MacCutchan16-Jan-15 22:49 
QuestionList containing custom controls Pin
Bart Van Eyndhoven15-Jan-15 23:10
Bart Van Eyndhoven15-Jan-15 23:10 
AnswerRe: List containing custom controls Pin
Richard Andrew x6416-Jan-15 5:57
professionalRichard Andrew x6416-Jan-15 5:57 
AnswerRe: List containing custom controls Pin
Eddy Vluggen16-Jan-15 7:38
professionalEddy Vluggen16-Jan-15 7:38 
QuestionSNMP Coding for VB 2013 Pin
RudyL15-Jan-15 11:11
RudyL15-Jan-15 11:11 
AnswerRe: SNMP Coding for VB 2013 Pin
Richard MacCutchan15-Jan-15 21:40
mveRichard MacCutchan15-Jan-15 21:40 
AnswerRe: SNMP Coding for VB 2013 Pin
Eddy Vluggen16-Jan-15 7:44
professionalEddy Vluggen16-Jan-15 7:44 
QuestionRight Mouse Click in TextBox brings up strange menu Pin
KKW_acd15-Jan-15 5:51
KKW_acd15-Jan-15 5:51 
AnswerRe: Right Mouse Click in TextBox brings up strange menu Pin
CHill6015-Jan-15 6:00
mveCHill6015-Jan-15 6:00 
GeneralRe: Right Mouse Click in TextBox brings up strange menu Pin
KKW_acd15-Jan-15 6:48
KKW_acd15-Jan-15 6:48 
GeneralRe: Right Mouse Click in TextBox brings up strange menu Pin
CHill6015-Jan-15 6:57
mveCHill6015-Jan-15 6:57 
QuestionDJB2 Hash algorithm for VB Pin
SepPax13-Jan-15 11:39
SepPax13-Jan-15 11:39 
AnswerRe: DJB2 Hash algorithm for VB Pin
Richard MacCutchan13-Jan-15 21:53
mveRichard MacCutchan13-Jan-15 21:53 
GeneralRe: DJB2 Hash algorithm for VB Pin
SepPax14-Jan-15 6:33
SepPax14-Jan-15 6:33 
GeneralRe: DJB2 Hash algorithm for VB Pin
Richard MacCutchan14-Jan-15 6:58
mveRichard MacCutchan14-Jan-15 6:58 
GeneralRe: DJB2 Hash algorithm for VB Pin
SepPax14-Jan-15 9:54
SepPax14-Jan-15 9:54 
I have tried so many variants that I lost the path Sigh | :sigh:

BTW, the following is one of them

VB
Public Function CRC_calc_crc_bernstein(frame As String, len As Integer)

    Dim crc As UInt16 = 5831
    Dim tmp As UInt16 = 0
    Dim t As UInt16 = 0

    For i = 1 To len

        tmp = Mid(frame, i, 1)

        ' t = (crc << 5) + crc + tmp
        t = (crc * 33) + 1  'this is another variant
        t = t + crc
        t = t + tmp

    Next

    CRC_calc_crc_bernstein = crc

End Function


The main error I get is that usually after few cycles of For I get an Overflow exception
I tried the use of Ctype() and DirectCast() without success, so... I'm almost giving up.

Thanks in advance for your kind help.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.