Click here to Skip to main content
14,978,671 members

Comments by Ed Nutting (Top 200 by date)

Ed Nutting 21-Oct-13 16:54pm View
Compile or run? Or both? I can do both if you like :p You're right, I don't know you, but I have an impression of you. If you don't like the impression I have got, you should consider the way you present yourself, not the way that I respond. In practical terms, you ought to flesh out your question more and perhaps even comment your code. Anyway, I hope your problem is solved.

Ed Nutting 21-Oct-13 13:46pm View
Ed Nutting 21-Oct-13 12:44pm View
Your code for generating the Fibonacci sequence would be fine if you just removed the "% 10". Put the "% 10" outside the loop i.e. "println(fibo_2 % 10)" which should then get you the answer you want.

I suggest you read this:
If you don't understand at least the first page, then you should give up on this problem.
If you understand the first page, but don't bother reading the rest because you think you already know it, give up programming.
If you understand all of it but can't solve your problem, go ask on a maths forum for a better explanation.

All the best,

Advice on a crude but perhaps more obvious method: Generate an array of last digits for n=1 to 60, then when asked for last digit of Xth element, index into your array at X%60. Job done.
Ed Nutting 21-Oct-13 12:31pm View
I can answer the second bit for him: solving his homework. The "0.5 seconds" requirement just screams "theoretical h/w question"!

Ed :)
Ed Nutting 21-Jul-13 6:52am View
Hahahahaha clearly you haven't done this before - you need to actually ask a question before anyone can help you :) Perhaps try giving some details about the error you are getting and even try finding a place for a question mark. And if you find yourself thinking "Who's this guy? Why is he acting like he's better than me?", try looking at my profile.

Good luck improving your "question".
Ed Nutting 20-Jul-13 16:04pm View
Haha best thing I've seen for ages! At least he is honest about what he expects! :P
Ed Nutting 18-Apr-13 17:28pm View
Yes - "le gogo" a.k.a. "use Google and search for yourself instead of being lazy and expecting some un-paid CodeProject member to answer your lousy, un-researched, un-attempted question" - it was going to be an anagram... :)

Ed Nutting 21-Feb-13 8:12am View
Much improved :) I now have at least some idea what your code is trying to do (and how :) ). Next step is to find out what it thinks is 'undefined'. Try opening the code in the Safari debugger and pause on the line that's giving you the error. Then check the values of all the inputs to the method (i.e. pathString, xmlSoapTemplate) - check to see if they are undefined. Also, search the web a bit and check that this is possible - you may need to convert the data that comes from the XMLHttpRequest into a proper XMLDocument (or XMLElement) which the request object is not. Essentially, I don't think the "evaluate" method exists on the XMLHttpRequest object. Search Google for how to convert XMLHttpRequest to XMLDocument then use the same code as you have but with the XMLDocument in place of xmlSoapTemplate for your parse code (not the request code - that can stay the same :) ).

Hope this helps,
Ed Nutting 21-Feb-13 7:47am View
You realise that the enter key will only cause a click event on the button if the button has focus. If the textbox has focus, then it will fire a keydown/up event on the textbox but not submit the form. Just write a small piece of js code that calls form.submit() when the enter key is pressed.

(It may not be perfect, but it is a good, general purpose blanket solution :))
Ed Nutting 21-Feb-13 7:40am View
My your mess of HTML I missed the button that actually had onclick set to bt1_Click (you really should name/label things better!)

Taking a second look now,
Ed Nutting 21-Feb-13 7:36am View
Had you noticed that in your HTML you have the onclick event set to "Button1_Click" but your event in code is named "btn1_Click". They must be named EXACTLY the same (including case) for the event to be fired. i.e. have them both as "Button1_Click" or "btn1_Click".

Hope this helps,

P.s. no error is throw if the event name is not found. It just carries on as though nothing happened.
Ed Nutting 21-Feb-13 7:35am View
Capitalisation is irrelevant - HTML and HTML attributes are not case sensitive. (Names are not case-sensitive, values are of course...)
Ed Nutting 21-Feb-13 7:30am View
What were you trying to do? Can we see the complete code? (Since there are a lot of variables without any indication of what content they contain...) Any exception messages? Have you tried wrapping it in a try-catch(exception) block and reading the exception message? Have you used the built-in Safari debugger? Have you Google'd what are trying to do to see if anyone else has solved whatever issue(s) you are having?

There are too many unknowns for this question to be answerable. Please use the "Improve question" link above to update your question.

Ed Nutting 14-Feb-13 17:21pm View
Why do I get the horrible feeling that the OP has done something far more horrendous than what I think you are trying to suggest.

Let me explain: Logically you would expect anyone using ASP.Net / ASP to create an aspx/asp page and write code in that to generate the output HTML. In which case, your comment is correct - i.e. why not just change the generating code. However, this is what I think the OP has actually done:

I think the OP has created an HTML file as a static page, and is now attempting to have server side ASP.Net/ASP code, read that file, replace the URL then either attempt to re-save the file or render the new HTML back to the client. Horrendous as it sounds, it fits what the OP has currently said i.e.:
1. Read HTML file
2. Replace URLs
[Implied - not explicitly stated: 3. Send this to user]

My suggestion to the OP: Go back and learn the basics. If you have read the HTML from a file (occasionally, but rarely, a valid thing to do) then you have a string. If you don't know how to do a simple replace statement, you are trying something to hard. If you haven't read the HTML from file, but are in fact trying to modify some complicated ASP.Net/ASP code then: 1) Someone else wrote it for you and you don't understand it or 2) you have the memory of a goldfish because if you wrote the original code, you should know how to change the URLs you hard-coded into it... Either way, you need to go back and learn how to program before trying something this "advanced".

If this is for your job then: Get help from a colleague. Without more explanation of what you're doing we cannot help.

Ed Nutting 28-Jan-13 13:54pm View
That is a somewhat different question which perhaps you should have asked in the first place. Anyway, so far as my limited knowledge on the oAuth protocol in particular lets me, I shall try and suggest what you should do.

1. You need to be able to receive/respond to web requests with url params & input/output streams.
2. This is, essentially, the same as a page.
3. You (presumably) have different types of data you want to respond with and different sets of requests for these types of data (else your API is a one-type API but you should still follow this method so you can expand later - expansion is inevitable).
4. On this basis, you want one generic oAuth page class that can be used for multiple types of data.
5. Therefore, create yourself a class called oAuthPage which inherits from Page (see any *.aspx.cs file class declaration for what I mean).
6. In this class, add (static?) methods for handling oAuth authentication etc. and then implement those in a virtual override of the Page_Load event.
7. Add variables to the oAuthPage class for setting the response.
8. In oAuthPage class, override the Page_Unload to clear the response output stream and write the data in the response variables (that you added to the class in step 7).
9. For each request type (data-type in your API), add a new aspx page to a folder called something like "API"
10. Edit the aspx.cs file and change the inheritance from "Page" to "oAuthPage" in each of the new files.
11. You now have a generic oAuth class for any oAuth request and pages that can implement it.

In each oAuth Request Page, simply override the Page_Load event, call the parent classes Page_Load event (base.Page_Load() or something) and then immediately check that the authentication was OK. If it was, process the request. Otherwise, ignore - do not pass back error messages that reveal how your system works!

Hope this helps,
Ed Nutting 27-Jan-13 5:29am View
Haha! Your really expect to get this answered in a "Quick Answer"? This topic has hundreds of long articles written about it! It's 2nd year degree level maths at least and to program it is just as hard. Aside from the FFT being hard to implement, implementing it "graphically" doesn't make much sense as a question given that it is a mathematical process to transform data from wave space to frequency space and back... This leads me to believe you don't really know much about what you are trying to do. I think you should read up on this a lot more (start with say, Wikipedia? At least the first few paragraphs?) before you try implementing anything.

If it's any consolation, I tried to do his a couple of years ago but gave up because 1) I was 14 so my maths was nothing like good enough and 2) It turned out there were loads of free bits of code already out there to do what I wanted. Perhaps you should try searching for some?

Ed Nutting 26-Jan-13 13:25pm View
No?? :confused:
Ed Nutting 26-Jan-13 6:43am View
He has xsl repeating units in there doesn't he? He's probably got lots of content injected into the page that we can't see but that is actually being validated. I would suggest he turn on the option to show the actual HTML that is being validated and then post all of that.

Ed Nutting 18-Jan-13 14:48pm View
+5 that!
Ed Nutting 16-Jan-13 7:50am View
You should only have to do it once at the very start since "goandstop" will go to the specified frame and then call stop for you. Stopping before the "goandstop" command would make no noticeable difference since goandstop would change the frame immediately afterwards.

