|
Thankyou TnTinMn,
Your answer put me on the right track on solving my problem.
Thanks again for your assistance.
|
|
|
|
|
I work as a coop student and I need some serious help so I sincerely appreciate everyone's input.
Basically my manager has told me to create an application which takes text files, processes them and creates a report which the user can change tolerances on what columns or fields they want to view. For example, if 10000 files (each file represents company/client audit info) are input into the application for 1 year, the user should be able to filter and compare files from separte months based on column headings in the files such as "% population" and "field".
Background info on why this app needs to be created: 1000s of files containing client audit info is fed into our servers daily. These files contain several columns in regards to client financial info. Someone needs to go through each of these files and just check if there is any irregularities in the data. An example of the irregularities could include info in a column containing number of docs to go from 100 000 docs in 1 year to 10 docs the next.
The problem is that no one has the time to sit down and check irregularities in 1000 files. Thus, it would be great if there was an application which goes through each file, reports any irregularities AND have a good user interface where the auditor can compare stats for files based on filters such as column headings and monthly.
I'm new to database programming so I have the following questions:
1) What language should I use to make this app? We have access to XML, SQL, VB, Visual Studio
2) Any General Tips for making this app?
3) Did anyone do something similar to this before?
4) General logic behind this application?
5) Flowchart help
6) Any link to helpful resources for an app of this context
Please forgive me for asking 6 questions but I need to ask all of them. I've tried my best to be as pin point as I can. I cannot be more specific than this. Every site I go to kicks me off for asking a question which is too general. I need help with every aspect of this post, thanks a ton.
|
|
|
|
|
- VB is the only one of those which is a language, and I trust you meant VB.NET.
- If you need to ask then you are probably going to struggle with this. Sorry, but you need to have at least a general idea if you wish to do it.
- Possibly, and if they have publicised it then Google should find it for you.
- No one is going to provide that for you.
- See 4.
- Google will find you resources for all the different aspects of the application. There are also lots of articles that will help you with sample code, but you have to do the research and the work.
- When you have a specific technical question come back here and people will try to help you.
Veni, vidi, abiit domum
|
|
|
|
|
I have to wonder what your job spec is at the coop, Any manager that asks a random (junior) employee for this needs to be looked at.
The questions you are asking require much more that a forum post, basically you need to be taught to be a developer to deal with this and that is what you are asking for on a forum.
I suggest you tell the manager to hire a contractor to build this or at least get a professional to look at it.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: basically you need to be taught to be a developer to deal with this
Which is at least two years of solid programming, business analysis experience and being mentored.
I agree with the suggestion to get a professional to look at this.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Hi I want to establish a ssh connection to remote host and run some set of commands and store its output in text file. I want to do this in vb script. Plz help
|
|
|
|
|
You probably already noticed that you'd either need a COM-object or an executable. I'd recommend using Putty.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi Thanks for your reply,
I have achieved it by using plink.
|
|
|
|
|
Thanks i was able to execute commands through plink exe
|
|
|
|
|
I designed a custom attribute using the following class:
<AttributeUsage(AttributeTargets.Field, AllowMultiple:=False, Inherited:=False)> _
Public Class OutputDescriptionAttribute
Inherits Attribute
#Region "Variables"
Private _oldDescription As String
Private _newDescription As String
#End Region
#Region "Properties"
Public ReadOnly Property OldDescription As String
Get
Return Me._oldDescription
End Get
End Property
Public ReadOnly Property NewDescription As String
Get
Return Me._newDescription
End Get
End Property
#End Region
#Region "Constructor"
Public Sub New(oldDescription As String, newDescription As String)
Me._oldDescription = oldDescription
Me._newDescription = newDescription
End Sub
#End Region
End Class
And I apply the attribute to various enumerations. For example:
Public Enum ConditionType
<OutputDescription("I", "Intact")> Intact
<OutputDescription("F", "Fair")> Fair
<OutputDescription("P", "Poor")> Poor
<OutputDescription("N", "None")> None
End Enum
What I haven't be able to figure out exactly, is how to get one of the attribute's properties for a specific enumeration member.
For example, if I have a variable Dim condition As ConditionType = ConditionType.Fair and I want to retrieve either the NewDescription or OldDescription property of the attribute tag ("Fair" or "F" respectively) how can I go about doing this.
Currently I was using the following function to test out methods:
Private Sub GetAttribute(T As Type)
Dim attr As OutputDescriptionAttribute = CType(Attribute.GetCustomAttribute(T, GetType(OutputDescriptionAttribute)), OutputDescriptionAttribute)
Dim newDesc As String = attr.NewDescription
Dim oldDesc As String = attr.OldDescription
End Sub
If I call this method using GetAttribute(GetType(ConditionType)) I get no error message, however if I try doing the following:
Dim condition As ConditionType = ConditionType.Fair
GetAttribute(condition.GetType)
I get any error about ConditionType cannot be converted to a needed type. How can I go about getting the custom attribute that is applied to a specific enumeration member? Thanks in advance.
|
|
|
|
|
I've taken your class and put it in a console-application; below is the code that fetches the member, and then the attributes of said member.
Sub Main()
Dim someCondition As ConditionType = ConditionType.Fair
Dim mi As MemberInfo = GetType(ConditionType).GetMember(someCondition.ToString()).FirstOrDefault()
Dim attribute As OutputDescriptionAttribute = mi.GetCustomAttributes(GetType(OutputDescriptionAttribute)).FirstOrDefault()
Console.WriteLine(attribute.NewDescription)
Console.ReadLine()
End Sub You might want to put this into a nice little helper-method. Generics and method extensions would help in keeping above code readable.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Overlay Text, Image,animation or video on a Runing Video using visual basic 6 and direct x and how i get full screen of of a video.
Shreekanta Mohanty
|
|
|
|
|
There's some problems with your question as it is; first, you're stating requirements, and not asking a specific question on code. We don't give away completed projects.
Also, VB6 has been dead for quite some time now. It's no longer sold, nor supported. If you want "anything" in VB6, then you're basically on your own. You can download VB.NET for free if you need an alternative.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I want to select all text in a textbox, so I coded the SelectAll() method inside the GotFocus event handler.
This did not work, so I inserted a breakpoint to try to find the problem and what I found is that after the execution of the SelectAll() instruction the LostFocus event is fired and the code within the LostFocus handler executed.
The same thing hapens when using the TAB key to go to the textbox. However in this case the text remains selected
Bottom line I want to select the all text in the text box after clicking the control.
I looked around and the MouseDown event does the trick. However if I try to move the insertion point by clicking with the mouse all the text is selected again. And that is not a desirable behavior for this program.
Any ideas? Thanks In Advance!
|
|
|
|
|
Without seeing your code for these two event handles, it's impossible to tell you what you did wrong.
Either your code is wrong or your testing method and/or description of the problem is.
SelectAll will NOT change the focus to another control or remove focus from the control that you called SelectAll on.
|
|
|
|
|
Quote: I inserted a breakpoint to try to find the problem and what I found is that after the execution of the SelectAll() instruction the LostFocus event is fired You observed the LostFocus event after hitting your breakpoint in GotFocus because the breakpoint transfered the focus to the debugger. Ain't event debugging fun?
I believe that you will need a custom control to change the default handling mouse handling to get the effect that you want. Here is quick example that intercepts the left mouse button down message to achieve this behavior.
Public Class TBSelectOnEnter
Inherits TextBox
Protected Overrides Sub OnEnter(ByVal e As System.EventArgs)
SelectAll()
MyBase.OnEnter(e)
End Sub
Private Const WM_LBUTTONDOWN As Int32 = &H201
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If Not Focused AndAlso (m.Msg = WM_LBUTTONDOWN) Then
Me.Focus()
Else
MyBase.WndProc(m)
End If
End Sub
End Class Just add this to your code and do a build. It should show up in your toolbox at the top in the "YourApplicationName Components" section. Then use it as your TextBox.
|
|
|
|
|
Thanks TnTinMn! It Works fine.
And thanks for helping me understand the "LostFocus Mystery"
|
|
|
|
|
You are welcome.
Just be careful with that control. I did not put a lot of thought into the ramifications of "eating" the mouse down message, but I can not think of any.
|
|
|
|
|
I will. I know now the way. It's easier to explore.
|
|
|
|
|
hello everyone,
i am using vb.net(2003 in windows application) along with sql server 2005 i need to give display data of a sql procedure whose columns are being generated dynamicaly. The problem arise when i want to give header of flexgrid as i am not able to find out how sql column headers can be retrieved in case of it is being generated dynamicaly(for windows application)...Plz help
ashish sharma
|
|
|
|
|
Flexgrid?? The older-than-dirt-itself Flexgrid?? WHY on earth are you using that thing?
Is there something wrong with using the DataGridView??
What you want to do is a very trivial SQL operation. You're just putting the SqlCommand object together to execute a stored procedure and the resultset will come back with the column header in place by default. Well, IF your stored procedure is written correctly anyway.
|
|
|
|
|
I'm building a neural network library pretty much to see if I can do it and advance my skills in programming. I'm currently building the Neuron class, and as you may or may not know, a neuron in a neural network has what's called an activation function; however my question below does not have to do with neural networks directly, strictly with the use of Func(Of TResult) delegate So within my neural network class I have several built in activation functions:
Private Function Identity(value As Double) As Double
Return value
End Function
Private Function [Step](value As Double) As Double
If value <= 0 Then
Return 0
Else
Return 1
End If
End Function
Private Function LogarithmicSigmoid(value As Double, alpha As Double) As Double
If value < -45.0 Then
Return 0
ElseIf value > 45.0 Then
Return 1
Else
Return (1.0 / (1.0 + Exp(-alpha * value)))
End If
End Function
Private Function SymmetricSigmoid(value As Double) As Double
Return HyperbolicTangent(value)
End Function
Private Function HyperbolicTangent(value As Double) As Double
If value < -45 Then
Return -1.0
ElseIf value > 45.0 Then
Return 1.0
Else
Return Tanh(value)
End If
End Function
I also have an enumeration for the user to select which activation function they want to use for the neuron:
Public Enum ActivationFunctions
IDENTITY
[STEP]
LOGARITHMIC_SIGMOID
SYMMETRIC_SIGMOID
HYPERBOLIC_TANGENT
End Enum
The first problem I'm having is with the following methods:
Private activationFunction As Func(Of Double)
Public Sub SetActivationFunction(activationFunction As ActivationFunctions, value As Double, Optional alpha As Double = 1)
Select Case activationFunction
Case ActivationFunctions.IDENTITY
Me.activationFunction = Function(value As Double)
End Select
End Sub
Public Sub SetActivationFunction(ByVal activationFunction As Func(Of Double))
End Sub
I can't figure out how to set the instance variable activationFunction to a specific method using the AddressOf operator while passing it a parameter. Specifically in the first SetActivationFunction if the user passes the ActivationFunctions.IDENTITY enumeration, I would like to set the instance variable activationFunction to the method Identity but also pass the value parameter.
I've tried changing the line marked "PROBLEM LINE" to Me.activationFunction = AddressOf Identity but got the error message Method 'Private Function Identity(value As Double) As Double' does not have a signature compatible with delegate 'Delegate Function Func(Of Double)() As Double' .
If I changed it to Me.activationFunction = AddressOf Identity(value) the error message become 'AddressOf' operand must be the name of a method (without parentheses) , and if I change it to Me.activationFunction = AddressOf Identity()(value) I get the error message Argument not specified for parameter 'value' of 'Private Function Identity(value As Double) As Double'
Based on the varying error message it seems like what I'm trying to do can be done, I just can't figure out the proper way to specify the argument for the Identity method while using the AddressOf operator.
Any help and guidance would be greatly appreciated. I should note that this is the first time I'm trying to use the Func(Of TResult) delegate in my own code, but since I want users to be able to supply their own methods and arguments for the parameters it seemed appropriate.
Thanks in advance for any help.
|
|
|
|
|
For as function with return type Double and a parameter of type Double, use the Func(T, TResult) delegate[^].
However, in this case, a delegate solution is not feasible as you have two different function signatures:
Func(Of Double, Double)
Func(Of Double, Double, Double)
An alternative would be:
Private Function GetActivationFunctionValue(ByVal functiontype As ActivationFunctions, _
ByVal value As Double, _
Optional ByVal alpha As Double = 1) _
As Double
Select Case functiontype
Case ActivationFunctions.IDENTITY
Return Identity(value)
Case ActivationFunctions.LOGARITHMIC_SIGMOID
Return LogarithmicSigmoid(value, alpha)
' other enum cases
End Select
End Function
|
|
|
|
|
That works fine for built-in functions but how can I generalize it so that a user can supply their own activation function to use instead of just the ones I define?
|
|
|
|
|
Quote: how can I generalize it so that a user can supply their own activation function to use instead of just the ones I define? You should probably ask this question as a new question to get input from others.
The best advice that I can offer on that is to define the allowed function structure and develop an expression builder so that the user must follow a structure you define. The expression could then be processed to emit a DynamicMethod[^] that can called if selected.
This will take a fair amount of work.
|
|
|
|