Search Results

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

Page 129/297 | < Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >

  • Drupal CCK Date: how to set datetime field's default value to a fix date?

    - by Daj pan spokój
    Hi, I have a CCK datetime field and would like to set its default value to 31 May 2011. When I go to the configuration of the field I can set the default value to Now, Blank or Relative. Relative is to be set by a PHP's strtotime argument. However, it fails when I set it to 31 May 2011 last day of May 2011 (that should normally work according to http://php.net/manual/en/function.strtotime.php) Do You have any idea how to set it to default to 31 May 2011?

    Read the article

  • cygwin sed substitution against commands in history

    - by Ira
    I couldn't find an answer for this exact problem, so I'll ask it. I'm working in Cygwin and want to reference previous commands using !n notation, e.g., if command 5 was which ls, then !5 runs the same command. The problem is when trying to do substitution, so running: !5:s/which \([a-z]\)/\1/ should just run ls, or whatever the argument was for which for command number 5. I've tried several ways of doing this kind of substitution and get the same error: bash: :s/which \([a-z]*\)/\1/: substitution failed

    Read the article

  • One class per file rule in .NET?

    - by Joan Venge
    I follow this rule but some of my colleagues disagree with it and argue that if a class is smaller it can be left in the same file with other class(es). Another argument I hear all the time is "Even Microsoft don't do this, so why should we?" What's the general consensus on this? Are there cases where this should be avoided?

    Read the article

  • Standard library function in R for finding the mode?

    - by Nick
    In statistical language R, mean() and median() are standard functions which do what you'd expect. mode() tells you the internal storage mode of the R object, not the value that occurs the most in its argument. But surely there is a standard library function that implements mode for a vector (or list).

    Read the article

  • Problem initialing a unicode string

    - by Simon
    Hey All. Atm im working with native API calls and i have to get RtlInitUnicodeString to work. The way i use: const WCHAR wcMutex[] = L"String1"; UNICODE_STRING unicodeMutexBuffer; RtlInitUnicodeString(&unicodeMutexBuffer,wcMutex); now my problem the project doesnt compile , i get this error: Error argument of type "UNICODE_STRING*" is incompatible with type of "PUNICODE_STRING" but in my old Driver kit , i used same way to initialize the unicode string struct

    Read the article

  • gzip several files and pipe them into one input

    - by Daniel
    I have this program that takes one argument for the source file and then it parse it. I have several files gzipped that I would like to parse, but since it only takes one input, I'm wondering if there is a way to create one huge file using gzip and then pipe it into the only one input.

    Read the article

  • How to read and write a STL C++ string?

    - by cambr
    #include<string> ... string in; //How do I store a string from stdin to in? // //gets(in) - 16 cannot convert `std::string' to `char*' for argument `1' to //char* gets (char*)' // //scanf("%s",in) also gives some weird error Similarly, how do I write out in to stdout or to a file??

    Read the article

  • Variable type for Application on Time Events [on hold]

    - by user2931226
    Been Trying to figure out how to go about setting a Variable for some Application On Time events, But still not confident to do it. These events (Macro's) get called by another Macro then they wait for 10 - 20 minutes, then they don't Run. So have read that (EarliestTime argument) should be assigned to a variable to store it other wise it looses it when other things are running Help appreciated Thanks Sub settimers() Application.OnTime TimeValue(Range("$X$9").Text), "StartBlink" Application.OnTime TimeValue(Range("$W$11").Text), "StopBlink" End Sub

    Read the article

  • Zend Framework, what $this->_forward is doing

    - by RageZ
    Hello everyone, I would like someone to explain me what _forward is exactly doing, I cannot see if _forward is also rendering the attached view to the action or just executing the action. Also is it possible to pass argument to $this-action in a view script ? More generally my problem is how to code a confirmation page, let's say the user input some stuff and you want to show him confirmation, is forward is mean for that case ? Thanks

    Read the article

  • Why GUID is returned as empty?

    - by jess
    Hi, After loading an entity from the database using LINQ-to_SQL,I pass the entity.ID to a method having argument of type GUID.When I access this parameter in the method,I get an empty value,and not the GUID.Why is it so?

    Read the article

  • Are duplicate directives in php.ini going to cause an issue?

    - by Brandon G
    I sent a request to ops today to update some php.ini directives, and found out that he merely appended them to the end of the file. My google search didn't really come up with any info on whether this is a problem or not to have duplicates in there and how they would be parsed. Obviously, it can cause confusion, but, I would have a stronger argument if I knew if this was acceptable or not. Any input? Thanks in advance...

    Read the article

  • C++: Pass array created in the function call line

    - by Jarx
    How can I achieve a result like somebody would expect it according to the following code example: // assuming: void myFunction( int* arr ); myFunction( [ 123, 456, 789 ] ); // as syntactical sugar for... int values[] = { 123, 456, 789 }; myFunction( values ); The syntax I thought would work spit out a compile error. How can I define an argument array directly in the line where the function is called?

    Read the article

  • how to find if groovy args contains a particular string

    - by groovynoob
    println args println args.size() println args.each{arg-> println arg} println args.class if (args.contains("Hello")) println "Found Hello" when ran give following error: [hello, somethingelse] 2 hello somethingelse [hello, somethingelse] class [Ljava.lang.String; Caught: groovy.lang.MissingMethodException: No signature of method: [Ljava.lang. String;.contains() is applicable for argument types: (java.lang.String) values: [Hello] why can I not do contains?

    Read the article

  • C++ choose function by return type.

    - by anon
    I realize standard C++ only picks functions by argument type, not return type. I.e I can do something like: void func(int); void func(double); but not double func(); int func(); Where in the former, it's clear, in the latter, it's ambigious. Are there any extensions that lets me tell C++ to pick which function to use also by return type? Thanks!

    Read the article

  • How to make this if statement in bash

    - by Selmak
    Hi, I'm having a hard time figuring out how to do this if statement. I want to do this: IF (the function has only 1 argument AND $1 is a directory (in the current folder)) OR IF (the function has 2 arguments AND $1 is NOT a directory ) THEN .... END Sorry if it's not very clear, Thanks in advance

    Read the article

  • XNA and Ninject: Syntax for dependency arguments?

    - 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

  • C++ Template const char array to int

    - by Levi Schuck
    So, I'm wishing to be able to have a static const compile time struct that holds some value based on a string by using templates. I only desire up to four characters. I know that the type of 'abcd' is int, and so is 'ab','abc', and although 'a' is of type char, it works out for a template<int v> struct What I wish to do is take sizes of 2,3,4,5 of some const char, "abcd" and have the same functionality as if they used 'abcd'. Note that I do not mean 1,2,3, or 4 because I expect the null terminator. cout << typeid("abcd").name() << endl; tells me that the type for this hard coded string is char const [5], which includes the null terminator on the end. I understand that I will need to twiddle the values as characters, so they are represented as an integer. I cannot use constexpr since VS10 does not support it (VS11 doesn't either..) So, for example with somewhere this template defined, and later the last line template <int v> struct something { static const int value = v; }; //Eventually in some method cout << typeid(something<'abcd'>::value).name() << endl; works just fine. I've tried template<char v[5]> struct something2 { static const int value = v[0]; } template<char const v[5]> struct something2 { static const int value = v[0]; } template<const char v[5]> struct something2 { static const int value = v[0]; } All of them build individually, though when I throw in my test, cout << typeid(something2<"abcd">::value).name() << endl; I get 'something2' : invalid expression as a template argument for 'v' 'something2' : use of class template requires template argument list Is this not feasible or am I misunderstanding something?

    Read the article

< Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >