|
Please don't shout. All caps is considered to be like shouting...
|
|
|
|
|
yo common man , what the hell is going on , i required a answer and u dudes are talkin about ur own,how come u do that ??,listen i m new here and didnt expected this frm u all , i;m my self c++ programmer , but couldnt help out myself in this task , it is urgent cuz i have only 6 days now to submit my project , right now i cant tell u what is the project ........
Dark Verdict
|
|
|
|
|
hi,
how to add columns dnamically to crystal report in vb6.0
tx
|
|
|
|
|
hi i want to develop personal firewall in vb.net.. any suggestion of useful links or sample codes? i spend a lot of time on researching sample codes and article of personal firewall[vb.net] but all i found is c++ or c# version.. anyone knows a sample firewall(with source code or article) develop using vb.net...
|
|
|
|
|
I don't know of any examples. Probably because they all involve writing a packet driver that sits in the network stack. This packet driver should expose an interface to pass the traffic to an external application and then get a response back to tell it wether or not to continue passing the traffic up the stack or to discard it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Friends,
I want to develop a chat application which has features similar to msn messenger by using VB.NET
Any advice, link, or any code will be appreciated.
Thanks in advance
|
|
|
|
|
The ubiquitous chat application. All you have to do is Google for "VB.NET chat" and you'll come up with thousands of examples in the 2,000,000 or so hits you get.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
please help on how to detect and block inbound and outbound traffic on the network. im newbee in network programming... please please help... sample code will be appreciated..
|
|
|
|
|
carl_sti wrote: im newbee in network programming
Then this project is WAY over your head. Do some research on network sniffing first. You'll need to write, or find, a packet driver that will allow your code to see all the traffic comming acrossed the machine wire. There is a problem with this though. A switch will not let you see all the traffic on the subnet your machine is connected to. You will only see the traffic directed at your sniffing machine.
Sniffing a network is best left up to the switch itself (if available), where it forwards all the selected traffic to a specific machine on the network.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Sir/Madam,
Please explain the basic difference between string and string builder class.I know one difference is , string builder variable is gets the dynamic memory and string class not.
Thanks.
|
|
|
|
|
String builder variable is preferred over string variable, when there is a need to store a larger string and also when you need to create any string value by appending to the same variable.
In such a case, when we consider a string variable, when we reassign any value to a string variable, it allocates NEW memory location along with the new char whatever we appended. hence every time we reassign to a string variable, memory allocations increase and thus affects the performace, where as in case of string builder this is not the case and hence preferred.
Renu.K
|
|
|
|
|
I have developed a code but not sets its securities ( permission, permission sets, etc.) so wether it will take default settings or i need to set it myself
|
|
|
|
|
If you don't change anything, of course it's going to get the default set of user and machine permissions, dependings on who ran the application and from where the .EXE is stored.
Read up on Code Access Security here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
thanx,
but im not able to understand abt how default set of permissions and user created depending on "who ran the application and from where the .exe is stored"
|
|
|
|
|
An person with Admin level privileges will have greater access to the machines resources than one without. Also, there are privileges that exist depending on from where the code is launched. Code launched from a local (physically attached) drive has MUCH greater priviliges to the machines resources than code launched from a network source, like a share on a server.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello, everyone. Happy holidays.
I'm just wrapping up an Anagram program to use when I play scrabble. I need all the help I can get when playing against my wife.
My question:
I'm using an old Dic.txt file I got a couple years ago to reference in my program. Is there a formal site or program that takes a current dictionary and produces an updated text file? Bascially, how do programmers obtain current dictionary files to use in their programs today?
I know I've seen some in DB and text file formats, but for now, I'm more interested in keeping in txt format.
Any help in locating such a site/program would be greatly appreciated.
Thanks!
Sincerely,
Harold Kinser
|
|
|
|
|
|
Hi.
Does anyone knows the way to parse (extract) data from Excel and CSV files?
Any help is appreciated.
Thank you,
Alex.
|
|
|
|
|
Here is a link to an article that has plenty of examples. csv
There is always the String.split method or RegEx expressions that you can use to code you own if that fits your needs. The last one I coded up used generics which made the parsing files less work.
|
|
|
|
|
Thanks a lot for reply. Do you have any examples from what you've done?
The reason I ask is I have a little time to learn .NET and I need something quick.
We changed from Java to .NET recently.
And one more thing. I need examples in VB.
|
|
|
|
|
is your field structure static and will you have to deal with commas inside of the fields? As far as vb or c# I use the latter but use vb.net from time to time so the cross over is very easy. If you are comming out of java the c# syntax is very very similar.
|
|
|
|
|
I know about C# being similar to Java. The problem is that our infrostucture is based on VB. . Here's the deal with files. We will be getting data from our customers in Excel and CVS fromats. Of course different customers will have different data and it's not consistent between them, meaning customer 1 won't be the same as customer 2. I need to create parsers for all customers (around 10), which I understand will be cusomer specific. I'm a bit familiar with VB but never done parsing (extracting) data from Excel and CSV. I need something to start and I'm sure I can impovise.
Thank you a lots.
|
|
|
|
|
We may need to jump offline to not fill up the forum but let me offer some personal insight into what you may find.
I have dealt with this situation before and there is a solution that may save you effort in the future. To start with I used the Strategy pattern to devise the solution which uses a Windows Service that runs on a timer and loads up the parsing assemblies that are specific for the file being dropped by the customers. The assembly finds the file and parses it then returns back to the service.
Sounds like a bunch but the code in the service never changes and you can add, change or remove the assemblies as the customers dictate. This type of functionallity keeps you from having to get in and out of the code every time a customer changes making the code much more durable.
Java is not as friendly to use with Windows Services but .net makes them very easy. If you want to skip the service just use a factory method and spin up the assemblies that parses that type of file.
This is a fair amount of code so prepare.
This class will hold the fields and their values out of the line from the file.
Friend Class Field
Sub New(ByVal fieldNameIn As String, ByVal fieldValueIn As String, ByVal isFoundIn As Boolean)
misFound = isFoundIn
mFieldName = fieldNameIn
mFieldValue = fieldValueIn
End Sub
Private misFound As Boolean
Private mFieldName As String
Private mFieldValue As String
Public Property IsFound()
Get
Return misFound
End Get
Set(ByVal value)
misFound = value
End Set
End Property
Public Property FieldName()
Get
Return mFieldName
End Get
Set(ByVal value)
mFieldName = value
End Set
End Property
Public Property FieldValue()
Get
Return mFieldValue
End Get
Set(ByVal value)
mFieldValue = value
End Set
End Property
End Class
This object will expose a list of lines that holds the parsed fields
Imports System.Collections.Generic
friend Class Line
'''
''' Ctor takes in a simple delimiter
'''
''' <param name="lineIn" />
''' <param name="delimiter" />
''' <remarks>
Sub New(ByVal lineIn As String, ByVal delimiter As Char)
mLine = lineIn
parseFields()
End Sub
Private mLine As String
Private mFieldArray As String()
Private mDelimiter As Char
Private mFields As List(Of Field)
'''
''' public interface for the fields
'''
''' <value>
''' <returns>
''' <remarks>
Public ReadOnly Property Fields()
Get
Return mFields
End Get
End Property
Private Sub parseFields()
' This is where your validation code will go make sure the text is not malformed
mFieldArray = mLine.Split(mDelimiter)
If (mFieldArray.Length > 0) Then
For Each fld As String In mFieldArray
mFields.Add(New Field("give it a name", fld, True))
Next
End If
End Sub
End Class
This is the public interface that takes in the file name and loads the data
Imports System.Collections.Generic
Imports System.IO
Public Class parser
Sub New(ByVal filepath As String, ByVal isFirstLineFieldNames As Boolean)
gListOfLines = New List(Of Line)
readFileAndLoadLines(isFirstLineFieldNames)
End Sub
Private gListOfLines As List(Of Line)
Private mFilePath As String
Private mFieldNames As String
Private mFileStream As IO.StreamReader
'''
''' public exposure of the list of lines which exposes the fields
'''
''' <value>
''' <returns>
''' <remarks>
Public ReadOnly Property ListOfLines()
Get
Return gListOfLines
End Get
End Property
Private Sub readFileAndLoadLines(ByVal firstLineFieldNames As Boolean)
mFileStream = New StreamReader(mFilePath)
' Strip out the field names which you can use later if you want
If (firstLineFieldNames) Then
mFieldNames = mFileStream.ReadLine()
End If
While mFileStream.Peek() > 0
'read through each line of the file and load it up into the generic list
gListOfLines.Add(New Line(mFileStream.ReadLine(), ","))
End While
End Sub
End Class
This is a very simple example of parsing a csv without error handling or any type of validation so take it as a starting point. As I mentioned at the top I would build a group of dll's that are specific for each of you customers and use reflection to load the correct dll for the file.
Hope it helps.
|
|
|
|
|
Thank you very much my friend. I will look into this. Do you have any idea what I should use for xls files? I tried to use code that reads line by line but got a mess back (and I know why). If you want to get off line you can alway email me usign the link.
Thanks a lot and Happy New Year.
|
|
|
|
|
Perhaps your bestbet would to buy a Visual basic learners guide from the dummies series or other.
Alternatively, http://msdn.microsoft.com/vstudio/express/vb/learning/default.aspx offers two seperate video series that should get you started on the basics. However, both of these options will take some time.
The other option is trying to stumble your way through it, which would take much longer.
Posted by The ANZAC
|
|
|
|