Click here to Skip to main content
12,078,795 members (55,729 online)

Comments by Keith Barrow (Top 200 by date)

Keith Barrow yesterday View
Fixed, thanks!
Keith Barrow yesterday View
First, you need to know the type of FirstClass and SecondClass - they must be of the same type of have a common super-type in their inheritance chain. Both will be of type object, but you should avoid that if possible.
Second you need to figure out the best collection type for what you are doing- generally List<int> works in *roughly* the same way as int[]. List isn't necessarily the correct solution.
Keith Barrow 4-Dec-15 7:01am View
I'm with Manas_Kumar on this - without knowing what idcontrol is, and therefore mycontrol, it's pretty hard to tell what is going wrong.
Keith Barrow 16-Mar-15 6:39am View
Voted as abuse. With that attitude I'm sure you'd have no trouble finding a top flight job in the housekeeping or food service industry.
You're question isn't clear - it isn't about how OG "feels".
What is clear is your code isn't functional - even as someone with minimal c++ experience it's pretty clear it won't work.
Keith Barrow 3-Sep-14 7:52am View
Reason for my vote of 1 \n Doesn't explain anything. Just a couple of screen shots and some not particularly well structured code.
Worse, the app itself isn't brilliant: most hex to text editors display the hex values as paired numbers - without the "-" separator. Worse, things like the hex values for cr-lf are not hexified, so line breaks appear - defeating some of the point & making it less readable.
Keith Barrow 8-Aug-14 6:10am View
So you are asking us if there is a way to access the Internet you are already using?
Keith Barrow 6-Aug-14 4:47am View
I've had a good night's sleep, so I can better answer your question.
On your summary point 1 - this was my answer to your question about circular dependency, it doesn't matter whether it calls an API or the DB - the solution is to abstract the code calling code into a separate assembly. Better separation of concerns to do this anyhow - the OM shouldn't be concerned with how it is stored generally.

Fundamentally you have a problem with a long lived process blocking your main thread - the solution is to spin this process off to another thread - you are effectively doing this with your WCF call. You can do this internally within app, but you'd also want to make the thread call asynchronous so the main thread isn't hanging around waiting for the "PostToChina" thread to complete. The problem with this is that, as you have a web app, the main thread will respond and spin down before the posting is complete. This is why I suggested the queue - the message gets enqueued somewhere off the ASP.NET stack.
It's hard to give a one-size fits all answer, without knowing the detail of your app, but fundamentally you need to take the call taking the 2-3 mins off the "main" thread and call it in such a way that it is fire-and-forget. This will probably involve an intermediary - such as your WCF service or a message queue as there is a danger of the main thread being destroyed by the ASP.NET framework after response.
Keith Barrow 31-Jul-14 4:41am View
This is future you speaking - good answer!
You've become quite the rep wh*re BTW....
Keith Barrow 22-Jul-14 9:42am View
There doesn't seem to be a problem here - you create the partials and declare the view model type in the markup, should just work.
Are you trying to create display/edit templates?
Keith Barrow 30-Jun-14 8:11am View
Hi - I have updated your question for you with the correct code tags. It'll help you get a quicker answer in the future if you do this yourself as people won't take the time to read stuff that is hard to read.
Keith Barrow 2-Jun-14 11:41am View
Hi - is there any reason you want to do this? At some level you are either going to need a library - or write your own (which is going to be hard at a guess). has an example, but it uses an MS library.
Keith Barrow 28-May-14 6:53am View
What type of application is this - Winforms/WPF/ASP.NET/ASP.NET MVC/Other?
We need this information as the methods are different depending on the answer to this question.
Keith Barrow 16-May-14 8:38am View
I'm 99.9% certain that's not what you meant to post :)
Keith Barrow 16-May-14 8:35am View
Hi, can you update the *question* with what you want to happen please as this isn't clear to me - the maximised and minimised screens should be different sizes.
Keith Barrow 16-May-14 8:14am View
Hi I have added formatting tags to your question. This makes reading your question easier, especially the code. This will make it more likely someone will responds as people tend not to read a question that is difficult to read (or too long for that matter), it is in your own interests for you to do this next time.
Keith Barrow 16-May-14 8:00am View
My vote of 1: You are either writing the software, or you aren't. This is a site for people who write software, please read the "how to ask a question" guidance, if you show no evidence of having tried to code this yourself (e.g. code/ a description of what you have searched for) you are unlikely to get help. Additionally, a leave management system is a big thing, off the shelf solutions are unlikely to do what your client has asked for, so any help you do get is unlikely to be useful. My suggestion is you delete this question, or edit it to show what you have done<br>
Off Topic: I've removed your e-mail address from the question, You will get a lot of spam if you do this.
Keith Barrow 13-May-14 12:24pm View
Are you sure the characters went in to the DB with the correct encoding? If not you might have problems. Additionally, the machine you are viewing on needs to support the characters, and the text transferred with the correct encoding (e.g. in an HTML page).
Keith Barrow 13-May-14 11:08am View
Good answer. He might also need to add a name attribute to: <label id='2' name='2'> to support some versions of IE.
Keith Barrow 13-May-14 6:46am View
Please post some code - showing what you have already. It will make it easier for others to help you.
Keith Barrow 13-May-14 5:34am View
Got my 5!
Keith Barrow 2-Apr-14 6:46am View
Not really - SQL doesn't have an array list. At a stretch an individual row is like an object instance, columns like properties of the object type and the whole table acts as a list. Additionally, a table is a store, properly written it is the only store for this information.

Can you clarify where you want to "store" the "array list" and what you want to do with the information - normally working on SQL you query against the table directly unless the table is *very* large
Keith Barrow 2-Apr-14 6:26am View
Can you update your question please, as it stands it doesn't make a lot of sense I think the terminology is confused or (more likely) you've missed some important information.
The select will return [probably] several columns and however many rows in your database, this is how SQL works, so an array list doesn't make sense in this context. Are you executing the SQL from code (e.g. .net/Java) - if so which?
Certainly for .net I wouldn't use an array list as the collection type - I doubt it is still the best choice in Java.
Keith Barrow 28-Mar-14 9:00am View
My vote of 1:
Please read the site guidance on how to ask a question. You haven't provided *any* code - in this case the view and the controller method would be helpful. There are a few possible solutions but without knowing exactly what is wrong no-one is going to really be able top help.