Just in case, here's some possibly helpful info:
Flash files are animations (or movies) and, just like any movie, they have frames. Just like you'd expect from a film, it's default aim is to play the frames at a set frame rate and produce an animation. So when you open a Flash file, by default, it just starts playing. However, you are trying to produce a mini application in which the movie only "plays" (i.e. goes to the frame you want) when the user generates some input (i.e. clicks/hovers over a button). Since you want the first frame to be displayed and then the movie to stop, your code must override the default playing state by calling "stop()" at the very start of the movie. Thus the first frame is shown. Then, when a user hovers on a thumbnail, you call goandstop, which plays the movie from the current frame, straight into the specified frame (ignoring any inbetween). It then calls stop to prevent the movie playing any subsequent frames. Thus you get the affect of going to a particular image :) It is helpful to always think of Flash files as movies but with events and code that can change how the movie behaves.

Hope this helps,
Ed Nutting 15-Jan-13 14:14pm View
May seem a bit dumb, but you do have the initial stop(); call at the start of your ActionScript, right? If not, your flash show would play each frame at standard frame rate (which I think is 0.2 frames per second ish) - it would explain why it isn't working properly. Please see this quote from the article you linked to:
"We will now stop the movie from playing these frames without us telling it to do so, click on the very first frame in the layer named Actions and then press F9 to open up the ActionScript panel (or go to Window>Actions). Simply type Stop(); to stop the movie from playing those frames automatically." and refer back to the article screenshot provided too.

Hope this helps - it's the only thing I can think of that could be wrong!
Ed Nutting 15-Jan-13 14:09pm View
Thanks :)
Ed Nutting 30-Nov-12 17:56pm View
Please take a look at the latest articles page or try searching CP.

Hope this helps,
Ed Nutting 21-Nov-12 11:20am View
Yes. Now work out how :)

You didn't indicate that you had actually tried to solve this yourself, so you shouldn't be expecting anything more than a "yes" or "no" answer...

Ed Nutting 19-Nov-12 17:10pm View
+5 your solution - that makes sense of the original code but I agree entirely, PORTD1 is an insanely confusing name (goes against everything I have seen with other micro-controllers such as PICs).

Ed Nutting 19-Nov-12 17:08pm View
What the??? O.o PORTD1 = 1??? Weird... That really is an AVR quirk... in PIC C PORTD1 would refer to the first bit of PORTD i.e. if you read the value of PORTD1 it would tell you the input/output value for the pin PD1...odd that it is set to a constant... Oh well, explains a lot :)

Ed Nutting 19-Nov-12 16:25pm View
Please see my last update - looked at the original article and created a new improved version that is simpler and hopefully more understandable - for a beginners tutorial, it really wasn't a very good article!

Ed Nutting 19-Nov-12 16:14pm View
Odd...that article seems to suggest that PD1 will flash on and off...but the first bit of PORTD relates to PD0 not PD1 doesn't it? Thus I am confused as to how it is supposed to work. It also looks like there is a lot of redundancy in the code too since the first line of the loop wouldn't change anything if PORTD1 does relate to PD1 & the first bit of PORTD. The code is more complex than it needs to be. Looking at it again, it is trying to be too clever. Please see my updated solution for what I think is the best version.

I would recommend finding a better or at least better explained set of tutorials.

Ed Nutting 19-Nov-12 16:11pm View
Thank you :) Mmmm...I was wondering that too...However, looking at the original page that the OP linked to, it appears that the original code was simply poor code...When I look at it, I get the distinct feeling that there is significant redundancy in the first line of the loop (the one the OP queried in the first place). I think the OP ought to find a better set of tutorials - especially given the total lack of decent explanation of the code given in that tutorial.

Ed Nutting 19-Nov-12 16:07pm View
Thank you :)
Ed Nutting 19-Nov-12 14:55pm View
If I'm right, it actually starts at PORTD0 so PORTD1 is the second bit. In which case, this code makes not a great deal of sense... I would sort of expect it to be:

PORTD |= 1;

Your final simplification does not quite work as that would clear all the other bits in the PORTD register thus losing the other outputs - you still need the "|=".

It looks likely that PORTD1 is an input switch and so driving PORTD0 high depends on PORTD1 being high, however, it is not 100% clear, especally given the fact that PORTD1 is not set as an input...

Perhaps not a very good example for the OP to learn from after all...
Ed Nutting 19-Nov-12 13:20pm View
Thanks :) I will post it as a solution then - I wasn't sure how good an explanation it really was.

Ed Nutting 19-Nov-12 12:48pm View
"PORTD OrEquals 1 left shifted the number of times of the value of PORTD1" i.e. PORTD = PORTD | (1<<PORTD1);
X << Y left shifts X, Y times e.g. 1 << 5 lefts shifts 1 5 times giving 10000b i.e. 32. Put some examples into Wolfram Alpha and you'll get the idea.

Hope this helps,
Ed Nutting 18-Nov-12 14:11pm View
Looking at this code, in your send method adds in Thread.Sleeps to allow the attached hardware time to process each part of the message. However, there is no Thread.Sleep after the final WriteLine so it may be that you need something after that to delay enough for the message to be sent. It may be that your hardware has a maximum send rate (very likely that it does) since it takes several seconds for text messages to be sent. Add in a Thread.Sleep after the last WriteLine call. Adjust the time to the proper value or use trial and error to find what works.

My modified loop is the proper way to do this though and I still recommend using it. You should not continually open/close/reopen connections to your hardware for every message - maintain one connection and just limit the send rate.

I would be surprised if your hardware could handle sending more than one text message every few seconds without investment in upmarket kit or hardware with multiple transmitters/receivers/links to mobile companies.

Hope this helps,
Ed Nutting 18-Nov-12 6:42am View
Hmm...a quick search in Google revealed that as of Android 1.6, all android installations must report to have a camera regardless of whether they do or not. Therefore, your app should never have a problem. I cannot see why you would get error messages like these if you have done everything I suggested... I suggest you search Google to try and find a good example of how to use the Camera Service - you may spot something you are missing.

Sorry that I cannot help further,
Ed Nutting 18-Nov-12 6:37am View
Where did you get your SmsClass? Is there any documentation for it? If so, take a look at that or look through the original code - that might give you some idea why it didn't work. I would be very surprised if you had to open a new connection for every message that you want to send... If you can get at the original code you might well be able to adapt/bug fix it for your needs.

Ed Nutting 7-Nov-12 7:24am View
Thank you :)
Ed Nutting 7-Nov-12 7:24am View
Thank you :)
Ed Nutting 6-Nov-12 13:56pm View
Or the OP has totally failed to realise that he could just change the IP address from a local address to his external address and unblock ports on firewall & router (and possibly needs a port forward)...I wonder if the OP reeaallyy understands what his code is doing? :/
Ed Nutting 6-Nov-12 13:28pm View
Thank you :)
Ed Nutting 6-Nov-12 13:27pm View
1) Because some of what is stored in memory for the object isn't needed.
2) To transfer between systems you may need to serialise to a different format (e.g. little endian / big endian integer conversion)
3) Because in high level languages you don't have direct access to the bits/bytes
4) Because you may want to bits/bytes to be in a human-readble format suring transfer e.g. XML

I am sure there are many other reasons, these are just a few brief ones...

Hope this helps,
Ed Nutting 6-Nov-12 13:23pm View
My 3. No explanation and not particularly helpful to the OP. Also, probably incorrect, given that the name of the table is "banks" with a lower case "b" it is likely the autogenerated type also has a lower case "b" i.e. "bank".

Ed Nutting 1-Nov-12 14:01pm View
Haha! :laugh: I love the attempt at taking this question literally... :)
Ed Nutting 1-Nov-12 10:31am View
UDP doesn't necessarily require a connection if the OP is only interested in broadcast packets so .Connect() may not be required. Since this is only the server, .Connect() is certainly not required but I'll agree he perhaps ought to listen for connections (again depends on what OP is trying to do). He has only presented the server end so we cannot really know what he is trying to achieve/receive. I will agree at the moment this code is horribly incomplete and I did only provide details of a few of the basic flaws in it. I would advise the OP to try TCP first then do UDP, since TCP is significantly simpler to get right and there is only really one version of it, unlike UDP where there are two (i.e. connected and connectionless).

I would not expect the OP to have posted any client code (which he hasn't - only server code). Worth noting that you can use a UDPClient to run a server which often causes immense confusion. Anyway, I would not expect any code for sending data either, since none of that is required to write/run a UDP server (though using it for testing is very helpful).

Thank you for your comment, I do agree the OP has a long way to go, but the question itself was not so bad - at least it had an error, unlike so many of the questions we see on CP!
Ed :)
Ed Nutting 1-Nov-12 8:42am View
Some HTML perhaps to complement your JavaScript sample? If you are failing to get the element by Id, then you simply have the wrong Id in your JavaScript (or your HTML depending on which way you look at it...). Please post your HTML so we can actually start to solve your issue. Check that you have actually set an Id on your check box and check that he Id in JavaScript is the same as in HTML. Also, make sure this JavaScript code isn't running before the Page Load event. I.e. place your code in a method that gets called on page load or at some later time/event but not beforehand because otherwise the DOM hasn't loaded and thus you can't get ANY element by any method: Id, tag name or otherwise...

