Click here to Skip to main content
11,921,898 members (67,735 online)

Comments by Ciumac Sergiu (Top 44 by date)

Ciumac Sergiu 4-Dec-11 6:44am View
Thanks Dave.
Ciumac Sergiu 21-Oct-11 11:07am View
The only possible exception that I see in this code is the FileNotFound exception. Have you considered the fact that the FileName.exe is missing on some computers?
Ciumac Sergiu 13-Oct-11 17:40pm View
Have you tried running the application under Administrator privileges?
Ciumac Sergiu 13-Oct-11 6:31am View
Ciumac Sergiu 13-Oct-11 6:31am View
Ciumac Sergiu 7-Oct-11 3:13am View
My 5!
Ciumac Sergiu 26-Jun-11 23:49pm View
Good call, my 5!
Ciumac Sergiu 26-Jun-11 23:47pm View
That a very frequent question :) Anyway, my 5!
Ciumac Sergiu 17-Jun-11 11:30am View
Good question indeed.
Ciumac Sergiu 8-Jun-11 4:28am View
Its not
'if(ConnectionState.Open)' but rather
if(con.State == ConnectionState.Open){}
Ciumac Sergiu 8-Jun-11 4:23am View
Reading from database is expensive operation. You might try caching the most frequently read items on the application level.
Cache["key"] = "value";
Anyway you should act carefully with the cache as storing big data chunks in it is not a good idea.
Ciumac Sergiu 8-Jun-11 3:52am View
If the PostBackUrl is correct I see no problem of why it shouldn't work.
Ciumac Sergiu 7-Jun-11 13:19pm View
"So I'll have a while loop that also has a stack" - exactly, this is the classical way of simulating the recursion. Its not so fast in terms of speed of processing, but it's very reliable if the solution is scaled for big inputs.
Ciumac Sergiu 7-Jun-11 13:09pm View
Thanks, a small remark here: I've meant that the idea behind a long string is not related to memory consumption, but rather to the big number of sequential method calls that one needs to perform while calculating the longest sub-string (recursively it is an expensive operation). I'm mostly sure that in the written algorithm the number of method invocations is O(n*n) dependent upon the length of the string, thus once you select 2 big strings for analysis you get your stack overflowed. Its not that the stack is fulfilled because of the memory that a string occupies, but because of the # of method calls it requires to solve the problem.
Ciumac Sergiu 7-Jun-11 11:55am View
Succinct, and right.
Ciumac Sergiu 7-Jun-11 2:26am View
What have you tried to achieve? When did you get this error?
Ciumac Sergiu 6-Jun-11 16:29pm View
My 5, docking is the best approach.
Ciumac Sergiu 6-Jun-11 10:02am View
Try deleting the slash, and place backslash:
string path = Server.MapPath("~") + "Uploads\\Chrysanthemum_3.jpeg";
Ciumac Sergiu 6-Jun-11 10:00am View
Complete answer, my 5.
Ciumac Sergiu 6-Jun-11 9:28am View
Have you tried running the application under Administrative privileges?
Ciumac Sergiu 6-Jun-11 9:22am View
The solution is simple, try selecting that value from the database, if the result is null, it is absent, and otherwise.
Ciumac Sergiu 3-Jun-11 5:12am View
You would like to get the selected text, or copied text? If selected, then it wont be a simple task at all.
Ciumac Sergiu 29-Apr-11 15:38pm View
Yeap, it depends upon the requirements indeed. What I've meant, while talking about the implementation difficulty, is writing this behavior using raw sockets. I've been developing a similar app using only most primitive constructs, fulfilling packets with custom developed header/body data and parsing it on the server side according to similar rules (with no WCF/Remoting/RPC which does this thing behind the scenes). It wasn't that simple (a big number of nasty problems have been rising all over the place (string enconding, non-blocking sockets handling, protocol versioning, etc.).
Ciumac Sergiu 29-Apr-11 14:45pm View
Hi SAKryukov,
indeed I didn't go into much details as in the answer you provided, but speaking frankly I do have doubts that inversion of control in a client-server application is a good idea (moreover based on raw sockets, OP will have to implement his own communication protocol over TCP or UDP, in order to achieve this behavior, which is not a trivial task). But the thing that is really more important about this scenario is that, it breaks the concept of a client server app (for the sake of theory it can be done, but I doubt that the client will be happy in this kind of a web service that takes control of your machine :) ).
Ciumac Sergiu 29-Apr-11 14:26pm View
See the updated solution.
Ciumac Sergiu 29-Apr-11 14:24pm View
it's a snippet of code written in C#, so in Java it will be a Math.log(). The second parameter is the base of the logarithm (in C# you can explicitly specify the base). In Java you can use Math.log() that returns the natural logarithm (base e) of a double value, so it will be the same as Math.Log(min, Math.E /*E is the Euler's number */).
Ciumac Sergiu 29-Apr-11 10:57am View
There is no way of controlling the client from the server (it doesn't make sense), thus I've inferred the inverse relationship, which the OP was most probably thinking of.
Ciumac Sergiu 27-Apr-11 7:42am View
My 5!
Ciumac Sergiu 20-Apr-11 2:23am View
Have you tried (Checkbox)gr[1], instead of using FindControl?
Ciumac Sergiu 13-Apr-11 6:52am View
Indeed I've reread the msdn info about delegates, there is a small remark about this fact :) : "Delegates are immutable; once created, the invocation list of a delegate does not change". Useful information, thanks for sharing.
Ciumac Sergiu 13-Apr-11 5:35am View
Well, I haven't tested, but it should keep it's identity. My logic is simple - each delegate class derives from MulticastDelegate which has a hidden field '_invocationList'. As far as I know that field keeps track of all function pointers to be called. Once the Invoke() or BeginInvoke() method is called, the list is iterated and every delegate in the chain is invoked. Thus I do not see why the delegate should change it's referential identity once a new handler is added (as the List object doesn't change it's identity once a new item is added to it) :)
Ciumac Sergiu 13-Apr-11 2:37am View
Yes, indeed that's a possibility. But I do prefer standard ways of interaction (maybe because I'm a big fan of delegates :) ). Anyway my 5.
Ciumac Sergiu 12-Apr-11 4:48am View
Yes, I misunderstood you first, check my reviewed solution. Regards.
Ciumac Sergiu 12-Apr-11 4:23am View
My 5.
Ciumac Sergiu 12-Apr-11 3:25am View
Yeap :) I haven't see Abhinal solution (didn't refresh the page).
Ciumac Sergiu 9-Apr-11 6:47am View
Thank you DrNimnull, I've figured out the problem, it was a simple miss within the RelayCommand class. Please see my solution below.
Ciumac Sergiu 9-Apr-11 6:28am View
This logic is already implemented, the problem is that it doesn't work as described in the question.
Ciumac Sergiu 7-Apr-11 11:32am View
Hm, I was voted with 1 providing the right answer :)
Ciumac Sergiu 7-Apr-11 5:48am View
Process.Start will start Microsoft Word as a separate application. If you like to embed the Word app into your WPF you would rather want to consult P/Invoke topic proposed by Tarun.K.S.
Ciumac Sergiu 5-Apr-11 10:24am View
It's difficult to state what is the cause of the problem. Don't know whether it helps but I would take a look on the firewall setting for port 1001.
Ciumac Sergiu 5-Apr-11 9:53am View
dt.Rows[0]["FName"] - stands for the name of the file which should be Ok, as far as I understood the problem is within the data which is dt.Rows[0]["FData"].
Ciumac Sergiu 5-Apr-11 9:27am View
Yes, but that's a matter of decision. In an ideal case it would be:
systemNames.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select((item)=>item.ToLower(CultureInfo.InvariantCulture)).Contains(inputValue.ToLower().Trim());

Anyway the person who asked, should decide by himself what cases to handle.
Ciumac Sergiu 5-Apr-11 9:07am View
Wrong. Array.Contains() is not the same as string.Contains().
Ciumac Sergiu 5-Apr-11 8:38am View
The solution won't work if the originalInput is the last item in the systemNames, thus it will be looking for a value which has a "," at the end.

Advertise | Privacy | Mobile
Web02 | 2.8.151120.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid