|
It is like an automatic generation for an activation code.
Maybe my description as a password was some how wronge
|
|
|
|
|
use math.random to create a nuber between 0 and 61
use a switch statement for 0 to 25, 26 to 51, 52 to 61
convert the numbers to letters or numbers using system.convert.tochar(int) and these values ^
loop to create a pwd of required length
HTH
Russ
|
|
|
|
|
Create a char array with all the 'allowed characters'
Call up a random number between 0 and the length of that array for the amount of characters the password should contain.
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
|
I think the biggest problem a lot of password generating programs have is that they don't guarantee a strong password. While choosing random characters from a set of predifined values might get you very diversive password, it doesn't mean it always will. So despite using long password, you could still end up with weak ones like 'ifdhgkfsd'. There should be some code to check, if teh generated password meets some special requirements, and possibly do some adjustments. A good example for this is the built-in membership provider for ASP.NET 2.0, which requires you to have at least one non-alphanumerical character in your password. Then again it's not a generator tool, it just checks a given password. I don't mean to stay you need these precautions in every case, however I do mean you should find (or possible write) code that allows usage of similiar features. For example:
public string GetPassword(int length, int minUppercaseLetterCount, int minNumberCount, int minNonAlphanumericalCount)
{
//your code here
}
Obviously, for simple passwords you would use it like GetPassword(5, 0, 0, 0). And if you ever need strong passwords you can still reuse this function.
I think this smells like an article . Someone should write it. Or maybe I will .
|
|
|
|
|
it smells like an article but you should add to it some code
szukuro wrote: I think the biggest problem a lot of password generating programs have is that they don't guarantee a strong password.
i thought about this problem. SO i took the function that GUFFA provided and i am trying to implement it in a way to force it to generate some strong password with at least 2 digits in it.
|
|
|
|
|
Obviously by writing an article I also meant writing the code, since the article itself would be pretty much the code itself, with some explanation .
|
|
|
|
|
when i run my program (login as standard user on vista) it gives access denied on a process( created from System.Diagnostics.Process).But when i logged in as administrator) it get access.
How can i grant permission on process.Please suggest me...
|
|
|
|
|
Hello everyone,
Anyone knows how to insert a chart in a windows form??
Many thanks
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
You have two options
1 - buy/download a charting control
2 - write the code to draw a chart
Once you have your chart, on a bitmap, you can either draw it in your paint event, or use a picture box
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thank you Graus, please tell me where I can find a free download.
Many thanks
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
hi,
i have a problem with datagridview sort methode.
i doono whether i can sort datagridview by 2 Columns. there's example
username--------actionType--------filename
user1-----------download----------picture1.tiff
----------------upload------------picture2.jpg
----------------upload------------picture3.tiff
user3-----------download----------file1.txt
----------------download----------file2.txt
admin1----------upload -----------config.cfg
----------------download----------db1.mdb
so there i wanna sort the table by 'filename' and 'username', i mean the order of username Column should not change but the order of 'filename' and the association of 'username' and 'filename' should not change neither.
just like the effect in slq 'order by username, filename'
has anyone a idea?
regards
faye
-- modified at 4:54 Monday 15th January, 2007
|
|
|
|
|
Use a BindingSource to bind your table to the DataGridView, then use the BindingSource's Sort property to specify the columns and directions to sort. E.g.:
bindingSource.Sort = "username, filename";
You can also specify the direction of the sort, e.g.:
bindingSource.Sort = "username ASC, filename DESC";
|
|
|
|
|
Hello!
I just learned concepts of OOP and I want some problems to work ... and the answers of the problems to correct me about the results.Know anyone where I can find some kind of problems. The answer is not really necessary.
Thanks
-- modified at 4:15 Monday 15th January, 2007
|
|
|
|
|
a good reference will be YourTeacher.com
|
|
|
|
|
I saw this site ... but is with math.
I need Object Oriented Programming problems
|
|
|
|
|
mihksoft wrote: Know anyone where I can find some kind of problems
You came to the right place.
On these forums you'll find some of the weirdest, rarest, and most funniest programming problems you'll ever meet in your life. Many are high level, but still many are from beginners. Just wait till a question is posted, then try t o think of an answer. Make a dummy project to try out your solutions. When someone does answer and it works compare your solution to his. After sometime you'll know the guys who provide what is usually a "Best Practice" answers from the guys who just screw up thing like me. Stick to them, they will help a lot.
BTW:
If you think your answer is quite good enough why not posting it if no one did? Maybe you'd get sarcasm in the beginning, but don't let that depress you. You'll get a grasp on it soon.
Regards
|
|
|
|
|
How can I open a windows service when the service starts.
I tried to open it, it's opened but the controls don't appear and then immediately it becomes "not responding".(Interactive with desktop is checked)
|
|
|
|
|
You can't just double click on the service's exe file for it to run. Either use he Services applet from the Administrative tools, or in your code use the ServiceController class.
Regards
|
|
|
|
|
Dear All,
I am using XFS API to send commands to ATMs. For example If I want to get the information of Receipt Printer, I am calling the following function..
public class XFS
{
[DllImport(@"msxfs.dll")]
public static extern int WFSGetInfo(ushort SPIHandle, uint Category, IntPtr QueryDetails, uint TimeOut, ref IntPtr result);
}
I want to know that what value of SPIHandle I have to pass.
|
|
|
|
|
you should call WFSOPEN at first
hi,everybody
|
|
|
|
|
i need code for :
to write into embedded xml file of assembly
HELP EACH OTHER TO GROW TOGETHER.
|
|
|
|
|
Can anyone help.
I am writing a graphics intensive app and I need to know more about Regions, Clipping regions and all that pertain to the sublject.
I have Chands book Graphics Programming with GDI+ but he doesn't go into Regions as in depth as I need or I'm just not understanding.
Anyway could anyone point me in the right direction??
Thanks for your help.
If you keep doin what ya been doin you'll keep gettin what ya been gettin
|
|
|
|
|
Really need help guys!! Am just a newby in .Net programming, i am using visual studio 2005 and studying C# programming language. I am building a utility software that would need to be opened by clicking or double-clicking the file built by my application using its own file extensions, much like zip files in windows explorer loading on WinZip etc... Really need help... Please anyone..Sample C# 2005 codes would be very much appreciated. Thank you!!!
.............
|
|
|
|
|
[STAThread]<br />
static void Main(string[] args) {<br />
<br />
Application.EnableVisualStyles();<br />
Application.SetCompatibleTextRenderingDefault(false);<br />
if(args == null || args.Length == 0)<br />
Application.Run(new Form1());<br />
else<br />
Application.Run(new Form1(args[0]));<br />
}
args is the parameter list. if you open app through file the first parameter is the file name.. then you can do whatever you want with it..
life is study!!!
|
|
|
|