Hope this helps,
Ed Nutting 1-Nov-12 8:38am View could Google "Send message to IP address c#" and choose at least one thing to bother reading out of the plethora of results... Or is typing "" then the search term too much like DIY? Or you could read Wikipedia, find out that what you probably want is to use TCP then Google or search CP for "TCP Networking" to find many many many examples. You can even look through two of my articles for examples on this.

In essence, I think you need to consider searching before asking such a nondescript "question"...

Hope this helps,
Ed Nutting 31-Oct-12 18:37pm View
There are so many things wrong with the code here that he will continue to receive errors for a while to come... See my Solution which points out just a few of the most obvious flaws. The implementation above is best described as "incomplete". A good start though so good luck to the OP!

Ed Nutting 31-Oct-12 18:21pm View
OP responded below on a new thread by the way.
Ed Nutting 31-Oct-12 18:21pm View
Would help if you replied to Sergey's comment rather than posting a new thread... Use the 'Reply' button on the right hand side not the 'New Comment' as you have done.
Ed Nutting 31-Oct-12 18:18pm View
System.Threading.Timer instead of Windows.Forms.Timer? Threading one is more reliable and works at faster tick rates but has the disadvantage of not running on the UI thread. (It is more reliable/works faster because it isn't on the UI thread but that is more complex than you really need to know...)

Hope this helps,
Ed Nutting 31-Oct-12 15:32pm View
So what problem are you having? What error are you getting? We cannot fix a problem if we don't know what the problem is...
Ed Nutting 14-Oct-12 9:08am View
Perhaps your question should be titled "How to turn off Caps-lock so that I don't annoy people?"...
Ed Nutting 14-Oct-12 9:07am View
He will follow with a question titled "How to turn off Caps-Lock?" :P
Ed Nutting 10-Oct-12 16:33pm View
+5 that :)
Ed Nutting 29-Sep-12 12:31pm View
Thank you :)
Ed Nutting 29-Sep-12 9:34am View
Thank you :)
Ed Nutting 29-Sep-12 9:33am View
Thank you! :)
Ed Nutting 29-Sep-12 9:32am View
My vote of 4: Not sure I entirely like the idea of hiding the link round an image but at least you recommend using YouTube's standard (I don't think we should be sending HTML emails really - they are just too insecure at the moment!). I certainly wouldn't recommend embedding Flash Player (though Flash is dying now so that bit will be broken inside the next few years I imagine). Please see my solution :)

Ed Nutting 29-Sep-12 9:22am View
My vote of 3: Never embed object tags, applets, active-x controls, JavaScript or iFrames in an email - it's far too often malicious content and if it isn't you should avoid being classed as malicious. Please see my solution.


Edit: Also, that solution is unlikely to work across email clients - it's talking about IE6 & 7! Very outdated... A lot of people now use web mail clients such as gmail, which I would hope blocks all types of embedded content such as this - it certainly blocks a lot of embedded files/images which is good - protects the user from malicious content. Furthermore, you would have to start catering for all the browsers and email clients in your one email - much better to simplify the problem and make it friendlier to users by sending description, an image and the url to go to if they trust your email.
Ed Nutting 22-Sep-12 15:13pm View
Have you debugged and checked what the value of node.Name is? We can't help much without knowing that that value is what it is supposed to be. Have you also checked that you don't have a capitalisation issue. I would recommend:

switch(node.Name.ToLower()) and then put all your options in lower case e.g. "city" instead of "City".

Ed Nutting 22-Sep-12 14:54pm View
I agree entirely with your comment except that I vote 2 for this solution: Putting in any amount of effort every day to try and learn deserves a better vote then the OP's question...
Ed Nutting 21-Sep-12 2:21am View
Hey how about the Twitter Developer's website? I've just got this feeling that it might be all about how to search Tweets and use their API, specifically for developers! Even Google have indexed it!

(Yes...yes that was sarcasm... We are can't just magically produce code or links to websites that do it all for you. You have the same access to Google as we do...along with all the other helpful sites you could find...)

Ed Nutting 20-Sep-12 13:38pm View
Please post in the Site Bugs & Suggestions forum under the "discussions" menu.

Ed Nutting 15-Sep-12 17:33pm View
Err.. you can't set a control to a string - you need to set the control's Text property. Assuming the active control is definitely a textbox:
((TextBox)YourForm.ActiveControl).Text = "Samad";
would work.
Ed Nutting 15-Sep-12 17:25pm View
Well what on earth is Focused supposed to be then!? Do you mean you want YourForm.AcvtiveControl which gets the control in YourForm that currently has focus? See here:
Ed Nutting 15-Sep-12 17:24pm View
Well I think so - I can't see anything else "fitting-the-bill" though OP still insists that I am wrong!?
Ed Nutting 15-Sep-12 17:15pm View
Please see my interpretation of his insane code below - I think he was trying to go through his controls one by one (by simulating tab key :O ) each time getting the currently focused control (Focused) and then set that control's text. Seems very odd thing to be doing really but hey-ho, people do some crazy stuff sometimes! :)

Ed Nutting 15-Sep-12 17:08pm View
Wait so are you trying to set the text of the currently focused control? So by Focused = strnew you mean Focused is the currently focused control (changed by your tab key being sent) and = strnew; is supposed to set that control's text?
Ed Nutting 15-Sep-12 16:59pm View
focus is a method - not a Text Property! You cannot set it! What are you trying to achieve? Please improve your question to describe what you think that line of code should do? Use the Improve Question link that's in green at the bottom right of your question.

Ed Nutting 15-Sep-12 16:51pm View you mean textBox1.Focus(); See:

Hope this helps,
Ed Nutting 15-Sep-12 14:58pm View
Please see the Twitter Developers website and post in their forums.

Ed Nutting 15-Sep-12 9:39am View
Erm.. all of it? You start by saying you can't use any kind of Form but then say that you are using a Form for your Main Form - that doesn't make sense. Then you say that you want to put a User Control in a Form but not using a Form - really confused here.

I suggest you listen to Wes Aday, he is right when he says you should use a MessageBox (with Yes/No button options used not default buttons - see MSDN documentation). This shouldn't show the Task Bar.

I would just like to point out though that all your efforts are defeated by one simple fact - you cannot disable Ctrl+Alt+Delete! Any user could just Ctrl+Alt+Delete and get out of your program without too much difficulty. Edit: Unless your company will be disabling many of the useful Ctrl+Alt+Delete features, notably Task Manager, on every client computer.

Ed Nutting 15-Sep-12 9:29am View
Your question is very unlcear at the moment and really doesn't make much sense. Please use the Improve Question link above to create a re-worded version of it. Perhaps get a colleague to look it over or something?

Ed Nutting 15-Sep-12 9:26am View
The error means your code does not compile because there is a bracket in the wrong place (or some other part of your code is wrong). Please review your code in Visual Studio for errors (try building locally) then upload all your files to your server. Without seeing your entire CS file, we cannot solve this problem for you. Please use the Improve Question link above to edit your question and include the whole file.

Ed Nutting 13-Sep-12 14:38pm View
Do your own research - there is no question here that we can answer and everything you need is all ready and waiting if you care to use Google...
Ed Nutting 13-Sep-12 13:57pm View
+5 - Should have posted as a solution. :)
Ed Nutting 13-Sep-12 13:54pm View
Erm...surely the HTTP AJAX request would time out before your Thread.Sleep ends resulting in no response to your AJAX request and so the textbox wouldn't be updated. The default (I think) is a 30 to 60 second timeout, you will have to increase this to 100 (if not more) for your code to work. If that doesn't fix it in itself, it is almost certainly going to be a problem.

Hope this helps,
Ed Nutting 13-Sep-12 13:46pm View
Well your "question" would suggest you didn't even attempt to answer any of them... Please go away, do some research, try programming something, then post what code you come up with and what problems/errors you hit. Also, learn to use the Reply button, it's there for a reason. I only spotted this because I happened to refresh the page...
Ed Nutting 13-Sep-12 13:40pm View
"How to add a row to a grid view?" _ Now I wonder why you didn't bother putting that into Google?
Ed Nutting 10-Sep-12 13:42pm View
Seriously? And you think we have time to do work for you? It really isn't very hard to convert...or are you going to post a new question every time you need to convert some code because you never have time to bother to learn how to use jQuery? By the looks of it, this isn't your first question on jQuery - if you learnt it, you'd find you solve your problems much faster.

Ed Nutting 10-Sep-12 13:16pm View
Yes people do. Don't you? Look up the jQuery documentation, read it, learn how to use jQuery then do this yourself - it's not hard...if you're not lazy...

Ed Nutting 10-Sep-12 12:49pm View
And yet another person who is lost when the fountain of knowledge has been lain before them in massive coloured letters and in every advert for the past few years...

Oh, sorry, don't you know what I'm on about? Maybe you should search Google. Haha.

Ed Nutting 9-Sep-12 16:50pm View
Use an internal server side call to generate the page then include the contents of its body into the rest of the page. Alternatively, think of a more sensible way of doing this because at the moment that sounds ridiculous... Either use an iFrame or your code needs restructuring...

Ed Nutting 9-Sep-12 16:48pm View
Please stop being lazy. If you just bothered to put "JavaScript Key Press" into Google you would have got the answer...

Ed Nutting 9-Sep-12 13:34pm View
What on earth are you on about? Please write this in your native language, then use Google translate (or similar), copy the translated result, then use the Improve Question link above to edit your question and include the translated version - it will make more sense than anything you have written already...

Ed Nutting 9-Sep-12 13:31pm View
I'm not even sure this is a coding question...looks like it should be one for the Microsoft/Windows 7 forums...
Ed Nutting 8-Sep-12 17:54pm View
I understand that you are doing this for yourself. However, the aim, I presume, of locking your computer is to prevent your students (or anyone other than you) from accessing your account. Therefore, you need your computer to lock reliably and you need to make sure other people can't get access simply by spoofing your phone. When I said "have some respect..." what I meant was, respect the fact that you have the responsibility to make your account (and thus your student's private information/records that you hold about them) secure and that, therefore, you must make your program secure. A common mistake for people to make is to say "oh well we'll build security in later" but that often doesn't work. It is best to build security in from the outset. That way, everything remains secure.

To do this at all should imply doing it well.

Anyway, so long as you implement security before actually using this then that is okay.

(P.s. Also, please use CP commenting/threading properly. Use the Reply button to respond to posts, don't start a new thread by using the "Have a Question or Comment?" link.)
Ed Nutting 8-Sep-12 16:46pm View
I'm sorry you appal me! Security is not an issue you just want to use it to make sure your computer locks so that people can't access it? Security is most certainly an issue.

Let me try and explain this to you simply. I'm 16 from London UK. I am still a student. Lets suppose I am a student at your school, in your class and as a keen programmer and techy person I notice what your doing. All I then have to do is spoof your device then turn my Bluetooth on before you leave. Hey presto when you forget to lock your computer it will still look like you're nearby (as my phone will be spoofing your's) and guess what - I now have complete access to all your files and all of that supposedly "private" information that I shouldn't be able to access.

I wouldn't do this, because I am a good person, but there are plenty of people my age who would and could. Security IS an issue for you - otherwise what do you classify locking a computer as??

As for your other problem, it sounds like you are scanning for paired devices not available devices which is why you are having problems. Given that you MUST now write the program I suggested (to fix your security holes) you can assume that if your phone is in range, it will be connected and identified with your program. Therefore, simply have a timer in your program that sends your phone a message every 30s. If no response is received then your phone is no longer in range and the computer should be locked. Do not unlock your computer by walking back in range - another security hole that you may introduce. Also, you MUST use public key/private key encryption such as SSL over your Bluetooth connection before identifying the device else it would be just as easy for someone to man-in-the-middle attack your connection and thus still spoof your phone.

Please have some respect for the fact that you are supposed to be protecting your student's private data. I don't know about the US, but in the UK there have been far too many leaks of private/confidential data - especially through phone hacking (you may have heard about the Murdoch scandal?)

Please, either do not do this, or take the time to develop it properly/securely. Thanks,
Ed Nutting 8-Sep-12 14:35pm View
If I correct your English slightly all I get is "How can I sell my website using PayPal?" - why are you offering everyone the chance to buy your website through CP? I think what you meant was "How can I use PayPal to sell items on my website" and the answer is, you can stop being lazy and bother to read the PayPal API documentation which is easily found through Google.

Ed Nutting 7-Sep-12 15:36pm View
Why not take a look at this project: which supports HTTPS and is written in C#. Or a very similar way of doing things to the article but less some of the web server stuff can be found in this answer: Simply pull out the relevant bits that add the SSL protocol to the stream you are using and add that into the CP article code. Shouldn't be hard at all. All you are doing is laying the extra SSL protocol on top of HTTP so naturally you just need to add an SSLStream onto your NetworkStream (or StreamReader - whichever the CP article uses...)

Hope this helps,
Ed Nutting 7-Sep-12 15:21pm View
"run from server to localhost" - what on earth is that supposed to mean??? Your question doesn't make any sense at the moment. Please use the Improve Question link above to better explain what you mean. Do you mean you're trying to access your Joomla site from your local computer (via a web browser) and it is not working? Your error message would suggest you have forgotten to upload some files or you have failed to configure Joomla properly.

Ed Nutting 7-Sep-12 15:19pm View
Just a small amount of research would begin to make you understand what it is you're trying to tackle, how it works and why you really shouldn't create your own certificates... Please research how HTTPS works and how modern web servers use/handle it. Hopefully you then won't need to ask a question on CP unless you hit a specific error. Additionally you could try posting a message on the original article that you linked to asking for guidance on this. This is not really the sort of question that Q&A can answer. Q&A is for specific questions on errors or specific code or for short answer problems. I have no doubt there will be sufficient material on the internet that will answer your question, if you simply search.

Ed Nutting 7-Sep-12 14:48pm View
(Perhaps we should be checking Stack Overflow? ;p) And your comment has genuinely made me ROFL! +5 :D
Ed Nutting 7-Sep-12 14:44pm View
4 questions in a row that I have clicked on and they have all not be err..questions. My "delete finger" is starting to get itchy...
Ed Nutting 7-Sep-12 14:41pm View
Ed Nutting 7-Sep-12 14:40pm View
I wonder if collectively we have made our message heard? :) +5
Ed Nutting 7-Sep-12 14:39pm View
Agreed it does feel like we are spending our time posting back "please don't ask..." responses. Should we now head to the site "Bugs and Suggestions" forums to suggest a harsher deletion approach?
Ed Nutting 7-Sep-12 14:37pm View
OP's answer should probably be: "What IS a question?"

Ed Nutting 7-Sep-12 14:33pm View
No and unless you provide a link we are unlikely to. We are equally unlikely to help if you haven't tried anything yourself and don't have a specific error that we can help you with. Please improve your question (using the Improve Question link above) to include a more specific error or issue along with much more information and an example of what you have tried ooorrr just delete it entirely.

Ed Nutting 7-Sep-12 14:31pm View
Thanks :)
Ed Nutting 7-Sep-12 14:31pm View
Not if I get there first! ;p
Ed Nutting 7-Sep-12 14:29pm View
You're not going to get help by not doing any work yourself, not writing any code yourself and using poor English even by text speak standards. Please learn to use proper English. Then learn to program. Then get off your back and write some code yourself. If you hit a specific code problem (i.e. error) then ask a question. We don't give advice for "I can't be ******* bothered" questions...

Ed Nutting 7-Sep-12 14:26pm View
It's your lucky day! You have won a £32,550 lottery ticket and an all expenses paid trip to Utopia :)

Sorry...just had to... ;p

Ed Nutting 7-Sep-12 14:11pm View
I want you to go away and write it yourself, but I'm probably not going to get that either by putting it that bluntly to you.

We aren't here to dish out source code - we do this for free, in our free time and we don't just "have" source code for everything. Go learn to use Google and find it for yourself or try learning to program and write it yourself. There are plenty of examples of this on the web. If you had even searched CP there was a recent article on it.

Ed Nutting 6-Sep-12 12:45pm View
Same thought at the same time aah... great minds think alike :)

(Or is it that fools seldom differ? ;p )
Ed Nutting 6-Sep-12 12:44pm View
Have you got the correct Baud rate? That often causes problems. Also, check that the encoding the device uses for encoding/decoding the command is the same as the one you are using. Have you got a way of confirming that your access control device is working properly? Can you send it the command from anything else and get it to work? If so, perhaps inspect the command sent by said other program and compare it to your's?

Hope this helps,
Ed Nutting 5-Sep-12 11:28am View
Thank you :)
Ed Nutting 5-Sep-12 11:12am View
Please note: I edited my solution since you copied that line of code. Please take another look at the line - you have not included the extra .ToList() at the end of the line of code.

Ed Nutting 5-Sep-12 11:10am View
I said it wouldn't be bug free... Make sure you have got "using System.Collections.Generic". Other than that you'll have to give me a more specific error message if you ecpect me to help.
Ed Nutting 5-Sep-12 10:43am View
Additional answer: If you really want to you could use the Twitter API to post a tweet for you? Or you could post a tweet at every single one of your followers (which counts as spam and would get you blocked). Or you could use the API to direct message every single one of your followers just like messaging/inviting friends on Facebook and it would very annoying for everyone... The whole point of Twitter is that you spread news to everyone by tweeting once and then all your followers see it - invites doesn't make sense. Facebook invites are what most people find annoying/irritating. Just post a Tweet and be done with your problem.

