-
Demonstrate an efficient way to search the last 100 lines of a file containing roughly ten million lines for a sample string. This should function without having to process each line of the file (and without making use of the .tail. command or any external system commands). Any of the following languages can be used: PHP, C, C++, Java.
run
data (72M)
- Utilizing two common Object-Oriented design patterns, write a set of classes, which can be used to log a given message. The message should be logged to either a MySQL database or a file, depending on a configuration setting. There should be only one connection opened to the database (or the log file should only be opened once) throughout the use of the application. ). Any of the following languages can be used: PHP, Java, C++.
-
Write a basic web application, following the Model-View-Controller/Modular design pattern. The following URLs should be functional:
- http://www.server.com/index.php?page=showTime - Displays the current system time.
- http://www.server.com/index.php?page=showDate - Displays the current system date.
- http://www.server.com/index.php?page=showVersion - Displays the current PHP / Java version.
Monday, March 30, 2009
Chegg application
Tuesday, March 24, 2009
code highlighting test
public interface Logger
{
public function log($destination, $data) {}
}
public class DatabaseLogger implements Logger
{
public function __construct() {
// open file handle, singleton
}
public function log($data) {
// write to file
}
public function __destruct() {
// close file handle
}
}
public class FileLogger implements Logger
{
public function __construct() {
// open database connection, singleton
}
public function log($data) {
$data = mysql_real_escape_string($data);
// write to database
}
public function __destruct() {
// close database connection
}
}
public class LoggerFactory
Wednesday, November 12, 2008
Monday, September 22, 2008
Ever Noticed This While Playing Super Mario?
In all the years I've played the game....I can't believe I didn't notice this. Can anyone confirm if this is true?
read more | digg story
read more | digg story
Friday, September 19, 2008
This is how police SHOULD react to protesters
A video of an LAPD officer explaining things to an Anon protest group. This is how protests SHOULD be treated.
read more | digg story
read more | digg story
Subscribe to:
Posts (Atom)
