Below are the top ranked snippets.
5
This script demonstrates the use of the Speech API via VBScript. Simply type in the word or phrase that you want to the computer to speak and click OK. Useful for vocalizing the results of a function or literally reading a text file to the user.
Note: To successfully run this code you MUST have the Speech API installed. The Speech API is installed during a complete Office install. If the required libraries are not present on your system, search Microsoft.com for the speech API SDK download. See this page for help on setting up Text To Speech: http://support.microsoft.com/kb/306902/
Note: To successfully run this code you MUST have the Speech API installed. The Speech API is installed during a complete Office install. If the required libraries are not present on your system, search Microsoft.com for the speech API SDK download. See this page for help on setting up Text To Speech: http://support.microsoft.com/kb/306902/
9
This PHP class allows you to send SMS to almost every country directly from your website. All you need is an account on www.tm4b.com and PHP 5.
Also required is either cURL or allow_url_fopen enabled in php.ini
Also required is either cURL or allow_url_fopen enabled in php.ini
5
Generate prime numbers blow some limit using the Sieve of Eratosthenes algorithm. This snippet uses some object abstractions to simplify the algorithm.
5
Generate prime numbers below some limit. This snippet uses groovy categories to locate the appropriate methods in common classes.
7
A websafe colour palette generator in JavaScript. Coded this after looking at http://www.bytemycode.com/snippets/snippet/585/ and wanting to do it differently.
It's been refactored so that:
* can pass generateColourPalette an arbitrary array of colour codes and it'll generate a palette.
* it hooks into the page through the external file
* uses an internal stylesheet instead of inline styles
It's been refactored so that:
* can pass generateColourPalette an arbitrary array of colour codes and it'll generate a palette.
* it hooks into the page through the external file
* uses an internal stylesheet instead of inline styles
5
This class implements a simple template engine that works by replacing text.
It can read a template file into a string. Then it searches and replaces all occurrences of the template place holder marks with the values of one or more template arguments.
It can read a template file into a string. Then it searches and replaces all occurrences of the template place holder marks with the values of one or more template arguments.
6
This class is a MySQL database access wrapper. It can:
- Connect to a MySQL server
- Execute SQL queries and retrieve single value results or return result rows into arrays
- Return the last inserted table row identifier, the number of result rows and the number of affected rows
- Count the number of executed queries
- Lock and unlock tables
- Escape text literal values or like patterns
- Retrieve database access errors
- Connect to a MySQL server
- Execute SQL queries and retrieve single value results or return result rows into arrays
- Return the last inserted table row identifier, the number of result rows and the number of affected rows
- Count the number of executed queries
- Lock and unlock tables
- Escape text literal values or like patterns
- Retrieve database access errors
7
This class can be used to retrieve the search words entered by an user in a search engine site that lead the user to the current page.
The class can parse the HTTP_REFERER variable if present. Then it can detect which search engine site lead the user to the current page, and extract the search words.
Currently the following engines are supported:
- Google
- Yahoo
- MSN
- AllTheWeb
- LookSmart
- AskJeeves
The class can parse the HTTP_REFERER variable if present. Then it can detect which search engine site lead the user to the current page, and extract the search words.
Currently the following engines are supported:
- Yahoo
- MSN
- AllTheWeb
- LookSmart
- AskJeeves
10
This simple function will check if a url is valid (going by parse_url()) and if it's 'online' - by seeing if it returns a 302, 301, or 200 status code.
5
This small snippet will not allow _POST requests from a 'foreign' domain. It relies on the HTTP_REFERER variable.









