Programming

PHP Function: Built-in Functions part 4

Fadıl

Today we will look at some Date and Time functions.

date()
The date() function returns the current server timestamp, formatted according to to a given set of parameters. Its syntax is
date(format, [timestamp]);
The date() Function Formats are located at https://techsoftcenter.com/articles.php?view=238

checkdate()
The checkdate() function validates a given date. Successful validation means that the year is between 0 and 32767, the month is between 1 and 12, and the proper number of days are in each month (leap years are accounted for). Its syntax is
checkdate(month, day, year);

Introduction to Java : Distributing Applets part-2

Fadıl

.zip, .cab, and .jar

Distribution History

As we noted earlier, for most of the history of Java development, there was really no packaging. For the most part, the developer was required to put each class file as a separate file on the web server in the same hierarchy as the packages defined in your Java files. For example, if you had a com.test.utility package you would need a directory hierarchy of com/test/utility under the directory with the main applet class.

PHP Function: Built-in Functions part 3

Fadıl

Welcome back to the not so exciting built in functions part 3!
Today we will deal with Database Connectivity Functions for MySQL.

*Numerous PHP functions exist for connecting  to adn querying a MySQL server. Following are some basic functions and their syntax.*

mysql_connect()
This function opens a connection to MySQL. It requires a server name, username and password.
$connection = mysql_connect(“servername”, “username”, “password”);

mysql_create_db()
This function creates a database on the MySQL server. It requires a valid established connection.
mysql_create_db(“DBName”);

Introduction to Java : Distributing Applets part-1

Fadıl

Introduction

Once you have finalized your applet code, the final stage in the development process will be to determine how to make your program available to browsers on the web.

In the last section, we showed an example of this when we created a class file, referenced it with our HTML, and sat back while web surfers played with our applet.

This approach is realistic for “example” applets and silly little ticker tape programs typical of some Java development, but it may be unrealistic for real-world applications.

PHP Function: Built-in Functions part 2

Fadıl

Welcome back to part 2 of Built-In functions, just a reminder.

count()
The count() function counts the number of elements in a variable. It’s usually used to count the number of elements in an array, because any variable that is not an array has only one element – itself.

In the following example, $a  is assigned a value equal to the number of elements in the $colors array:

$a = count($colors);
if $colors contains the values "blue", "black", "red", and "green",
 $a will be assigned a value of 4.

each() and list()
The each() and list() functions usually appear together, in the context of stepping through an array and returning its keys and values. Here is the syntax for these functions.