Search Results

Search found 7418 results on 297 pages for 'argument passing'.

Page 132/297 | < Previous Page | 128 129 130 131 132 133 134 135 136 137 138 139  | Next Page >

  • Flexible array members in C - bad?

    - by Lionel
    I recently read that using flexible array members in C was poor software engineering practice. However, that statement was not backed by any argument. Is this an accepted fact? (Flexible array members are a C feature introduced in C99 whereby one can declare the last element to be an array of unspecified size. For example: ) struct header { size_t len; unsigned char data[]; };

    Read the article

  • Ninject: How to resolve this dependency?

    - by Rosarch
    I have a class with a public constructor: public MasterEngine(IInputReader inputReader) { this.inputReader = inputReader; graphicsDeviceManager = new GraphicsDeviceManager(this); Components.Add(new GamerServicesComponent(this)); } How can I inject dependencies like graphicsDeviceManager and new GamerServicesComponent while still supplying the argument this?

    Read the article

  • Finding object count where a field is unique in Django

    - by Johnd
    I have a model that is something like this: class Input(models.Model): details = models.CharField(max_length=1000) user = models.ForeignKey(User) class Case(Input): title = models.CharField(max_length=200) views = models.IntegerField() class Argument(Input): case = models.ForeignKey(Case) side = models.BooleanField() A user can submit many arguments, per case. I want to be able to say how many users have submitted side=true arguments. I mean if 1 user had 10 arguments and another user had 2 arguments (both side=true) I'd want the count to be 2, not 12.

    Read the article

  • Is it standard behavior for this code to throw a NullPointerException?

    - by Eric
    I've had a big problem in some library code, which I've pinned down to a single statement: System.out.println((String) null); Ok, the code doesn't actually look like that, but it certainly calls println with a null argument. Doing this causes my whole applicaio to throw an unexpected NullPointerException. In general, should println throw this exception under that circumstance, or is this non-standard behavior due to a poor implementation of the out instance?

    Read the article

  • FORTRAN: determine variable type

    - by tibbs
    hello, GOOGLE has yet to find an answer for me, so here goes: In FORTRAN, is there a way to determine the TYPE of a variable? E.G., pass the variable type as an argument in a function, to then be able to call type-specific code with that fuction; eliminating the need to have seperate similar functions for each data type. thanks.

    Read the article

  • How to Turn Off Annoying Eclipse Console on Windows

    - by engfer
    So I change the -vm argument for eclipse.exe using the elcipse.ini settings file, and now there's an annoying command prompt console (even if I remove the -vm value). Does anyone know how to turn off the console so I only have the eclipse GUI and not the console window? /cry NOTE: On MS WIndows 7

    Read the article

  • C++ operator ','

    - by user286215
    what is result of operator ',' by standard? Last argument? in code like this, for example: int a = 0; int b = 1; while(a,b); or using it like this is not allowed? MSVS thiks that result is b, is it true?

    Read the article

  • How do I define my own operators in the Io programming language?

    - by klep
    I'm trying to define my own operator in Io, and I'm having a hard time. I have an object: MyObject := Object clone do( lst := list() !! := method(n, lst at(n)) ) But when I call it, like this: x := MyObject clone do(lst appendSeq(list(1, 2, 3))) x !! 2 But I get an exception that argument 0 to at must not be nil. How can I fix?

    Read the article

  • How to turn off Eclipse console on Windows

    - by engfer
    So I change the -vm argument for eclipse.exe using the eclipse.ini settings file, and now there's an command prompt console (even if I remove the -vm value). Does anyone know how to turn off the console so I only have the eclipse GUI and not the console window? I'm running MS Windows 7.

    Read the article

  • jquery menu ul li

    - by eyalb
    i have a tree menu that i need to open on specific branch. 1. on click on an A element i open the all next UL. now i want to close all other UL exept the ones that are parents of the A element. i want to write a function that will get an argument that is a A ID and will open the menu in the right place. example of my code

    Read the article

  • How can I define a method with multiple optional arguments in Obj-C

    - by The Dark Bug Returns
    I want to be able to update two sets of identical buttons with one function. Also I don't want to update all the buttons, only some of them. Can I have a function like this?: -(void) updateFields{ updateButton1 : (Bool) x updateButton2 : (Bool) y updateButton3 : (Bool) z } The implementation will look like this: [button1_1 setEnabled:x]; [button1_2 setEnabled:x]; //called only if updateButton1 is given an argument [button2_1 setEnabled:y]; etc...

    Read the article

  • errors on shell

    - by lego69
    somebody knows what does this error mean? Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ]. I receive this error after I enter in my script this row #! /bin/tcsh -f

    Read the article

  • Why closed contours are guaranteed here?

    - by user198729
    Quoted from here: BW = edge(I,'zerocross',thresh,h) specifies the zero-cross method, using the filter h. thresh is the sensitivity threshold; if the argument is empty ([]), edge chooses the sensitivity threshold automatically. If you specify a threshold of 0, the output image has closed contours, because it includes all the zero crossings in the input image. I don't understand it,can someone elaborate?

    Read the article

  • C++ function dynamic data type definition

    - by user330352
    Hi all, in C++, when you define a function which takes one argument, you have to define the data type of that variable: void makeProccess(int request) However, I want to implement a function which takes different data types rather taking statically defined integer type. void makeProccess(anyType request) How can I design a proccess like this, any idea? Thanks.

    Read the article

  • C++: Life span of temporary arguments?

    - by shoosh
    When creating a new instance of a MyClass as an argument to a function like so: class MyClass { MyClass(int a); }; myFunction(MyClass(42)); does the standard make any grantees on the timing of the destructor? Specifically, can I assume that the it is going to be called before the next statement after the call to myFunction() ?

    Read the article

  • How do i pass null into stdin like this perl code?

    - by acidzombie24
    This is my question and apparently this is the answer. I found you can stdout to null by writing NUL in command prompt so i tried writing < NUL at the end of my argument. No luck. How do i pass in null or do something with the IO locks like that perl code does so i can get my ffmpeg script not locking up after 15 or so seconds?

    Read the article

  • Does the Visual Studio debugger implicitly cast smaller types to int?

    - by emddudley
    Does the Visual Studio 2008 debugger implicitly cast all smaller data types to int? I have a function with the following signature: public int DoSomething(sbyte value) { ... } When pass in -127 and I look at the value argument the Visual Studio debugger (e.g. Watch window) shows me that it has the value 0xFFFFFF81. This is correct except for the fact that sbyte is only 8 bits wide; I would expect the debugger to show me that it is 0x81.

    Read the article

  • How is the result of openssl_sign() encoded?

    - by Bozho
    The docs about openssl_sign() say that the signature is returned in the passed string argument. My question is - how is it encoded? Base64, Hex-string, anything else? I don't have php installed and I have to use this PHP code I was given simply in order to verify whether my Java implementation is correct, so don't ask me "have you tried it" ;)

    Read the article

< Previous Page | 128 129 130 131 132 133 134 135 136 137 138 139  | Next Page >