On a related issue - it is considered bad form top mark your question as ASAP - it is only urgent to you.

Please update your question
Keith Barrow 28-Mar-14 6:09am View
Keith Barrow 27-Mar-14 10:06am View
I suggest you post the code you have so far. Also you don't say whether you are having problems doing this on the client side or server side (assuming you want both).
Keith Barrow 25-Mar-14 5:35am View
It sounds more like you have a specific problem, or you want to do things in a certain way - the discussion on Stack Overflow are common ways to have the results in HTML. Can you update your question with more e.g. what you want (converting the xml report into html covers a lot of bases) or what you have tried and what isn't working - as I say the technologies described here work for a lot of people.
Keith Barrow 24-Mar-14 9:02am View
Hi, can you clarify whether you want non-English characters (e.g. Arabic in your case I guess) or special characters (such as + , ? etc) please.
Keith Barrow 5-Nov-13 8:02am View
You've not stated what the problem is. As it stands we have the following information: You are hosting and MVC4 app on IIS7 and you have some sort of problem, possibly an angry user. Please read the section provided about asking a question, you've provided almost no information useful to getting help.
Keith Barrow 5-Oct-13 4:01am View
I've added to my answer. the tldr; version is that you should look at the stack trace to find the recursion in the non-MS code, if that fails then it's educated guesswork....
Keith Barrow 5-Oct-13 3:28am View
Now you come to mention it, I think you are right: Any methods called in the loop would pop off again (unless it called itself recursively). Possibly it could happen if calling in parallel? I'm really not sure what happens to the stack in parallelism, I'd expect there to be problems with the threading first. Might give it a check out!
Keith Barrow 2-Oct-13 7:53am View
That was as interesting as it was informative.
Keith Barrow 2-Oct-13 4:34am View
No, I really don't have the code for this. If I did, I'd be asking you who you are writing this software for and getting in touch so they could pay me instead. It is obvious you haven't read or understood what I have said: Functionally decompose your system, start writing it yourself and if you then hit problems first google, then ask for help. Implicit in this is that you need to do it yourself.

You have a solution. You have *the* solution.
Keith Barrow 30-Sep-13 5:52am View
Can you clarify what you need? It looks like you want to convert text into a bitmap. If so it might be worth stating whether you need to be able to choose colours and/or fonts.
Keith Barrow 30-Aug-13 12:08pm View
My Vote of 1: Do your own exam questions.
Keith Barrow 19-Aug-13 10:28am View
Can you post the code you call these methods from?
Keith Barrow 16-Aug-13 9:05am View
Can you ensure the headers are sent from the server? I'd suggest downloading "Fiddler2" ( to see what is being passed down the wire.
Keith Barrow 15-Aug-13 9:05am View
Hi, I've updated my solution. Hopefully this is what you need.
Keith Barrow 15-Aug-13 5:14am View
You are going to be better off asking this in the discussion forum at the bottom of the article. Could be one of any number of things. It's also probably worth mentioning which OS you are using, the article is 5+ years old and things have moved on since then.
Keith Barrow 14-Aug-13 9:44am View
My vote of 1: This is extremely Googlable information. Google "c# max string length" and there are 1.6 million results
Keith Barrow 14-Aug-13 8:29am View
Hi, I've improved your question ("Improve question" in green under and to the right of your question). This information is relevant. You should do this (so everyone can see) and reply in the comments that you've updated the question.
Keith Barrow 14-Aug-13 8:18am View
You might want to re-phrase your question so it contains a question. Currently this sound more like a statement of something you have achieved.
Keith Barrow 14-Aug-13 8:17am View
Only one I can see, and that's yours...
Keith Barrow 26-Jul-13 8:29am View
Could be firewall, but the first thing I'd do is download fiddler ( and inspect the message being sent from the client to the server to ensure the expected message is being sent up. I'd also make sure the fields in jsonText2 / the Http request match those on the service. If you can, get a debugger onto the target service (host locally and amend the JavaScript as necessary) ans find out what is arriving there.
Keith Barrow 26-Jul-13 8:24am View
Ahhh. I'll delete my answer then, I realy thought webserver B was calling webserver A directly.
Keith Barrow 26-Jul-13 8:06am View
It'd be worth updating your question (use the green "Improve question" link to describe what it is the current query does (or post the query if it is not too long).

One thing to *try* to improve performance that sprung to mind immediately was to maintain latitude and longitude fields against zip codes. You can then calculate maximum & minimum longitudes and latitudes for the original codes (i.e. to form a "square"), then query ZIP codes in that square into a temp table. This is less computationally expensive than getting all ZIP code's distances from the start point, then deciding if < 50km. You can then run the query you have on the square results temp table (to get those in the radius) on a much smaller subset of ZIP codes.

I'm not sure how ZIP codes are organised (we have our own system in the UK) but there might be systematic things you can do to filter out candidates for example getting ZIP codes that border first, and traversing "borderers of borderers" until you get no results.

The other thing that I don't know if you need to handle is that ZIP codes aren't points (in the UK Post Codes represent streets, more or less) so I don't know whether you need to take into account the physical area of the code.
Keith Barrow 26-Jul-13 5:34am View
Why are you using JQuery and how are you executing it on your web sever? Or are you executing it from the client?
Keith Barrow 24-Jul-13 8:03am View
I removed my earlier comments, from your post it looked like you were suggesting a threaded timer to handle the log-out. When I looked at the link it doesn't do that, so apologies.
One thing I would say about this method is that it conflates the idea of session with the idea of authenication, these are not the same thing. The OP may have a circumstance where this doesn't matter, but then they may not. Personally I'd avoid coupling these two things together, I certainly see situations where I'd want session to end to release resources but the user to be logged in. See for some helpful-ish discussion
Keith Barrow 24-Jul-13 7:53am View
Sorry, this makes no sense. What is working properly? Did you mean to reply to one of my comments? If so reply to that, rather than posting a new, context-less, answer. Even if it you mean my comment to *your* solution, it doesn't stop it from being a verbatim copy of kshkrao3's answer (excluding the link he provided).
Keith Barrow 24-Jul-13 5:36am View
This is not a good solution, assuming the application idle (20 mins by default) is shorter than the session timeout (30mins in the OP) one of the following could happen:
1. The App pool will be destroyed on idle, taking the timer thread with it, the user won't be logged out
2. The timer thread keeps the app pool live, so server resources are unnecessarily kept, which may slow performance
Assuming the application is idle long enough for the above to happen. I'm not sure which will take place without further digging, but one will.
As long as the security infrastructure is compliant (the providers I mentioned in my reply are), the session timout can be set in the web.config
Keith Barrow 24-Jul-13 5:31am View
I'm not entirely sure what will happen with this if the login timeout is longer than the application idle timeout. My guess (without doing further research) is the application will go idle and the timer thread will be ended, in which case the user won't be logged out. The other likely option is the timer thread keeps the application live, so resources aren't released, which may impact performance. In any case, if the security is properly implemented, you can configure a timeout in web.config.
Keith Barrow 24-Jul-13 5:25am View
This is an almost vebatim copy of kshrao3's answer, this is why I voted 1.
Keith Barrow 22-Jul-13 6:19am View
I'm not an expert on Oracle, but I do have a few, more general comments.

Firstly: It is a bad idea from a security point of view to store your passwords in either plain text or so they can be unencrypted. *If you can*, consider using a hashing algorithm where the original password cannot be retrieved but can be tested against. (Google "password hash" and you'll get a fuller explanation of what I mean.

Secondly: Even if the URL is secured on the wire using https, passing sensitive information still isn't a good idea (for starters servers normally log incoming request URLs including the password in your case) see for a better explaination.
Keith Barrow 19-Jul-13 8:55am View
They can still be stopped, you just need to be determined enough. Not only that, you should re-think your strategy: I wouldn't want "unstoppable" software on my machine, so I don't think those installing your work would be happy to do the same.
Keith Barrow 19-Jul-13 8:51am View
My Vote of 1: This isn't even a question. You can edit HTML in VS2012 directly like a text file. You can easily google HTML 5 Visual STudio 2012 and the top result is a video explaining this. Questions are answered on this site by volunteers, we don't want to spend time answering stuff that can be answered with a basic Internet search. See
Keith Barrow 19-Jul-13 8:47am View
Please read . As it stands, it looks like you have tried nothing (even if you have been working on the problem for days, this is what it looks like). You should break down your problem into manageable taskes and approach each of these in turn. Then, if you have a specific problem, post here and explain what you tried and how it isn't meeting your expectations. This way people will help.
Keith Barrow 12-Jul-13 5:06am View
Reason for my vote of 2 \n About to add a proper comment
Keith Barrow 24-Jun-13 5:33am View
My vote of 1.
IMO You have broken the guidance (to the left of the text box where you typed your question):
2. Be specific! Don't ask "I need to write a booking application". Specify exactly what it is you need help with.
3. Keep the subject brief but descriptive. eg "How do I change the dialog colour?"
5. Tag your question appropriately.
7. If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums. (possibly)

By far my main reason for this vote is point number 2. It *appears* you are basically asking for a solution you can copy and modify, not only that what you have is so specific you aren't likely to get what you are after. You also seem to be focusing on the technologies you want to use, not what technologies you should be using to achieve your goals. It is almost as if this is a homework or possibly job-interview assignment and you don't want to develop this yourself.

If you want to learn these technologies then by far the best thing you can do is to implement a simple app, building up layer by layer.
Keith Barrow 24-Jun-13 4:36am View
I've written precisely one Android app, not much more complicated than hello world so I really can't help you further. The best thing is to ask Android specific forums.
Keith Barrow 21-Jun-13 8:49am View
Why did you answer your own question with another question?
See Richard's answer. I've given general advice, break the problem down into small enough units to get started and Google as needed. If you then have specific problems, by all means ask here. If someone asks for a sample solution, most people infer that you are going to copy this to avoid doing work, even if that is not your intention. It is extremely unlikely you will get a sample as this is a non-trivial project which few people will have worked on.
Keith Barrow 19-Jun-13 16:39pm View
Hi, I've left a comment on Mohammed Mitwalli's answer, it applies here, normally I'd retype, but I'm on my mobile.
Keith Barrow 19-Jun-13 16:32pm View
Hi, I've yet to see a back button properly disabled across all browsers and versions. Not only that, I'd say it is "bad manners" to try to disable GUI functionality from a website.. Furthermore, I've seen a few sites where disabling the back button just tries to hide poor security. The answer is to disable the cache on secured pages, if the user presses back this forces a re-load, and if the security is properly written, the user will be re-directed to login or wherever. This does nit interference with the browser itself.
Keith Barrow 18-Jun-13 8:59am View
This *seems* needlessly complicated on first look. Can you update your question (Click the green "Improve question" link)? Please let us know what you want to achieve (rather than what you are doing) and anything oddities and such that might make the problem more complicated.
Keith Barrow 17-Jun-13 8:20am View has a searchable library of regexs, with descriptions of how they operate (including limitations etc) as well as ratings. Searching for e-Mail produces 8 pages of results at 20 results per page. About 20 of these have a 5-star rating. You can just peform a basic check on the client side and a full code-based check on the server if you get desperate...
Keith Barrow 14-Jun-13 8:22am View
I wish I could upvote this.
Keith Barrow 7-Jun-13 5:04am View
If the start button isn't hidden btnStart.Visible = true; is working, you need to change true to false. .Visible is a property on all forms controls. I suggest you create a new application, drop a label and a button on to it and practise showing/hiding the label if the button is clicked. You can use the following, assuming your label is called lblFoo:

lblFoo.Visibile = !lblFoo.Visible //Swaps the visible state of lblFoo

If you are having problems, it is often a good idea to take a step back and use a simpler construct until you get the hang of what is happening.
Keith Barrow 6-Jun-13 9:24am View
It won't be very relaxing for the person who would need to maintain your proposed code. OriginalGriff knows what your code is for, but the code you have given isn't the best (or even a reasonable) solution - he gave his reasons and I agree with him. I really dislike contradicting answers given, but yours is just plain wrong.
Keith Barrow 6-Jun-13 9:02am View
Is the start button hidden?
Keith Barrow 6-Jun-13 8:42am View
You need to put an if statement in the Event handler, a ***hack** answer is:

But you should find a solution that is cleaner, by either keeping track of whether the state is running separately, or doing this on the object you are running the long=lived process on.
Keith Barrow 6-Jun-13 7:59am View
HI, I've updated my answer.
Keith Barrow 28-May-13 8:40am View
Please update your question with this information (and the other reply you made). Can you also specify whether you are using or winforms or WPF etc in your question please.
Keith Barrow 28-May-13 8:36am View
You might also want to specify which technologies you are using, the solution would be different for ASP.NET and WPF and even framework version numbers.
Keith Barrow 24-May-13 10:29am View
The short answer to your question is yes. The web api app is just an app, and the WCF clients are just a bunch of objects. From your existing question, it looks like the settings connecting out to the WCF aren't in the web.config properly. Can you provide more info (especially the error message) please?
Keith Barrow 1-May-13 9:39am View
Better ask the site owner. The classes in VB and C# are the same, just the syntax differs so you should be able to follow what is happening.
Keith Barrow 1-May-13 9:38am View
Not really. You should be able to make pretty much anything rational fit.
Keith Barrow 1-May-13 8:43am View
Which matrimonial websites?
Keith Barrow 1-May-13 8:09am View
You can extend the provider base classes to fully implement you own functionality (including custom SQL) video here:
Keith Barrow 1-May-13 6:35am View
This. I've never needed to know the difference between those two. Might matter in other languages (hard to see how), but in c# never.
Keith Barrow 1-May-13 6:15am View
Can you add the stacktrace to your question? You don't normally get this error with sql commands, it could be something in the transport layer that the connection sits on, or be some other semaphore timing out.
Keith Barrow 1-May-13 6:09am View
My vote of 1: Please read the guidance about asking a question. Your question is very broad, how do you want to use googe api with MVC4? What have you tried - the fact you ask for source code is normally indicative of nothing? My guess is you haven't even tried Googling (protip, Google has lots of answers), which you should before you post here, we're all unpaid volunteers (barring a very few staffers who answer questions from time to time).
Keith Barrow 30-Apr-13 16:29pm View
No Worries
Keith Barrow 30-Apr-13 16:00pm View
Its all a question of balance I suppose. I was watching a web-api course last night (my sum experience with it), and he claimed blocking the thread like this was a bad plan. Not sure if the threading model is different, or I misunderstood :/
Keith Barrow 30-Apr-13 15:24pm View
From what I can determine from your code, you are writing a speech-synthesised voice to file. At the very least the file write is relatively long lived and will block the return until it has done its work. For a web API this isn't good as it blocks server resources.
Keith Barrow 30-Apr-13 15:07pm View
The Dispose isn't the problem it works OK with a StreamWriter. Your code inside the using block is blocking the return operation (which was my first thought and asking about the using block). Something inside the using block is taking too much time. The best thing to do is to put a breakpoint on ss.Rate= 2; and step through each step to see what is taking the time. More than likely the using block this should be done on a separate thread/asynchonously anyway.
Keith Barrow 30-Apr-13 14:56pm View
Can't check this right now, but I *think* you are getting an error with ss.Dispose(); which is redundant.
The using block disposes the object for you.
Keith Barrow 30-Apr-13 14:49pm View
Got to check the easy stuff first! I assume it works if the using block is commented?
Keith Barrow 30-Apr-13 14:44pm View
Have you examined the response in Fiddler or a similar tool?
Keith Barrow 29-Apr-13 10:58am View
I've no certifications in .net, never had any complaints nor any problem finding work. You might want to find out what prospective employers are looking for, or decide what you are interested in.
Keith Barrow 29-Apr-13 7:46am View
Should have been able to work that one out. Monday mornings bah!
Matej Hlatky's reply basically contains everything I was going to say....
Keith Barrow 29-Apr-13 6:01am View
Can you let us know which line is throwing the error?
Also "Select template from usertbl where username='" + registration.txtusername.Text + "'" is bad. You might want to look up "SQL Injection attack." for the reasons why. Parameterise your query and all will be well.
Keith Barrow 28-Apr-13 13:49pm View
My Vote of 1: Not a question. This sort of thing is easily googled if you want an opern source one. If this an University/College assignment you should be writing this yourself
Keith Barrow 26-Apr-13 10:58am View
Plenty of examples on Google.
Keith Barrow 26-Apr-13 9:41am View
Hi, Not an answer more a piece of advice. Use the built in provider model if you can, it isn't as simple as just re-directing and a lot can go wrong. It is also fantastically easy to introduce security flaws. I've been a dev for years and I wouldn't risk it without expert advice or a well establised framework. The provider model will also save you a lot of work (it even has a DB Schema built-in) and doesn't need to be re-rolled each time you start a project.

There is an excellent set of tutorials at
Keith Barrow 26-Apr-13 6:51am View
As Manfred said, this is not a solution please delete it. People will assume you have answered your own questions.
You can update your original question, but what you have added doesn't make much sense either I'm afraid.
Keith Barrow 26-Apr-13 4:46am View
Can you re-write your question please? I can't understand it.
Keith Barrow 24-Apr-13 12:24pm View
Keith Barrow 24-Apr-13 8:14am View
You might want to actually ask a question, please read the site guidance about this. I will delete this as you will continue to garner 1-votes.
Keith Barrow 23-Apr-13 12:31pm View
I'm with Sergey on this, if you think putting the text into resources is too much effort, you should try not doing that. Then you'll have the effort of replacing MS's work AND creating something equivalent to the resx files.
Resx files are the way to go.
Keith Barrow 23-Apr-13 9:17am View
Why without resource files? They will make the task *much* easier.
Keith Barrow 5-Apr-13 6:12am View
Just compiled it on my machine, it should work. I'd try a clean and re-built as Nicholas Marty suggests (or even restart VS - this has fixed things for me in the past).
Despite my deleted reply, both the property and the nested class have the same visibility (public) so you shouldn't be getting this error.
Keith Barrow 5-Apr-13 5:48am View
That will cause problems to anything that relies upon INotifyPropertyChanged, but won't cause the bug described
Keith Barrow 4-Apr-13 8:08am View
No problem
Keith Barrow 28-Mar-13 8:49am View
As the PhantomUpvoted said, please re-tag your question this is a UML question, not a ASP.NET/c# one (even if the site is an asp one). I also suggest you look at the site guidance about asking a question, no one is going to do this work for you, they aren't getting paid. I will delete this question also.
Keith Barrow 28-Mar-13 8:46am View
My vote of 1: Not helpful, instead of trying to be clever it would be better to explain to the user what he is doing wrong.
Keith Barrow 28-Mar-13 8:44am View
I'm going to delete this question, you have already asked it. If I leave it up people will downvote you.
Keith Barrow 21-Mar-13 10:40am View
I don't see what the problem is. If you have Telerik-specific problems then the Telerik forums are more likely to help.
If they require the license and your company has it then you need to get in touch with the person in your company and get the key to get help. If your company doesn't have a license (even a trial one) and you are trying to use the controls then you are committing an act of software piracy. They aren't going to help you if you try and pirate their software.
Keith Barrow 15-Mar-13 7:30am View
I'm going to delete this. Please don't repost.
Keith Barrow 13-Mar-13 10:23am View
Can't answer that for you, depends what you want to do.
Keith Barrow 13-Mar-13 9:34am View
No problem.
Keith Barrow 13-Mar-13 8:12am View
Hi, please see my solution. You shouldn't need any code at all - the .net framework has a built-in tooling to handle this stuff.
Keith Barrow 13-Mar-13 7:56am View
Seeing as you never instantiate A or B, none.
Keith Barrow 11-Mar-13 9:27am View
I really can't help much more, as I said I've not done this sort of thing before.
See Original Griff's reply. Th activeX solution only works in IE, and even then only if activeX is turned on. Personally, I think what you are doing has a "bad smell" about it (i.e. why would you want to list these port in a website, it feels like there is probably something wrong with the design if you are trying to do this) and is probably more suited to a full desktop application
Keith Barrow 11-Mar-13 9:13am View
It will: the code is running on the server so it gets the ports on the server. You will need to investigate how to do this on the client side. I Googled "Javascript list serial ports" and got several promising results (this isn't something I've ever had to do- and why I haven't added an answer). It looks like JavaScript won't do this out of the box (a good thing in my view, it seems a bit of a security risk), but there is activeX that seems to do what you want.
It seems a pretty unusual thing to want to do however.
Keith Barrow 8-Mar-13 10:35am View
No worries.
Keith Barrow 19-Feb-13 12:10pm View
I think it still is this way. Just because standards have dropped, doesn't mean the requirements or programming have got easier. I'm appalled at the level of some of the questions. Even so I interviewed someone who was on the same course as me. As part of the dev test we asked him to parse a text file and count the number of each instance of a word. The code produced didn't make sense or even have a hope of compiling. He copied and pasted various bits of code for each logical part of the task (we checked the browser history, he copied all of the code). He couldn't integrate it all. He finished uni 5 years earlier (he didn't graduate) and was working as a senior dev at a Building Society.
Keith Barrow 8-Feb-13 4:28am View
Int is also a good way to go, that is what we do where I work.
Keith Barrow 7-Feb-13 15:04pm View
I am indeed, born & bred. I almost went to Northumbria Uni (hasn't been a Poly since my undergrad days in the mid 90s) to read my MSc, but the course at Newcastle suited my needs better as it had less emphasis on DB work. Glad to be of help!
Keith Barrow 7-Feb-13 12:04pm View
Please edit your question. A "browse button" makes no sense, by itself it won't do anything even if it did. A "sth" makes even less sense. Please explain what you are trying to do.
Keith Barrow 7-Feb-13 6:27am View
What have you tried? Please post the code and/or explain what you are having problems with.
Keith Barrow 5-Feb-13 7:00am View
Your activities on this site (answering anything you can find with links to your site) have been spotted & reported.
Keith Barrow 5-Feb-13 6:55am View
This isn't relevant, *database* normalization isn't the same as a normalization *factor* (and there are other types of normalization). The link you provide is far from useful as a description: it only goes up to 3rd normal form and doesn't even describe those fully, despite these things being well defined elsewhere.
Oh wait- you are plugging your own stuff. If you are going to do this, you should at least make it look as if you understand what is happening.
Keith Barrow 11-Jan-13 15:06pm View
If you take a look at my answer, you'll see what they mean.
Keith Barrow 11-Jan-13 10:02am View
You have to do extra configuration work on the server to force the client to do this. Just remove the config that does this. Unless I've missed something of course.
Keith Barrow 7-Jan-13 8:35am View
Why do you think this is a good idea? You must have reasons. Personally I'd have thought updating one database from the other directly through SQL would have been quickest, next quickest would be an app that connects to two databases, pretty much the slowest way to do this would be via a web service such as WCF, even on named pipes. I'm also unsure why you need to do this row by row, this will be slower than updating many records at once.

It might be better to explain what you are trying to do, and what constraints you have (e.g. the DBs can't communicate directly).
Keith Barrow 4-Jan-13 4:48am View
Not sure why you got down-voted, I countered this.
Keith Barrow 3-Jan-13 9:22am View
My vote of 1:
a) Don't mark your question as urgent, the only person it is urgent to is you and possibly your boss/supervisor. We are all volunteers.
b) Asking for code isn't going to win support.
c) You've asked a very general question, even if someone were prepared to write you code for you they'd need to know the table schema, sql requirements etc
d) The question you've asked is easily googled, try googling "android database example"
Keith Barrow 3-Jan-13 9:13am View
On topic: Crystal reports can be made to do this. I've not used them like this, but generating bitmaps seem more likely to encounter maintainability problems. Crystal Reports isn't available in later version of the framework and isn't so future-proof, so you might consider MS Reporting services (which is available for in to SQL server 2000 onwards) which is equivalent-ish to Crystal Reports.
If you are using a non-web app, there are other options available too.
Keith Barrow 3-Jan-13 9:06am View
Off topic: I removed the formatting from your question, it was making it harder to read. More importantly, I removed your e-mail address from the question. *Never* put your e-mail onto an open forum like this. There are dedicated robots that scan web-pages for e-mail addresses, which are then sent tonnes of spam.
Keith Barrow 28-Dec-12 4:42am View
What sort of help do you need? Have you tried Google?
Keith Barrow 24-Dec-12 7:59am View
Hi, I suggest you create a new question for this, more people will see it so you'll be more likely to get an answer.
Keith Barrow 23-Dec-12 16:03pm View
No problem.
Keith Barrow 21-Dec-12 17:41pm View
Apologies, I totally misread your question. Richard's answer answers the question you actually asked.
Keith Barrow 21-Dec-12 12:30pm View
Performance is pretty hard to optimise without the code, please can you add it?
Given the what you have described, it shouldn't be taking that long, but without the code it is hard to tell. Despite common belief, EF performs fairly well, but you need to know what you are doing, like all technologies I suppose.
The first thing I'd check is that you aren't creating a DataContext for every update, this would slow things down immediately.
Keith Barrow 21-Dec-12 9:51am View
You've missed the link...
Keith Barrow 21-Dec-12 9:04am View
You've already decided on a technology. I'd use a database as well, and probably the Entity Framework.
As for a tutorial, you'd have to google it.
Keith Barrow 21-Dec-12 9:03am View
Library catalogue systems make me dewey-eyed.
Keith Barrow 21-Dec-12 5:57am View
We are not here to do your project for you, we are all volunteers. Making comments like this will *reduce* your chance of getting any answer.
The correct answer is to study your problem and break it down into manageable smaller tasks. In your case you are going to need to work out a database structure to store you data, which mechanism you are going to use to get info in/out and then how you are going to allow the user interact with the database (and eachother). This should be within the reach of a university student.
Your university may allow you to include other people's code to do this, if so there are plenty of frameworks out there to achieve what you want.
Keith Barrow 20-Dec-12 7:01am View
As Sk Tajbir suggests, the relevant bit of the HTML would help.

As and aside, there is also a slide toggle you might find useful
Keith Barrow 20-Dec-12 6:58am View
I'm going to delete your question. It isn't at all clear, coding a bee colony doesn't make *any* sense. If you want to model a bee colony, just asking for code isn't going to get you anywhere here, please read the guidance about asking questions.
Keith Barrow 4-Dec-12 4:50am View
I doubt, given that Albert actually gave you the root of the problem, and your subsequent attitude, that many people are going to be willing to help you. This is your homework, not ours.
Keith Barrow 19-Nov-12 6:18am View
My Vote of 1: Please read the Site FAQs about asking for code. Please be specific about what it is you are having problems with, or if you are having problems getting started, state this. We are overwhelmingly unpaid volunteers here, and are not here to supply you with fully-formed code.
Keith Barrow 14-Nov-12 10:38am View
This doesn't answer your question (this is why I haven't added a solution), but you can make significant improvements to the checking algorithm:
1. Instead of iterating over all numbers and rejecting if divisible by 2, only iterate over the odd ones (and add two to it in each loop). This halves the number of numbewrs you check.
2. Keep a list of primes you have found. You should check that the prime is not evenly divisible by numbers in this primes list, rather than looping though all divisors. This is related to the sieve of Eratosthenes if you want to Google it. You semi-implemented the first part of this with (a % 2 == 0 || a % 3 == 0 || a % 5 == 0 || a % 7 == 0)!
3. You only need to check divisors from the prime numbers list up to the square root of the number you are checking, e.g. if you are checking to see if 9 is prime, you only need to perform division checks using the primes up to 3.

