Hi All,
Im an active member in one of the online forums (I am targetting the .Net framework)
And on common problems faced by people I decided to start a library which will implement what might be a very common task but takes out effort.
I started with prime numbers, will build it up as I go so that I can add support to adding Fractions, and converting decimals to fractions and vice versa.
The DLL for this can be found here (LooneyStar DLL)
Please feel free to get back with comments and suggestions
Thank you
PS. LooneyStar.... even i was laughing :)
Tuesday, November 13, 2007
Wednesday, September 12, 2007
Password character - round dots
After creating my windows form app on Vista,
I came across with various GUI dilemas.
I am artistically challenged and my password box shows a *, while everywhere in Vista it shows those big beautiful Dots, making my app look ancient.
Thanks to this site I got the colution
set the password char to be (char)00x25CF
And wallah, im into metal age from the dark ages
cheers
I came across with various GUI dilemas.
I am artistically challenged and my password box shows a *, while everywhere in Vista it shows those big beautiful Dots, making my app look ancient.
Thanks to this site I got the colution
set the password char to be (char)00x25CF
And wallah, im into metal age from the dark ages
cheers
Monday, September 3, 2007
MySql Connection Basics
Hi,
I was working with MySql, untill i figured out to keep some of the basic necessary code aside and include it in my classes...and reduce my code.
I have created a dll of the class.... of that...which is available at my homepage
Will get some documentation with it soon
Will also mail the code if needed.
The DLL file is uploaded here :
http://shashi.sadasivan.googlepages.com/MySqlDB.dll
Please feel free to send in any comments or suggestions
I was working with MySql, untill i figured out to keep some of the basic necessary code aside and include it in my classes...and reduce my code.
I have created a dll of the class.... of that...which is available at my homepage
Will get some documentation with it soon
Will also mail the code if needed.
The DLL file is uploaded here :
http://shashi.sadasivan.googlepages.com/MySqlDB.dll
Please feel free to send in any comments or suggestions
Tuesday, August 28, 2007
Visual studio handy Shortcuts
Considering your code and you want to comment a block of code using your keyboard!!
Well...no worries...
Select the code you want to comment
Press Ctrl + K + C
to Uncomment the code
Press Ctrl + K + U
Unfortunately unlike eclipse it dosent use the same shortcut to comment and uncomment the code.
Another good editing shortcut:
Have you ever tried to delete a line, and then started to use backspaces or del keys to format the code?
Well...if you do want to remove the line completely....even without selecting the whole line
press Shift + Del and the line will dissapear without affecting anything else
Collapse all Regions / Blocks
Ctrl + M + O
some good shortcuts given at http://visualstudiohacks.com/navtricks
Well...no worries...
Select the code you want to comment
Press Ctrl + K + C
to Uncomment the code
Press Ctrl + K + U
Unfortunately unlike eclipse it dosent use the same shortcut to comment and uncomment the code.
Another good editing shortcut:
Have you ever tried to delete a line, and then started to use backspaces or del keys to format the code?
Well...if you do want to remove the line completely....even without selecting the whole line
press Shift + Del and the line will dissapear without affecting anything else
Collapse all Regions / Blocks
Ctrl + M + O
some good shortcuts given at http://visualstudiohacks.com/navtricks
Wednesday, August 22, 2007
Can't connect to remote sql server/express?
Got a few links that can help.
Make sure that you check the log file in the server's directory, to find the nature of the error.
this blog gives a brief description of the protocol errors:
http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx
if you are not able to connect to the server, follow the steps given in
http://blogs.msdn.com/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx
And if your client is Vista, turn off the firewall.. that will solve the issue, Im trying to find how to enable the firewall and still connect to the DB.
Will update accordingly,
Goood luck
Make sure that you check the log file in the server's directory, to find the nature of the error.
this blog gives a brief description of the protocol errors:
http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx
if you are not able to connect to the server, follow the steps given in
http://blogs.msdn.com/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx
And if your client is Vista, turn off the firewall.. that will solve the issue, Im trying to find how to enable the firewall and still connect to the DB.
Will update accordingly,
Goood luck
Sunday, August 19, 2007
Concurrency violation: the UpdateCommand affected 0 of the expected 1 records
{"Concurrency violation: the UpdateCommand affected 0 of the expected 1 records."}
Terrible exception.
Well what was happening is i had a datatable, and i was editing it.
At one of the points i update it, then I call in a different class's method, pass only the unique key of one of the rows and make certain claculations, change the row, and update it.
Now when I go back to my original table, and update it....it threw this error.
Lets take this example.
The table "myTable" has the following fields: ID,name,address,country,credit
where ID is the primary key.
lets take a row ID=1,name=Shashi,address=Brisbane,country=Australia,credit = 20
i have 2 classes MyClass and MyCalcClass
MyClass is instantiated and it acquires a row from myTable lets call it myRow
now i instantiate an instance of MyCalcClass called objCalc and send it myRow.ID.
now objCalc changes the value of credit (lets say multiplies by 10) to 200 from 20 and saves it.
now back in MyClass if i save myRow.
The adapter throws back with the error.... why?
well....for ID=1 the credit value shud have originally been 20 but it dosent find it..and hence it throws a concurrency error
to overcome this.....either send the entire row so that the row is update while objCalc does its changes ,OR: repopulate myRow for that ID so that you have the latest updated version of the row.
Eureka, it worked for me
Terrible exception.
Well what was happening is i had a datatable, and i was editing it.
At one of the points i update it, then I call in a different class's method, pass only the unique key of one of the rows and make certain claculations, change the row, and update it.
Now when I go back to my original table, and update it....it threw this error.
Lets take this example.
The table "myTable" has the following fields: ID,name,address,country,credit
where ID is the primary key.
lets take a row ID=1,name=Shashi,address=Brisbane,country=Australia,credit = 20
i have 2 classes MyClass and MyCalcClass
MyClass is instantiated and it acquires a row from myTable lets call it myRow
now i instantiate an instance of MyCalcClass called objCalc and send it myRow.ID.
now objCalc changes the value of credit (lets say multiplies by 10) to 200 from 20 and saves it.
now back in MyClass if i save myRow.
The adapter throws back with the error.... why?
well....for ID=1 the credit value shud have originally been 20 but it dosent find it..and hence it throws a concurrency error
to overcome this.....either send the entire row so that the row is update while objCalc does its changes ,OR: repopulate myRow for that ID so that you have the latest updated version of the row.
Eureka, it worked for me
Subscribe to:
Posts (Atom)
