AD MANAGEMENT
Collapse
BEHOSTED
Collapse
Announcement
Collapse
No announcement yet.
Search Result
Collapse
18 results in 0.0519 seconds.
Keywords
Members
Tags
-
Testability
The MVC architecture gives you a great start in making your application maintainable and testable, because you naturally separate different application concerns into different, independent software pieces. Yet the ASP.NET MVC designers didn’t stop there. To support unit testing, they took the framework’s...
-
What is Boolean Literals ?
Boolean values, also called logical values, are basically true or false. They are usually used in conditional expressions and statements. If you are familiar with C++, you probably recognize these terms as 1 and 0, 1 representing true and 0 representing false. JavaScript officially uses the true and...
-
The Equals Operator
The equals comparison operator (==, two equal signs) enables you to test whether two values are equal. For example, you might use the expression
to test whether the values stored in $a and $b are the same.The result returned by this expression is true if they are equal or...
-
Make_std_zval( )
The most basic of the pval/zval access macros provided by the extension API is the MAKE_STD_ZVAL( ) macro:
This does the following:
• Allocates memory for the structure using emalloc( )
• Sets the container reference count to 1
• Sets the container...
-
Singleton Pattern
The singleton pattern is probably one of the best-known design patterns. You have probably encountered many situations where you have an object that handles some centralized operation in your application, such as a logger
object. In such cases, it is usually preferred for only one such application-wide...
-
Cleaning up a function that generates a link
For our first example, we will try the first approach to separating markup and code. We will place the HTML output under test and change the PHP code slowly and incrementally so that the code is always working and the tests never fail. This is manageable in this case since there is not much HTML ...
-
How do I create compressed ZIP/TAR files with PHP?
Perhaps you have a directory that contains many files, or different types of files, as well as subdirectories. There may well be situations in which you need to create a download of the whole directory that preserves its original structure. The typical command line approach to achieving this on Unix-based...
-
How do I write portable PHP code?
Not all PHP installations are the same. Depending on version and configuration settings in php.ini, your script may or may not run correctly on another server where PHP is installed. However, there are some general good practices you can adopt to make life easier and minimize the need to rewrite code...
-
How do I deal with members who forget their passwords?
In the last solution, I was happy to explain just how great human beings are in comparison to computers. Unfortunately, though, we have a tendency to “age out” important information such as the password we need to log into a site. A feature that allows users to retrieve forgotten passwords is an essential...
-
Closely Examining the East Code
It’s customary in Western languages to write from left to right, so the code for E, which indicates write towards the East, is probably the most natural to understand. I explain how that code works and then show you how the other directions differ.
Here’s the code fragment that attempts...
-
mt_srand()
This function seeds your random number generator.
void mt_srand (int seed)
Use the following line and you can be sure your numbers will be plenty random:
mt_srand ((double) microtime() * 1000000);
Seed the random number generator only once per scr...
-
Zend_Registry
Using global variables is generally considered unwise for large applications as it introduces coupling
between modules and it is very difficult to track down where and when a given global variable is modified during the processing of a script. The solution is to pass variables as parameters through...
-
boolean chdir(string directory)
When a PHP script begins to execute, its default path is the path to the script itself. That is, if the fully qualified path to the script were /users/leon/public_html/somescript.php, then all relative paths would work off /users/leon/public_html/. You may change this default path with the chdir function....
-
Explain the differences between Server-side and Client-side code ?
Server side code will execute at server (where the website is hosted) end, & all the business logic will execute at server end where asclient side code will execute at client side (usually written in javascript, vbscript, jscript) at browser end.
-
What is an Iterator class?
A class that is used to traverse through the objects maintained by a container class. There are five categories of iterators:
random access.
input iterators
forward iterators
output iterators,
bidirectional iterators.
An iterator is an entity that gives access to...
Unconfigured Ad Widget
Collapse