If you are looking to do automated notifications about changes to your site, set up code with the Twitter API to post a Tweet whenever you log a change or something. For more information search Twitter Developers or Twitter API. CP is not the place to get help with the Twitter API unless you hit a specific code error.

Please do not keep re-editing your post to bump it up or it will be removed.
Ed Nutting 5-Sep-12 10:19am View
If only I could down vote the OP for asking such a sad question... :(

Ed ;P
Ed Nutting 5-Sep-12 10:15am View started out as a comment and turned into a solution ;P

I'll post a solution that directs people to my comment ;)
Ed Nutting 5-Sep-12 8:40am View
What's wrong with just embedding a video tag with the Src set to your video? Unless you are trying to support IE8 at which point I recommend you embed an HTML5 video tag by default but detect IE8 and then instead put a Flash player. Note: You will need to get your own Flash player to play your video file. A popular one is JWPlayer. Only use Flash in IE8 as Flash is being killed off and HTML5 is a much better solution - HTML5 will work on mobiles too.

Hope this helps,
Ed Nutting 5-Sep-12 8:38am View
OP responded to your comment but started a new thread rather than replying. Please see below :)
Ed Nutting 5-Sep-12 8:24am View
On top of what Sandeep put, we will need to know which Calendar.js you are using and if you get any errors. At the moment though, it is worth noting that you never call init() so it guaranteed not to work...
Ed Nutting 5-Sep-12 8:17am View
Please contact the support team for your server. We cannot help you this issue as it is specific to your server and how it's run. Unless of course it's a problem with your code but for that we would need a specific error and the code that causes it.

Ed Nutting 5-Sep-12 8:15am View
How about Tweet the link to your followers like everybody else? And on LinkedIn set your status message or post a message with then URL and set on both services set your profile's website URL to your website. That is about it...unless your question is poorly worded and you mean something other than what you said?

Ed Nutting 3-Sep-12 16:28pm View
You may want to take a look at this page:

From the looks of it, R is not suited to web development. You will find it much easier to develop in PHP since it is designed for web development and servers support it - I doubt you'll find any servers that support R without paying lots to have it set up.

Edit: R is suited to statistics, but while it may be slightly more work to program in PHP, to get servers/hosting and for someone else to maintain/update later, PHP would be much friendlier.

Ed Nutting 3-Sep-12 13:14pm View
Reason for my vote of 3
A good article on implicit operator and that shouldn't be forgotten but there's a reason var is forgotten - good programmers learnt to forget it and actually learn/understand what they were doing with types rather than hiding it all away in vars. Code without them is readable/maintainable/understandable for others. It should remain "forgotten" - though sadly it is certainly not and is one of the primary causes of poor code that we see here on CP. JavaScript only has vars - look at code for that - messy and horrible. Use of var is in almost all situations bad. Without a far better explanation/standard for when it should be used, I am forced to vote this down. Var should never have made it in...let alone be encouraged on a site for teaching people. Use of var should be rare, and certainly not for hiding the types returned by LINQ just because you don't like writing it out properly.

Ed Nutting 2-Sep-12 17:17pm View
You can use Google :D

Ed Nutting 2-Sep-12 17:14pm View
Not possible and I sincerely hope it is never possible. It should not be possible for one site to bypass site security like that - ever. Sadly there are some hacks to do it - but no trustworthy site would ever use them. Let your user decide when to open their Hotmail account - it's their account and their details - you should not be encouraging users to input the same password for your site nor encourage them to just give out their email password to other sites.

Just open a page that direct to Hotmail. Let the user handle any logins that may be necessary,
Ed Nutting 2-Sep-12 17:11pm View
Out of interest, why on earth are you using old-style YouTube embed code? Much better to go back to YouTube and get the new iFrame method - more reliable and will probably solve your issue. It would also be "cleaner" code too and would allow YouTube to work its magic at getting videos to work on mobiles (iOS & Android) and all other platforms using HTML5. What you have will be very limited in compatibility compared to if you used the new method.

Try putting in the iFrame code - I bet it solves your bugs! Hope this helps,

Edit: By the way, it's probably because the browser isn't loading your written HTML properly since it's written after the proper page load cycle which is almost certainly crucial for this to work properly. If you use the iFrame method though, that won't be an issue because all browsers do support writing in an iFrame and immediately loading it - trust me, I've used it.
Ed Nutting 2-Sep-12 17:05pm View
That's not the point I was making. The point is that you haven't tried to research and develop a solution for yourself - you haven't programmed a single line of code so far! You are just asking us to give you a pre-made solution! Well guess what? We don't have one. We aren't here to just dish out code for people let alone entire projects like this. We aren't paid, we do this in our free time and we don't just make stuff for you. Research how to enlarge stuff with jQuery (scale animation) then apply that to a div. Then work out how to make stuff appear with jQuery (set clear a display style? Use fadeIn()?) then apply both those to enlarge a div containing your image and fade in details next to it. I couldn't do more than that without just writing all the code for you. If you hit a specific issue (e.g. you try laying out the details next to image but are incapable of getting it to work so you post your HTML/CSS for us to look at) then we (CP members) can help you more. Only if you hit an error or specific problem do you post a question. Not when you hit a "I have to actually make something? But I'm too lazy!" issue...

Finally, learn how to use CP commenting properly. There is a Reply button for a reason. CP uses a multi-thread posting system - not a single stream system like Facebook - the only reason I saw your comment was because I happened to still have this tab open and hit refresh and noticed it. If you reply properly to comments people receive notifications on CP and via email to let them know you have responded.

Ed Nutting 2-Sep-12 16:37pm View
What's the problem? Have you actually tried anything? We aren't here to just dish out pre-coded projects. Try something, if you hit a specific issue/error, then we can help.

Ed Nutting 2-Sep-12 15:01pm View
Yes that documentation is very incomplete (not surprising as it is open-source, free and not official). However, all the methods etc. that it supports will be the same as described in the PhotoBucketAPI and if you're lucky they'll have wrapped up some of the nasty bits for you. Since it claims to be open source - try finding the source and inspecting it/compare to PhotoBucket API documentation to see what it's doing.

Perhaps you begin to understand why I rolled my own for Facebook, Twitter and LinkedIn - it was easier than using anything anyone had produced in March 2011. For those there may be proper .Net support now but I haven't checked.
Ed Nutting 2-Sep-12 14:55pm View's an Async operation so my bet is that there is a possible bug in the SDK that means that when it's 100% uploaded, the uploader thread tries to access it's creator thread by which point that creator thread has been disposed of and so you get the error. Certainly the reason a try-catch block doesn't work for you is because Async creates a new thread on which the error is then occurring. I will not explain threading here as there are many articles on it but it means the error jumps all the way up to the process as a whole and any try-catch block round the code you present is completely irrelevant - it's hard to explain without explaining threading as a whole - please read up on it as an issue. My advice would be to check the SDK forums (by searching in Google or on the SDK's development site) to see if this is a known issue or if other have come across it/solved it.

Ed Nutting 2-Sep-12 14:50pm View
As far as I was aware, by the time the code is rendered to the web browser (i.e. actual HTML is outputted) the repeater etc. have been converted to actual HTML elements and there is no further trace of them. Try using a web debugger to look at the actual HTML rendered to the web browser - that will show you what to do in JavaScript. As for code behind, what's wrong with accessing the inner repeater by Id? What do you mean by "access"? If you need "access" to individual items then that is done via your data not directly through the repeater surely? Or if you mean "access" as in changing the look of what the repeater renders dynamically, then "access" it via Id server side. I.e. tsize.some_property = ....

Hope this helps a little, though it would be helpful to know what you are actually trying to do/achieve,
Ed Nutting 2-Sep-12 14:43pm View
Maybe adapting/exploring this will help you?

