Search Results

Search found 31 results on 2 pages for 'pfunc'.

Page 2/2 | < Previous Page | 1 2 

  • turning off sleep mode on kindle?

    - by pfunc
    I'm just getting into kindle development, and I want to know if it is possible to turn off kindle's sleep mode? Or is there a way to wake it up (or a way to program it to wake up) by pushing the buttons on the front, rather than using the power button? Not looking for anything to in-depth here, just point me in the right direction or let me know if it is possible.

    Read the article

  • flex accessing children of a list component

    - by pfunc
    when I try to loop through the children of a List component that has buttons in it, I can't seem to access those children. I try for(var btnNum:Number = 0; btnNum < myList.numChildren; btnNum++) { trace(myList.getChildAt(btnNum); } but it is giving some other instance, not the button instances. and the weeklist <mx:List id="myList" dataProvider="{_data.mappoints.week.@number}" > <mx:itemRenderer > <mx:Component> <mx:Button buttonMode="true" toggle="true" alpha="1" width="116" height="35" label="WEEK {data}" > </mx:Button> </mx:Component> </mx:itemRenderer> </mx:List>

    Read the article

  • Virtual Includes not recognized

    - by pfunc
    I am attempting to include a header in my html file. <!--#include virtual="/header.shtml" -- This is not being read by the browser. The file works fine when I go to it alone. It works fine when I had it in the header (not through an include file). Do some servers not allow this kind of include?

    Read the article

  • What is the merit of the "function" type (not "pointer to function")

    - by anatolyg
    Reading the C++ Standard, i see that there are "function" types and "pointer to function" types: typedef int func(int); // function typedef int (*pfunc)(int); // pointer to function typedef func* pfunc; // same as above I have never seen the function types used outside of examples (or maybe i didn't recognize their usage?). Some examples: func increase, decrease; // declares two functions int increase(int), decrease(int); // same as above int increase(int x) {return x + 1;} // cannot use the typedef when defining functions int decrease(int x) {return x - 1;} // cannot use the typedef when defining functions struct mystruct { func add, subtract, multiply; // declares three member functions int member; }; int mystruct::add(int x) {return x + member;} // cannot use the typedef int mystruct::subtract(int x) {return x - member;} int main() { func k; // the syntax is correct but the variable k is useless! mystruct myobject; myobject.member = 4; cout << increase(5) << ' ' << decrease(5) << '\n'; // outputs 6 and 4 cout << myobject.add(5) << ' ' << myobject.subtract(5) << '\n'; // 9 and 1 } Seeing that the function types support syntax that doesn't appear in C (declaring member functions), i guess they are not just a part of C baggage that C++ has to support for backward compatibility. So is there any use for function types, other than demonstrating some funky syntax?

    Read the article

  • How to call IronPython function from C#/F#?

    - by prosseek
    This is kind of follow up questions of http://stackoverflow.com/questions/2969194/integration-of-c-f-ironpython-and-ironruby In order to use C/C++ function from Python, SWIG is the easiest solution. The reverse way is also possible with Python C API, for example, if we have a python function as follows def add(x,y): return (x + 10*y) We can come up with the wrapper in C to use this python as follows. double Add(double a, double b) { PyObject *X, *Y, *pValue, *pArgs; double res; pArgs = PyTuple_New(2); X = Py_BuildValue("d", a); Y = Py_BuildValue("d", b); PyTuple_SetItem(pArgs, 0, X); PyTuple_SetItem(pArgs, 1, Y); pValue = PyEval_CallObject(pFunc, pArgs); res = PyFloat_AsDouble(pValue); Py_DECREF(X); Py_DECREF(Y); Py_DECREF(pArgs); return res; } How about the IronPython/C# or even F#? How to call the C#/F# function from IronPython? Or, is there any SWIG equivalent tool in IronPython/C#? How to call the IronPython function from C#/F#? I guess I could use "engine.CreateScriptSourceFromString" or similar, but I need to find a way to call IronPython function look like a C#/F# function.

    Read the article

< Previous Page | 1 2