Search Results

Search found 6753 results on 271 pages for 'forward declaration'.

Page 69/271 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • django display m2m elements in a template

    - by dana
    if a have a declaration like theclass = Classroom.objects.get(classname = classname) members = theclass.members.all() and i want to display all the members(of a class) in a template, how should i do it?? if i write: {{theclass.members.all}} the output is an empty list(though the class has some members) How should the elements of a m2m table be displayed in a template? thanks!

    Read the article

  • Why Do I See the "In Recovery" Msg, and How Can I Prevent it?

    - by John Hansen
    The project I'm working on creates a local copy of the SQL Server database for each SVN branch you work on. We're running SQL Server 2008 Express with Advanced Services on our local machine to host it. When we create a new branch, the build script will create a new database with the ID of that branch, creates the schema objects, and copies over a selection of data from the production shadow server. After the database is created, it, or other databases on the local machine, will often go into "In Recovery" mode for several minutes. After several refreshes it comes up and is happy, but will occasionally go back into "In Recovery" mode. The database is created in simple recovery mode. The file names aren't specified, so it uses default paths for files. The size of the database after loading data is ~400 megs. It is running in SQL Server 2005 compatibility mode. The command that creates the database is: sqlcmd -S $(DBServer) -Q "IF NOT EXISTS (SELECT [name] FROM sysdatabases WHERE [name] = '$(DBName)') BEGIN CREATE DATABASE [$(DBName)]; print 'Created $(DBName)'; END" ...where $(DBName) and $(DBServer) are MSBuild parameters. I got a nice clean log file this morning. When I turned on my computer it starts all five databases. However, two of them show transactions being rolled forward and backwards. The it just keeps trying to start up all five of the databases. 2010-06-10 08:24:59.74 spid52 Starting up database 'ASPState'. 2010-06-10 08:24:59.82 spid52 Starting up database 'CommunityLibrary'. 2010-06-10 08:25:03.97 spid52 Starting up database 'DLG-R8441'. 2010-06-10 08:25:05.07 spid52 2 transactions rolled forward in database 'DLG-R8441' (6). This is an informational message only. No user action is required. 2010-06-10 08:25:05.14 spid52 0 transactions rolled back in database 'DLG-R8441' (6). This is an informational message only. No user action is required. 2010-06-10 08:25:05.14 spid52 Recovery is writing a checkpoint in database 'DLG-R8441' (6). This is an informational message only. No user action is required. 2010-06-10 08:25:11.23 spid52 Starting up database 'DLG-R8979'. 2010-06-10 08:25:12.31 spid36s Starting up database 'DLG-R8441'. 2010-06-10 08:25:13.17 spid52 2 transactions rolled forward in database 'DLG-R8979' (9). This is an informational message only. No user action is required. 2010-06-10 08:25:13.22 spid52 0 transactions rolled back in database 'DLG-R8979' (9). This is an informational message only. No user action is required. 2010-06-10 08:25:13.22 spid52 Recovery is writing a checkpoint in database 'DLG-R8979' (9). This is an informational message only. No user action is required. 2010-06-10 08:25:18.43 spid52 Starting up database 'Rls QA'. 2010-06-10 08:25:19.13 spid46s Starting up database 'DLG-R8979'. 2010-06-10 08:25:23.29 spid36s Starting up database 'DLG-R8441'. 2010-06-10 08:25:27.91 spid52 Starting up database 'ASPState'. 2010-06-10 08:25:29.80 spid41s Starting up database 'DLG-R8979'. 2010-06-10 08:25:31.22 spid52 Starting up database 'Rls QA'. In this case it kept trying to start the databases continuously until I shut down SQL Server at 08:48:19.72, 23 minutes later. Meanwhile, I actually am able to use the databases much of the time.

    Read the article

  • Visual C# Express 2010: how to set language to C# 2.0

    - by luqui
    I am using Visual C# Express 2010 to develop an application for the Unity3D game engine, which only supports C# 2.0. That is, I am only using it to edit code, but the compilation is done by Unity. I'm wondering if there is a way to configure Visual C# to edit C# 2.0, so that, for example, it yells if I (out of habit) try to use a var declaration or foo => bar function. Thanks!

    Read the article

  • Serialize ASP.NET Web Service HTTP POST request results

    - by nigative
    I am trying to serialize my webmethod output (rename XML element with results), So far [return: System.Xml.Serialization.SoapElementAttribute("results")] before method declaration works fine with soap requests, but I am looking for something that would work the same way with HTTP POST/GET requests as well (right now I get return class name as element name)

    Read the article

  • Odd behaviour with scala method syntax

    - by Ceilingfish
    Hi chaps, I hit a bit of a quirk of scala's syntax I don't really understand object Board { def getObjectAt(x:Int, y:Int):Placeable = return locations(x)(y) } works fine. But object Board { def getObjectAt(x:Int, y:Int):Placeable { return locations(x)(y) } } returns the error Board.scala:8: error: illegal start of declaration return locations(x)(y) I found some stuff that says the second form convinces the scala compiler you're trying to specify an expansion to the return type Placeable. Is there a way I can fix this, or should I just avoid specifying a return type here?

    Read the article

  • LaTeX - Changing the font sizxe for a document, but in the preamble, not the document class?

    - by Rory
    I have a LaTeX document. I want to change the font size of all the text, to make it smaller. Normally I would just change the documentclass part. However I am generating LaTeX files from another programme, and it is setting the documentclass, I can't change that. However I can put things in the preamble. Is there anyway to change the font size in the preamble, without touching the documentclass declaration.

    Read the article

  • Override generic methods in c#

    - by Pascal
    I thought I can not override generic methods of a derived class. http://my.safaribooksonline.com/book/programming/csharp/9780071741163/generics/ch18lev1sec13 The code in this link runs fine. The overriden method is called although the instance type of the base class is used and not the instance of the derived type. Now I am confused because a former question of mine Type parameter declaration must be identifier not a type is about calling the overriding generic method with the instance of base type which did NOT work!

    Read the article

  • What is wrong with this list comprehension code?

    - by suresh
    My aim is to list all elements of the array a whose values are greater than their index positions. I wrote a Haskell code like this. [a|i<-[0..2],a<-[1..3],a!!i>i] When tested on ghci prelude prompt, I get the following error message which I am unable to understand. No instance for (Num [a]) arising from the literal 3 at <interactive>:1:20 Possible fix: add an instance declaration for (Num [a])

    Read the article

  • SVNKit: How to get the repository url from a local path?

    - by StackedCrooked
    I would like to implement a method that can get the svn revision number from the path where a SVN repository has been checked out. The method declaration would look something like this: long getRevisionNumber(String localPath) { ... } I'm trying to use SVNKit for this, but it seems to require an SVN URL to start with. Is there any way to start with a local path?

    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 can I prevent page-break in CFDocument from occuring in middle of content?

    - by Dan Roberts
    I am generating a PDF file dynamically from html/css using the cfdocument tag. There are blocks of content that I don't want to span multiple pages. After some searching I found that the style "page-break-inside" is supported according to the docs. However in my testing the declaration "page-break-inside: avoid" does no good. Any suggestions on getting this style declaration to work, or have alternative suggestions? Here is an example. I would expect the content in the div tag not to span a page break but it does. The style "page-break-inside: avoid" is not being honored. <cfdocument format="flashpaper"> <cfloop from="1" to="10" index="i"> <div style="page-break-inside: avoid"> <h1>Table Label</h1> <table> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> <tr><td>label</td><td>data</td></tr> </table> </div> </cfloop> </cfdocument>

    Read the article

  • Random Number Generator

    - by skinni
    - (IBAction)randomnum{ int randomNumber1 = 1+ arc4random() %(49); label1.text = [NSString stringWithFormat:@"d", randomNumber]; Local declaration of randomNumber hides instance variable. How can i get round this warning? thanks

    Read the article

  • gcc -Wshadow is too strict?

    - by idimba
    In the following example: class A { int len(); void setLen(int len) { len_ = len; } // warning at this line int len_; }; gcc with -Wshadow issue a warning: main.cpp:4: warning: declaration of `len' shadows a member of `this' function len and integer len are of different type. Why the warning?

    Read the article

  • Working with wchar in C

    - by Richard Mar.
    I have this code: #include <stdio.h> #include <wchar.h> int main() { wchar_t *foo = L"ðh"; wprintf(L"[%ls]\n", foo); return 0; } And when I compile it, it gives me the implicit declaration of function ‘wprintf’ warning. I know that I should link the wchar library during compilation, but how do I do that?

    Read the article

  • Hi, i want to implement a small routing table for my learning? I know it is implemented using radix/

    - by aks
    Hi, i want to implement a small routing table for my learning? I know it is implemented using radix/patricia tree in routers? Can someone give me an idea on how to go about implementing the same? The major issue i feel is storing IP ADDRESS. For example : 10.1.1.0 network next hop 20.1.1.1 10.1.0.0 network next hop 40.1.1.1 Can someone give me a declaration of the struct from which i can have an idea?

    Read the article

  • Creating instance in java class

    - by aladine
    Please advise me the difference between two ways of declaration of java constructor public class A{ private static A instance = new A(); public static A getInstance() { return instance; } public static void main(String[] args) { A a= A.getInstance(); } } AND public class B{ public B(){}; public static void main(String[] args) { B b= new B(); } } Thanks

    Read the article

  • What is tagged structure initialization syntax?

    - by httpinterpret
    struct file_operations scull_fops = { .owner = THIS_MODULE, .llseek = scull_llseek, .read = scull_read, .write = scull_write, .ioctl = scull_ioctl, .open = scull_open, .release = scull_release, }; This declaration uses the standard C tagged structure initialization syntax. Can someone elaborate?

    Read the article

  • Getting An Array Result From A C# Method

    - by Soo
    I am trying to write some code to return an array in C#, but don't know the proper syntax. I think my method is set up correctly, but to set an array to the result of the method is what I'm having difficulty with. Method Declaration: double[,] function(double variable) { ... code ... return array }

    Read the article

  • Flexible array member in C-structure

    - by Arpan
    Quoting from the C-std section 6.7.2.1, struct s { int n; double d[]; }; This is a valid structure declaration. I am looking for some practical use of this kind of syntax. To be precise, how is this construct any more or less powerful than keeping a double* as the 2nd element? Or is this another case of 'you-can-do-it-in-multiple-ways'? Arpan

    Read the article

  • c++, when do you need/have to pass data as (*&)

    - by ra170
    I came across people passing data objects as: declaration: DataObject * data = 0; calling it as: SomeMethod( data ); definition of Somethod: void SomeMethod(SomeObject * & object) My obvious question is, when and why do you have to do this (& *)? Is it passing the pointer as reference?

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >