|
amrreko wrote: please i need the complation of 4 queen only by my code for my doctor
Is your Doctor a psychiatrist?
amrreko wrote: we start
We sure do, as an ova then the sperm initiates mitosis...etc.
amrreko wrote: desgin from
Alexander McQueen perhaps?
amrreko wrote: node class
YEah, gotta learn about them nodes, I attended one once, I am expert nodologist!
amrreko wrote: bfs class
BFS Class? Well, I suppose if you want to be a British Fertility Society, it would help if you learnt about that Ova/Spern thing.
amrreko wrote: to top expirt
You are going to murder an Ex Pirt? Kill a current Pirt instead!
amrreko wrote: please try to find by this method in simple code
I tried, but there aren't enough letters in the clue.
amrreko wrote: by use my class and add to classes the miss code
Well, if your young female teacher finds you being bad, she will add to her class, that is her code.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
This is for your doctorate? You can't string 2 coherent words together: how on earth do you expect to understand the answer if no one can begin to guess at what the question might be? One from me as well.
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|
|
I think you'll find this[^] link more than useful.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Brilliant: I was going to say something along those lines but thought it just a smidge too much like good advice.
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|
|
What does "complation" mean?
Is it really for your PhD dissertation?
|
|
|
|
|
I've been playing guess the question for a while now. I think he wants an implementation of the n-Queens problem.
So far, I've got:
the complation = the compilation = code[s]
only by my code = courswork
for my doctor = to be handed into the Doctor lecturing his course = urgent.
please try to find by this method in simple code = Help
In summary:
Help,
I have coursework. Urgent Send codes plz.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
Soooooo 5-ed.
//L
|
|
|
|
|
|
code sent please i give up to try
that in main topic i added code
|
|
|
|
|
You have reposted instead of adding to the original thread.
I suggest you google for the breadth-first algorithm for this problem, if that is the one you want. Then work out how to implement it in C#. This is a well known problem, there is plenty of material on the Internet.
In your first post you didn't give any code, let us know what is wrong or ask what you needed. You need to do all of this before you'll get a reasonable answer. The other thing is, people here won't do your homework / employed work for you, but it looks like you are asking for this, even if that is not what you meant.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
I thought it meant "completion" -- gimme the whole thing.
|
|
|
|
|
I didn't find any question here.
Looks like you posted your test paper answers for your friends.
|
|
|
|
|
i will explain simply
make a program to solve 4 queen problem that by using two classes
Bfs class that contains breadth first search
and Node class contains Best node to choose
take that my work in section
http://www.mediafire.com/?zkzhlenykj3[^]
picture explain
http://www.mediafire.com/?txky0xkdngq[^]
class Node
{
public bool[,] state { set; get; }
public Node parent { set; get; }
public List<Node> childs { get; set; }
public int level { get; set; }
public int Hfunction()
{
int res=0;
return res;
}
public void generate_child()
{
for (int i = 0; i < 4; i++)
{
bool[,] newstate = (bool[,])this.state.Clone();
Node child = new Node();
childs.Add(child);
child.parent = this;
child.level = this.level + 1;
newstate[child.level, i] = true;
child.state = newstate;
}
}
public bool visited { get; set; }
public Node GetBestChild()
{
int Min = int.MaxValue;
int min_index = -1;
Node BestChild = null;
for (int i = 0; i < 4;i++ )
{
int CurrentValue = this.childs[i].Hfunction();
if (CurrentValue < Min && this.childs[i].visited == false)
{
BestChild = this.childs[min_index];
BestChild.visited = true;
Min = CurrentValue;
min_index = i;
}
}
return BestChild;
}
}
class BFS
{
public Node BfsProcess(Node root)
{
Node soultion = null;
if (root.Hfunction() == 4)
{
return root;
}
else {
root.generate_child();
Node bestchild =null;
while ((bestchild = root.GetBestChild()) != null)
{
soultion = BfsProcess(bestchild);
}
return soultion;
}
}
}
you can find nice solve but must use bfs
i find smart project like http://www.mediafire.com/?txky0xkdngq[^]
but i need to do simple project 4x4 board
|
|
|
|
|
I have a server class that should be able to dynamically load classes that implement IServerExtension from a dll. Our current concept works and looks like this:
Project [ServerExtensionInterface]
interface IServer { /*several important methods that do server stuff*/ }
interface IServerExtension { Init(IServer srv); /*init will be called from the server after creating an instance*/ }
Project [Server]: Reference to [ServerExtensionInterface]
class Server : IServer
{
/*Implements the curious Methods of IServer*/
List<iserverextension> Extensions = new List<iserverextension>
void LoadExtFromDll(string filename) { /*open dll assembly, create class instance and call newext.Init(this);*/ }
}
Project [TestExtension]: Reference to [ServerExtensionInterface]
class TestExtension : IServerExtension
{
IServer Server;
TestExtension() { /*make some extension-internal setup stuff*/ }
Init(IServer srv) { this.Server = srv; /*some additional stuff for communicating with the server*/ }
/* some other things that do cool stuff */
}
---
This all does work well, however, there are these two things that bug me a bit:
Server.ExtensionList ---[reference]--> Extension
Extension.Server ---[reference]--> Server
I'm not sure if this bi-directional association is any good. It could end up in infinite loops or something.
Also, when compiling, the output is as follows:
Server Project: Server.exe, ServerExtensionInterface.dll
TestExt Project: TestExtension.dll, ServerExtensionInterface.dll
The identical interface dll file. I don't like having that additional dll. It is created because the ServerInterfaceExtension project that is referenced to, needs to be compiled to have the IServer and IServerExtension types available in the extensions and the server. Since it is a independent project after all, these types compile into their own dll.
It is not an option to entirely remove the ServerExtensionInterface project and supply the actual Server and Extension projects directly with the files that define the interface. This will lead to type incompatibility. The IServer and IServerExtension in Server.exe may be different from those in TestExtension.dll, thus methods (such as Init(IServer srv) can not be invoked.
Question:
I'd like to know whether there is a general misconception in my interface ideas or something, maybe someone has experience with such things?
|
|
|
|
|
Hi all,
I am using
<input id = "files" type = "file" runat = "server"/>
for a user to upload a file, this file will have contents similar to:
Morgan,Freeman,morgan@domain.co.za,0743700187,1987/12/31
Morgan,Obama,obama@statehouse.com,0743720187,2010/12/31
I then want to separate these fields accordingly and assign them... like,
first.Text = "Morgan";
last.Text = "Freeman";
email.Text = "morgan@domain.co.za";
these values should be retrieved from the file remember,
Does anyone know how I can do this or approach to take.
Please help
Thanks,
Morg
|
|
|
|
|
|
Thanks man that was so helpful
|
|
|
|
|
Try this:
string[] lines = File.ReadAllLines(path);
foreach (string s in lines)
{
string[] fragments = s.Split(',');
...
}
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
Hi OG,
Thanks alot,
you code works quiet ok but I have another issue, look at my code below:
HttpPostedFile myFile = files.PostedFile;
string strFilename = Path.GetFileName(myFile.FileName);
string[] lines = File.ReadAllLines(strFilename);
foreach (string s in lines)
{
string[] fragments = s.Split(',');
errors.Text = fragments[0];
errors.Visible = true;
}
remember the contents of my file look like:
Kiss,Simwaba,morgan@domain.co.za,0743720187,1987/12/31
Person,Simwaba,morgan@domain.co.za,0743720187,1987/12/31
what happens is that when i pick
errors.Text = fragments[0]; it
returns "Person" which is the first index[0] in the second line.
I don't quiet know why it ignores the first line....
Please help me in case am making a mistake somewhere.
Morg
|
|
|
|
|
Hi,
I am working .net 3.5 version.
I am developing windows application.
I need to add reference the mscorlib dll from the microsoft reference ,
but i cannot able to do that instead of i got this error as follows,
"A reference to 'mscorlib' could not be added' this component is automatically added by the project system and cannot be referenced directly".
So how to resolve this problem..
Can u please explain me...
Thanks & regards,
kannak......
kannak
|
|
|
|
|
sekannak wrote: I need to add reference the mscorlib dll
why is that??
I never felt a need to add it, as it is always present. It is the core of .NET (you could check with Reflector).
|
|
|
|
|
sekannak wrote: instead of i got this error as follows,
"A reference to 'mscorlib' could not be added' this component is automatically added by the project system and cannot be referenced directly".
Just like the error says, it's self explanatory.
Besides, why do you want to reference it? tell me exactly what you want
to do with thi dll,
Morg
|
|
|
|
|
Well huh? If it is not present, that means you explicitly checked that one checkbox in the advanced build settings that says "Do not reference mscorlib.dll" - just uncheck that
|
|
|
|
|
|
That function is not provided by .NET.
But even if it were, mscorlib.dll is referenced already unless you checked said checkbox.
(and btw, it's not like I'd give you any help after you were so nice as to give me a 1-vote)
|
|
|
|
|