function

readelf-like tool for Mac OS X?

Is there a tool for reading Mac OS X binaries that would print information about relocation tables and symbol offsets similar to this readelf output? readelf -r app Relocation section '.rel.dyn' at offset 0x5ec contains 2 entries: Offset Info Type Sym.Value Sym. Name 08049d58 00001706 R_386_GLOB_DAT 00000000 _...

What is the simplest way to "cast" a member function pointer to a function pointer in C++?

I want to provide a member function for the "comp" parameter of an STL algorithm like lower_bound( ..., Compare comp ). The comp() function accesses a non-static member field so it must itself be a non-static member but the type of a non-static member function pointer is different from that of an ordinary function pointer. What is the ...

coding this function without memory leak! - please advise

Hello, In the following code example,will filestream and streamreader get disposed or will they create memory leaks? Is it possible to code this function without causing memory leaks? string ReadFile(string strPath) { using (FileStream fstream = new FileStream(strPath, FileMode.Open)) { using (Stre...

What is this at the end of function ,...) in c++

Possible Duplicate: In a C function declaration, what does as the last parameter do? What does this mean ,...); it is written at the end of a function in a code i am debuging. like this void abc( int a, int b, ...); ...

Autoconf Produces configure with Broken Functions (ac_fn_set_status, ac_fn_exit)

I'm trying to set up autoconf for my project. I have everything working "properly" except that the ac_set_<...> functions are not being found in ./configure. They work fine in configure.status if I run it directly. Specifically, I am having trouble with as_fn_set_status and as_fn_exit. If I manually edit the config file and move the ...

Matching with functions in OCaml?

Is it possible to use pattern matching over specified functions directly or with some exploits that don't involve specifying a type for every function I need? Just to explain things better suppose I have a type like type BBoolOp = (bool->bool->bool)*term*term and suppose that the bool->bool->bool functions are some quite simple like ...

Jquery "reusable" function

Silly question I think, but is there a way to use the "if" statement as a reusable function success: function(msg){ if(msg=='o'){ $j('#ok').show(); $j(button).show(); $j('#chk').hide(); } else{ $j('#ok').hide(); $j('#chk').show(); $j(button).hide(); } } ...

short cut to view function list in VS2008 which is right under Document tabs

is there a short cut key to view function list in VS2008 which is right under Document tabs ...

How to retrieve result of calling a script from within a Python function?

I would like to call an external script from within a function, for instance: import subprocess def call_script(script): subprocess.call(script) return answer #retrieving the result is the part I'm struggling with call_script("/user/bin/calc_delta.py") The script calc_delta.py simply prints the result when it is done. How can ...

Cannot call member function without object = C++

I am brushing up again and I am getting an error: Cannot call member function without object. I am calling like: FxString text = table.GetEntry(obj->GetAlertTextID()); FxUChar outDescription1[ kCP_DEFAULT_STRING_LENGTH ]; IC_Utility::CP_StringToPString(text, &outDescription1[0] ); The line: IC_Utility::CP_StringToPString(text, &out...

What's the lowest level Windows function(s) to play sound?

What's the lowest level Windows function(s) to play sound? (The function(s) that are called by any other functions that play sound). For example, fopen() calls CreateFileA(), and CreateFileA() calls CreateFileW(), and CreateFileW() calls NtCreateFile(), etc. I want to know what's the lowest-level one for sound (without comunicating with...

Please Solve/Answer C++ Program problems with Functions Variables

Please solve/answer problems to get program to work. I am not fully understanding the passing variables by reference or value and I think that is what is making this so hard. So if you could fix the program. I've been at this for the last 2 days. I have included my full code. paxdiablo suggested this and I'm trying to do what they said ...

C++ Functions and Passing Variables

Possible Duplicate: C++ passing variables in from one Function to the Next. The Program is working but when it comes to getUserData it asks for the same information 4 times and then displays the results with negative numbers. I used test numbers for number of rooms 1, 110 for sqrt feet in the room, 15.00 for cost of paint. /...

function to generate 26 (A-Z) * 26 (A-Z) * 26 (A-Z)

Hello, I'd like to create a function which will generate a 3 char key string after each loop. There are 26 chars in the alphabet and I'd like to generate totally unique 3 char keys (A-Z). The output would be 17,576 unique 3 char keys (A-Z) - not case sensitive. Can anyone give me an idea on how to create a more elegant function witho...

What is the function got get all the media files wordpress?

Hello there, Can anyone suggest me what is the function to get all the images stored for wordpress? I just need to list all the images seen under menu Media of the wordpress admin. Thanks in advance ...

C++ template function with unknown number of arguments

Hi, this is probably a useless problem but it stuck on my mind for few hours. I wanna write a function which accepts some (POD) arguments, convert them to string and return the concatenation. for example template<typename A, typename B> string ToString(A a, B b) { stringstream ss; ss << a << b; return ss.str(); } pretty ...

Any programming language with "strange" function call?

I was wondering, is there any programming language where you can have function calls like this: function_name(parameter1)function_name_continued(parameter2); or function_name(param1)function_continued(param2)...function_continued(paramN); For example you could have this fu...

Perl function knowing receiver type

I have a text file, and a function to retrieve from that text file: @thefile = read_file( 'somepathfile' ); I would like to have a different implementation of the read_file function depending on which type is receiving the information. So if I write: %thefile = read_file( 'somepathfile' ); then a different function will be execute...

Django: Calling another modules function passed through a parameter

I have a list of functions as: FUNCS=[{'someattr':'somedetail', 'func':baseapp.module.function_name}, {...}, ...] Unfortunately it doesnt work if i try calling the func with FUNCS[0]['func'] I get the error Tried function_name in module baseapp.module Error was: 'module' object has no attribute 'function_name' I presume there mus...

Vim Perl autocomplete displaying a given modules functions

Is it possible to have Vim autocomplete show which functions are available to a given module? So if I include a module called math and then go: math:: and at that i could get a list of the functions available through that module. ...