These will significantly improve the performance of app. Also it will clean up the check_prime method, which has a few things wrong with it.
Keith Barrow 14-Nov-12 9:12am View
That's quite a cough you've developed there Richard.
Keith Barrow 14-Nov-12 9:11am View
Sorry, which tracking system? You don't seem to have asked a question, just described the un-named tracking system. Can you please clarify the question?
Keith Barrow 13-Nov-12 5:57am View
How? If I knew that, I'd set up a Plagarism-checking website :).
Keith Barrow 13-Nov-12 5:01am View
IMO you should try and find a simpler problem if this is a University project. Sites like Turnitin will have teams of specialised developers running complex algorithms, and they still won't be 100% accurate. I *really* dislike discouraging developers like this, but it is important to screen the problems first to see if your goals feasible . In my view, a plagarism checker is going to be too hard. Even my suggestions is only the very tip of the iceberg, it only brings down the scale of the challenge, whilst increasing the probability of losing plagiarised articles in the process.
Keith Barrow 12-Nov-12 14:12pm View
If you read my text, I'm basically telling him brute force is effectively impossible, and anything else he is likely to acheive inaccurate results. At no point did I say this was going to produce reliable result. I expect a lone dev, however talented l, is unlikely solve this poblem.
Keith Barrow 9-Nov-12 7:03am View
You can stop replying to your own pre-prepared questions now. It's been noticed and reported. I'm going to delete all that I find. If you persist, I suspect your account will be banned.
Keith Barrow 6-Nov-12 6:00am View
I'm deleting this. We don't provide exam papers here.
Keith Barrow 2-Nov-12 9:57am View
Glad to be of help!
Keith Barrow 2-Nov-12 9:56am View
The this keyword code is just a suggestion, which is why I added it second, it will perform faster as long as you are acting on the control being passed.

