function

Mysql limit function doesn't seem to work for me...

Here is my query, select t1.dSyllabus_id,t1.dBatch,t1.dFilePathName, t2.dDegreeName,t3.dDepartmentAbbr from tbl_syllabus as t1 join tbl_degree_master as t2, tbl_department_master as t3 where t2.dDegree_id=t1.dDegree_id and t3.dDepartment_id=t1.dDepartment_id and t1.dCollege_id='1' and t1.dIsDelete='0' and i get applying limit , ...

In postgresql return result of a function in a rule when performing INSERT INTO RETURNING

I have a View that has several fields. When i INSERT INTO a view I run a function based on INSERT parametrs. The function returns a value. How can I retrieve The value from rule? INSERT RETURNING Gives me: ERROR: cannot perform INSERT RETURNING on relation "full_subntes" HINT: You need an unconditional ON INSERT DO INSTEAD rule wi...

PHP mysql - ...AND column='anything'... ?

Is there any way to check if a column is "anything"? The reason is that i have a searchfunction that get's an ID from the URL, and then it passes it through the sql algorithm and shows the result. But if that URL "function" (?) isn't filled in, it just searches for: ...AND column=''... and that doesn't return any results at all. I've ...

How to change the meaning of pointer access operator

Hi All, This may be very obvious question, pardon me if so. I have below code snippet out of my project, #include <stdio.h> class X { public: int i; X() : i(0) {}; }; int main(int argc,char *arv[]) { X *ptr = new X[10]; unsigned index = 5; cout<<ptr[index].i<<endl; return 0; } Question Can I change the meaning of...

Separating arguments to a function, in locales with comma as decimal marker

In locales, e.g. French, with comma as decimal indicator (where "5,2" means five and two-tenths), how do users separate function arguments from each other? For example, in many programming/scripting languages, I could specify MAX(1.5, X) in a EN-US locale. How do you avoid the ambiguity between the comma as decimal indicator, and as ...

How to make a copy of a char and not a reference in C++

If I declare a function like this: string hash (char* key) then any change I make to key will also change it's value when the function exits, correct? I want to make a copy of it in the function so that I can safely change it without changing the original value. I tried this, but it doesn't work. char temp = key; How can it be do...

How to structure javascript callback so that function scope is maintained properly

I'm using XMLHttpRequest, and I want to access a local variable in the success callback function. Here is the code: function getFileContents(filePath, callbackFn) { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState == 4) { callbackFn(xhr.responseText); } }...

How can I send null value to clr function?

When I'm trying to create a clr fucntion with nullable paramete (any kind), the function does not created in the DB. Does anyone know how can I do it? thanks. ...

using an array in a custom formula in crystal reports xi

I have a formula which is working; the formula uses an array. I tried to extract the formula to create a custom formula but now get an error in the syntax. I am wondering if the array is causing the problem as the error is on the line: last_element_current:=val(sc_array[1]) + 1; and the error is: the ) is missing and highlights the va...

Help with dynamic range compression function (audio)

I am writing a C# function for doing dynamic range compression (an audio effect that basically squashes transient peaks and amplifies everything else to produce an overall louder sound). I have written a function that does this (I think): public static void Compress(ref short[] input, double thresholdDb, double ratio) { double ma...

what is the easiest way to do this function in c# ?

Hello let say that we have an array [5,5] 01,02,03,04,05 06,07,08,09,10 11,12,13,14,15 16,17,18,19,20 21,22,23,24,25 the user should send 2 values to the function (start,searchFOR) for example (13,25) the function should search for that value in this way 07,08,09 12, ,14 17,18,19 if the value is n't found in this level it will go...

How can I refactor this JavaScript code to avoid making functions in a loop?

I wrote the following code for a project that I'm working on: var clicky_tracking = [ ['related-searches', 'Related Searches'], ['related-stories', 'Related Stories'], ['more-videos', 'More Videos'], ['web-headlines', 'Publication'] ]; for (var x = 0, length_x = clicky_tracking.length; x < length_x; x++) { links = document.ge...

deleting cookie at the end of a process

Hi, I am using the following plug in for cookies in jQuery: https://code.google.com/p/cookies/ The issue i am having is not with the plugin but when and how to delete the cookie at the end of a quoting process. The site i am using this on is a six step online quote and buy process. There is Omniture event serialisation sitestat trac...

What's the benefit of declaring class functions separately from their actual functionality?

In C++, what's the benefit of having a class with functions... say class someClass{ public: void someFunc(int arg1); }; then having the function's actual functionality declared after int main int main() { return 0; } void someClass::someFunc(int arg1) { cout<<arg1; } Furthermore, what's the benefit of declaring the...

Can IDL evaluate strings as code?

Is there any functionality in IDL that will allow it to evaluate a a string as code? Or, failing that, is there a nice, dynamic way of including /KEYWORD in functions? For example, if I wanted to ask them for what type of map projection the user wants, is there a way to do it nicely, without large if/case statements for the /Projection_...

How can you write a function that accepts multiple types?

I have a function that should work on int[] and on String[] now i have made the same function with a int parameter and an String parameter however if it has to go this way its a bit copy paste work and doesn't look very organized is there a way to solve this and put these 4 functions in 2? static public void print(String s) { ...

How to send a signal ( or notification ) from MPI process to another on C?

Hello All, How can i make MPI process notify the others about an error for example, specially on an MPI program where all the MPI processees are independant from each others ( There no synchronisation between the different MPI processees ) ? Thanks ...

How do I pass custom variables to javascript events?

I have a user control with a javascript function which references some controls within the user control. This user control works perfectly when there is only one instance of it, but I'm now building a page where I have two instances of the user control. In IE7, it works fine, but in FireFox, it is getting confused that there is two fu...

Calling a non-exported function in a DLL

I have a program which loads DLLs and I need to call one of the non-exported functions it contains. Is there any way I can do this, via searching in a debugger or otherwise? Before anyone asks, yes I have the prototypes and stuff for the functions. ...

How do I pass a variable number of parameters along with a callback function?

I'm using a function to lazy-load the Sizzle selector engine (used by jQuery): var sizzle_loaded; // load the Sizzle script function load_sizzle(module_name) { var script; // load Sizzle script and set up 'onload' and 'onreadystatechange' event // handlers to ensure that external script is loaded before dependent // code is e...