|
Thanks Manas it works well.
|
|
|
|
|
Hi,
why are you starting a new thread? Your question today is what it was yesterday.
and did you make sure to use only one Random() generator as I told you then?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
He seems perfectly happy with the other reply that's not random in the slightest
|
|
|
|
|
Yeah, I wasn't absolutely sure his example was generated at random either.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I have decided to try to follow a dream of mine: Creating a chessprogram that can beat me (that should not be difficult).
I am lost before I have started, because basically I want to do a nice UI, where I can move pieces with the mouse.
I want to do everything my self and only one hints and links to ressources where I can learn.
My first question: How to make the board in the best way?
Thanks
Søren
|
|
|
|
|
nerosdk71 wrote: I want to do everything my self and only one hints and links to ressources where I can learn.
You can use WPF to create a nice UI for your dream program.
Try to google tutorials on WPF. In fact, you can also start with the available articles here at CP.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
|
Hi,
a chess program that plays a mediocre game and has any chance at ever beating someone is a major undertaking, my rough estimate would be some 25 thousand lines of code.
If you are rather new to programming, if you are rather new to the language you intend on using, or if your largest program sofar is smaller than some 5000 lines of code, I strongly recommend you to reconsider, and first do something less ambitious.
You might want to solve the 8-queens problem first: how to put 8 queens on a chess board in such a way they can;t capture each other. That one can easily be solved in 500 lines of code.
The next challenge should be a program that solves "mate in 2" problems; that one requires full impementation of the rules of chess, and already needs some attention to performance concerns.
When you have finished a sufficient number of such smaller tasks, you may or may not be ready to create a true chess game.
FYI: the GUI of a chess game is less than 1% of the effort; there are many available freely on the web.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi.
I need a help.
when i am trying to save system time in my database give error.
Error is not a valid month
I am Use Oracle database, I Create Table in My database like this
create table timemgmt (empid number,sysdte date,timein date,timeout date).
please tell me how i solve this problem?????
thanks in Advance
|
|
|
|
|
mjawadkhatri wrote: how i solve this problem?????
Ask it in the database forum[^].
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
With the limited information you provided I would guess that the date is saved in the wrong format. Hence the database thinks the day is the month and vica versa.
SQL-server has a format that always works: yyyyMMdd. Easy to convert it to that format with date.tostring("yyyyMMdd")
Don't know if it works for oracle or not. If not I'm sure there is a similar format for oracle.
On a side note: 'need help' isn't a very good subject, it says nothing about your question.
Better would have been: 'Error saving date into oracle db.'
|
|
|
|
|
ok ..
bt sir i just want to save time not date in timein and timeout feild in my data base.
|
|
|
|
|
help: google. keywords: oracle to_date
|
|
|
|
|
I'v never used oracle but I would think that as with sql you can provide parameters with your command.
Use those and they should format your date and time correctly, you also prevent sql-injections (read up on those)
This might also be off help:http://forums.asp.net/t/1316360.aspx[^]
|
|
|
|
|
Did you try to debug and see what are the values being inserted in the database.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
How do I search for text in PDF through C#.Net.
Is there any API for it?
Pls respond ASAP..
|
|
|
|
|
Chris has asked us to be play nice and not shout at stupid questions. So...
What have you tried so far?
I found a lot of pdf components for the .net framework by searching for read pdf .net in google.
The approach to search fro the string would be to extract the text from the pdf - through whichever component - and then search the text.
Ajay Dalvi wrote: Pls respond ASAP..
Asking 'ASAP' or 'Urgent' will not endear you to the general populus of the forum, you have been warned.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Nagy Vilmos wrote: Chris has asked us to be play nice and not shout at stupid questions. So...
I know, sometimes they try to test your patience.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Nagy Vilmos wrote: Chris has asked us to be play nice and ...
you're willing to try...
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
try this[^]
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
1. When I make a Setup of a project today (i.e.,14 July, 2009), how to lock that setup such it should not work ofter some days(consider after 20days, i.e., 3 August, 2009).
How can make this?
2. If the setup is installed on a PC today, it also should not show its effect after 3rd August, 2009, eventhough it is not uninstaled?
How can lock the setup according to date or no.of days?
|
|
|
|
|
You can write the installation date in a persistent place (registry, file, database etc.) during the installation. You should be able to do this a Custom Action[^]
Every time your application starts check this date and do a validation.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi,
Using GDI32 dill i'm trying to build a form with curve, it works fine, as i've mentioned FormBorderStyle as NONE it is appearing entire screen and hides system task bar. How to avoid this?
<br />
<br />
Screen screen = Screen.PrimaryScreen;<br />
<br />
Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, screen.WorkingArea.Width - 60, screen.WorkingArea.Height - 60, 20, 20));<br />
<br />
|
|
|
|
|
What in particular do you want to avoid?
'appearing entire screen' or 'hides system task bar' ?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
Is this correct?
I am not sure why I get unknown username or bad password.
Note that the login and password I enter are both correct.
Is there something wrong with the way I am setting the username and password?
Thanks
private void CheckLogin()
{
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "cscript.exe";
process.StartInfo.Arguments = strScriptPath;
process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UserName = "myusername";
System.Security.SecureString strPassword = ReadPassword("password");
}
public static System.Security.SecureString ReadPassword(string password)
{
System.Security.SecureString secPass = new System.Security.SecureString();
for (int i = 0; i < password.Length; i++)
secPass.AppendChar(password[i]);
return secPass;
}
|
|
|
|