Computers and Technology Articles
Using Shared Libraries - ...namic loading.
Using Noninstalled Libraries
When you run a program, the dynamic loader usually looks in a cache (/etc/ld.so.cache,...
What are Java Listeners - ...rently occupying that area of the screen.
The most commonly used event listeners are shown below and are found in the package java.awt.eve...
Break ins - ...d any subdirectories and files therein, and so on. In most break-ins, however, the intruder's goal is not simply to reach another user's account. ...
Whats a Linux Process - ...m's credentials (which user and group owned the process, for example)
The program's current directory
Which ...
Common PHP Errors - ...>
will return an error similar to the following:
Parse error: parse error, unexpected T_ECHO in c:\webserver\test2.php on lin...
POSIX Interfaces - ...16-bit machine does not have the same native word size as a 64-bit machine, and a low-level programming language should not pretend it does—...
PHP mail - ... e-mails using the mail function. The format for the mail function is as follows:
mail($to, $subject, $message, $headers);
...
Common Linux Security Holes - ...IV>
1: /* bufferoverflow.c */
2: 3: #include <limits.h>
4: #include <stdio.h>
5: #include <string.h>
6: ...
Java EE Platform - ...pment. The runtime environment is widely used in Web browsers to run small applications known as applets. The development kit is used to compile and d...
Java EE Architecture - ...rnal integration. The following is a list of major technologies provided by Java EE.
Enterprise Applications and Transactions
Compone...
About Ipods and Iphones - ...an be recalled and listened while commuting places.
Ipods actually stormed the music industry and created followers of young breed of music ...
Relational SQL Databases - ...te also that every row of data in the primary key must be unique to one another. Here is the statement required to create our database (called gam...
SQL Data Import Methods - ...we use \N to specify a field that contains NULL and an extra tab is required after each row of data to signify the end of that row. We have saved ...
Install MySQL on Windows - ...eed to select the option MySQL 3.23 Production release (recommended). This will take you to a new page where you can select the package to ...
Emax vs. vi Unix text editors - ...environment of its own. vi is small and is designed to be one piece of the Unix environment. Many clones and alternative versions of each editor h...
Running a Linux Program as a Daemon - ...the program and a meaningful exit code to be returned. This type of work includes parsing configuration files and opening sockets.
...
PHP Date and Time - ...eplaced with the date or time section that they represent. For example:
<?php echo date("d/m/Y"); ?> outputs 11/02/2003
&...
PHP Random Password - ...rd($length) {
$possibleCharacters = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$characterLength = strlen($possibleCharac...
Importing Java Packages - ...end of the package name. This means that it will include all of the classes within the package (i.e., the asterisk is used as a wildcard).
Ano...
Joining SQL Tables - ...them (although when the statement is executed the actual data is compared).
For an example of how we can use joining, let's look back to the...
Linux Console Capabilities - ...ape character signals the beginning of an escape sequence and changes the processing mode to escape mode.
For example, consider the fo...
What is a Java Package - ...e of the name of a variable.
The following table shows some of the main packages that are include...
Variable Scope - ...this code block
inside = outside;
}
outside = 5;
// inside cannot be accessed here
The variable inside cannot be access...
Notional Lineage of Unix Systems - ...ntained Unix operating systems that were derived from the original Unix implementation done by Bell Laboratories.
The Berkeley version of Un...
Regular Expressions in Java - ...to match to string data. In the String class, you can use the method matches to match a regular expression passed as a parameter of type String to the...
Invocation Chaining - ...follows:
int i = 72;
String str = String.valueOf(i);
char firstChar = str.charAt(0);
System.out.println(firstChar); // prints...
Latest "C" Articles
Page# 1 (last added articles shown first)
Calling Virtual Functions in Constructors and Destructors (10/15/2009)
(...) .D x; // no resources seized or released!
As the first step in the initialization of x, the derived class constructor invokes the base class constructor, which in turn makes a virtual function call to seize. As the last step in the destruction of x, the derived class destructor invokes the base class destructor, which in turn makes a virtual call to release. (...)
define Literals in C plus plus (10/15/2009)
(...)
The #define directive does not respect scope. Most C++ facilities are now encapsulated in namespaces. This has a number of benefits, not the least of which is that different facilities are less likely to interfere with each other. (...)
define Pseudofunctions (10/15/2009)
(...) . .
Here, we've committed the common error of insufficient parenthesization of the pseudofunction. (...)
Excessive Commenting (09/21/2009)
(...) The line should originally have been written without a comment:
a = b;
The code is maximally clear as it stands, with no comment to be incorrectly maintained. This is similar in spirit to the well-worn observation that the most efficient code is code that doesn't exist. The same applies to comments: the best comment is one that didn't have to be written, because the code it would otherwise have described is self-documenting. (...)
Magic Numbers in C (09/21/2009)
(...) (If we had any concern about safety and correctness, we'd use a standard vector.) The trouble is that we're now obliged to examine every source file that uses Portfolio for each occurrence of the literal 10, to decide if that 10 means maximum number of contracts.
Actually, the situation can be worse. (...)
Misunderstanding References in C plus (09/21/2009)
(...) (Though the C++ standards committee has discussed allowing references to references in the future, at least in some contexts.)
int &&rri = ra; // error! int &*pri; // error!int &ar[3]; // error!
References can't be const or volatile, because aliases can't be const or volatile, though a reference can refer to an entity that is const or volatile. An attempt to declare a reference const or volatile directly is an error:
int &const cri = a; // should be an error . (...)
Ignorance of Base Language Subtleties in C plus plus (09/21/2009)
(...) If val is a function, this is of little importance. However, if val is a preprocessor macro, the presence of multiple expansions may produce incorrect side effects. In these contexts, the availability of an effective conditional operator as a substitute for an if-statement can be essential. (...)
Precedence Problems in C plus (09/21/2009)
(...) A left-associative operator like + will bind first with the argument to its left. Therefore, we'll first add a and b before adding the result of that subexpression to c.
Assignment is right-associative, so we'll first assign the result of a+b+c to a, then assign a to b. (...)
Enter page# 1 (last added articles shown first)