Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Intrinsic functions



  Output control functions in PHP

The Output Control functions in PHP allow you to control when output is sent from the script. This can be useful in several different situations, especially if you need to send headers to the browser after your script has began outputting data. The Output Control functions do not affect headers sent using header() or setcookie(), only functions such as echo and data between blocks of PHP code. These output control functions include ob_start(0, ob_clean(),ob_get_contents(), etc. To be honest, I a...

   PHP,output buffer,relationship,ob     2012-06-15 10:11:58

  The ugliest C feature:

<tgmath.h> is a header provided by the standard C library, introduced in C99 to allow easier porting of Fortran numerical software to C. Fortran, unlike C, provides “intrinsic functions”, which are a part of the language and behave more like operators. While ordinary (“external”) functions behave similarly to C functions with respect to types (the types of arguments and parameters must match and the restult type is fixed), intrinsic functions accept arguments of...

   C,,Fortran,Intrinsic functions,C99,Ugly     2011-12-26 08:33:27

  mysql_fetch_array(),mysql_fetch_assoc() and mysql_fetch_row()

In PHP MySQL mannual. There are three functions which need to be clarified for some users who may get confused when choosing which one to use to get the result. mysql_fetch_array() : by seeting the different parameters, there are three ways to return the result set. MYSQL_ASSOC(Result set with field names as the associative indexs.It means you can use the field name as the index to get value of the specified cell). MYSQL_NUM(Result set with field names as the number indices). Or MYSQL_BOTH(...

   PHP,MySQL,resultset,comparison,mysql_fet     2011-08-05 04:53:09

  Why no max/min function for integer in GoLang

You may notice that there is no max/min function provided to compare the maximum/minimum of two or more integers if you are a GoLang developer with some experience . In other languages, these functions are provided as part of the core lib functions. Have you wondered why?  Indeed GoLang provides max/min function in math package, but they are used for comparing float64 data type. The signature of these two functions are math.Min(float64, float64) float64 math.Max(float64, float64) float...

   GOLANG,MAX,INT,INT64     2019-06-08 07:00:55

  Highly efficient PHP code writing

Next are some tips for writing highly efficient PHP codes. They are described below: 0. Use single quote to replace double quote, this will be better since PHP will serach for variables in double quoted strings. Note, only echo can do this; 1. If we can define methods of a class as static, then do it. It will increase access speed by 4 times; 2. $row["id"] is 7 times faster than $row[id]; 3. echo is faster than print, and also use echo's multiple parameter format such as echo $str1,$str2 inst...

   PHP,Code writing,High efficient,Tips     2011-07-23 12:35:50

  malloc/free and new/delete in C++

malloc and free are C++/C language standard library functions, while new/delete are operator of C++. They can be used to allocate dynamic memory and free memory in C++ programs malloc/free can not meet the requirements of dynamic objects creation. Object needs to call the constructor to initialize the object when creating, the object needs to call the destructor before it is destroyed  Since malloc() and free() are library functions rather than operators, the compiler has no control permiss...

   C++,memory,malloc,free,new,delete     2012-06-20 06:52:09

  Break down defer statements in GoLang

Basic Concepts What are the characteristics of the deferred statement defer in Go language? When is it usually used? The deferred statement(defer statement) in Go language has the following characteristics: Deferred Execution: Deferred statements are executed before the function containing them exits, regardless of whether the function returns normally or encounters an exception. Last In, First Out (LIFO): If there are multiple deferred statements, they are executed in the order of last in, f...

   DEFER,GOLANG     2024-02-10 21:56:10

  Google released a visual programming language Blockly

Google released a visual programming language Google Blockly, similar to the children programming language Scratch developed by MIT. You can build an application using some graphic objects, this is like playing LEGO toys. Eveny graphic object is a code block,  you can integrate them together to create simple functions, then you can combine some simple functions together to build a complete application. Users can drag blocks together to build an application. No typing required.This project...

   Google,Blockly,Visual programming language     2012-06-05 08:58:26

  Optional arguments in PHP function

In PHP, we can define our own functions which can accept optional number of arguments. In this kind of functions, the optional argument should be set with default value.Fox example, the next code example will illustrate this:<?php function func($name,$type=NULL) { echo "$name $type"; } func("Hello"); echo "<br />"; func("Hello","world"); echo "<br />";?>Here $type is an optional argument. It must be set with a default value either NULL or some other value. Quite simple....

   PHP,optional,arguments,user defined func     2011-03-28 12:35:20

  JavaScript: Passing by Value or by Reference

In JavaScript, we have functions and we have arguments that we pass into those functions. But how JavaScript handles what you’re passing in is not always clear. When you start getting into object-oriented development, you may find yourself perplexed over why you have access to values sometimes but not other times. When passing in a primitive type variable like a string or a number, the value is passed in by value. This means that any changes to that variable while in the function are com...

   JavaScript,Function,Pass by reference,Pa     2011-07-28 11:05:25