As for the masterpage, this is only partially relevant to the client ID (if I understand what you mean) as it might still be different even if there is not a master page in user.
for an explanation of how the client side ID is built up, and the options you to select how the server id becomes the client id.
Keith Barrow 2-Nov-12 5:22am View
Hi, I've updated my answer.
Keith Barrow 1-Nov-12 13:16pm View
Hi, I've edited your question and put you code in it, with formatting. That way everyone looking at the question will see it and the formatting makes it more readable.
What I'd do in this situation is to edit the original question (as I have done) and reply to the comment saying I've done this.
Keith Barrow 1-Nov-12 9:23am View
I'm going to delete this question.
Please read the site guidance about asking a question. We don't do other people's work here, we are all volunteers.
Keith Barrow 1-Nov-12 9:15am View
I'm going to delete this question: you are going to get a lot of down-votes for it otherwise. Read the instructions about how to ask a question.
We won't do your work for you here, we aren't getting paid for it, nor are you paying for it. Oh and saying the code is urgent isn't going to help your case: it is only urgent to you and your boss/lecturer.
Keith Barrow 26-Oct-12 12:00pm View
The query string comes in via the URL, it is stored in the Request.Url
Request.Url is used to copy the URL of the current page into the Uri.Builder object, this includes the query string part.
Because the Open ID wants the shortest form of the web's URL, the query string needs to be stripped, line 3 of your code sample does this.

