function

Calling any dll function based on variable arguments

I have the following items in a structure - Dll name (absolute/relative path) - Function name in the dll - number of parameters - Array of parameter types and values With these information, I need to load the dll and call the function. To load the dll - I would use loadlibrary To get the address of the function - I would use GetProcAdd...

Oracle function and query return different results

Hi, I am using oracle 10g database. Function is : create or replace FUNCTION FUNC_FAAL(myCode number,firstDate date , secondDate date) RETURN INTEGER as rtr integer; BEGIN select count(*) into rtr from my_table tbl where tbl.myDateColumn between firstDate and secondDate and tbl.kkct is null and tbl.myNumberColumn...

How do I call a function with a variable number of parameters?

How do I call execlp() with a variable number of arguments for different processes? ...

How to run two functions simultaneously

Hello, I am running test but I want to run 2 functions at the same time. I have a camera and I am telling it to move via suds, I am then logging into the camera via SSH to check the speed the camera is set to. When I check the speed the camera has stopped so no speed is available. Is there a way I can get these functions to run at the s...

PHP function not returning string

Hi there I have constructed a function that takes a filename, and increments a counter in the filename and returns it, however, everything is correct, except the return does not return the filename. Any help, please? My code: $filename = join("", array_reverse($date)); $filename .= ".xml"; $dir = "../gigs"; $file = $dir."/".$filename...

Dynamic static method call in PHP?

Hi, Please could someone experienced in PHP help out with the following. Somewhere in my code, I have a call to a public static method inside a non-instantiated class: $result = myClassName::myFunctionName(); However, I would like to have many such classes and determine the correct class name on the fly according to the user's langua...

Modifying arguments 'passed by value' inside a function and using them as local variables

I have seen some code in which the arguments passed to the function by value was being modified or assigned a new value and was being used like a local variable. Is it a good thing to do? Are there any pitfalls of doing this or is it Ok to code like this? ...

Problem using loop values in function

Hello - Beginners Javascript question here. I am trying to create a function that finds all the links in a given div and sets up an onclick event for each one. I can get the link hrefs correctly, but when I try using them in the onclick function, Javascript seems to only use the last value found: I.E I have these links #purpose #futu...

Inject javascript into a javascript function

Hi all, I've got a weird question in that I need to inject some javascript into another javascript function. I am using a framework which is locked so I can not change the existing function. What I've got is something like this function doSomething(){ ... } ...* I can manipulate the *(above) however I can not change the doSom...

Sql Splitting Function

I have a string like that "10*cat*123456;12*rat*789;15*horse*365" i want to split it to be like that "cat, rat, horse" I have made this Function CREATE FUNCTION [dbo].[Split](@BenNames VARCHAR(2000)) RETURNS VARCHAR(2000) AS BEGIN DECLARE @tmp VARCHAR(2000) SET @tmp = @BenNames SET @tmp = SUBSTRING( S...

JavaScript prototype limited to functions ??

o.prototype = {...} is working only if o is a Function. Suppose I've the following Code conf = { a: 2, b: 4 }; conf.prototype = { d: 16 } conf.a and conf.b is OK and returns proper values. But conf.d doesn't return 16 rather it goes undefined. Is there any solution suck that prototype based generalization can also be applied...

PHP: Merge full array with empty array or check isset() first?

I have a few functions that should return an array, to have it merged with another array. However, sometimes there's nothing to return. What's the best scenario here? Return an empty array and merge that with the full one OR Return null, store the return in a variable, check that variable and THEN merge it if needed. I'm asking this...

FillChar, but for integer/cardinal

The word has it FillChar is about the fastest way to fill a patch of memory with bytes of the same value (not zero, for that there's ZeroMemory), but is there an equivalent to fill memory with a sequence of the same (four byte) integer or cardinal value? Something like FillInt or FillLongWord? ...

Problems with javascript/php image positioning system

Hi everyone! I am working on a project which involves moving products around a virtual living room, I have the following function <a href="javascript:void(0)" onclick="sendxandy( <? echo $_SESSION['numberOfProducts']; ?> )">Save Positions of Products</a> and then the function is as follows: ` function sendxandy(productAmount) { ...

Redeclaring function parameters as variables?

I can't seem to find an answer for this anywhere on the 'Net... Is there any reason, advantage, or disadvantage to redeclaring function parameters as local variables? Example: function(param1, param2) { var param1, param2; ...etc... } Seems extremely redundant to me, but maybe I'm missing something...? Thanks, Brian ...

I want a function in VB SCRIPT to calculate numerology

I want a function to calculate numerology.For example if i enter "XYZ" then my output should be 3 . Here is how it became 3: X = 24 Y = 25 Z = 26 on adding it becomes 75 which again adds up to 12 (7+5) which again adds up to 3(1+2) . Similarly whatever names i should pass,my output should be a single digit score. ...

Retrieving the name of the current function in php

Is there a function that can return the name of the current function a program is executing? ...

C++ Inheritance, calling a derived function from the base class

Hi. Probably asking this shows that I don't have the convenient grasp on OOP, but... How can I call a derived function from a base class? I mean, being able to replace one function from the base to the derived class. Ex. class a { public: void f1(); void f2(); }; void a::f1() { this->f2(); } /* here goes the a::f2() definit...

Modifying a function used as a column default in SQL Server

Hi, We're having an issue with a poorly coded SQL function(which works fine in live, but not in our test environment). This function is used to provide a default value in many tables, trying to ALTER the function returns a "Cannot ALTER ### because it is being referenced by object" error. Is there any way round this error message? T...

Javascript,calling child window function from opener doesn't work

Hello! I'm developing a web application that opens a popup using windows.open(..). I need to call a function on the opened window using the handle returned by "window.open", but I'm always getting the error message "addWindow.getMaskElements is not a function", as if it couldn't access the function declared on child window. This is the b...