computer cartoons

May 25, 2010
computer cartoons

Just for the fun of it: from www.userfriendly.org see www.calvinandhobbes.me this is so old, I don’t remember where it came from:

Read more »

Syntax Check a PHP Pgm

May 14, 2010

Be sure your error reporting is turned on: (for your testing copy or for your IP address) @ini_set('display_errors', '1'); error_reporting(E_ALL ^ E_NOTICE); If it is and you still get nothing but a blank page … then, by all means, your next step might be to take the syntax check option built into PHP! From a linux/unix command line (terminal session), run php with its...

Read more »

PHP(6): Character encoding and other new features

April 13, 2010

The Internet is converging on UTF-8 for a common / universal character encoding. Set your apache environment to utf-8 by adding ‘AddDefaultCharset utf-8’ to your .htaccess. If you do not use apache add ‘default_charset utf-8’ to your php.ini. You have to do either of them (not both), php will use the apache setting where needed. And, of course, your html-header: ‘< meta http-equiv="Content-type" content="text/html;...

Read more »

SQL db Injection, Cross-Scripting, RFI, and LFI

March 27, 2010

It is possible for a hacker to enter the following seemingly innocuous text into the UserName textbox to gain entry to the system without having to know a valid user name and password: ‘ Or 1=1 — The hacker breaks into the system by injecting malformed SQL into the query. This particular hack works because the executed query is formed by the concatenation of...

Read more »

Comparing OOP in php, java, and C++

March 18, 2010

Sample introductory Object Oriented Programming code in php, java, and C++ showing the similarities and differences. With the possible exception of large, long-term projects, OOP, despite all the hype, is a lot more expensive to write and to maintain than clean structured code. The reality of it does not live up to the theory, and the hype is often “smoke and mirrors” unfortunately. This...

Read more »

Original Technology terms translated

February 25, 2010
Original Technology terms translated

Just for the fun of it: (found this a long time ago) Hope you enjoy it also!

Read more »

accessing a MySQL db

February 12, 2010

4 sample C utility programs that came with MySQL 1. connect_test.c 2. select_test.c 3. insert_test.c 4. list_test.c They came with the disclaimer below. /* connect_test.c A program to connect to a database. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation;...

Read more »

screen I/O pgm

February 10, 2010

This program was written back in the days of cassette tapes!: Screen I/O pgm in C & Pascal. This program will go through a list of songs, throwing out one song or another until it finds a total time that most nearly matches the target time. It will display and write to a (text) file the new (sub) list and, separately, the song(s) that...

Read more »

php Number Formatting, Rounding, and Incrementing

February 10, 2010

updated 2019-09-15 Checking ctype_digit() only checks strings from the manual: $strings = array('1820.20', '10002', 'ws123'); foreach ($strings as $testcase) { if (ctype_digit($testcase)) { echo "The string $testcase consists of all digits.\n"; } else { echo "The string $testcase does not consist of all digits.\n"; } } The above example will output: The string 1820.20 does not consist of all digits. The string 10002 consists...

Read more »

[C] File I/O and params

February 7, 2010

Written to copy a large file across several floppy disks!: Simple example of file I/O, buffering, and input parameters. The pgm breaks a file into diskette (or any) size pieces. if the parameters are not correct, instructions are written to the screen. #include /* BREAK UP . C */ #define FALSE -1 /* +----------------------+ */ #define TRUE 0 /* | This c program is...

Read more »