Search Results

Search found 40745 results on 1630 pages for 'type deduction'.

Page 137/1630 | < Previous Page | 133 134 135 136 137 138 139 140 141 142 143 144  | Next Page >

  • How to detect textarea or input type="text" editing?

    - by kavoir.com
    I use this snippet to prevent the user from accidentally navigating away from the editing page: var warning = false; window.onbeforeunload = function() { if (warning) { return ''; } } Now I want to set the variable warning to be true if any of the textarea or input type="text" has been modified, I want to use the onkeyup event such as in: document.getElementById('textarea_id').onkeyup = function() { warning = true; } But it's not working. Don't quite want to use jQuery on this. Any insights?

    Read the article

  • What is a "could not find type System.Collections.Generic.List" in the .NET Designer?

    - by WindyCityEagle
    I've got a WinForms project that I've had for quite some time, and now suddenly, I can't open the designer anymore and when I try to open the designer I get an error that says could not find type 'System.Collections.Generic.List' All of the code builds just fine, but I can't use the designer anymore, and I don't know what happened, nor do I have any idea where to look to solve the problem. Has anyone ever run into this or have any insight?

    Read the article

  • Why is the Objective-C Boolean data type defined as a signed char?

    - by EddieCatflap
    Something that has piqued my interest is Objective-C's BOOL type definition. Why is it defined as a signed char (which could cause unexpected behaviour if a value greater than 1 byte in length is assigned to it) rather than as an int, as C does (much less margin for error: a zero value is false, a non-zero value is true)? The only reason I can think of is the Objective-C designers micro-optimising storage because the char will use less memory than the int. Please can someone enlighten me?

    Read the article

  • How to add the document library column named "Type (icon linked to document)" into list view?

    - by Sushant
    I am working with a list view. I want a column to have look similar to the document library column named "Type (icon linked to document)" column. I should also be able to set the path this hyperlinked icon should open. I tried a lot with existing site columns but could still not figure out how to do this. Has anyone implemented this earlier. Please share your expertise. Thanks in advance.

    Read the article

  • Can't get GetModuleFileNameA to work, keep getting error 'missing type specifier...'

    - by flavour404
    Hi, I am trying to use 'GetModuleFileNameA' but I keep getting the error 'c4430: missing type specifier - int assumed'. From reading the results from my google search I am guessing that it is from my use of NULL: char Filename[MAX_PATH]; //this is a char buffer GetModuleFileNameA(NULL, Filename, sizeof(Filename)); NULL is supposedly defined in #include stdio.h which I have included in my project, what am I doing wrong? Thanks.

    Read the article

  • Is typeid of type name always evaluated at compile time in c++ ?

    - by cyril42e
    I wanted to check that typeid is evaluated at compile time when used with a type name (ie typeid(int), typeid(std::string)...). To do so, I repeated in a loop the comparison of two typeid calls, and compiled it with optimizations enabled, in order to see if the compiler simplified the loop (by looking at the execution time which is 1us when it simplifies instead of 160ms when it does not). And I get strange results, because sometimes the compiler simplifies the code, and sometimes it does not. I use g++ (I tried different 4.x versions), and here is the program: #include <iostream> #include <typeinfo> #include <time.h> class DisplayData {}; class RobotDisplay: public DisplayData {}; class SensorDisplay: public DisplayData {}; class RobotQt {}; class SensorQt {}; timespec tp1, tp2; const int n = 1000000000; int main() { int avg = 0; clock_gettime(CLOCK_REALTIME, &tp1); for(int i = 0; i < n; ++i) { // if (typeid(RobotQt) == typeid(RobotDisplay)) // (1) compile time // if (typeid(SensorQt) == typeid(SensorDisplay)) // (2) compile time if (typeid(RobotQt) == typeid(RobotDisplay) || typeid(SensorQt) == typeid(SensorDisplay)) // (3) not compile time ???!!! avg++; else avg--; } clock_gettime(CLOCK_REALTIME, &tp2); std::cout << "time (" << avg << "): " << (tp2.tv_sec-tp1.tv_sec)*1000000000+(tp2.tv_nsec-tp1.tv_nsec) << " ns" << std::endl; } The conditions in which this problem appear are not clear, but: - if there is no inheritance involved, no problem (always compile time) - if I do only one comparison, no problem - the problem only appears only with a disjunction of comparisons if all the terms are false So is there something I didn't get with how typeid works (is it always supposed to be evaluated at compilation time when used with type names?) or may this be a gcc bug in evaluation or optimization? About the context, I tracked down the problem to this very simplified example, but my goal is to use typeid with template types (as partial function template specialization is not possible). Thanks for your help!

    Read the article

  • HTML / CSS How to add image icon to input type="button" ?

    - by Brett
    Hi, I'm using this css, but it puts an image in the center. Any way to left or right align an icon using an input type="button" html button, so that the text and the image fit on the button nicely? background: url('/common/assets/images/icons/16x16/add.png');background-position:center;background-repeat:no-repeat;

    Read the article

  • How to make OSX application that just runs opens some file type and runs arbitrary Ruby code?

    - by taw
    It's trivial to make a program executable from shell - just put #!/usr/bin/ruby on top, chmod +x it and done. Unfortunately OSX won't let me associate file type with such scripts - it requires its .apps instead. This sort of distinction doesn't seem to exist on other operating systems. What's the simplest way of making such .app, which would merely execute some arbitrary Ruby code?

    Read the article

  • Problem with C function of type char pointer, can someone explain?

    - by JJ
    Find the errors from following C function : char* f(int i) { int i; char buffer[20]; switch ( i ) { 1: strcpy( buffer, "string1"); 2: strcpy( buffer, "string2"); 3: strcpy( buffer, "string3"); default: strcpy(buffer, "defaultstring"); } return buffer; } this is c funtion not C++, I think it has to do with type conversion my compiler give warning that declaration of int i shadows a parameter.

    Read the article

  • How to find the class object of Java generic type?

    - by Samuel Yung
    Assume I have a generic type P which is an Enum, that is <P extends Enum<P>>, and I want to get the Enum value from a string, for example: String foo = "foo"; P fooEnum = Enum.valueOf(P.class, foo); This will get a compile error because P.class is invalid. So what can I do in order to make the above code work?

    Read the article

  • How to display full documentation of a method as you type in VS?

    - by drasto
    The title is pretty descriptive... Is there any extension that let me see FULL documentation of the method I'm typing ? I would like to see the documentation as I can see it in Object Browser with description of parameters and everything not just some "summary". So what I'd like to see when I type String.Format is: Of cause with an option to see all overrides. It may be part of intelisence or I don't know what it does not really matter.

    Read the article

  • Where i get the better idea to which type of application base should be in iphone?

    - by Rajendra Bhole
    Hi, I want to develop an application in which i doesn't any idea about how to create my app with which controller class i should i have gave? My application first screen contain TabBarController and i have also inserting UINavigationController. On above scenario i little bit confused which type of controller(confusion in TabBarController, NavigationBarController or simple ViewController ya windows based appliaction) should i take.

    Read the article

< Previous Page | 133 134 135 136 137 138 139 140 141 142 143 144  | Next Page >