
twistedm1nd
Avatar/Signature-
Posts
34 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by twistedm1nd
-
lol i just discovered nullable types , didnt know they existed. // Nullable Type Example int? x; if (x != null) Console.WriteLine(x.Value); else Console.WriteLine("Undefined");
-
internal struct data { internal DateTime time_stamp; internal double duration_good; internal int count_good; internal int count_bad; internal double value_sum; internal double value_sum2; internal double? value_min; internal DateTime? value_min_timestamp; internal double? value_max; internal DateTime? value_max_timestamp; } The struct works fine when used but What kind of a decleration is DateTime? or double? I'm using .NET framework v2 beta. Thanks
-
//C# code // KeyPressEventArgs accepts a char as the input private void Form1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { // do something based on the key pressed } private void button1_Click(object sender, System.EventArgs e) { char ch = 'a'; Form1_KeyPress(new object(),new System.Windows.Forms.KeyPressEventArgs(ch) ); } OR the other way would be to use keybd_event winapi
-
I have a string which has to be grouped using regular expressions The sample string is \{Voltage\}{VoltageValue, Max\{Value\},5,5}\{Voltage\}\{Pressure\}{PressureValue,12345}\{Pressure\} The output should be Group 1 : {VoltageValue, Max\{Value\},5,5} Group 2 : {PressureValue,12345} Basically should ignore "\{", "\}" and group it based on '{' and '}' Can Somebody help me in formulating the regular expression? Thanks and regards
-
would this work ? if(Math.Abs(x-y)>z)
-
Assuming that you wanted to make use of the Array Class otherwise use the myIntArray in the foreach loop
-
3+4*2 (standard calc) = 14 3+4*2 (scientific calc) = 11 rules of BODMAS [ brackets , of , div, mul add and subtraction ] hold for one and not the other ?
-
Am I on Candid Camera?... About to Flip Out
twistedm1nd replied to realolman's topic in Water Cooler
Source : http://msdn2.microsoft.com/library/t6b8wa5e.aspx Ty Rich :p i always thought the controller communication protocols were standardized ... i guess i do need to research a whole lot more into that. -
the time duration is in milliseconds therefore Thread.Sleep(1000) -- > sleeps for a second
-
Am I on Candid Camera?... About to Flip Out
twistedm1nd replied to realolman's topic in Water Cooler
IMhO yep it will or should i say its already begun. MSoft itself has been asking a lotta VB coders to start trying out (read convert to) VB.NET In a way its good as it keeps programmers employed, at the price of converting existing programs into .net :p Holy god Automation ... :D you'd be an I/O controller developer. I thought the controllers spoke in an OPC standardized format. or atleast the vendors who supplies the valves, pumps etc provided a black box that gave data out in a standardized format. I'm still to trying to get my head around the industrial automation domain... so pardon me if i'm wrong or talking(typing) non-sense. -
Dll reading from a file for the connection string
twistedm1nd replied to jvcoach23's topic in General
Sorry PlausiblyDamp, I decided to remove them(binaries) and then decided to leave them on... guess i should have removed them. Thanks Diesel. Ty to u too shannon, thats my 1st VB.Net program:p lol -
Am I on Candid Camera?... About to Flip Out
twistedm1nd replied to realolman's topic in Water Cooler
Why not just quit learning VB.Net and switch to C# insted ... least u can tell yerself its a new language ( its not very different from VB.NET ) I've found some very good stuff on MSDN Dr GUI.NET :) .. imho MSDN is targetted at medium and experienced programmers ... and not if u want to learn somethin from ground up. -
Dll reading from a file for the connection string
twistedm1nd replied to jvcoach23's topic in General
my bad coach its appSettings < yep case sensitivity .. which leads me to the question are XML files case sensitive .. i'm too sleepy now i'll look it up morrow and let ya know > dll1.zip -
Determining common start menu/startup folder
twistedm1nd replied to snarfblam
's topic in Directory / File IO / Registry
Theres no direct way of getting the other folders in the but u can always getthe parent folder of the "CommonApplicationData" and then get all the subdirectories in that folder or just check (Directory.Exists) to see if u can find the folder u are looking for -
Dll reading from a file for the connection string
twistedm1nd replied to jvcoach23's topic in General
an app config file is in the format <?xml version="1.0" encoding="utf-8" ?> <configuration> [b]<appsettings>[/b] <add key="key1" value = "pwd=password; UID=uid; server=(local); database=Monitor"></add> [b]</appsettings>[/b] </configuration> u missed the app settings tag out ALSO as Optical pointed out the config file must be named performance.dll.config BECAUSE the name of yer DLL is perfromance.dll IN general assembly name + ".config" eg. blah.exe -> blah.exe.config mydll.dll ->mydll.dll.config -
Am I on Candid Camera?... About to Flip Out
twistedm1nd replied to realolman's topic in Water Cooler
im struggling with MFCs and VC++ at the moment . Visual C# is a breeeeze. realolman try the "dummies" or "complete idiots guide" books (if u like their style of writing) .. they helped me understand the basics :) and yep i swear by them One of my classmates was 40 something programmed his whole life in COBOL [ yep it still is used ] he had a tough time trying to grasp C#. I dunno much about VB .. but is trying to convert from a procedural language to an OO one thats causing such a problem ? -
You;d proably appreciate C# more if u did c++ ..... I took a more natural course from C to C++ to Java to C#...so I;d suggest C++. Learning curve from C++ to C# is minimal [ can i say non-existant ] , but u sure are gonna have a steep curve if u do choose c++.. C++ is fun to learn ...butthen again i'm biased :p
-
a sniffer can be used to monitor packet traffic between the end points. deducting the amount of data that has passed between the end points from the size of the original file , should i guess help you keep track of how much data has been uploaded .
-
zed is yer IM app gonna be wholly P2P (gnutella) or is it gonna be centralized ( like napster ) ? if its P2P then you can go with SQL ServerCE as suggested by Optikal ... if its a centralized then you can use any of the other databases like SQL Server/ Oracle /My SQL etc etc .. running on a server. yer mobile clients interact with the server to figure out whos logged in. the server can send notifications when a new user logs in etc What tables have you added so far ? http://www.venkydude.com/articles/yahoo.htm << how yahoo IM works though the articles old it should help you get started another place where u can begin is P2P programming using VB.net by APress its got a simple IM Example and a File sharing App example.
-
Dll reading from a file for the connection string
twistedm1nd replied to jvcoach23's topic in General
Add a new app. config file ... Add -> Add new Item,->Application Configuration File this file can contain yer various DB connection strings <configuration> <appsettings> <add key="key1" value="my key1 value"> <add key="key2" value="my key2 value"> <add key="key3" value="12345"> <add key="key4" value="true"> </appsettings> </configuration> To read the app.config u code string s1 = System.Configuration.ConfigurationSettings.AppSettings["key1"]; MessageBox.Show(s1); string s2= System.Configuration.ConfigurationSettings.AppSettings["key2"]; MessageBox.Show(s2) -
you cud always enclose the file processing between a try catch block and catch a filenotfound exception // c# code try { StreamReader sr = new StreamReader(txtBoxLast.Text + txtBoxFirst.Text); //file processing done here } catch (FileNotFoundException fex) { MessageBox.Show(fex.Message); }
-
A function can return multiple values by tagging the input parameter/s with the out keyword decimal FuncDoSomeThing(out decimal d2,out string msg); input parameters passed using out needn't be initialized before calling the method .however after a call the out parameter must be initialized
-
http://www.codeproject.com/vb/net/threadingvbnet.asp a very very basic introduction to threading . i found it useful and easy to understand hope it helps. imho i'd use threading to make the application more scalable
-
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebMailSmtpMailClassTopic.asp SmtpMail class allows mails to be delivered either using the SMTP mailer service of Win 2000 or through any SMTP server. The links got some sample codethat u can use.