The rest you'll have to work out for yourself.
Keith Barrow 26-Oct-12 10:16am View
By clearing the query string I mean this in your code { Query = "" };

The Query string taken from the incoming URL, it follows a ? at the end of the address of the page in the URL, See
Keith Barrow 26-Oct-12 9:45am View
Hi, I've updated my answer. You need to remove the query string for the open ID request, see my answer for the reasons.
Keith Barrow 25-Oct-12 11:09am View
Sorry but that is just plain rude.
Keith Barrow 25-Oct-12 10:25am View
ldc.i4.s 10 --> Pushes the *constant* (ldc = LoaD Constant? :/) value 10 onto the stack. The constant value is taken from the IL code itself, this line is where the value actually goes from the IL into the executing program itself.
I hope this helps!
Keith Barrow 25-Oct-12 8:19am View
Please read the site guidance about how to ask a question. Just asking for code isn't going to get you anywhere: we are all volunteers and asking code *looks* very like getting us to do your job/coursework *even if* you've spent hours on the problem.
Please let us know what you have tried (with code where appropiate), what is failing, or what you don't understand so we can help you better.
Keith Barrow 25-Oct-12 8:16am View
do you want to covert the number into a new format e.g. 3.13 to 3 - 14. If so you can use digitsOnly.Replace(".", " - ")
Keith Barrow 25-Oct-12 7:07am View
Hi, I added code tags to your code: it makes it much more readable, and will improve the likelihood of your getting an answer.
Keith Barrow 24-Oct-12 5:35am View
Can you add the code-behind please, the ASP doesn't really tell us what is happening before render.
Keith Barrow 21-Oct-12 5:17am View
Without seeing the rest of your code, it is hard to say. My guess is that whoever wrote this code wants to copy all the information from the request url, but needs to strip the query part out for some reason. This was probably done for a reason, so my guess is that the assignment is needed. The best thing to do is for you to trace through the code yourself and see what effect removing the assignment has
Keith Barrow 19-Oct-12 11:05am View
No, I really can't. There isn't an ideal solution, it totally depends on what you need. It's a bit like saying which vehicle should I choose, a Land Rover, a Ferrari or a Minibus without specifying how many people you are going to carry, whether you are going off-road or just want to blast round a track.
Keith Barrow 19-Oct-12 10:55am View
I suggest you ask this in the one of the forums, this is a topic for discussion rather than a quick answer as much depends on you needs rather than a blanket answer.
Keith Barrow 19-Oct-12 10:46am View
No, I don't understand it either. Unless there is something subtle and c++y going on (I'm a c# dev with a little c++ experience about 10 years ago) I doubt the code above is well written. Might be worth trawling through the code and seeing where it is used to see what it is intended for.
Keith Barrow 5-Oct-12 7:25am View
Is there any reason you are not binding controls - this is much easier and one of the great benefits of WPF over win-forms.
Keith Barrow 20-Sep-12 8:03am View
Please read the guidance about asking a question. This might be urgent to you, but not to anyone else here. Also, the question as posted seems to imply that you just want a solution given to you, there is no evidence of any effort on you part.
Keith Barrow 20-Sep-12 7:59am View
That's a bit unfair: this is far more likely to be a homework question.
Keith Barrow 7-Sep-12 17:16pm View
I'm going to delete this, the Code Project is not your personal storage. I suggest you try Dropbox, or one of the excellent alternatives.
Keith Barrow 16-Aug-12 8:15am View
Please update you question with either:
1. The compile time error message you are getting
2. The runtime error message you are getting
3. The information you are putting in, your expected results and your actual results.

