|
Yes it can be done!
But you need to expand / explain your problem, what you have tried or even show code detailing where its going wrong and detailing as much as you can and include errors where possible.
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
ok thanks.
actually i didn't build yet therefore i can't provide code.
i want to build. i am trying to build 20 employees duty and want to see their roster in gridcontrol.
all employees section wise or id wise should display left side of the grid date range should display on columns headings and employees duty timinges should appear in cells all these should be from access database table.
|
|
|
|
|
Okay, so when you've built some of it, feel free to pop back with any questions on the code you've written - we'll be glad to help you fix things.
|
|
|
|
|
hi guys . i have asked my qustion in algorithm section but no one have respond me . i'll appriciate for any help .
my qustion is that , i have made a bfs solver class that solve the puzzle 8 with bfs algorithm .
what im doing its like this .
1 - node class >> contain some info
2- bfs solver class
2-1 : Qeue Neede .
2-2 : enqeue the first node (initial state) << its parent .
2-3 : check if its the Goal Or not (if its not go to next )
2-4 : find the empty tile and see if you can exchange any tile with it .
2-5 : any change w'll make a child node . of that parent
2-6 : deqeue the parent node.
2-6 : check if the child node of the parent is in the qeue (if is not then enqeue the child node and put a parent label on it). jump to the (2-3)
is that algorithm working well , i have test it and it really work fine , the problem its here that it dosnt work if i played too much with the tile and chaneged them around . it works fine in small problem like {1,2,3,5,4,6,0,7,8} or sth like this .
and it gave me an error stackoverflow in big problems like {8,0,4,2,3,1,6,7,5} i dont know what should i do to prevent this error but i just know that my codes work fine .
im writing my code with c#.net . using a node class and bfs solver class.
i can put some parts of my code if you neede to see what im doing .
i'll appriciate any help .
|
|
|
|
|
You are talking about the brute force search, aren't you?
mohammadkaab wrote: it gave me an error stackoverflow in big problems like {8,0,4,2,3,1,6,7,5}
It's implemented recursivly?!
You have to test, wether a state has already been calculated or not, otherwise you get an infinite loop and a stackoverflow!
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
ofcourse im doing this , i'll check if the current node it has been in the qeue or not , if its in the qeue then i'll ignore and go to the next part .
but a fellow in the algorithm section give me a soluation that i cant find out what that supose to mean .
fellow in algorithm section said :
The problem is that breadth-first search (bfs) tries ALL sequences of length N before it tries any of length N+1. And it stores all these intermediate attempts, resulting in your stack overflow for a deep solution.
An approach more specific to the problem would give better results, e.g.
for (int tile = 0; tile <= 8; ++tile)
placeTileInCorrectPosition (tile, board);
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
i dont know what does that mean .
|
|
|
|
|
mohammadkaab wrote: breadth-first search
Ahh! Breadth-First Search!
Yes, that is... no solution. Because in every turn it increases exponential. The only way is another algorithm:
depth-first search or (even better) A* search<
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
mohammadkaab wrote: i have asked my qustion in algorithm section but no one have respond me
The forums are international. You have to have patience - the person who can answer your question may be asleep or at work. As we don't get paid for helping out, we get to answering questions when we can.
Second point - I found your question difficult to read, not because English isn't your first language, but because you don't use capitals. Please, at the start of a sentence, use some capitals.
|
|
|
|
|
Hi
I have a situation where we have an application that we have written and a third party application. Basically when a change happens in the 3rd party SQL database, we want to make changes to our own SQL database.
What would be the best way to achieve this? Obviously a combination of SQL triggers/stored procedures could achieve this, but was wondering if there was another alternative?
Thanks
|
|
|
|
|
UCLAdam wrote: Obviously a combination of SQL triggers/stored procedures could achieve this, but was wondering if there was another alternative?
There are other ways, but to use triggers/stored procedures is the best.
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
Thanks ihoecken. I thought that might be the case. Out of interest what are the other ways?
|
|
|
|
|
UCLAdam wrote: Out of interest what are the other ways?
Well depending on the situation.
- Replication - if just data has to be transfered
- adding a "sync" column in the tables, but then the 3rd-party solution has to clear it when it changes or add a column - otherwise triggers would be needed
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
It really depends on what changes you want to make, and when you want to make those changes. You could do this with triggers, but that would mean modifying the 3rd party database, and you could have issues if you change the schema of the 3rd party database (say during an update). Also, some 3rd parties will have warranty/support clauses that would be invalidated by you altering their schema - we do, for instance, because of a particularly troublesome client who broke the database and then expected us to bail them out at our expense.
If you are just looking to replicate the data, and the change doesn't need to be instantaneous, you could use something like the Sync Framework[^] to accomplish this.
BTW - this isn't a C# question. It belongs in the database forum.
|
|
|
|
|
Thanks Pete. Unfortunately the changes do need to be instantaneous and we need to manipulate the data before putting it into our database. Luckily we are able/allowed to change the 3rd party DB schema, but obviously have to bear updates in mind like you say.
Apologies for posting in wrong forum, you're completely right. May be I was subconsciously hoping for a C# solution!
|
|
|
|
|
Then triggers are your best choice - don't forget to take into account the fact that the database you are trying to copy into might be down, so your solution will have to cope with this.
|
|
|
|
|
If the change involves transformation of data, you might use a combination of Triggers and Procedures, otherwise Replication[^] will be the right choice.
modified 26-Sep-12 10:26am.
|
|
|
|
|
With Visual Studio 2012, setup projects will no more be available.
Setups have aways been a pita with Visual Studio, but after a first glance, WiX feels even more painful. InstallShield LE is said to not support Windows Services...
What will you do then - use free WiX, or buy a commercial tool (which one)?
|
|
|
|
|
Well...this article[^] provide a point of view to why setup was removed.
I guess WIX is the future (as per the author of the blog).
|
|
|
|
|
|
Thanks for the link. I've just added this to the Free Tools forum here on Code Project. My 5.
|
|
|
|
|
|
Looks interesting. I'll give it a try.
|
|
|
|
|
I've been very happy with Advanced Installer[^]. I use the free version for my freeware apps.
/ravi
|
|
|
|
|
That's a good tool. We need Custom Actions, and additionally the Dialog Editor - consequently, it costs just a thousand dollars per developer ("Enterprise" version)...
At least, I could create such an advanced install project within a few hours, quite easily.
|
|
|
|
|
how to find a menu item name by passing menu text in a mdi form ?
|
|
|
|