Search Results

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

Page 106/297 | < Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >

  • how to know the protocol from servlets

    - by Dusk
    If I need to get inbox messages by passing request from servlets to javamail API , how can I know the protocol in which to retrieve inbox messages? Do I have to state the protocol in request URL? I've already checked in gmail, where they haven't stated any protocol, then How can I get inbox messages based on particular protocol like: POP3 or IMAP

    Read the article

  • Naming Suggestions For A Function Providing Chaining In A Different Way

    - by sid3k
    I've coded an experimental function which makes passed objects chainable by using high order functions. It's name is "chain" for now, and here is a usage example; chain("Hello World") (print) // evaluates print function by passing "Hello World" object. (console.log,"Optional","Parameters") (returnfrom) // returns "Hello World" It looks lispy but behaves very different since it's coded in a C based language, I don't know if there is a name for this idiom and I couldn't any name more suitable than "chain". Any ideas, suggestions?

    Read the article

  • How to 'do' ByVal in C#

    - by Jouke van der Maas
    As I understand it, C# passes parameters into methods by reference. In vb.net, you can specify this with ByVal and ByRef. The default is ByVal. Is this for compatibility with vb6, or is it just random? Also, how can I specify what to use in C#? I kind of like the idea of passing parameters by value.

    Read the article

  • Which new C#/VB features require .net Framework 4?

    - by Barry
    I remember reading in passing that some of the new language features in C# and VB that are available in VS2010 are backwards compatible with earlier versions of the framework, but that others are not. I'm pretty sure this was in reference to the new property syntax in VB. Which new features are language features vs which ones are framework specific?

    Read the article

  • Implementing dynamic scope when using CPS as intermediate language

    - by asandroq
    I am currently studying the implementation of programming languages and became interested in using Continuation-Passing Style as the intermediate language of the compiler. I also want to implement limited dynamic scope (for exception-handling or Scheme parameter objects) but I cannot find the relevant literature. I think it can be done with a separate environment passed as a variable to every closure, but this solution seems ugly to me. Could anyone point me to the relevant literature, or give me an idea of how this can be done?

    Read the article

  • How to make sure that Parameters have been updated in a Dataset Provider

    - by Matt
    In a Delphi app we have assigned a dataset provider with a TADOQuery, passing parameters to the Query. When the TADOQuery is refreshed with new parameter values these are not being passed to the Dataset Provider. This seemed to work ok in Delphi 5, but we are migrating our application to Delphi 2010 and it seems to have broken this link. Is there a way of refreshing the parameters against the dataset provider with the new values?

    Read the article

  • Cleaning hanging IPCS in UNIX

    - by Sachin Chourasiya
    I knew that IPCRM is used to clean hanging IPCS and semaphores for a particumar user by passing the segment id or the semaphore id in either -m or -s option. WE NEED TO PASS INDIVIDUAL SEGMENT ID/ SEMAPHORE ID IN -m OPTION. Is there any way to clean ipcs that belongs to a particular user in just one move. I think shell script could be the way but not sure. Please help

    Read the article

  • instantiate spring bean via factory method

    - by Don
    Hi, I need to instantiate a Spring bean in the same manner as this Java code: MyClass foo = Mockito.mock(MyClass.class); The XML I need will look something like: <bean id="foo" class="Mockito" factory-method="mock"> <constructor-arg value="MyClass"/> </bean> I can't seem to find the correct syntax for passing a Class object as a parameter to the factory method. Thanks, Don

    Read the article

  • In php, how to detect the execution is from CLI mode or through browser ?

    - by binoy
    Hi, I have a common script which Im including in my php cron files and the files which are accessing through the browser. Some part of the code, I need only for non cron files. How can I detect whether the execution is from CLI or through browser (I know it can be done by passing some arguments with the cron files but I dont have access to crontab). Is there any other way ? Regards Binoy

    Read the article

  • How to select top n rows from a datatable/dataview in asp.net

    - by skamale
    How to select top n rows from a datatable/dataview in asp.net.currently I am using the following code by passing the table and number of rows to get the records but is there a better way. public DataTable SelectTopDataRow(DataTable dt, int count) { DataTable dtn = dt.Clone(); for (int i = 0; i < count; i++) { dtn.ImportRow(dt.Rows[i]); } return dtn; }

    Read the article

  • Debug Deserialization on Silverlight Client

    - by Andrew Garrison
    I'm working on a Silverlight client that interacts with a WCF web service. The Silverlight client and the WCF web service are using the same class library for their data entities that they are passing back and forth over the wire. I just added a new entity, and it's not being correctly deserialized on the Silverlight client. My question is, how can I debug the System.ServiceModel.ClientBase as it is deserializing an entity that it received from a WCF web service?

    Read the article

  • How to determine whether a class has a particular templated member function?

    - by Aozine
    I was wondering if it's possible to extend the SFINAE approach to detecting whether a class has a certain member function (as discussed here: "Is there a Technique in C++ to know if a class has a member function of a given signature?" http://stackoverflow.com/questions/87372/is-there-a-technique-in-c-to-know-if-a-class-has-a-member-function-of-a-given-s ) to support templated member functions? E.g. to be able to detect the function foo in the following class: struct some_class { template < int _n > void foo() { } }; I thought it might be possible to do this for a particular instantiation of foo, (e.g. check to see if void foo< 5 >() is a member) as follows: template < typename _class, int _n > class foo_int_checker { template < typename _t, void (_t::*)() > struct sfinae { }; template < typename _t > static big test( sfinae< _t, &_t::foo< _n > > * ); template < typename _t > static small test( ... ); public: enum { value = sizeof( test< _class >( 0 ) ) == sizeof( big ) }; }; Then do foo_int_checker< some_class, 5 >::value to check whether some_class has the member void foo< 5 >(). However on MSVC++ 2008 this always returns false while g++ gives the following syntax errors at the line test( sfinae< _t, &_t::foo< _n > > ); test.cpp:24: error: missing `>' to terminate the template argument list test.cpp:24: error: template argument 2 is invalid test.cpp:24: error: expected unqualified-id before '<' token test.cpp:24: error: expected `,' or `...' before '<' token test.cpp:24: error: ISO C++ forbids declaration of `parameter' with no type Both seem to fail because I'm trying to get the address of a template function instantiation from a type that is itself a template parameter. Does anyone know whether this is possible or if it's disallowed by the standard for some reason? EDIT: It seems that I missed out the ::template syntax to get g++ to compile the above code correctly. If I change the bit where I get the address of the function to &_t::template foo< _n > then the program compiles, but I get the same behaviour as MSVC++ (value is always set to false). If I comment out the ... overload of test to force the compiler to pick the other one, I get the following compiler error in g++: test.cpp: In instantiation of `foo_int_checker<A, 5>': test.cpp:40: instantiated from here test.cpp:32: error: invalid use of undefined type `class foo_int_checker<A, 5>' test.cpp:17: error: declaration of `class foo_int_checker<A, 5>' test.cpp:32: error: enumerator value for `value' not integer constant where line 32 is the enum { value = sizeof( test< _class >( 0 ) ) == sizeof( big ) }; line. Unfortunately this doesn't seem to help me diagnose the problem :(. MSVC++ gives a similar nondescript error: error C2770: invalid explicit template argument(s) for 'clarity::meta::big checker<_checked_type>::test(checker<_checked_type>::sfinae<_t,&_t::template foo<5>> *)' on the same line. What's strange is that if I get the address from a specific class and not a template parameter (i.e. rather than &_t::template foo< _n > I do &some_class::template foo< _n >) then I get the correct result, but then my checker class is limited to checking a single class (some_class) for the function. Also, if I do the following: template < typename _t, void (_t::*_f)() > void f0() { } template < typename _t > void f1() { f0< _t, &_t::template foo< 5 > >(); } and call f1< some_class >() then I DON'T get a compile error on &_t::template foo< 5 >. This suggests that the problem only arises when getting the address of a templated member function from a type that is itself a template parameter while in a SFINAE context. Argh!

    Read the article

  • Property transfers in soapui

    - by Scobal
    I'm trying to write parallel tests in soapui and need to transfer properties between the test steps I currently have 3 tests steps: Execute legacy request Execute new request XML diff the two responses in a groovy script I've found a lot of blogs about picking values out with xpaths, but nothing about passing the full response through. My questions is how do I fill out the source and target boxes in the property transfer editor?

    Read the article

  • Python __import__ parameter confusion

    - by CMC
    I'm trying to import a module, while passing some global variables, but it does not seem to work: File test_1: test_2 = __import__("test_2", {"testvar": 1}) File test_2: print testvar This seems like it should work, and print a 1, but I get the following error when I run test_1: Traceback (most recent call last): File ".../test_1.py", line 1, in <module> print testvar NameError: name 'testvar' is not defined What am I doing wrong?

    Read the article

  • os.environ() giving errors while setting for Hudson

    - by Arnab Sen Gupta
    I want a small python script to set the HUDSON_HOME environment variable. When using the shell, I can easily do this using set HUDSON_HOME=http://localhost:8080 But how can I do the same directly through python?? I don't want to do it by passing the command line to os.system().. can os.environ() be of any help?? I had in my script: import os os.environ('HUDSON_HOME')='http://localhost:8080' but it's probably setting it for the subprocss and not the parent shell..any way around this??

    Read the article

  • Is it good practice to generally make heavyweight classes non-copyable?

    - by Emile Cormier
    I have a Shape class containing potentially many vertices, and I was contemplating making copy-constructor/copy-assignment private to prevent accidental needless copying of my heavyweight class (for example, passing by value instead of by reference). To make a copy of Shape, one would have to deliberately call a "clone" or "duplicate" method. Is this good practice? I wonder why STL containers don't use this approach, as I rarely want to pass them by value.

    Read the article

  • Windows equalivalent to eth0

    - by Justin Fuller
    Is there a generic IP device name for windows similar to "eth0" used by Linux and Solaris? I am attempting to monitor SCTP traffic, which appears to be successful passing the ip address, but this means for every machine to use this application would changing to use the host address. Thanks

    Read the article

  • Using the LIMIT statement in a SQLite query

    - by anselmophil
    Hi guys. I have a query that selects rows in a ListView without having a limit. But now that i have implemented a SharedPreferences that the user can select how much rows will be displayed in the ListView, my SQLite query doesnt work. Im passing the argument this way: return wDb.query(TABELANOME, new String[] {IDTIT, TAREFATIT, SUMARIOTIT}, CONCLUIDOTIT + "=1", null, null, null, null, "LIMIT='" + limite + "'"); Help, please!

    Read the article

  • Queuing methods to be run on an object by different threads in Python

    - by Ben
    Let's say I have an object who's class definition looks like: class Command: foo = 5 def run(self, bar): time.sleep(1) self.foo = bar return self.foo If this class is instantiated once, but different threads are hitting its run method (via an HTTP request, handled separately) passing in different args, what is the best method to queue them? Can this be done in the class definition itself?

    Read the article

  • getting the "this" that a function's caller was called with in JavaScript

    - by David Morrissey
    Is it possible to get the this that a function's caller was called with in JavaScript without passing this to the arguments in a way which supports IE as well as Firefox/Chrome et al? For example: var ob = { callme: function() { doSomething() } } function doSomething() { alert(doSomething.caller.this === ob) // how can I make this work? } ob.callme() I'm starting to suspect it's not, but I thought I may as well ask as it'd make my code much shorter and easier to read. Thanks for any information!

    Read the article

  • Getting variable in iframe

    - by Roland
    I'm passing a varaible to a iframe but can't seem to access this variable via the global get variable. <iframe src="uploadContract.php?clientid={$clientid}" frameborder="0" height="95"></iframe> in uploadContract.php I try to access the variable like $_GET['clientid']; Somehow I can't seem to get the value via the Get global What am I doing wrong?

    Read the article

< Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >