Currently browsing tag

function

Function in WHERE clause

Function in WHERE clause

  Introduction When we are using the function in the SELECT statement it returns data depends on the number of records retrieve by the select statement and what type of value is passed in the scalar function. The performance of the MS SQL Query is little bit degraded using the …

Ranking Function

Ranking Function Ranking functions return a ranking value for each row in a partition. Depending on the function that is used, some rows might receive the same value as other rows. Ranking functions are nondeterministic and return Big Integer values.   This article is related to RANKING Function. ROW_NUMBER function The …

STUFF Function

STUFF Function    In this article I am trying to illustrate a vary useful function of SQL Server called STUFF. STUFF Function Stuff is a T-SQL Function used to delete a specified length of characters within a string and replace with another set of characters.    Syntax: STUFF(Character_expression1, start, length, …

SetPixel function on windowsh How to use it

SetPixel() function on windows.h . How to use it?? windows.h provides a function SetPixel() to print a pixel at specified location of a window. The general form of the function is SetPixel(HDC hdc, int x, int y, COLORREF& color); .csharpcode, .csharpcode pre{ font-size: small; color: black; font-family: consolas, “Courier New”, …

C Tutorial Function Templates

C++ Tutorial: Function Templates Function Templates Function templates are used to reduce the repeated code. I want to make you clear about function templates by giving a small example here. Functions abs() and fabs() are used to find the absolute value or non-negative value of a integer and floating point …

Cursor Function

Cursor Function This article is related to cursor function. Here in this article I am trying to mention each function in simple way that you can use it when you are using the cursor. Cursor function pays a very important rows when you playing with cursor. The cursor function is …

How to Overload function call operator in C

How to Overload function call () operator in C++? The argument list of function call operator () is evaluated and checked as according to the argument passing rules. The function call operator is a binary operator with object as one operand and argument list as other operand. In the following …

Numerical Methods Integration of given function using Simpsons 13 rule in C

Numerical Methods: Integration of given function using Simpson’s 1/3 rule in C Source Code: ///integration of given function using Simpson’s 1/3 rule #include float y(float x){ return 1/(1+x*x); } int main(){ float x0,xn,h,s; int i,n; printf(“Enter x0, xn, no. of subintervals: “); scanf(“%f%f%d”,&x0,&xn,&n); h = (xn – x0)/n; s = …

Numerical Methods Integration of given function using Simpsons 38 rule in C

Numerical Methods: Integration of given function using Simpson’s 3/8 rule in C Source Code: //integration of given function using Simpson’s 3/8 rule #include float y(float x){ return 1/(1+x*x); //function of which integration is to be calculated } int main(){ float x0,xn,h,s; int i,n,j,flag; printf(“Enter x0, xn, no. of subintervals: “); …

Numerical Methods Integration of given function using Trapezoidal rule in C

Numerical Methods: Integration of given function using Trapezoidal rule in C Source Code: ///integration of given function using Trapezoidal rule #include float y(float x){ return 1/(1+x*x); } int main(){ float x0,xn,h,s; int i,n; printf(“Enter x0, xn, no. of subintervals: “); scanf(“%f%f%d”,&x0,&xn,&n); h = (xn-x0)/n; s = y(x0) + y(xn); for(i …

Type of Function

Type of Function When I am thinking about function, I find several article related to UDF factions in SQL server. There are so many type noted in different article that hardly to remember them.  In my point of view the, UDF function is broadly categorized at 2 types 1.    Scalar …

gotoxy function in Codeblocksgcc compiler using C

gotoxy() function in Code::blocks(gcc compiler) using C In Turbo C/C++ and Borland C++ compiler, gotoxy() is build in function. You need not have to write its function definition. All you have to do is call the function with arguments as x and y coordinate. But in modern C compiler like …

Returning Two Dimensional Array from a Function in C

Returning Two Dimensional Array from a Function in C Many author do not include topics about returning array from a functions in their books or articles. It is because, in most  of the cases, there is no need of array to be returned from a function. Since, on passing array …

SPACE Function in SQL

SPACE() Function in SQL Some of my friends has a lot of confusions about the functions SPACE() and it’s implementations. The SPACE function takes Integer as parameters and Returns a specified number of spaces as string. The number of space it returns is what number you provide in the parameters. …