|
If you don't know the hash value of the uncorrupted version of this file, then you will not be able to check for some file corruption.
In a good anti-virus-software there are many ways to reach this goal (in general they combine the following steps):
1. (very simple) Check the last-modified property of the file.
2. Do a first scan of all files and store the hash value of these files, after that the software
can check if the file was modified.
3. Scan the file data for some known virus-signatures (short byte sequences extracted from an infected file/virus).
4. Do a heuristic file scan.
Greetings
Covean
|
|
|
|
|
Thanks for your help. I got what I wanted.
But I have still some doubts. As you suggested the approach, I have confusin in (3) Scan the file data for some known virus-signatures (short byte sequences extracted from an infected file/virus).
Could you explain this??
|
|
|
|
|
For example this is the signature of EICAR-testvirus/testfile.
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
If you insert this string in a file (for ex. in a textfile), every anti-virus program should find an infection of this file! (but its not dangerous in any way)
See this wikipedia article.
This quote I found somewhere in the net:
"A virus signature is an unique string of bits, or the binary pattern, of a virus. The virus signature is like a fingerprint in that it can be used to detect and identify specific viruses. Anti-virus software uses the virus signature to scan for the presence of malicious code."
Greetings
Covean
|
|
|
|
|
These questions have been asked and answered a week ago, see here[^].
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
I have use a datagrid in my sales software, now when the user select any item and qty i want to calculate its value in another columns.
say for example:
Col "Items"
Col "Qty"
Col "Rate"
Col "Total Value" - I want to calculate the total value.
Thanks,
Sohil Masani
|
|
|
|
|
Here is a code snippet that I found online a while ago that helps:
Try this code in DataGrid CellEndEdit Events (note: this will sum the items
not multiply. So you will just modify it to check whether the cells have values and then multiply the values. i am to lazy to retype it)
Dim iTotal As Integer = 0
With DataGrid1
For i As Integer = 0 To .ColumnCount - 2
If Not IsDBNull(.Rows(e.RowIndex).Cells(i).Value) Then
iTotal += .Rows(e.RowIndex).Cells(i).Value
End If
Next
.Rows(e.RowIndex).Cells(.ColumnCount - 1).Value = iTotal
End With
modified on Wednesday, January 27, 2010 2:59 AM
|
|
|
|
|
Hi Sohil,
You can use the Datagridview_CellEndEdit() for manipulating the calculations. For example, from the below, suppose your "qty" column number is 3 or your "rate" column is 4 then, it can be...like the following
Private Sub MyDataGrid1_CellEndEdit(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles MyDataGrid1.CellEndEdit
If e.ColumnIndex = 3 or e.columnIndex = 4 Then
Try
MyDataGrid1.CurrentRow.Cells("total value").Value = MyDataGrid1.CurrentRow.Cells("qty").Value * MyDataGrid1.CurrentRow.Cells("rate").Value
Catch ex As Exception
End Try
End If
End Sub
|
|
|
|
|
Developer,
I am looking for a code which retrieves data from the listview to textbox, combobox...etc. When I click on listview recode, I want it data pass to those textbox, combobox.
Thanks,
Chuon Visoth
Angkor Wat - Cambodia
asp.net - c sharp beginner
|
|
|
|
|
TextBox1.Text = ListView1.SelectedItems(0).Text
TextBox2.Text = ListView1.SelectedItems(0).SubItems(1).Text
|
|
|
|
|
It still doesnt work!
Private Sub lvwStaff_ItemClick(ByVal Item As Object)
Me.txtInsurance.Text = lvwStaff.selecteditems(0).Text
Me.txtName.Text = lvwStaff.selecteditems(0).SubItems(1).Text
Me.txtAddress.Text = lvwStaff.selecteditems(0).SubItems(2).Text
Me.txtAddress.Text = lvwStaff.selecteditems(0).SubItems(3).Text
End Sub
Chuon Visoth
Angkor Wat - Cambodia
asp.net - c sharp beginner
|
|
|
|
|
Try to check with events lvwStaff_Click() and not from lvwStaff_ItemClick()
|
|
|
|
|
It still does not work at all. It says "Object does not support this property or method."
Thanks,
Chuon Visoth
Angkor Wat - Cambodia
asp.net - c sharp beginner
|
|
|
|
|
Can you show me the code.....for Listview, how the items are added?
|
|
|
|
|
Is this thread solve his problem? I want this too. Pls help us to solve
|
|
|
|
|
Hi Experts,
I'm quite new to VB6 & I need to know how to update a field using ADODC in VB6.I think it can't be very heard.but I'm unable to find my error in my code.These are my file Details...
Database - Access97
Database name - db1
file name - FileTbl
fields - Number,Date
Textboxes - txtNum,txtDate
First I need to enter the number & date in textboxes & when I press the ok button, i need to find the record in field "Number", with the value which I entered in the txtNum & need to update field "date" with the value in txtDate.That's all.
I think it's very simple,but I tried many more times..Still I'm unable to understand my mistake.
Please Help Me...This is my code...
Private Sub cmdOk_Click()
Dim conn As Adodb.Connection
Dim rs As Adodb.Recordset
Set conn = New Adodb.Connection
Set rs = New Adodb.Recordset
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\db1.mdb"
conn.Open
rs.Open "SELECT * FROM FileTbl WHERE Number =" & Me.txtNum
rs!Date = Me.txtDate
rs.Update
rs.Close
conn.Close
Set cn = Nothing
End Sub
Thanks a lot....
Thanking you !!!
~ Sathish Chandimal ~
modified on Wednesday, January 27, 2010 7:14 AM
|
|
|
|
|
New to VB6?? Don't bother. Stop now before you pick up a bunch of very bad habits and start by learning VB.NET.
VB6 is long since dead and is no longer supported by MS.
I also refuse to help on VB6 questions anymore because I believe it just promots people to want MS to keep the thing around and working on future versions of Windows.
|
|
|
|
|
Yes...But this is not a new project & I also don't like to programming with oldest languages, but this is a oldest program which coding by VB6 & I have to do some modification on it..
please help me sir...
thanks..
Thanking you !!!
~ Sathish Chandimal ~
|
|
|
|
|
You beat me by 7 hours with this post
Not only VB6 being disturbing that the OP is new to, but using Access 97 as well
"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
|
|
|
|
|
They only just got electricity and inside toilets last month, so they are getting there!
|
|
|
|
|
Dave Kreskowiak wrote: New to VB6?
Take a look at his first post ever, around December of 2008. It's a VB6 question
"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
|
|
|
|
|
Private Sub cmdOk_Click()
Dim conn As New Adodb.Connection
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Documents and Settings\db1.mdb"
conn.Open
Dim cmd As New ADODB.Command
cmd.ActiveConnection = conn
cmd.CommandText = "UPDATE FileTbl SET [date] = " & Me.txtData & " WHERE [Number]=" & Me.txtNum
cmd.CommandType = adCmdText
cmd.Execute
Set cmd = Nothing
conn.Close
Set conn = Nothing
End Sub
Two additional warnings;
0) You're declaring a connection conn , while releasing cn at the end. It should release the conn object, not a new variable. (Is Option Explicit turned on?)
1) You're vulnerable to SQL-injection, using an ADODB.Parameter might help.
Good luck
I are Troll
|
|
|
|
|
hi everyone
i have a problem.i have a selector column in my janus gridex.i want when i select this field a particluar cell gets enable and when i deselect the selector column this cell gets disable.my problem is that all the column of my particluar cell gets enable.
|
|
|
|
|
This is a question for Janus, not us. The best source of information on 3rd party controls is the manufacturer of the control. They usually have support forums on their site for questions like this.
|
|
|
|
|
hi
My application is like a brick game where i have to fill the space with
correct brick size.
i have a large rectangular/square container
in that container , i have to place small rectangles or squares
so that there should be less wastage of space in the container.
first my doubt is can we do this application using vb.net or .net
if yes then can you give a little bit idea or a link which can be helpful to me to start this kind of application.
thanking you in advance
vijay kumar D
|
|
|
|
|
I don't have any links to offer, but I am sure Google has lots.
This is really a mathematical problem where you need to create an array showing the empty spaces and then fill them with bricks. I assume that you know the algorithm to do this; the actual coding can be done in any language you choose.
MVP 2010 - are they mad?
|
|
|
|