Dear all:
I have an old VC 6.0 project with lots of C files. I need to document all the methods with their signatures, for example, listed them in a txt file like:
LoadTranCde(LKFD lkfd, char * msg, char * code)
MoveBack(LPT lStm, int numRows)
RTrim(Char * paraString)
....
The function list can be easily viewed in Visual Studio clas...
the list.index(x) function returns the index in the list of the first item whose value is x.
is there a function, list_func_index(), similar to the index() function that has a function, f(), as a parameter. the function, f() is run on every element, e, of the list until f(e) returns True. then list_func_index() returns the index of e.
...
I tried to print all the possible combination of members of several vectors. Why
the function below doesn't return the string as I expected?
#include <iostream>
#include <vector>
#include <fstream>
#include <sstream>
using namespace std;
string EnumAll(const vector<vector<string> > &allVecs, size_t vecIndex, string
strSoFar)
{...
How can I do this? (The following code does NOT work, but I hope it explains the idea.)
class MyClass
{
....
private:
int ToBeCalled(int a, char* b);
typedef (MyClass::*FuncSig)(int a, char* b);
int Caller(FuncSig *func, char* some_string);
}
I want to call Caller in some way like:
Caller(ToBeCalled, "stuff"...
Visual C++ is saying my void function needs a return value
I compiled this on my mac, and it worked perfectly, but now I am trying to compile this with Visual c++ (using windows 7)
Heres the build log:
Command Lines Creating temporary file
"c:\Users\Jonathan\Documents\Visual
Studio
2008\Projects\magicsquare\Debug\RSP000008229...
Hallo all, i have this SQL
SELECT DATE_ADD( '2009-'+ MONTH( NOW() ) +'-01' , INTERVAL -1 MONTH );
i can't get it to work, what i make wrong here?
tanks for help.
...
I've just started learning Python and would like to know if there is a searchable list of Python (3.1) functions available online, like there is for PHP (php.net)?
Thanks.
...
Hi,
How can I pass a 'set' function as the Function Object argument of another function?
eg:
public class IdModel
{
private var _id:String;
public function IdModel(source:Source)
{
//Create Binding
BindingUtils.bindSetter(id,source,"id");
}
public function get id():String
{
return _id;...
I'd like to be able to extract some array elements, assign each of them to a variable and then unset these elements in the array.
Let's say I have
$myarray = array ( "one" => "eins", "two" => "zwei" , "three" => "drei") ;
I want a function suck("one",$myarray)as a result the same as if I did manually:
$one = "eins" ;
unset($myarray...
I want to create a function that returns a substring of a specific string from the beginning of said string up to but not including the start of another specific string. Ideas?
So something like:
substrUpTo(theStr, subStr)
so if I inputted substrUpTo("Today is my birthday", "my"), it would return a substring of the first argument u...
Hi!
I am currently dynamically adding content to the page with the help of Jquery. The content that is being added contains some input fields and I need to use some kind of form hint/helper plugin on those.
I have tried this one, but i have no idea how to set it up correctly: http://mucur.name/system/jquery%5Fexample/ whilst dealing wi...
Not sure what this is called, but is there a way I can pull data from a file, echo it, but ignore data within a certain set of characters?
<?php
echo file_get_contents('test.txt');
?>
Would it be possible to ignore the data in between the asterisks, and the asterisks themselves when I echo out the final function?
...
I have a basic question on array and pointer in C/C++.
Say I have:
Foo* fooPtrArray[4];
How to pass the fooPtrArray into a function?
I have tried:
int getResult(Foo** fooPtrArray){} // failed
int getResult(Foo* fooPtrArray[]){} // failed
How can I deal with pointer array?
EDIT: I once thought the error msg is from passing the...
All,
I want to create a function that takes a symbol representing a java method and applies it to some object:
(user=> (defn f [m] (. "foo" (m)))
When I execute this, I get a result much different from what I expect
user=> (f 'getClass)
java.lang.IllegalArgumentException: No matching method found: m for class java.lang.String (NO_SO...
Hi all,
I'm reading up some material on whether Java can be faster than C++, and came across the following quote:
"Java can be faster than C++ because JITs can inline over virtual function boundaries."
(http://www.jelovic.com/articles/why%5Fjava%5Fis%5Fslow.htm)
What does this mean? Does it mean that the JIT can inline virtual functi...
I'm trying to time an order statistic function implemented in SBCL. Googling around I found this timing function: (time form). However I'm not sure what it returns. It seems to be a large number but I can't find documentation specifying if the return value is milliseconds, nanoseconds, system time, etc.
Does anyone know?
...
I have a JavaScript variable which contains the name of a JavaScript function. This function exists on the page by having been loaded in and placed using $.ajax, etc.
Can anyone tell me how I would call the javascript function named in the variable, please?
The name of the function is in a variable because the URL used to load the page...
In C++ functions needed to be declared before they were called. This could be worked around with function signatures but for the most part this is no longer required in newer programming languages, C#, Python, ETC.
However, while reading other peoples, code and when having to structure functions in a class, I find that I miss the consis...
I have been trying to figure out how to go about doing this but I am not quite sure how.
Here is an example of what I am trying to do:
class test {
public newTest(){
function bigTest(){
//Big Test Here
}
function smallTest(){
//Small Test Here
}
}
publ...
I am trying to do an SQL query, but I need to check somehow if the value is an email address.
I need a way to check if $user is an email address, because I have user values such as this in my table.
test
test2
[email protected]
[email protected]
test392
[email protected]
and so on...
I need to make it so $useremail checks $user to find...