Search Results

Search found 8286 results on 332 pages for 'defined'.

Page 110/332 | < Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >

  • Where does the AccountController in Asp.Net MVC 2 store its data?

    - by JLago
    I'm creating a website using ASP.NET MVC 2 and I'm thinking of using the default AccountController and Views to take care of the Users. The only problem is that, for all the rest, I'm using a Postgres database. Is there a way to link The account controller to a User class defined by me? I'm using Nhibernate to connect to the database, so I'll have a User class with whatever fields necessary. Thanks very much.

    Read the article

  • How to move an anonymous function out

    - by cf_PhillipSenn
    I have a $.ajax call with an error callback: error: function(result){ $('#msg').text(result.statusText).addClass('err'); } I'd like to change it to a more generic: error: myError(result) And then all by itself: function myError(theError){ $('#msg').text(theError.statusText).addClass('err'); } But firebug is telling me "result" is not defined.

    Read the article

  • In the UK, how do I find an address given the GPS coordinates?

    - by Ian Ringrose
    Sorry this is not a very well defined question, I am thinking about an ideal for a product, so need to know what is possible... Say I am standing at the fount door of a house, given the GSP coordinates from a smart phone, how can I find the address I am standing at? Is GPS good enough for this? How much does the data/service I need to use cost? What other questions should I be asking about this?

    Read the article

  • android : widget long press & movement handling in user activity.

    - by Puneet kaur
    hi, please suggest me a way to handle widget long press event & its movement in user defined home screen .i.e i have activity whose background handles the long click and then we can choose the approprait widget from the list ,but the problem is that i am not able to implement the long click on widget and its movement in my activity. for code reference see the link below http://www.google.com/support/forum/p/Android+Market/thread?tid=25992cd433e6b826&hl=en thanks

    Read the article

  • How to pickle and unpickle objects with self-references and from a class with slots?

    - by EOL
    Is it possible to pickle an object from a class with slots, when this object references itself through one of its attributes? Here is a simple example: import weakref import pickle class my_class(object): __slots__ = ('an_int', 'ref_to_self', '__weakref__') def __init__(self): self.an_int = 42 self.ref_to_self = weakref.WeakKeyDictionary({self: 1}) # __getstate__ and __setstate__ not defined: how should this be done? if __name__ == '__main__': obj = my_class() # How to make the following work? obj_pickled = pickle.dumps(obj) obj_unpickled = pickle.loads(obj_pickled) # Self-references should be kept: print "OK?", obj_unpickled == obj_unpickled.ref_to_self.keys()[0]

    Read the article

  • tomcat startup.sh trouble finding JAVA_HOME

    - by peter
    I am a bit puzzled by this strange behavior on CentOs 5.4 when starting Tomcat 6.0 as a service I've added a script at /etc/init.d/tomcat that can start/stop/restart Apache Tomcat 6.0 with user 'tomcat', and registered it as service. The problem with the service is that I am getting a 'Neither the JAVA_HOME nor the JRE_HOME environment variable is defined'. But when type 'sudo -u tomcat echo $JAVA_HOME' I get '/usr/java/jdk1.5.0_22' which is correct since I am using that JDK. What can I do about this?

    Read the article

  • How do debug header file implemetation (its .cpp) in c++ using GDB

    - by zengr
    Hi, I have these 3 file in my program: sample1.h (method in sample1.cpp are defined here) sample1.cpp (all the actual implementations) demo.cpp (I am using the methods in sampe1.cpp here, and have included sample1.h) Now, I am using GDB to debug and I know the basic commands like "break lineno." or "break methodname". But, how do I debug the methods written in sample1.cpp? I tried: break "sample1.cpp:mymethod" but it did not work. Thanks

    Read the article

  • Are reference attributes destroyed when class is destroyed in C++?

    - by Genba
    Suppose I have a C++ class with an attribute that is a reference: class ClassB { ClassA &ref; public: ClassB(ClassA &_ref); } Of course, the constructor is defined this way: ClassB::ClassB(ClassA &_ref) : ref(_ref) { /* ... */ } My question is: When an instance of class 'ClassB' is destroyed, is the object referenced by 'ClassB::ref' also destroyed?

    Read the article

  • intrusive_ptr: Why isn't a common base class provided?

    - by Jon
    intrusive_ptr requires intrusive_ptr_add_ref and intrusive_ptr_release to be defined. Why isn't a base class provided which will do this? There is an example here: http://lists.boost.org/Archives/boost/2004/06/66957.php, but the poster says "I don't necessarily think this is a good idea". Why not?

    Read the article

  • Replace a control on the screen

    - by Rob Bonner
    Hello all, I have an instance of a FlowCoverView (a great library that emulates cover flow on the iPhone). And it works great, with the exception of an update. When I update my table behind the scenes, I have no way of telling this control (that is defined in IB) that it has been updated, and to reload. (much like you can with a table using reloadData) To the question, is there a way to replace a control that is on the screen with another control to force the reload?

    Read the article

  • relation between ranks of processes after using MPI_COMM_split

    - by dks12345
    I used MPI_Comm_split to split the default MPI communicator.If initially there were 10 processes in default communicator ,MPI_COMM_WORLD and ,say, their ranks were identified by id_original. The new communicator consisted of 4 processes with id_original 6,7,8,9.These processes will have ranks defined by , say , id_new in the new communicator. What will be the relation between ranks of processes in these two communicators. Will the processes with id_original 6,7,8,9 will have new ranks 0,1,2,3 respectively in the new communicator or the ordering might be different?

    Read the article

  • How do you convert a string to a node in XQuery?

    - by Sixty4Bit
    I would like to convert a string into a node. I have a method that is defined to take a node, but the value I have is a string (it is hard coded). How do I turn that string into a node? So, given an XQuery method: define function foo($bar as node()*) as node() { (: unimportant details :) } I have a string that I want to pass to the foo method. How do I convert the string to a node so that the method will accept the string.

    Read the article

  • Use jQuery to change a CSS value

    - by justSteve
    If i have a background image defined as: #header { width: 100%; background: url(/Content/images/header.jpg) -0 0 no-repeat; } and i want to overwrite that after the page loads. Shouldn't this code work? $("#header").css('background-image', '/Content/images/aff/header_<%=affiliateID%>.jpg')

    Read the article

  • Switching 2003 SRV to 2008 caused Asp.net application not to load DLL

    - by Tom
    Switching aged 2003 SRV to 2008 caused my Asp.net 2 application fail: The application is no more loading the required library DLL from /bin/ folder anymore. What should I change in my code or web.config to make this webapp load OK also in new 2008 server? Now I receive this error when I access the application: This type is in IMPORTS ( Dll ). Compiler Error Message: BC30002: Type 'Facebook.Entity.User' is not defined.

    Read the article

  • Easiest way to get Enum in to Key Value pair.

    - by vijay.shad
    Hi, I have defined my Enums like this. public enum UserType { RESELLER("Reseller"), SERVICE_MANAGER("Manager"), HOST("Host"); private String name; private UserType(String name) { this.name = name; } public String getName() { return name; } } What should be the easiest way to get a key-value pair form the enum values?

    Read the article

  • Trying to provide a global logging function

    - by Gekitsuu
    I typically write my scripts with a structure like s #!/usr/bin/python import stuff def do_things(): print "FOO" def main(): do_things() if __name__ == "__main__": main() The problem I have is I'd like to have a logging function that is defined globally and I"m not really sure how to do this. I tried a decorator function but if I define it in main I can't call it from other functions in the script. It seems like something that should be easy to do but not something I have experience with.

    Read the article

  • Reversed Sorted Dictionary?

    - by Mark
    I have a SortedDictionary as defined like this: SortedDictionary<TPriority, Queue<TValue>> dict; But I want to sort the keys in reverse order. I assume I need set the Comparer, but what comparer do I use for a generic TPriority? Note that TPriority implements IComparable.

    Read the article

  • C++ boost wave, scoped macro

    - by aaa
    hello. Is it possible to have scoped macros using custom defined macros through boost wave? I know it should a possible with C++0x however I am working with regular C++. If it is possible, can you provide link or reference how to accomplish this? Thanks

    Read the article

  • Assign enum property in xaml using silverlight

    - by Malcolm
    I have a property of datattype enum : like public BreakLevel Level { get { return level; } set { level = value; } } And enum defined : public enum BreakLevel { Warning, Fatal } I want bind the neum property to the visibility of my border , somewhat like this: Visibility="{Binding BreakLevel.Fatal}" so is it possible? <Border CornerRadius="4" BorderThickness="1" BorderBrush="#DAE0E5" Visibility="{Binding DataContext.IsError, Converter={StaticResource BoolToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" >

    Read the article

  • Any .NET '#region directive' convention ideas ?

    - by PaN1C_Showt1Me
    I really appreciate the possibility to define regions in your code, as it improves the readability insanely. Anyways, I'd like to have everyone using the same convention in all classes (with the predefined order of all regions) like: Private Fields Constructors Class Properties Event Handlers etc... Do you have any proposition how this division could look like (What regions have sense and what names should they have) and in which order should they be defined ?

    Read the article

  • undefined reference errors in C++

    - by Phenom
    I have files Record.h and Record.cpp. When I just include the Record.h file, I get several undefined reference errors to functions defined in those files. When I also include Record.cpp then the errors go away. Why is that? Record.h has the forward declarations for the functions it says are an undefined reference.

    Read the article

< Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >