Search Results

Search found 3679 results on 148 pages for 'definition'.

Page 10/148 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • django model relation definition

    - by Laurent Luce
    Hello, Let say I have 3 models: A, B and C with the following relations. A can have many B and many C. B can have many C Is the following correct: class A(models.Model): ... class B(models.Model): ... a = ForeignKey(A) class C(models.Model): ... a = ForeignKey(A) b = ForeignKey(B)

    Read the article

  • Python grab class in class definition.

    - by epochwolf
    I don't even know how to explain this, so here is the code I'm trying. class Test: type = self.__name__ #self doesn't work, how do I get a reference to Test? class Test2(Test): pass #Test2.type should return "Test2" The reason I'm even trying this is I'm working on creating a base class for an orm I'm using. I want to avoid defining the table name for every model I have. Also knowing what the limits of python is will help me avoid wasting time trying impossible things.

    Read the article

  • Where is the taglib definition of PrimeFaces 4?

    - by Michael Wölm
    I am looking around how to define custom components in JSF. According to the Java EE tutorial, any custom component needs to be described in a taglib. When I take a look into the PrimeFaces source, I cannot find any taglib file or any hint where the namespace is bound and the available components are defined. I am adding primefaces jar to my dependencies, adding xmlns:p="http://primefaces.org/ui to the xml namespace, defining some primfaces components on my page and it works... Ok, but neither I can find the related taglib in the source or binary package nor my IDE (IntelliJ) is able to find where "xmlns:p="http://primefaces.org/ui" is pointing to. Therefore, code completion is also not possible. (all other mojarra taglibs are found.) Is it possible that PrimeFaces is defining the taglib via annotations directly in Java classes or is it generating it during runtime? I can easily find the UIComponents, primefaces defines in its source, but the configuration of the taglib seems to be missing. I am sure I just don't know how PrimeFaces is doing it, but the javaeetutorial is not describing any other opportunity than defining a ...-taglib.xml

    Read the article

  • asp.net web service OneWay definition not working

    - by jbrook10
    When I specify <SoapDocumentMethod(OneWay:=True)> on my webservice it doesn't seem to get called. If I remove that the webservice works properly. Also, everything works fine on the development machine just not on the server. Here is my web method: <SoapDocumentMethod(OneWay:=True)> _ <WebMethod()> _ Public Sub Write(ByVal processGroupId As Integer) xslClass.xslHelper.writeDatabase(processGroupId) ', processGroupName) End Sub Here is my calling code: Dim svc As New svcWriteFiles.WriteDatabaseService svc.WriteAsync(e.CommandArgument) Any ideas?

    Read the article

  • C# 3 dimensional array definition issue

    - by George2
    Hello everyone, My following code has compile error, Error 1 Cannot implicitly convert type 'TestArray1.Foo[,,*]' to 'TestArray1.Foo[][][]' C:\Users\lma\Documents\Visual Studio 2008\Projects\TestArray1\TestArray1\Program.cs 17 30 TestArray1 Does anyone have any ideas? Here is my whole code, I am using VSTS 2008 + Vista 64-bit. namespace TestArray1 { class Foo { } class Program { static void Main(string[] args) { Foo[][][] foos = new Foo[1, 1, 1]; return; } } } EDIT: version 2. I have another version of code, but still has compile error. Any ideas? Error 1 Invalid rank specifier: expected ',' or ']' C:\Users\lma\Documents\Visual Studio 2008\Projects\TestArray1\TestArray1\Program.cs 17 41 TestArray1 Error 2 Invalid rank specifier: expected ',' or ']' C:\Users\lma\Documents\Visual Studio 2008\Projects\TestArray1\TestArray1\Program.cs 17 44 TestArray1 namespace TestArray1 { class Foo { } class Program { static void Main(string[] args) { Foo[][][] foos = new Foo[1][1][1]; return; } } } EDIT: version 3. I think I want to have a jagged array. And after learning from the fellow guys. Here is my code fix, and it compile fine in VSTS 2008. What I want is a jagged array, and currently I need to have only one element. Could anyone review whether my code is correct to implement my goal please? namespace TestArray1 { class Foo { } class Program { static void Main(string[] args) { Foo[][][] foos = new Foo[1][][]; foos[0] = new Foo[1][]; foos[0][0] = new Foo[1]; foos[0][0][0] = new Foo(); return; } } } thanks in advance, George

    Read the article

  • How to change enum definition without impacting clients using it in C#

    - by Rohit
    I have the following enum defined. I have used underscores as this enum is used in logging and i don't want to incur the overhead of reflection by using custom attribute.We use very heavy logging. Now requirement is to change "LoginFailed_InvalidAttempt1" to "LoginFailed Attempt1". If i change this enum, i will have to change its value across application. I can replace underscore by a space inside logging SP. Is there any way by which i can change this without affecting whole application.Please suggest. public enum ActionType { None, Created, Modified, Activated, Inactivated, Deleted, Login, Logout, ChangePassword, ResetPassword, InvalidPassword, LoginFailed_LockedAccount, LoginFailed_InActiveAccount, LoginFailed_ExpiredAccount, ForgotPassword, LoginFailed_LockedAccount_InvalidAttempts, LoginFailed_InvalidAttempt1, LoginFailed_InvalidAttempt2, LoginFailed_InvalidAttempt3, ForgotPassword_InvalidAttempt1, ForgotPassword_InvalidAttempt2, ForgotPassword_InvalidAttempt3, SessionTimeOut, ForgotPassword_LockedAccount, LockedAccount, ReLogin, ChangePassword_Due_To_Expiration, ChangePassword_AutoExpired }

    Read the article

  • SaaS tool for *simple* requirements definition?

    - by Angela
    I've seen some complex, enterprise tools for requirements like Rymatech's FeaturePlan -- is there something that enables collaboration and best practices for putting Business-Readable, Domain-Specific (or natural language) requirements and acceptance criteria in place?

    Read the article

  • Error with custom Class definition in protocol

    - by Greg
    I'm trying to set up a custom delegate protocol and am getting a strange error that I don't understand. I wonder if someone could point out what I'm doing wrong here (I'm still new to Ob-C and protocol use)... The situation is that I've built my own URLLoader class to manage loading and parsing data from the internet. I'm now trying to set up a protocol for delegates to implement that will respond to the URLLoader's events. So, below is my protocol... #import <UIKit/UIKit.h> #import "URLLoader.h" /** * Protocol for delegates that will respond to a load. */ @protocol URLLoadResponder <NSObject> - (void)loadDidComplete:(URLLoader *)loader; - (void)loadDidFail:(URLLoader *)loader withError:(NSString *)error; @end However, I'm getting the following error for both method signatures: Expected ')' before 'URLLoader' I feel like I must be overlooking something small and silly. Any help folks could offer would be greatly appreciated! Whoops ... it was pointed out that I should include URLLoader.h. Here it is: #import <Foundation/Foundation.h> #import "URLLoadResponder.h" /** * URLLoader inferface. */ @interface URLLoader : NSObject { NSString *name; NSString *loadedData; NSMutableData *responseData; NSObject *delegate; BOOL _isLoaded; } @property (nonatomic, retain) NSString *name; @property (nonatomic, retain) NSString *loadedData; @property (nonatomic, retain) NSObject *delegate; - (void)loadFromURL:(NSString *)url; - (void)addCompleteListener:(id)observer selector:(SEL)sel; - (void)removeCompleteListener:(id)observer; - (void)parseLoadedData:(NSString *)data; - (void)complete; - (void)close; - (BOOL)isLoaded; + (NSURL *)makeUrlWithString:(NSString *)url; + (URLLoader *)initWithName:(NSString *)name; @end

    Read the article

  • Aptana function definition popups

    - by DavidYell
    I've noticed that in Aptana 2.0 over 1.5.1 that when typing a php function, you no longer get the popup window showing the function description and it's parameters. Does anyone know how to get this working again? As I relied on it quite heavily to remember which parameters went where. Open in PHP Manual shortcut Shift+F2 also doesn't work either, so all I can do is open my browser and keep php.net open all the time. Are either of these features functional? I know that Open delcaration has never worked annoyingly, but I had the function popup in 1.5.1 perfectly.

    Read the article

  • C++ macro definition unclear

    - by Tony
    Is this a macro defintion for a class or what exactly is it? #define EXCEPTIONCLASS_IMPLEMENTATION(name, base, string) : public base \ { \ public: \ name() : base(string) {} \ name(const x::wrap_exc& next) : base(string,next) {}; \ name(const x::wrap_exc& prev, const x::wrap_exc& next) : \ base(prev, next) {}; \ }

    Read the article

  • Definition of domains in mySQL?

    - by mal
    I'm working on a college exercise and have the following question: What is the domain of the "country" table? My understanding of domain is that it defines the possible values of an attribute. This means that the table "country" doesn't have a domain, but the various attributes in the table "country" have their own domains. For example the attribute "SurfaceArea" has the domain FLOAT(10,2) and the attribute "Name" has the domain CHAR(52). Is this correct?

    Read the article

  • Access main stage from class definition file (as3)

    - by staypuffinpc
    I'd like to access the stage of the main timeline from w/i a class that extends a movieclip. Basically, I have a button in the main timeline that makes a HUD appear. The HUD is an extended MovieClip class. When people click on a button in the HUD, I'd like to remove the object from the stage of the main MovieClip.

    Read the article

  • Rails passenger production cache definition

    - by mark
    Hi I'm having a bit of a problem with storing data in rails cache under production. What I currently have is this, though I have been trying to work this out for hours already: #production.rb config.cache_store = :mem_cache_store if defined?(PhusionPassenger) PhusionPassenger.on_event(:starting_worker_process) do |forked| if forked Rails.cache.instance_variable_get(:@data).reset end end end I am using a cron job to (try to) save remote data to the cache for display. It is logged as being written to the cache but reportedly null. If anyone could point me toward a decent current tutorial on the subject or offer guidance I'd be extremely grateful. This is really, really frustrating me. :(

    Read the article

  • How to align Definition Lists in IE6 ?

    - by ellander
    I'm having a major headache trying to align some and elements in ie6. It looks fine in ie7 and firefox but the dt elements don't appear in ie6. can anyone help? here is the code.. <div id="listMembers"> <h3>Members</h3> <dl class="myDL"> <dt>Name</dt> <dd>John Smith</dd> <dt>Address</dt> <dd>the street</dd> ... </dl> <div id="listOptions"> <div> <table>...</table> </div> </div> <div> and the css:- DL.myDL { BORDER-RIGHT: black 2px outset; PADDING-RIGHT: 2px; BORDER-TOP: black 2px outset; DISPLAY: block; PADDING-LEFT: 2px; BACKGROUND: #ccbe99; PADDING-BOTTOM: 2px; BORDER-LEFT: black 2px outset; WIDTH: auto; PADDING-TOP: 2px; BORDER-BOTTOM: black 2px outset; FONT-FAMILY: "Trebuchet MS", Arial, sans-serif } DL.myDL DT { CLEAR: both; PADDING-RIGHT: 3px; DISPLAY: inline; FLOAT: left; WIDTH: 250px; TEXT-ALIGN: right } I basically want the dt text aligned to the right and the dd on the right hand side with left align text. I reset the margin on all elements to be 0 before anything else in the css and the elements are within a dive with position relative.

    Read the article

  • How to Create A Document Type Definition

    - by DaveDev
    Hi Guys I've been creating a lot of my own custom attributes in my XHTML documents lately, and am aware that because they are custom attributes, they won't validate against the W3C standard. Isn't it true that I can specify my own DTD to make it validate? If so, can anyone tell me what's involved in doing this in an ASP.NET MVC app? Thanks Dave

    Read the article

  • Useless variable name in C struct type definition

    - by user1210233
    I'm implementing a linked list in C. Here's a struct that I made, which represents the linked list: typedef struct llist { struct lnode* head; /* Head pointer either points to a node with data or NULL */ struct lnode* tail; /* Tail pointer either points to a node with data or NULL */ unsigned int size; /* Size of the linked list */ } list; Isn't the "llist" basically useless. When a client uses this library and makes a new linked list, he would have the following declaration: list myList; So typing llist just before the opening brace is practically useless, right? The following code basically does the same job: typedef struct { struct lnode* head; /* Head pointer either points to a node with data or NULL */ struct lnode* tail; /* Tail pointer either points to a node with data or NULL */ unsigned int size; /* Size of the linked list */ } list;

    Read the article

  • Constructor Definition

    - by mctl87
    Ok so i have a class Vector: #include <cstdlib> class Vec { private: size_t size; int * ptab; public: Vec(size_t n); ~Vec() {delete [] ptab;} size_t size() const {return size;} int & operator[](int n) {return ptab[n];} int operator[](int n) const {return ptab[n];} void operator=(Vec const& v); }; inline Vec::Vec(size_t n) : size(n), ptab(new int[n]) { } and the problem is that in one of my homework exercises i have to extend constructor def, so all elements will be initialized with zeros. I thought i know the basics but cant get through this dynamic array -.- ps. sry for gramma and other mistakes ;)

    Read the article

  • What is the definition of a Service object ?

    - by Maskime
    I've been working a lot with PHP. But recently i was sent on a work wich use Java. In PHP i used to do a lot of Singleton object but this pattern has not the same signification in Java that it has in PHP. So i wanted to go for an utility class (a class with static method) but my chief doesn't like this kind of classes and ask me to go for services object. So my guess was that a service object is just a class with a constructor that implement some public methods... Am i right ?

    Read the article

  • Generate Spring bean definition from a Java object

    - by joeslice
    Let's suggest that I have a bean defined in Spring: <bean id="neatBean" class="com..." abstract="true">...</bean> Then we have many clients, each of which have slightly different configuration for their 'neatBean'. The old way we would do it was to have a new file for each client (e.g., clientX_NeatFeature.xml) that contained a bunch of beans for this client (these are hand-edited and part of the code base): <bean id="clientXNeatBean" parent="neatBean"> <property id="whatever" value="something"/> </bean> Now, I want to have a UI where we can edit and redefine a client's neatBean on the fly. My question is: given a neatBean, and a UI that can 'override' properties of this bean, what would be a straightforward way to serialize this to an XML file as we do [manually] today? For example, if the user set property whatever to be "17" for client Y, I'd want to generate: <bean id="clientYNeatBean" parent="neatBean"> <property id="whatever" value="17"/> </bean> Note that moving this configuration to a different format (e.g., database, other-schema'd-xml) is an option, but not really an answer to the question at hand.

    Read the article

  • What is the function definition for member?

    - by NHans
    (define (member atom list) (cond ((null? list) '()) (= atom (car list) "True") (else (member atom(cdr list))) ) ) (member '5 '(1 2 3 4 5)) Always it gives true even though that atom isn't a member in the list. Could you plz help me to clarify this question as soon as possible.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >