|
Mark, glad you worked it out; if you feel charitable, you might post what happened here on on the DevXpress forum for their GridView, since it might help others using that Grid ? Assuming the performance issue had something to do with DevX's Grid, specifically.
best, Bill
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
Hi Bill,
There was no fault with the DevExpress grid (which truly is a stunning control and suite). It appears to have been some weird issue with the SQL Server Stored Proc Execution plan.
|
|
|
|
|
Hi eveybody
I want to convert given string to ıf statment
For Ex
string condition="(a>45 && b<34) || (c>14 && d>56)";
if(condition)
{
//to do smth
}
I try to write my own parser but ıt will be very diffucult because There are lots of conditions can be wrıtten lıke
string cond="a<45&&(b>=56 || c<45)";
strinf con="((a==50 & b>45)||c>56) && e<457";
so How can ı do this ?
Its to important for me please help me ...
|
|
|
|
|
Surely a parser has no trouble with that.
Anyway, since you're only parsing an expression, you could use something slightly simpler than a parser - the Shunting Yard algorithm.
|
|
|
|
|
Looks like lots of C# implementations of this algorithm are out there:[^]
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
That's no easy task.
Here's an article that deals with many if not all of your problems.
It should get you started.
All the best,
Dan
|
|
|
|
|
cacampa wrote: I try to write my own parser but ıt will be very diffucult because There are lots of conditions can be wrıtten
That will always be true for this type of problem.
cacampa wrote: so How can ı do this ?
Either write your own parser or use one of the free tools around. Try a Google search for "parser", "yacc" and "antlr", and you should find lots of useful resources.
cacampa wrote: Its to important for me please help me
Other than suggesting tools and search options there is not much else that we can do for you.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Another solution ... around for a long time ... assuming your working in C# ... is to reference and invoke the JScript library and its 'eval' facility: [^].
Note: I have not used this myself, and it might be "tricky."
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
|
Manfred, please fix the broken url.
|
|
|
|
|
Thanks for pointing that out! I'm quite disturbed by the troubles I'm having with inserting links via my tablet device.
Cheers!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
Hi,
through Dynamic in C# 4.0 you can achieve this, but you need to investigate it
here is the link i found to execute string in c#
hope this will resolve your problem
thanks
-amit
|
|
|
|
|
Hello ppl....
please i need a help.. i have a c# subject at my university,they give me a bonus marks to make a program (project).. i make some research in the net .. but it was difficult to choose a program to work in it.. and i want some ideas for a programs ..
tkx
|
|
|
|
|
Sounds like the perfect opportunity to make Skynet.
Somebody in an online forum wrote: INTJs never really joke. They make a point. The joke is just a gift wrapper.
|
|
|
|
|
I guess your not getting the bonus points.
No comment
|
|
|
|
|
Well, if there are no stipulations as to the nature or compexity of the project, perhaps Hello World[^]? Where do I queue to get my degree?
|
|
|
|
|
CodeProject badly needs a program to automatically reject bad subject lines. Maybe you could come up with something?
|
|
|
|
|
Luc Pattyn wrote: CodeProject badly needs a program to automatically reject bad subject lines. Could we append to that RFP: "accompanied by 'gimme' content" ?
best, Bill
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
When coming up with a topic like this, it generally helps if it's a subject area that interests you. That way you can keep your enthusiasm high which will help you when you run into areas where you feel stuck. Now we don't know you, so we aren't going to be much help there.
Failing that, write a program that converts gibberish text speak into real English.
|
|
|
|
|
Go here [^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
OP did not ask for code or a solution to homework, but was asking for ideas. Asking for ideas is not something that should be looked down upon (at least the way I see it).
Regards,
Manfred
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
Part of the homework assignment was to come up with the idea. If these guys aren't creative enough to even come up with their own ideas, what kind of programmer are they going to be when they graduate? How do they expect to analyze a problem, and document a solution? Development isn't just about writing code.
It doesn't have to be earth shattering, or the all-too-elusive "killer app". It's just a homework assignment. Hell, I've come up with several ideas in the last couple of years and have implemented all of them. CPAM took three weeks to develop from start to finish. Reputationator took three weeks to write (not including the article), and another two weeks for the WPF version). CamoPicker's basic implementation took all of two weeks from start to finish. I've got other examples that would be lost on you because there's no accompanying CP article.
I'm almost positive that he doesn't even have to actually finish the app. In fact, if he just showed some development cycle lifetime work and got MOST of the code implemented, he'd get full credit for it.
I stand by my "we don't do homework for people" post.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Hi,
The best way is to contribute in some opensource project. that will defiantly help you and others
thanks
-amit
|
|
|
|
|
(VS C# 2008 and C++ 2008)
I have a win32 c++ application with an entry point:
extern "C" int __declspec(dllexport) __stdcall ret_arr(float returnArray[])
{
float myArray[2];
myArray[0]=1.2;
myArray[1] = 2.4;
returnArray = myArray;
return 1;
}
I'm trying to get the array "returnArray[]" from C#:
[DllImport("MyDll.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "ret_arr")]
public static extern int ret_arr([MarshalAs(UnmanagedType.LPArray)] ref float[] retArray);
private void test()
{
float[] retArray = null;
int ans = ret_arr(ref retArray);
}
When I call my C# function - test() - in the debugger, "retArray" isn't being assigned (it remains null). Likewise, if I initialize the retArray (= new Float[2]) the array is not modified after it returns from the unmanaged dll.
I don't have any trouble retrieving a float. But working with float[] has me jammed-up. I have tried many variations including passing the argument as a pointer but I cannot, with my skillset, figure it out.
What should I try next?
|
|
|
|
|
Two comments apply here:
1.
your native code stinks. You are allocating an array on the stack, then returning its pointer. You should be aware whatever was on the stack is going to vanish as soon as the function terminates, so you should never do that, whatever the language is you are using.
2.
when you want to exchange large amounts of data between managed and unmanaged worlds, it is much much simpler to always have the memory allocated on the managed side: making the native world accept managed data is a lot easier than convincing the managed world it should accept native data. I did explain passing arrays in my little article here[^].
|
|
|
|