Search Results

Search found 14236 results on 570 pages for 'times square'.

Page 218/570 | < Previous Page | 214 215 216 217 218 219 220 221 222 223 224 225  | Next Page >

  • Is there a better way to format this date string

    - by Mark Breen
    Hello is there are better way to structure this line of code, as you can see, I am changing the format of a string that contains a date. lblCourseStartDate.Text = String.Format("{0:D}", DateTime.Parse(CourseStartDate)); I just found it untidy that I am converting twice or three times to get the format I want. Thanks

    Read the article

  • In an array of buttons, how can you tell which button was clicked?

    - by Michael Seltenreich
    If I have an array of buttons, how can I tell which button was clicked? example below var i=0 CreateButton = new function () { savebutton[i]=NewButton() i++ } every time a user runs the function a new button is generated. the first button is savebutton[0] the second is savebutton[1] and so on potentially infinity times. when later the user presses the button I want the screen to alert it's index number (or 'i'). is there any way to make this work in arrays?

    Read the article

  • Usage Tracking for Windows desktop applications ...

    - by sdaas
    Hi, I am looking for some frameworks that can be used to collect usage information for Windows desktop application and analyze it. For example, I would like to be able to answer questions like (a) how many times do people use this application in a day (b) which are their favorite menu items, etc. I looked briefly at Google Analytics and Omniture SiteCatalyst but they seem to work only on web applications. Thanks SD

    Read the article

  • Run Jar in Background on Linux

    - by Benny
    I have a jar that runs forever (infinite loop with socket listening thread) and need it to run in the background at all times. An example would be: "java -jar test.jar" How do I do this? Thanks in advance!

    Read the article

  • Any way to anticipate session timeout ?

    - by Tom
    Hi, Is there a way to "catch" the session timeout event, so as to retrieve data from HttpSession before its invalidated ? We're implementing the Filter Interface, and in the doFilter method, the user we stored in the session object at login is null when session times out. Thanks in advance.

    Read the article

  • Is passing a struct value to a method by-reference in C# an acceptable optimization?

    - by Arc
    Say I have a struct: struct MyStruct { public int X public int Y } And a method in some class that is iterated over many times elsewhere: public bool MyMethod( MyStruct myStruct ) { return ... } Is changing the MyMethod signature to the following an acceptable optimization? public bool MyMethod( ref MyStruct myStruct ) If so, how much of an advantage would it really be? If not, about how many fields would a struct need for a big enough advantage using ref this way?

    Read the article

  • What is this CSS rule?

    - by Lisa
    In the son of suckerfish drop down menu: http://www.htmldog.com/articles/suckerfish/dropdowns/example/ You see this rule w\idth: 13.9em; This can't be a typo as it appears various times in the css. What is it for?

    Read the article

  • Regular expression (PCRE) for url matching

    - by zerkms
    The input: we get some plain text as input string and we have to highlighight all urls there with {url For some time i've used regex taken from http://flanders.co.nz/2009/11/08/a-good-url-regular-expression-repost/, which i modified several times, but it's built for another issue - to check whether the whole input string is an url or no. So, what regex do you use in such issues?

    Read the article

  • Easiest way to find out if user has either Windows 7 or Vista (through telephone support)?

    - by Rabarberski
    If you have to provide some initial troubleshooting support by phone [or email], and you don't have access to the PC itself, what is the easiest and most foolproof question to find out if the 'dumb' user is using either Windows 7 or Windows Vista? For example: determining if the user has either Windows XP or Windows Vista/7 is easy. Just ask the user if the button at the left bottom corner is (a) either square with the word 'Start' on it, or (b) it is a round button. But how to determine the difference between Vista and 7? Edit: For all the existing answers the user has to type something, and do it correctly. Sometimes even that is already hard for a computer illiterate user. My XP example just requires looking. If it exists (although I am afraid it doesn't), I think a solution that is just based on something this is visually different between Vista and 7 would stand above all others. (Which makes Dan's suggestion to turn over the box and look at the label" not so stupid). Perhaps the small 'show desktop' rectangle at the right side of the task bar (was that present in Vista)?

    Read the article

  • What javascript templating engine do you recommend?

    - by flybywire
    Do you have experience with a Javascript templating engine, one that is stable, easy to use and has good performance? I need to do apply the same template many times for different data. I prefer to download the template itself once (and have it cached) rather than processing the template on the server. Also, this way the template itself would be a static resource more easily cached in the server side too.

    Read the article

  • Website programming language [closed]

    - by Develman
    Hello everybody, I have worked a lot with PHP in last times, but I am not sure if it is the best choice for website programming. What language do you prefer for website programming? Which type (private, business, etc.) of website do you build with that language?

    Read the article

  • Check if a pointer points to allocated memory on the heap.

    - by Ugo
    Ok, I know this question seems to have been asked many times on stackoverflow. but please read Well the answer for any address is "No you can't" but the question here is to know if a pointer points to a piece of memory allocated with malloc/new. Actually I think it could be easily implemented overriding malloc/free and keeping track of allocated memory ranges. Do you know a memory management library providing this specific tool ?

    Read the article

  • When would I want to model a class with a private ctor?

    - by dotnetdev
    Hi, I've seen plenty of classes in .NET which have private constructor (Stream is one of them I think). When would I want to model a class like this? I keep thinking that if my class has no internal state/fields, then I can make it have a private constructor. Am I on the right track with this idea? I can understand the use of a factory (I've run into the tipping point a few times), but not with a private constructor class. Thanks

    Read the article

  • Add a + sign to a +ve number in PHP

    - by user318466
    I need to design a function to return -ve numbers unchanged but should add a + sign at the start of the number if its alreay no present. Example: Input Output ---------------- +1 +1 1 +1 -1 -1 It will get only numeric input. function formatNum($num) { # something here..perhaps a regex? } This function is going to be called several times in echo/print so the quicker the better.

    Read the article

  • relaunch app when it ends or when it prints out certain text (stdout)

    - by acidzombie24
    I have an app which acts almost like a daemon. Sometimes it quits on error and many times it prints an error msg then ask users to press any key to close. How can i relaunch the app when either case happens? I am more interested in the 2nd case. I can do this in c++, C# or python. The script is an old python that i dont want to change (a newer c# version is in the works but not stable)

    Read the article

  • Code formatting when using pointers

    - by HD-VRSCA
    Is there any reason why the asterisk is next to the object type in this code? I'm a little confused by the way I see this used. Some times it looks like this: NSString* stringBefore; and sometimes like this: NSString *stringBefore; Is there a difference? Or a right or wrong way to do this? Thanks

    Read the article

  • Speeding up Math calculations in Java

    - by Simon
    I have a neural network written in Java which uses a sigmoid transfer function defined as follows: private static double sigmoid(double x) { return 1 / (1 + Math.exp(-x)); } and this is called many times during training and computation using the network. Is there any way of speeding this up? It's not that it's slow, it's just that it is used a lot, so a small optimisation here would be a big overall gain.

    Read the article

  • Mercurial: include revisions in diff?

    - by David Wolever
    Is there some way to ask Mercurial to show the revisions being diffed in the output? For example: $ hg diff -r trunk:development diff -r 08d51ecf22cf:ff5673e55b9f --git a/foo.c b/foo.c ... Or something similar? I've found that there have been a few times that I've taken a diff (eg, to review), but have later been unable to recreate it because I've forgotten which revisions it was taken against.

    Read the article

  • How would you show a file with cURL?

    - by Kyle
    There is an epic lack of PHP cURL love on the Internet for beginners like me. I was wondering how to use cURL to download & display an ICS file (They're plain text to me...) in my PHP code. Unless fopen() is 1,000 times easier, I'd like to stick with cURL for this one.

    Read the article

< Previous Page | 214 215 216 217 218 219 220 221 222 223 224 225  | Next Page >