|
Best Computer Solution
 |
|
|
|
|
|
Code
|
On this page you can find many examples and programs that I have created throughout my programming life. These are categorized by language, and are not in chronological order. It would take too long to upload every example, but these examples you will find useful.
Source code for programs is available on request, unless the source is included in the download.
Contents:
VB.Net
PHP (MySQL)
Javascript (XHTML/CSS)
VB.Net:
-
| Program Name: Subliminal Message |
Last Code Update 26/09/2009 |
Download (ZIP): subliminal_message_v1-0-0-0.zip (20KB) |
- Make you think/believe short sentences, such as "You are Happy".
- Can be used as a self help tool (You enter in your own messages).
- Known bug is that it sometimes defocuses the current window (This is actually a problem with Windows)
- Let me know if it works =). Source is available on request.
| |
| Program Name: Screenshot |
Last Code Update 06/01/2009 |
Download (RAR): screenshooter.rar (25KB) |
- This program is used for taking screenshots easier in the windows environment.
- It can be used to automatically save screenshots in a folder, or you can save them manually.
- Hotkeys can be assigned so that you can take the picture with ease.
| |
| Program Name: Shutdown Timer |
Last Code Update 2008 |
Download (RAR): shutdowntimer_standalone.rar (14KB) |
This program will shutdown your computer at a time you specify. Has safety built into it so if you have a document open it will cancel the shutdown in 1 minute (when you're asked to save it and you don't select antying).
| |
PHP and MySQL:
-
| Program Name: Pagination for PHP |
Last Code Update 13/05/2009 |
Download (RAR): pagination.rar 1KB |
An easy way to implement advanced pagination into your site. Example included =).
| |
| Program Name: Get Twitter Feed |
Last Code Update 05/04/2009 |
Download (ZIP): twitterfeed.zip 1KB |
Wondering how I got my Twitter feeds to appear up here? Well here's the (modified for others to use) code that I used. You can include this file, or simply copy the code!
| |
| Program Name: Change Wordpress Username For Any Account |
Last Code Update 20/03/2009 |
Download (ZIP): change_wp_username.zip 1KB |
This will change one of your Wordpress Usernames. For this to work, your wordpress must have the correct database details in the wp-config.php file. You should remove this file after you're finished with it, as it can be a major security breach. Please make sure you make the username compliant with Wordpress username standards (IE, no special characters). The usernames are cAsE sEnSiTiVe. You will need FTP access for this to work.
| |
| Program Name: Change Wordpress Password For Any Account |
Last Code Update 20/03/2009 |
Download (ZIP): reset_wp_password.zip 1KB |
This will change your Wordpress password on any account. For this to work, your wordpress must have the correct database details in the wp-config.php file. You should remove this file after you're finished with it, as it can be a major security breach. The usernames are cAsE sEnSiTiVe. You will need FTP access for this to work.
| |
| Program Name: DB Login and Session Example/Template |
Last Code Update 24/01/2009 |
Download (ZIP): login_session.zip 2KB |
This code can be used as a template for a login system that maybe on your site, or as an example of how to create one. It uses a database to store member details and sessions to keep track of who's logged in. Security wasn't in mind when this code was written, so you'll need to create your own input filters. When using, you'll have to manually place the database name, username, and password into the config.php file. After that, checkout the install directory to setup the tables. In the admin directory you can add/remove users. All passwords are MD5 HASHED when stored in the database.
| |
| Program Name: Catch All Submits |
Last Code Update 12/12/2008 |
Download (RAR): catch_all_submits.rar 2KB |
This shows POST, GET and COOKIE values that are being submitted to the PHP file.
To get this to work, create a simple form & set the form action to the location of this file on the internet. When you submit to this file it will output the results into 2 JavaScript Arrays. The first array is the variable names, and the second JavaScript Array is the data stored in the variable. Use the array index to match both variable and data.
| |
| Program Name: Quote Generator |
Last Code Update 15/10/2008 |
Download (RAR): quote_generator.rar 2KB |
Here's a script that I made that will allow you to call random quotes from a list, or cycle through them.
| |
JavaScript (XHTML, CSS):
-
| Program Name: Cypher Encryption |
Last Code Update 2008 |
View Page: Cypher |
|
You can enter in a password (Passphrase) and a message. The message can then be encrypted into the output box and copied from there. Once the message is encrypted the only way to (quickly) decrypt the it is to know the passphrase and enter it back into here. You can encrypt data multiple times using different passphrases for added security.
| |
| Program Name: Birthday Problem |
Last Code Update 2008 |
View Page: birthday_problem.htm |
Taken From Assignment Sheet
Given a random group of 23 people, how likely is it that two people have the same birthday? To answer this question, use the algorithm designed in class to write a program that creates a "person" array of range 1 to 23, and assigns to each of the 23 "persons" a random "birthday" integer from 1 through 365 (ignore leap years). The program then needs to check all the "persons" to see if there are any matching "birthdays". Expand the above by repeating it 100 times, counting how many groups of 23 "persons" have at least one matching "birthday". This count represents the percentage likelihood. (Hint: the answer should be around 50%.)
| |
| Program Name: Training Heart Rate |
Last Code Update 2008 |
View Page: heart_rates.htm |
Taken From Assignment Sheet
In order for exercise to be beneficial to the cardiovascular system, the heart rate (number of beats per minute) must exceed a value called the Training Heart Rate (THR).
| |
| Program Name: Click Me If You Can |
Last Code Update 2008 |
View Page: click_me.htm |
Taken From Assignment Sheet
Write a program that displays a simple web page with an image that randomly jumps around the screen, fast enough to be challenging. If the user manages to click on the image a pop-up message is displayed saying "Got Me!" Speed up if caught, slow down if not.
| |
| Program Name: Email Verification |
Last Code Update 2008 |
View Page: email_verification.htm |
Taken From Assignment Sheet
Create a form that only accepts an entered email address that is valid. The form must use regular expressions to prevent illegal characters being included, as well as checking for a username, "@" and a "." between each of the domain names for organisation, organisation type or country.
| |
| Program Name: Metric Conversion |
Last Code Update 2008 |
View Page: feet_to_inches.htm |
Taken From Assignment Sheet
Create a web page that has a pop-up prompt for "Feet" and another for "and Inches" which then produces a pop-up message "(value) metres or (value) centimetres", where each value is the metric conversion of the total of feet and inches. (Note: use 12 inches per foot, 2.54 centimetres per inch, and 100 centimetres per metre. If the user inputs 5 feet and 6 inches the output should be "1.6764 metres or 167.64 centimetres".)
| |
| Program Name: Times Table Drill |
Last Code Update 2008 |
View Page: times_tables.htm |
Taken From Assignment Sheet
Create from it a web page that displays two randomly generated integers between 0 and 12 and prompts for the user's answer, which then produces a pop-up message saying whether the answer was the correct multiplication of the integers. (Option, no extra marks: automatically repeat questions, display score and exit once the user has 5 correct answers in a row.)
| |
| Program Name: Prime Factors |
Last Code Update 2008 |
View Page: prime_numbers.htm |
Taken From Assignment Sheet
Create a web page that asks the user to supply an integer greater than 1 and then display all the prime numbers that multiply together to get the user's number. If a number is a prime, its only factors are itself and one. (For example the prime factors of 12 are: 2 x 2 x 3, but the prime factors of 13 are: only 13.)
| |
|
|
Last Updated:
|
12/01/2009 02:41:23
|
|
|
|