People aren't likely to help unless you give this information as we don't know what the error is.
Keith Barrow 16-Aug-12 8:13am View
I'm going to delete this: it has been duplicated somehow.
Keith Barrow 16-Aug-12 8:06am View
1. Please format you code, I have done this for you so you can see what I mean
2. You are going to have to be more specific: saying "its not working" isn't likely to get you an answer. Please be more specific: it you are getting a compile or runtime error, please say what it is. If the maths isn't working out, please tell us what you put in to test and what you expect to get out.
Keith Barrow 10-Aug-12 6:44am View
It's an an anagram of "in to mar mure" which is what griefers do when they destroy curtain walls of people's castles.
Other than that, anyone's guess.
Keith Barrow 1-Aug-12 5:07am View
I'm going to delete this: Put the question into google and you'll get many answers, including stuff you can just download and use.
Please read the guidance on how to ask a question, it specifically states that you should not just ask for source code.
Keith Barrow 1-Aug-12 5:03am View
Please give the code you are using, otherwise we are working blind. Also, you don't ask a question, is this what you want to do or what you have done?
Keith Barrow 4-Jul-12 8:29am View
Are you the original poster, your name/account is different but you seem to know about the problem? Categorised or not, a web application is unsuitable for timed jobs such as these. You can get it to work but the solution is harder, less maintainable and makes less sense than either the a Windows service, or a scheduled console app.
Keith Barrow 29-May-12 9:26am View
Well, the original question in the interview was bad. The most optimal sort depends on a few factors otherwise we'd all know and use the one "optimised" algorithm. Factors include how well ordered the list is, the size of the list in relation to the memory you have to play with. You may have even more esoteric requirements, like needing to know how long a sort is going to take for a real time system for example.
The standard answer when there are no given requirements is Quicksort, it is generally considered fastest *on average*.
My comment was prompted by the fact that bubblesort is never the most optimised, it can always be replaced by a cocktail sort which is faster on average than bubble sort, especially if the algorithm keeps track of where the last swap happened reducing the number of comparisons needed. It does this without requiring more memory, but is still slow compared to quicksort.
You should look up "Sorting Alogrithm" in wikipedia, it's very instructive
Keith Barrow 28-May-12 10:39am View
A bubble sort is never the most optimised solution to sort, even allowing for the fact that optimisation depends on the type of data you start off with.
Keith Barrow 28-May-12 10:33am View
I wish I could 5 this comment!
Keith Barrow 28-May-12 8:56am View
Guids are Fixed length. They are this long to make it massively unlikely that two will be the same, reducing the length reduces their effectiveness.
Can you explain what it is you are trying to acheive (rather than what it is you are doing), sending a guid to the user is probably wrong especially if (I assume) you want to make it shorter and easier for them to read.
Keith Barrow 28-May-12 8:23am View
Well that doesn't make any sense, you said "Note I make my date timepicker as custom control" so you must at least have the code for your date timepicker.
As for your functionality, I think it will be unsuable (though it isn't exactly clear what you want), lets say a user types 2011, how are you going to tell if they mean the year, or [accidently] type 20 (a day), and then correct it to 11. It's technically possible, but I doubt it will be usuable.
Please can you clarify your question, and let us know what you have done so far. Just asking for something without showing effort on your part isn't going to get you very far.
Keith Barrow 28-May-12 7:44am View
The error would be useful.
Keith Barrow 28-May-12 7:41am View
Here is the first help you need: Read the guidance about how to ask a question, its under the button you used to submit. Item 2 is the one you are having trouble with here: "Be specific! Don't ask "I need to write a booking application". Specify exactly what it is you need help with. "
Please let us know what it is specifically you are having problems with.
Keith Barrow 28-May-12 7:41am View
Here is the first help you need: Read the guidance about how to ask a question, its under the button you used to submit. Item 2 is the one you are having trouble with here: "Be specific! Don't ask "I need to write a booking application". Specify exactly what it is you need help with. "
Please let us know what it is specifically you are having problems with.
Keith Barrow 28-May-12 7:41am View
Here is the first help you need: Read the guidance about how to ask a question, its under the button you used to submit. Item 2 is the one you are having trouble with here: "Be specific! Don't ask "I need to write a booking application". Specify exactly what it is you need help with. "
Please let us know what it is specifically you are having problems with.
Keith Barrow 27-May-12 10:06am View
Just a thought: have you made sure the response is correctly encoded, the conversion could be happening there.
Keith Barrow 27-May-12 9:38am View
So it's a question for a job interview?
Keith Barrow 27-May-12 9:26am View
You could create a macro or a project template to do part of the work, but you'd still need to supply the macro/template with a database to generate from first. It is this last point that takes up most of the time.
Why do you need to automate this so heavily- it might help me understand your problem better.
Keith Barrow 24-May-12 8:42am View
I dunno, Aesceal asking himself if he has a friend he can grab and work through scenarios with has a certain surreal charm about it :)
Keith Barrow 15-May-12 8:42am View
I've already answered there a few times, and you replied LOL!
Keith Barrow 7-May-12 5:21am View
Why is the UpdatePanel Necessary - do you need to post back information to prepare the html file? From your description is seems like you can just use a link, as suggested by Dhanamanikandan. Please can you clarify
Keith Barrow 7-May-12 3:50am View
"mouse event handle by windows and always response to screen"
Actually, this isn't strictly true, but you need to go down to the OS level rather than the application level.

All interaction with the GUI works by queuing messages through the Windows Message Queue.As long as you have the address pointer to the thing you want to interact with and the message code, you can interact with it. This works even if the target is hidden. If you think about it this is logical: otherwise Windows would not be able to un-minimise a minimised window.

Please look at my answers, they give the instructions to do this. I tested this code on Windows 7, but have used the method in the 1st answer under XP.

I have not voted on your answer BTW
Keith Barrow 6-May-12 14:13pm View
I'm going to delete this: please do not repost it is bad manners on a site such as this.
Keith Barrow 6-May-12 8:39am View
This is a really broad question, a full reply would be huge. If you can't ask something a bit more specific I suggest you do some research. Google is a good place to start.
Keith Barrow 6-May-12 8:37am View
Is IE9 running in Quirks Mode?
Keith Barrow 6-May-12 8:36am View
Have you tried googling SaaS? There is tons there. It is also a worry that you have decided on the archtecture first, rather than letting the requirements drive this (unless of course the whole point it to learn Sofware As A Service).
Keith Barrow 2-May-12 8:08am View
What do you mean by you didn't get the master page exactly?
Is the page giving an error?

Is the page unstyled (i.e. you get a login page but it is not formatted)? If this is the case you are getting the masterpage, but the stylesheet is probably not being downloaded as it is in the secured area of the site.
Keith Barrow 1-May-12 9:07am View
Not really a question. UK cheque numbers can't be validated: they are sequential, with the account number and a code to identify the branch. You'll need to find out what constitutes a valid check number for the durisdiction you are writing the system for.

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