No guarantees - it's a stab in the dark - but it might just help you out - since no-one else has proffered anything.
Ed :)
Ed Nutting 2-Sep-12 14:30pm View
Please search Google or use MSDN. This is far too broad a question and there is plenty of material on the internet to answer this (in many languages!). (By "assembly" do you mean Assembler Language or (judging from your C# tag) you mean creating Libraries - search C# Libraries. This tutorial may help you a bit:

Ed Nutting 2-Sep-12 12:48pm View
No. I'm saying use the standard rather than the hack. Controlling everything is not always a good thing. That, and SilverLight won't last - did you believe Flash would last forever? Probably. I see from your profile that you favour SilverLight a lot. Fair enough. Using the standard rather than always trying to create new ones is better. It would be better if the OP programmed an HTML5 web app that will last probably for the next 15 years, rather than a SilverLight one that will break upon the next major update or when MS decide to stop supporting some browser or when another one pops up. I haven't been able to reliably (if at all) get SilverLight on my Android phone either (Samsung Galaxy S2) and that's a relatively new device. Older devices would be even owrse. So bang goes a large majority of the mobile market - only one of the most important markets and the major one that is growing fast in the education sector - especially for kids/teenagers.

If the OP uses SilverLight, fair enough. But his client won't be thanking him in 5 years time.

Ed Nutting 2-Sep-12 12:40pm View
Sorry but SilverLight is just not the best option for reaching his client's market and actually making it easy for them. Majority of schools and probably health facilities too will not have SilverLight installed and a large proportion of home users will either not have it installed (and not want to hassle with installing it) or will be on a Mac. While Mac is supported, many Mac users will be even less likely to have it installed or ever install it. Far better to use the HTML5 standard with a small piece of extra code (in JavaScript) that detects if Flash or possibly SilverLight are available and then embed whichever is necessary.

Using SilverLight because it gives you control of the player's UI is also not a good option. While it may be helpful for some things, one of the aims of HTML5 is to make web apps have a more standard UI to make it easier for users. Having every tom, dick and harry produce their own player UI is annoying not only because users get fed up of learning a new UI, and because they see so many different ones they can't tell which web apps to trust and which to not EVEN if in reality they are all using the same safe thing, but also because there is a huge amount of unnecessary code reproduction.

Use HTML5, support the standard rather than the Adobe/Microsoft hacks. Then give some backward compatibility/graceful degradation by inserting Flash/SilverLight where necessary. Most users will already have Flash installed though. Most won't have SilverLight. Using HTML5/CSS3 and any necessary JavaScript to create your UI will always be better and will always last longer than using Flash or SilverLight - come on. Everyone knows SilverLight was basically launched as an MS rival to Flash - or it sure looks like it. But look at the fate of Flash? It's dying and even Adobe are telling people to use HTML5!

Ed Nutting 2-Sep-12 12:25pm View won't's a web app... If he requires SilverLight the admin will have to install it. This is not a good option if the admin has to install even more stuff. Admin's (of XP) I'm sure would much rather just have to install Flash which they do anyway than have to install Flash and SilverLight. Furthermore, SilverLight is far inferior to HTML5 as an option if you're honest.
Ed Nutting 2-Sep-12 11:38am View
You recommend SilverLigth first..bad move IMHO... and yes SilverLight does work across those but how many people do you know that actually installed it? Furthermore, for the health and education market, SilverLight certainly isn't a good solution. For instance my school haven't installed it and where my dad works (primary school as technician) they haven't installed it. That applies for the majority of schools and probably the health market too. I have re-voted to a 4 because I didn't know SilverLight worked on Apple Mac but still it's not a good solution...

Ed Nutting 2-Sep-12 11:30am View
I voted 3 because...well really see my solution but in short: SliverLight is a terrible recommendation even if you were only looking at desktop browsers... Most users have never actually installed SilverLight (I only did because it came with Visual Studio!) and it's not exactly taking off. Furthermore, it is (for proper support) limited to IE.

All clients these days should be expecting maximum compatibility but also maintainability and lasting code. SilverLight in the long run, will not be maintainable/reliable/sustained. Far better to go with what will be a long lasting standard - HTML5 - and then use graceful degradation to support IE8.

Ed Nutting 29-Aug-12 5:20am View
Reason for my vote of 2
I read your article and found myself wondering if you were actually being serious? I assume you were but it's very odd. You seem to have named everything after obscure cartoon sailing speech yet in your conclusion you talk about "ease of use and portability". This code is appalling on both of those aspects. You have not only duplicated your entire code for two slide shows but also hard coded in variable and element names! Easy to use and portable code would be a single script that you can use multiple times on the same page where you simply pass in the container Id and a list of image url's. This code fails your own test for good code. I do wonder how anyone is actually supposed to use this...?

I'd also like to point out that you could have done this far more easily if you had used jQuery which does all the cross-browser compatibility for you along with providing smoother fade animations than anything else I've ever seen! Also there are one or two plugins for doing very simple things like this that would have saved you a lot of work.

Hoping to see this improve,
Ed Nutting 27-Aug-12 16:24pm View
Reason for my vote of 3
See message below.
Ed Nutting 26-Aug-12 15:38pm View
Reason for my vote of 1
Agree with Dave.
Ed Nutting 26-Aug-12 15:36pm View
Reason for my vote of 1
Agree with Dave.
Ed Nutting 26-Aug-12 15:35pm View
Reason for my vote of 5
Agree with Dave.
Ed Nutting 25-Aug-12 21:42pm View
Your only solution has been suggested in a comment on your question -.use an animated gif image and wrap it in a link or use Javascript to detect when it is clicked.
Ed Nutting 25-Aug-12 20:13pm View
Oh and as your image appears to show perspective, if you read the page fully you`ll see that's supported too.
Ed Nutting 25-Aug-12 20:10pm View
Your picture shows rotation and that is what you asked for. That is precisely what this does - 3D rotation. Either you haven`tasked the right question out you cannot be bothered to read the properly - which is it?

Ed Nutting 25-Aug-12 17:12pm View
You need to update your question (use Improve Question link above) - we do not know what you are trying to limit! Tell us whether you are downloading a file or web page, what you are using to do said download, whether you are trying to limit all applications download speeds or just your own, show us any code you have tried, explain what you have tried/searched for, tell us what it is you're actually trying to do! Your question is far too vague for us to answer it at the moment.
Ed Nutting 25-Aug-12 17:05pm View
Are you seriously asking for someone to provide you with a free ASP.Net template that looks like that? I mean if I had to guess I'd say they spent several thousand pounds on the design and development of that site - at least! Let alone anyone else giving away a free template of it! Seriously...just search "free templates" in Google and see what it comes up with. If you don't like what you see, search a bit more or spend the time developing your own - no one is going to do this for you (unless you pay them). As for what I think of using ASP.Net template? I think you should use a one-page website (look up what that is).

Ed Nutting 25-Aug-12 17:01pm View
If you'd used developer tools and looked at the table you'd notice the ID which is"...DataList..." so it is using custom styling (using CSS) and it is probably using a DataList control.

Ed Nutting 25-Aug-12 15:48pm View
This can be done in HTML5/CSS3 using CSS3 animation, keyframes and 3dtransform and will work in all browser except IE9/lower and Opera. Alternatively, you can do it using just CSS3 3dtransform and JavaScript and that will work in all except IE9/lower and Opera. Your final option is to try and use SVG or Canvas and JavaScript and detect mouse clicks to create a 3D rotating image that can be clicked on as though it were a button. All of the info for doing all of this (including an understanding of programming JavaScript) can be found on Please see their HTML5, CSS3 and JavaScript tutorials/complete references/complete examples (for everything!). You could easily have looked all this up on the internet without asking a question if you just searched a little bit - a search for "HTML 3d" puts this page (the most important one that yo need) just second in the list: I am surprised you managed to create something that worked only in IE...was it a Java plugin? If so, that nulls my surprise. Java plugins are bnot necessary. HTML5/CSS3/Javascript can do this for you provided yo don't mind it not working in IE9/lower and Opera. IE10 does support this. Coming versions of Opera will support it.

Hope this helps,
Ed Nutting 25-Aug-12 15:21pm View
If there is no command to tell you which application is using the mic, then I highly doubt it is possible to do. It is probably a good thing that you can't spy on other applications - security wise not being able to do this sounds sensible. Instead, you could ask the user to close any applications that may be using the mic and include in the message the detected list of possible currently running applications that they should close. I assume your intent was to force close the application using the mic? Very bad could easily cause file corruption etc. on the user's device and/or cause them huge problems e.g. if they were in the middle of an important Skype call I don't think they would appreciate your app just suddenly ending that. Always best to let the user handle which they want to use as they are the USEr. If they choose not to close other applications then that's their choice.

Ed Nutting 22-Aug-12 14:46pm View
This looks like a caching issue (i.e. your AJAX request's response is being cached by the browser). This is a common problem. jQuery (as has been mentioned) is a very good way of cleanly solving all these sorts of issues.

Ed Nutting 22-Aug-12 9:31am View
It's IE but at the same time it's not IE... For sure your running the Trident layout engine but often it is not the same version of the engine running in the WebBrowser control as it is in IE. Often the WebBrowser control uses an older version that may be installed (for some reason that is beyond my understanding and it really shouldn't). So things may not load as fast due to that issue. Also, I don't know if concurrent downloads is built into Trident/WebBrowser control by default or if it's part of IE and/or you need to set specific things to turn it on - this may also decrease speed. Finally, the OP should check that they are not telling the WebBrowser control to navigate to a link and then blocking the UI thread until that completes - this would undoubtedly cause the application to hang or behave very slowly. There is a Loaded (or LoadComplete or similar named) event that should be used.

Hope this helps,
Ed Nutting 22-Aug-12 9:24am View
This is a pretty poor fact it's not a question at all since there is no "question word" per se. Please use the "Improve question" link above to update/improve your question and tell us what is actually the problem? If I had to guess I'd say you meant that not all the fields are showing properly in the Windows Form that you have but they are in Crystal Reports but that's really just a stab in the dark at what you may be asking... (Also, improve your question title: "When I all..." doesn't make sense! "When you" do what to "all.."?)

Ed Nutting 18-Aug-12 23:34pm View
For which programming language? What would the loop/timer be doing? How frequently would the operation occur? Is it multi or single threaded? How many cores are you programming for? What defines "better" - responsiveness? Power consumption? CPU time used? Memory used?

Your question is far too vague. Please use the Improve Question link above.
Ed Nutting 18-Aug-12 21:15pm View

Well I can spot two issues with this:
1) cbtext should not be declared twice (the original code got.this wrong too)
2) You have changed ddltext to cbtext but the second cbtext line you forgot to change it to `[` + cbtext + `]` - this may well throw an error preventing your code from working.

Finally, don`t forget two include jQuery first in your page head section.

Hope this helps,

(Oh and where is the variable Editor1 declared/created?)
Ed Nutting 18-Aug-12 21:02pm View
This looks like an odd or at least outdated way of doing things... Have you considered using jQuery to show a loading message and then send an AJAX request and when you get the response, closing the loading message and showing the result?

Ed Nutting 18-Aug-12 20:58pm View
This can work alright - I can think of at least two ways to do it - clearly the OP is just not trying or needs to be taught to code (or ask questions) properly... My vote of 2.
Ed Nutting 17-Aug-12 23:54pm View
Reason for my vote of 3
While this code probably works quite nicely and is at least well formatted, I see very little actual discussion of what the code is doing and why. For instance it would be nice to have an explanation of how the Tcp streaming is actually working, things like the use of SSL, use of ASCII text encoding and whether UTF-8 should be used, ought to be pointed out. I feel you probably should have completed your project before posting and then have discussed the code thoroughly given that there isn't much to be gleamed just from the code alone.

Ed Nutting 4-Jun-12 7:47am View really didn't get what I said... I said that if you weren't using the VS compiler i.e. the default .Net compiler i.e. the one you just compiled with. I never denied that the compile wouldn't work. What I did say is that the bug wouldn't be found until compile time when, if using explicit types, the bug could have been spotted before compiling.

Regarding your articles, the first only seems to support my case that vars should not be used much (but I say not at all). The second may justify your point, but is proved totally wrong by the first article so really all you have done is harm your case for using vars. Vars should not be used. End of.

As regards to what I think of you, you give an extreme opinion. While I dislike the use of var (clearly), your code may still be good and valid. You appear to be a good programmer, however, I still uphold that the use of var, more often than not, leads to poor code and poor programmers. Just look at the author of the second article, it doesn't seem like he had a clue that what he was doing could cause major issues.

A good example would be if I were getting data from a database, I could either get it as an IQueryable or as a List. IQueryable uses lazy-load effectively, so the data isn't retrieved from the database until it is explicitly needed. Also, methods like Count fire extra database queries to return the result. On the other hand List gets the data immediately in one database request. Now both of these are useful for different things but suppose I was going to loop through all the items from the database. If I used IQueryable, it would result in a separate database query for every item. If, however, I used a list, I would get only one, bulk query at the very start. So clearly List is better here. However, the use of var in code could end up disguising which type I was actually using as the compiler may just make it into an IEnumerable, which could be either IQueryable or List. I am left not knowing which was returned. However, if I explicitly made the type used a List, I would have no worries and all other coders who came to look at my code would know exactly what it was doing. Here we see an intended use for var that actually ends up worse than if the programmer thought about what he/she was doing with types rather than just using var.

Anyway, enjoy your lunch and happy coding :)
Ed Nutting 4-Jun-12 6:42am View
Indeed it would if it weren't for VS stopping you at every turn. I have a number of issues with this sort of code. Assume I am writing code in Notepad so there is no nice Intellisense or pre-compiler, just raw code.
1) That sort of potential bug, assigning the wrong type, is impossible to spot until compile time when I may get an error
2) Any given compiler may actually be able to compile that, in much the same way JavaScript can handle it. Because it is not truly strongly typed, it leaves it open to abuse.
3) If the example weren't so simple, actually knowing quickly and easily what type I could assign to i without working it out and writing it down somewhere may be very hard. Now writing down what type something is, rather than just explicitly typing it in the first place, is farcical. Also, Joe Bloggs who reads my code in future will also have to work out what type everything is. If it had just been explicitly typed in the first place none of this pointless effort would be wasted. This argument otherwise summarised as "vars make code far more unreadable and hard to maintain".

vars have their place. Their place should be sat in corner for everyone to look at, study, understand and then never return to unless by force. JavaScript demonstrates that vars can be powerful but also a nightmare. Developers should not be allowing the same chaos to enter C#. Too many poor or new developers fall in love with vars and end up in a mess, writing awful code. Not using vars is both good practice and good principle. I have never used them other than to learn about them and see no decent reason for them to be used, especially since I have never needed to use them and since I have answered too many problems which were a result of using vars. The problems probably wouldn't have occurred if explicit typing had been used, i.e. proper strong typing. Their only advantage is allowing developers to be lazy, which in this extreme, isn't a good thing.

As an end to this debate, it comes down to how you define strong typing. This Wikipedia page points out several, I think you can spot which I would say is correct. - See "Omission of implicit type conversion", which implies omission of implicit type declaration.
It seems you follow a looser definition that allows implicit types. A correct definition, but one which, in my opinion, does not lead to good code.

Ed Nutting 4-Jun-12 5:59am View
Yes I know we are talking about C# but JavaScript and C# both contain the "var type" and in both languages they do the pretty much the same thing. C# is supposed to be strongly typed by nature but the var type introduces implicitly typed variables. These by definition are not properly strongly typed variables since strong typing means giving something a definite type, which var isn't. Implicitly typed variables are not strongly typed variables unless you have an IDE that forces it. Sadly the MSDN stuff is written with the prerequisite that you are using VS and nothing else and so is able to call implicitly typed variables strongly typed. var is only strongly typed in Visual Studio because Intellisense, pre-compiler and compiler all force it to be so. If I were to use notepad to produce C# code, using vars would make it hard to follow, impossible to maintain any idea of what type something was without going back and checking where I got it from every time and what type that was and furthermore there would be a lot of bugs through casually ignoring type that wouldn't be noticed until compile time. Even then you could have a compiler that lets you create a var, assign it one type of value then a completely different one on the next line and that'd be fine. If it were properly strongly typed, no-one making a compiler could even consider making it do that. Using var in C# is bad, plain and simple. If someone can't figure out what type something should be, they should look it up so that they actually understand what they are doing. The only reason vars work at all is because of Intellisense but outside of the narrow world of Visual Studio, not to say VS is bad, but it becomes a lot harder without it and code becomes worse generally. (Just to note, JavaScript is completely weakly typed, as you rightly point out, and look how unreadable most of the JavaScript people produce is!? And that's without mentioning how many bugs scripts have...)

Finally yes, it's perfectly okay by me, just don't try telling me what I don't understand because you know little, if not, nothing about me. (Though your own strong objection would suggest that the quality of your code isn't great and that you know it to be so.)

P.s. Just a final thing to point out is that with vars, when the compiler has a choice between types, it may not pick the one you want e.g. when it can choose between IEnumerable and IQueryable, which may be very significant for when data is actually retrieved from the database!
Ed Nutting 4-Jun-12 4:35am View
What you say demonstrates you do not understand what strongly typing really means or are you about to argue that JavaScript is strongly typed? I have done far too much programming in JavaScript - I know exactly what var is, what it does and that is precisely why it shouldn't be used. By the way, Intellisense says nothing about whether something is strongly typed or even good code practice. Perhaps you should try programming without it for a while and tell you what, only use vars. I bet your code will have a lot more bugs, be significantly harder to maintain and grossly unreadable.
Ed Nutting 1-Jun-12 5:59am View
This is not possible. The lines and spaces are mandatory in the IE8 implementation of this feature. Since it is not part of an official standard you just have to put up with what you've got as there is no way of changing it. You could just pop-up a blank message so that it just asks "Are you sure want to navigate away from this page !".

Sorry there is no work around,
Ed Nutting 1-Jun-12 4:00am View
You can adapt the message in this but the basic form is:
window.onbeforeunload = function (e) {
e = e || window.event;

// For IE<8 and Firefox prior to version 4
if (e) {
e.returnValue = 'Want to leave?';

// For Chrome, Safari, IE8+ and Opera 12+
return 'Want to leave?';

(I took this straight from the link I gave you really - it does work in IE8)
Ed Nutting 1-Jun-12 3:39am View
Glad I could help :) By the way that NKH Mindsqualls library is open source so if you need to look at the exact bytes that it sends you can :)

Ed Nutting 31-May-12 4:20am View
Good response but I can't upvote :( My virtual 5+ then :)
Ed Nutting 31-May-12 4:16am View
Errr..what? I think you need to do some serious basic research on what ASP.Net and VB.Net are. ASP.Net refers to the web system but VB.Net is the programming language. Using ASP.Net has no effect on what the VB.Net language can do, it's just what environment your running the VB.Net code in. You can use just the same code to connect to your database in ASP.Net as you would in Windows Forms - they are both VB.Net.
Ed Nutting 31-May-12 4:10am View
This is very unclear. What is the problem here? You have said "I can add the items" - did you mean "can't"? What is going wrong? Do they just not display or does an error occur? Please update your question using the Improve Question link above.

Ed Nutting 31-May-12 4:02am View
Thank you :)
Ed Nutting 31-May-12 3:54am View
Looks like your Sys Admin is the one to help you. As the error says, it's a permissions issue. So talk (or email or communicate in some way) with your server admin and ask for the required permissions to use the ASPxGauge control. If you are the server admin, look up in Google how to give yourself the required permissions. I don't see that this is really an issue with your code.

Hope this helps,
Ed Nutting 31-May-12 3:47am View
Good answer (or many answers ;p). My 5+ (Sometimes I feel enquirers are a bit spoilt on CP really...I mean do we really have to search stuff for them? :/ )
Ed Nutting 31-May-12 3:31am View
This just looks like you haven't tried... If a user is logged in, have a member status recorded against that user. Then use an if/elseif or switch block to check which pages you should add to the list based on what that status allows them to access. Finally, on all pages check if the user is actually allowed to access those pages.

Ed Nutting 31-May-12 2:17am View
Right okay so to "integrate" with HTML5 you need to include HTML5 tags/code in your reprogramming. So first you need to know what these new bits are, how to use them and also the CSS3 stuff (which links closely with HTML5 but can be used on HTML4 or older stuff). I recommend having a look at these 2 W3Schools tutorials which will show you all the new additions and how
to use them:

Hope this helps get you started,
Ed Nutting 30-May-12 15:08pm View
See the answer belowabove & my comment on it - hopefully it will fully explain to you why you would use an abstract class not a normal class.
Ed Nutting 30-May-12 15:07pm View
Yes that's a reason to use an abstract class and well explained but I can see why the OP is having difficulty. The OP wants to know why you would use an abstract class as the base class rather then just a normal class as the base class. The answer is something along the lines of "I have generic code for lots of classes but need specific implementation of certain bits for it to all work so I don't want to be able to create an instance of the partial code but also don't want to have to rewrite it so therefore use an abstract class to stop instantiation but still get inheritance of the code throughout the classes" - but I'm not sure if that's the best way to put it... I see you have touched upon it in your example but perhaps you should focus in on it more, since it is the real problem here?

Anyway my 4+ for now, if this solves the OP's problem (or you update) I will boost to a 5 ;)
Ed Nutting 30-May-12 14:22pm View
Good answer, my 5 :)
Ed Nutting 30-May-12 14:20pm View
Sorry do you mean that when you auto-select the first item in your list you expect your (I assume you have from what you imply), your selection change event to be called? If so you are mistaken as to what you are doing. Selecting an item in server rendering code (in the Page_Load event) does not cause (and physically cannot cause) a post back and so not event gets fired - just think about the request lifecycle! Where as the user (you) selecting the first item (regardless of what was selected before) does cause a post back from client (you) to the server where your event is then fired. If you want to run code after auto-selecting the first item, you will have to call your method after selecting the item in the Page_Load event.

Ed Nutting 30-May-12 14:09pm View
Hi there,
Are you sure there isn't another possibility for failure such as a "pending" status or something meaning the email is waiting to be sent, but hasn't actually been sent. This might result in your code thinking the email hasn't been sent when actually it is just waiting.

Not sure if this is correct, I've never tried myself, but it's at least worth checking,
Ed Nutting 30-May-12 5:01am View
Im very sorry im on my phone i bus realised i clicked the wrong star. Vote has been corrected :)
Ed Nutting 30-May-12 4:55am View
Good answer, my 5+ :)
Ed Nutting 30-May-12 4:52am View
Homework or laziness? Look up in Google "c# read text from file" then look at the IndexOf function.
Ed Nutting 29-May-12 10:19am View
Yes that makes some sense given that data loaders etc are supposed to use what's called lazy loading, only getting data when they really need to. You might want to research how to get the datasource to fill the list box immediately rather than waiting till the page renders.
Ed Nutting 29-May-12 9:47am View
Have you debugged it to make sure that there are two list items in it when the code runs? No items in the list would be the only thing that would cause : ListBox_servidores.Items[0] to throw the error you are getting.
Ed Nutting 29-May-12 9:37am View
Err I think I'm being a bit obvious here but the error is saying that you have tried to access index 0 of a list but it is out or range - i.e. your list is empty...Have you actually added items to your list?
Ed Nutting 29-May-12 9:34am View
Is there actually a problem here? Just try putting the CSS in your page and see if it works... (Though for starters urls do not contain back slashes...)
Ed Nutting 29-May-12 9:13am View
Please search Google/astrology sites. We are not here to list software...
Ed Nutting 27-May-12 8:06am View
bgPopup is not the css class, it is the name of the variable. When I create the bgPopup variable, it gets the correct element who's class is "backgroundPopup". The bgPopup variables refers to your div element that has the class "backgroundPopup" that relates to the popup you wanted to show. I never actually reference a css class called "bgPopup", only ever "backgroundPopup".

Ed Nutting 25-May-12 10:15am View
How about what the program you are using is? Or at least what it's based on? Or have you written it all from scratch yourself? What were you actually trying to do - stream video from a server to a PC but via what? Windows form? Web plugin? There are all the details that and more that we need to be able to answer this properly. If you can't provide these or are prevented from providing the necessary then tell whoever is preventing you that it is their problem or if it's your boss, tell him/her nicely :)

Ed Nutting 25-May-12 8:21am View
Odd that nothing happened. I retested the code I gave you and it definitely works - I can only suppose that your full project has some unaccounted for difference that causes it to fail. Well best of luck, if you are struggling with JS/CSS/JQuery I recommend you take a look at the tutorials and references on this site:

Best of luck,
Ed Nutting 25-May-12 7:11am View
From looking at the JS code you have pasted above I can see one small mistake that would cause the JS to be invalid. In the $(document).ready function find the lines which say:
//Click the button event!

On the next line after these you have a curly brace ({). This should not be there or it should be commented out. If you delete this the JS will be valid and hopefully then work :)

Ed Nutting 24-May-12 12:51pm View
Hi there,

Well that is certainly not at all the JS code I sent you, look in my comment from 4 days ago and you will see there are vast differences. It is no wonder it doesn't work if you have not made the changes to your JS code as I actually posted them... Please also check that your CSS is correct too. (If you're wondering, every JS method you have was different at least slightly in my version...)

Ed Nutting 24-May-12 12:47pm View
The sue of var isn't strongly typing - it can hold any type, which is by definition therefore not strongly typing your variable. Using var when it is not necessary (which is always in .Net languages) makes code unreadable and hard to understand, especially as many people don't use casting or the as keyword with it. It may be standard in C# but it is a horrible thing to use, otherwise why bother with using proper types!? You call it a "syntactic sugar", I call it an abomination...
Ed Nutting 24-May-12 7:25am View
Edit: Fixed formatting.
Ed Nutting 24-May-12 7:23am View
My 5+ - Good answer :)
Ed Nutting 24-May-12 7:22am View
My 5+ - Though I don't like the use of var (why not just do proper casting and strong typing, that's half the point of languages like VB.Net and C#). Anyway, looks like it should work :)
Ed Nutting 23-May-12 14:56pm View
The Facebook API is only accessible over the web. In fact it's next to impossible to interact with the Facebook API without doing some form of web service/web interaction. You will have to deal with this in your program. So look at the example and pick it apart to see which bits rely on the web and which bits can be done directly in your desktop application. Then work out how to separate the bits and make them work for you. You will most probably need a web service or similar somewhere.

Ed Nutting 23-May-12 14:40pm View
My 5! Yep! ;)
Ed Nutting 23-May-12 14:33pm View
Combine both answers and the code will work properly ;)
Ed Nutting 23-May-12 14:31pm View
Good answer and (again) very good point about the direct concatenation, my 5+. Though the OP is probably using ASP.Net so is protected from SQL injection fairly well - the auto-validation of data is very good already :)

Ed Nutting 23-May-12 14:30pm View
Thank you and yes that was about the most restrained I could get :)
Ed Nutting 23-May-12 14:28pm View
A very good point, my 5+ :)
Ed Nutting 23-May-12 14:28pm View
5+ :)
Ed Nutting 23-May-12 14:03pm View
Given that your server side code cannot possibly be interacting directly with IE and telling it to close, I would suggest that your server code is fine, as it works with other browsers. The issue may be that Internet Explorer (possibly) uses a shorter request time-out? If so you will need to investigate how to check what the time-out is and how to change it - I'm pretty sure you can. Either way your server side code is not able to effect IE directly so if it works in one browser and not in another then it's not your file creation code that's going wrong.

Hope this helps,