background preloader

Website Information

Facebook Twitter

JavaScript: Random Scripts. Get random numbers, quotes, etc. The random() method function of the Math object allows you to get random numbers for various uses in your scripts. You can make a random quote generator or have another type of random script. The only trick is knowing how to get a random number within the boundary you want, and making it a random integer. By default, the random function returns a random number between zero and 1. This by itself isn't very useful. Click the button below, and notice that the number in the alert is a long random number after the decimal point: In that state, you can't really do anything with the number. Var ran_number= Math.random()*5; Now, the numbers you get will be between zero and 4- but they still will not be integers.

We need these to be integers so we can have just the five random numbers between zero and 4. Var ran_number=Math.floor(Math.random()*5); You can also use two steps if it seems to make more sense: Now, try this button. Array_name[0]; quote[whichQuote] SkillShare Forum - CSS Beauty - Change Text Every 5 Seconds.. Redirection using a custom 404 page :: bobpeers.com. Display Information with Your Web Page Links on Mouseover. By William Bontrager This article shows you how to code an instant information system that can place • definitions, • instructions, and • other information near your site visitor's cursor. The information appears when the cursor hovers over certain links or when certain form fields are clicked.

The information pre-loads as the web page loads. This instant info system uses layers to present the info. Why instant info? 1. The instructions are in this article instead of in the JavaScript. You implement it in three steps: 1. Each step requires the prior step to be completed. If you prefer to have a complete example at hand as you go through the instructions, you'll find it linked from this page. The code has been tested to work with IE 5, Netscape 4, Netscape 6, and Opera 6. I. For links, it is rather straight-forward. If the href="____" attribute of any links do not contain a URL to another web page, replace the attribute with href="javascript:Null()" Once you've created the links, insert II. A. Title Case in PHP. The PHP functions strtoupper and ucwords capitalise all characters in a string, and the first letter of every word in a string, respectively.

However, there exists in the standard PHP library no way of achieving Title Case, which involves capitalising all words except for small words (such as conjunctions) when they are not the first word. The following mini-tutorial will provide a solution similar to the one I came up with for displaying thread titles in the SitePoint Forums’ Highlighted Forum Discussions.

First, we’ll need a list of all the words which we don’t want to capitalise when they are not the first word. The words we should be concerned about are conjunctions (such as and, or), prepositions (in, on) and internal articles (the, a). However, I’m no expert in English grammar so I’ll just call them ‘small words’. Here’s a selection of the ones I use. The explode function in PHP can be used to split any string into an array of strings, using a character as a split character. SoundManager 2: Documentation. SoundManager Properties: soundManager.setup() Just getting started? See the basics. For nicely-formatted, annotated source code, see the pretty-printed version. The soundManager object has many configurable properties which set debug mode, determine the flash movie path and other behaviours. You should call the setup method before "DOM Ready", which is when SM2 applies configuration and starts up.

Below are the default settings for SoundManager 2, which are appropriate for the majority of use cases - you shouldn't need to change them. Note: The only property requiring customization is url - this defines the path used to look for the appropriate flash SWF for driving audio when HTML5 is not available. Url: '/path/to/swf-files/', // the directory where SM2 can find the flash movies (soundmanager2.swf, soundmanager2_flash9.swf and debug versions etc.)

Bonus: Extended soundManager.setup() Parameters You can also provide values from the following top-level soundManager properties: debugFlash url. How to send email to a phone « SMS 411. SMS isn’t just for sending text messages from one phone to another — it’s also a great way to get email messages on your phone. Yes, you can get email on your phone! All you need to know is your cell phone’s email address. Most carriers have “SMS gateways” which take email messages from the Internet and deliver them to their customers’ cell phones as SMS text messages. The trick is that you need to know what carrier the recipient’s phone is on — it’s not enough to know their phone number. Sound complicated? (Note: For the major carriers, I’ve included a link to a page with more detailed information on how SMS works with that carrier, how much it costs, and where you can find more information. Alltel [10-digit phone number]@message.alltel.com Example: 2125551212@message.alltel.com AT&T (formerly Cingular) [10-digit phone number]@txt.att.net Example: 2125551212@txt.att.net For multimedia messages, use [10-digit-number]@mms.att.net Example: 2125551212@mms.att.net U.S.

Simple Tabs w/ CSS & jQuery - Easy Tab Tutorial with CSS and jQuery - jQuery Tutorials - Tabbed Navigation Tutorial | jQuery Tutorials. Function Reference/get bloginfo. Function Reference/get bloginfo Languages: English • 日本語 • Português do Brasil • Türkçe • (Add your language) Description Returns information about your site which can then be used elsewhere in your PHP code. This function, as well as bloginfo(), can also be used to display your site information anywhere within a template file. Usage Parameters $show (string) (Optional) Keyword naming the information you want. Default: name 'name' - Returns the "Site Title" set in Settings > General. $filter (string) (Optional) Keyword specifying how to filter what is retrieved. Default: raw 'display' - Passes the value of $show through the wptexturize() function before returning it to caller.

Examples Default Usage The default usage assigns your blog's title to the variable $blog_title. Blog Title This example assign your blog's title to the variable $blog_title. Blog Tagline Using this example: results in this being displayed on your blog: Your Blog Tagline is: All things WordPress Network Tagline Template Directory. WideImage Wiki: WideImage, an object-oriented PHP image library. Use PHP to Create Dynamic pdf Files. Use PHP to Create Dynamic pdf Files - Creating the pdfs on the Fly(Page 2 of 3 ) Firstly let’s find the extension that is needed for this exercise. If you installed php on a windows platform, then the php_pdf.dll, on my computer it is located at C:\PHP\php-4.3.1-Win32\extensions. If you are using a linux platform, believe you’ll need to download this dll file. Now, in your php.ini file remove the “;” character in front of the extension=php_pdf.dll line.

Since we updated the ini file, we must restart the apache web server so that the web server can reinitialize the php with the php_pdf library included. Create a php file with the following code, Now we will grab the post information. $user = $HTTP_POST_VARS["userName"]; Now, we are ready to start. <? Pass the object at the first position in all of the PHP pdf functions when required for that page. Pdf_open_file($pdf, "C:\bennyboy.pdf"); This should create a blank new pdf file size 0kb. Pdf_begin_page($pdf, 595, 842); How to Start Using jQuery Sliders in Your Designs. jQuery sliders offer a simple, elegant way to display content without giving up valuable real estate on your web page. They have skyrocketed in popularity and can be used in a variety of ways. Let's go over the popular styles, choosing a slider and integrating one into a demo site. A Little Background Once upon the time, an image on the web just had one way of showing up: as a flat JPG, GIF or PNG.

Sometime a few years ago, images started learning new tricks; They grouped together and started showing up in jQuery sliders to the applause of visitors all around. Since then, they've learned a plethora of new tricks that make them prime material for any web designer. Whether you've used them before or not, this tutorial will give you insight into the different flavors of sliders, when to use them in a design, and we'll even walk you through an installation of one.

If there is one thing jQuery sliders don't have, it's a consistent name. Popular Styles of jQuery Sliders Standard Photo Slider 1. 16 Gorgeous Web Safe Fonts To Use With CSS | Web Design Dev.