1
Answer

Statusstrip or Login Timeout in Visual Studio.

Emal Jan

Emal Jan

14y
4.1k
1
Can someone help me with one of these?
I working with a school project and im almost done. I need some help. When i Login to the database i should get the user name into a statusbar. Like: Ahmad is logged in as adminstrator or Ahmad is logged in as User somethiing like that. I actually use Visual Studio 2010.
Plz help :-)
Or
Give timeout for my database, like if there is no activity on database it should log off automatically after some minuts.
PS: My database is linked with MySQL.

Thanks!


Answers (1)
0
Sivaraman Dhamodaran
NA 61.8k 2.7m 12y
Well. You don't have any special char need in your spec.

Define a strings like:
"abcdefghijklmnopqrstuvwxyz0123456789".
"abcdefghijklmnopqrstuvwxyz"
" 0123456789"
Have a boolean flag for each.
Algo:
1) Iterate through each pwd char. Make sure the char falls in above string. When char not found, set the flag to false. When a char is lower case letter set the relevant flag to true. When a char is digit set flag related to digit as true. At the end of iteration you can check the flags to satisfy first three points.
2) For fourth point you need a inner loop that again iterates through all your chars. Here you can check the repeatable patterns.