|
Hi,
Sorry to disturb you with such a beginners question but I am sort of stuck.
I have just started with VB and ran into the following.
I have an application which creates multiple logs. I have created a script which does a readall and inserts them into one big file. The problem is that it becomes on big file and the dates get mixed up and some log entries have the same time date. Is there some way to sort the dates.
Any hint or suggestion will be appreciated.
BR,
Jorgen
|
|
|
|
|
You'd have to parse this information and store and sort it yourself. There is no component that will do it for you. If all there was in the log was a date/time stamp and a line of text after it, I'd probably use a SortedList[^] implementation to hold all of the records from the logs, then output the SortedList, line-by-line to your compiled log file.
|
|
|
|
|
Thanks a lot. I will go with you suggestion.
BR,
Jorgen
|
|
|
|
|
Hi ppl,
PLEASE I AM SO DESPERATE!!!
This is ALL relates to the Speech recognition technology by MS and to the released SDK of "Sapi 5.1"..
a link to the SDK:
http://www.microsoft.com/downloads/details.aspx?FamilyId=5E86EC97-40A7-453F-B0EE-6583171B4530&displaylang=en[^]
i am trying to build a simple program of Sapi, which only uses "Command&Control" Grammer (from an xml) and not the dictation one..
i am using the sample from the SDK 5.1 of the Solitaire Game (Sol.xml-which i got in c:\), and i can't get it to work, i just can't understand why isn't it Recognizing... i am using VB 2005 express edition..
I DO NOT have errors in my code.. but the program is still not accepting
when i say "New game", i wish there was some Sapi SDK for vb.net cause it's not simple for a newbie like me to "translate" the code from vb6 (as in the sample) to vb.net from the 5.1 SDK..
FOR SHORT- IT'S NOT RECOGNIZING- AND IT'S DRIVING ME *CrAzY*
PLEASE take a look at the code and try to help me out...
I have a Recognition code by xml, label1, label2, and a textbox1..
(if you are trying that you should add a refernce of a com object by the name of "Microsoft Speech object library" version 5.0..
Public Class Form1
Public WithEvents RC As SpeechLib.SpSharedRecoContext
Public myGrammar, b As SpeechLib.ISpeechRecoGrammar
Private Sub Form1_Load()
RC = New SpeechLib.SpSharedRecoContext
myGrammar = RC.CreateGrammar
myGrammar.CmdLoadFromFile("c:\sol.xml", SpeechLib.SpeechLoadOption.SLODynamic)
myGrammar.CmdSetRuleIdState(0, SpeechLib.SpeechRuleState.SGDSActive)
End Sub
Private Sub RC_FalseRecognition(ByVal StreamNumber As Long, ByVal StreamPosition As Object, ByVal Result As SpeechLib.ISpeechRecoResult)
Label1.Capture = "(no recognition)"
End Sub
Private Sub RC_Recognition(ByVal StreamNumber As Long, ByVal StreamPosition As Object, ByVal RecognitionType As SpeechLib.SpeechRecognitionType, ByVal Result As SpeechLib.ISpeechRecoResult)
Label1.Capture = Result.PhraseInfo.GetText '=NOTHING HAPPENS HERE
TextBox1.Text = Result.PhraseInfo.GetText '=NOTHING HAPPENS HERE
End Sub
Private Sub RC_StartStream(ByVal StreamNumber As Long, ByVal StreamPosition As Object)
Label2.Capture = Val(StreamNumber)
End Sub
End Class
I am sorry for the length of this msg.
I appriciate your help, no one answered and helped me anywhere else, but i have my hopes with you ppl here, cause it looks aweseme, I am new here, and it's my first question..
THANKS A MILLION!!!
Ray.
Only dead fish go with the flow..
|
|
|
|
|
None of this is going to work because the events are not wired up and you've got the method signatures using VB6 names for variables instead of VB.NET. For example, a Long type in VB6 is a 32-bit signed integer, while in VB.NET, Long is a 64-bit signed integer. The two are NOT interchangable.
Public Class Form1
Private WithEvents RC As New SpeechLib.SpSharedRecoContext
Private myGrammar As SpeechLib.ISpeechRecoGrammar
Private Sub Form1_Load()
myGrammar = RC.CreateGrammar()
AddHandler RC.FalseRecognition, AddressOf RC_FalseRecognition
AddHandler RC.Recognition, AddressOf RC_Recognition
AddHandler RC.StartStream, AddressOf RC_StartStream
myGrammar.CmdLoadFromFile("c:\sol.xml", SpeechLib.SpeechLoadOption.SLODynamic)
myGrammar.CmdSetRuleIdState(0, SpeechLib.SpeechRuleState.SGDSActive)
End Sub
Private Sub RC_FalseRecognition(ByVal StreamNumber As Integer, ByVal StreamPosition As Object, ByVal Result As SpeechLib.ISpeechRecoResult)
Label1.Capture = "(no recognition)"
End Sub
Private Sub RC_Recognition(ByVal StreamNumber As Integer, ByVal StreamPosition As Object, ByVal RecognitionType As SpeechLib.SpeechRecognitionType, ByVal Result As SpeechLib.ISpeechRecoResult)
Label1.Capture = Result.PhraseInfo.GetText()
TextBox1.Text = Result.PhraseInfo.GetText()
End Sub
Private Sub RC_StartStream(ByVal StreamNumber As Integer, ByVal StreamPosition As Object)
Label2.Capture = Val(StreamNumber)
End Sub
End Class
Warning! I haven't tested this code and don't have the time to. Use at your own risk!
|
|
|
|
|
THANK YOU FOR ENLIGHTING ME...
but the code still doesn't work, and i still can figure out where the problem is.. what am i doing wrong??????, i am just dieing so it would work for 2 months now..
but i have made a progress with your comment about the handlers, i could never get it right otherwise anyway..
Thanks again..
anybody else? please?
Ray.
|
|
|
|
|
sapi.dude wrote: but the code still doesn't work
Explain what "doesn't work" means? Are there any error messages? Compile or runtime errors?
|
|
|
|
|
What i meant when i said it's not working, i meant that it is not recognizing and outputting the result to the textbox1 or changing the text of label1 or anything, it supposed to have only this one command that i have in the XML file which is "New Game" and when i say it, it's supposed to recognize it, and output the result (text-New Game) to the textbox or label or anything, but it doesn't do it, it looks like it doesn't even go to the Recognition Sub, and i don't know why, i am a begginer, but all i want to know now is this, i want this simple code to work, and then it would give me a huge jump start for my project and my learning skills since then i could move on everything else.. which i don't belive i will have much prblems with..
I appriciate your help..
and i hope i am not to rude asking for it..
Thanks again..
Ray.
|
|
|
|
|
You might want to try adding these two lines to your code:
myGrammar.CmdLoadFromFile("c:\sol.xml", SpeechLib.SpeechLoadOption.SLODynamic)
myGrammar.CmdSetRuleIdState(0, SpeechLib.SpeechRuleState.SGDSActive)
myGrammar.DictationSetState SpeechLib.SpeechRuleState.SGDSInactive
myGrammar.CmdSetRuleIdState 0, SpeechLib.SpeechRuleState.SGDSInactive
Other than that, it's going to take some playing around to get this to work. I can't install the Speech SDK and mess around with it for you. But, go back to the examples you found and make sure your code is doing what the examples are for C&C. I found the examples you got this code from.
|
|
|
|
|
THANK YOU VERY MUCH!
I got a progress, it goes in to the Recognition subs and the loading grammer one too..
but it still doesn't work, i am working on it..
here is my code:
<br />
Public Class Form1<br />
<br />
Private WithEvents RC As New SpeechLib.SpSharedRecoContext<br />
Private myGrammar As SpeechLib.ISpeechRecoGrammar<br />
<br />
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
myGrammar = RC.CreateGrammar()<br />
AddHandler RC.FalseRecognition, AddressOf RC_FalseRecognition<br />
AddHandler RC.Recognition, AddressOf RC_Recognition<br />
AddHandler RC.StartStream, AddressOf RC_StartStream<br />
myGrammar.CmdLoadFromFile("c:\sol.xml", SpeechLib.SpeechLoadOption.SLODynamic)<br />
myGrammar.CmdSetRuleIdState(0, SpeechLib.SpeechRuleState.SGDSActive)<br />
myGrammar.DictationSetState(SpeechLib.SpeechRuleState.SGDSInactive)<br />
myGrammar.CmdSetRuleIdState(0, SpeechLib.SpeechRuleState.SGDSInactive)<br />
<br />
End Sub<br />
<br />
Private Sub RC_FalseRecognition(ByVal StreamNumber As Integer, ByVal StreamPosition As Object, ByVal Result As SpeechLib.ISpeechRecoResult)<br />
<br />
Label1.Capture = "(no recognition)"<br />
<br />
End Sub<br />
Private Sub RC_Recognition(ByVal StreamNumber As Integer, ByVal StreamPosition As Object, ByVal RecognitionType As SpeechLib.SpeechRecognitionType, ByVal Result As SpeechLib.ISpeechRecoResult)<br />
<br />
Label1.Capture = Result.PhraseInfo.GetText()<br />
TextBox1.Text = Result.PhraseInfo.GetText()<br />
<br />
End Sub<br />
Private Sub RC_StartStream(ByVal StreamNumber As Integer, ByVal StreamPosition As Object)<br />
<br />
Label2.Capture = Val(StreamNumber)<br />
<br />
End Sub<br />
End Class
I hope I will get it right now..i am still working on it,
and i am not intending to give up,
it's all i do all day in the last few days..
but i think that i am on the right track..
now you understand how much I Realy Realy appriciate this..
Thankssss!!!
Ray.
|
|
|
|
|
Thanks for the advice, i just GOT IT WORKING!!!
you guys are amazing..
NO WORDS.
(Besides THANKSSSS!!!!!!!!!!!!!!!)
Ray.
|
|
|
|
|
It is unlikely that anyone here will have the time or desire to grab your code and get it working for you, but I am willing to go so far as to do some research for you and give you some sample articles (below). Also please, Go to Barnes and Noble, spend a day buying coffee and reading vb.net books (try at least 1 c# book too, if only to be able to understand more sample code). I suspect your problem is not SAPI 5.1 and much more a lack of general vb.net programming knowledge. And whatever you do stick with it and don't quit. If you have more specific questions please ask.
Here is a vb article:
SAPI 5.1: Voice - Enabled Applications With VB[^]
Here are several c# ones
Writing SAPI 5.1 apps in CSharp[^]
Buliding Text to Speech Applications using SAPI 5.1 and C#[^]
Build a Speech Recognition Stock Quote App with .NET and SAPI 5.1
[^]
Because of the framework C# is closer in some ways to vb.net than VB6 is and there is more documentation available, so I would recommend ignoring the syntax and seeing if you can pluck out some useful code.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
HI,
well, that is all i need from the programing world for now, since i don't realy have the time to study it for months, i do understand though, what is going on, besides a few little basic things which i don't understand in VB.net.. and i do study from the Msdn videos and any other source i can get my hands on, i appriciate your help, and the links, allthough i know them all pretty well, the first link is the one that started me going..
anyway, thank you for encourging me.. as i said on another msg, i just want this simple basic code to work, it would give me a jump start to everything else, and will improve my learning after i'll get it right..
and thanks for your help..
i realy realy appriciate it..
Ray.
|
|
|
|
|
No problem. I've had a light load the past week and I have appreciated the site in the past, so I have jumped in to answer questions. Its been fun, 5 minutes here and there throughout the day while I work.
The problem is that there is no telling what is wrong with your code or how long it would take to fix. Open ended questions like this are open ended time sinks. And despite the fact that I have a light load, I do have work to get done, and so do others who volenteer here.
My suggestion is set break points in your code, put watches on the objects and examine them. Step throught your code line by line and watch what it does. Read the examples and yes, study programming. If you can locate a specific problem and ask for clarification, it might be that someone will look at it, decide its not to much work to answer it for you and give you an answer.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Thanks for the advice, i just GOT IT WORKING!!!
you guys are amazing..
NO WORDS.
(Besides THANKSSSS!!!!!!!!!!!!!!!)
Ray.
|
|
|
|
|
Hiya
Just wondering if anyone knows if you can export financial information (like totals of nominals) into an access database, or even export it as a txt or xls file from sage?
I need to create a piece of software that does this but i've never used the ODBC before.
Thanks
See, told ya!
|
|
|
|
|
You're going to have to ask Sage this question. There doesn't appear to be an SDK or any documentation on the database structure on their website. Without knowing how the database is organized, you're pretty much SOL.
|
|
|
|
|
This information is somewhat reserved for the Sage Developers' community, which Sage charge hansomly to be a member of. You didn't say which Sage Accounts your interested in?
Line 50, Line 100, Sage 200, MMS, Sage 500, Instant etc.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
I didn't say it because I'm not interested in it. Try replying to the OP instead.
|
|
|
|
|
Oops, sorry Dave. A bit of an oversight there
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Hello,
How is SFtp done with .NET? I have looked for Internet and have not found anything, alone components of payment.
I would like to be able programme it like.
Thanks,
Shiveta
|
|
|
|
|
The .NET Framework FTP component doesn't support SFTP. You need to use a third party component that does. Click[^] for an example.
|
|
|
|
|
Hello Dave,
This web already I saw. I already know that there are many components in Internet that do that, but are of payment. I need to know like doing it without using an existing library. The web that you have put is of a trial component. Long ago that I'm looking for it.
In any case thanks.
Shiveta
(forgives my language, I don't speak very well English)
.NET Developer
MCSD Certificate
|
|
|
|
|
In that case, you'll have to implement your own FTP Client class, complete with SSL support. I hope you're very familiar with how Sockets and SSL works.
|
|
|
|
|
I have some problems in implementing Operations Research algorithms(in a Distribution Management System/Sales) such as Salesman Problem,Application of Constrained Nonlinear Programming,etc....
It was difficult as I couldn't find a mathematical approach
to solve it.If anyone knows any links where i can find a solution(if possible a Source code) please let me know.
Regards
Roshan
|
|
|
|
|