Javascript Quizzes

February 5th, 2012

These are the Javascript quizes I’ve Tweeted and put up on jsFiddle:

Read the rest of this entry »


EBNFer

August 28th, 2011

EBNFer is a railroad diagram generator for WordPress. It lets you use WordPress shortcodes to parse and render Extended Backus–Naur Form diagrams.

Download EBNFer from WordPress.org

 

Read the rest of this entry »


PluGeSHin

August 14th, 2011

A WordPress Plugin for GeSHi

Description

PluGeSHin is a WordPress plugin by Peter Ajtai that lets you use the syntax highlighting of  GeSHi through WordPress shortcodes.

You can download PluGeSHin and read about it over at WordPress.org.

This page has samples of PluGeSHin in action.

Read the rest of this entry »


Visibility Toggling with jQuery

August 16th, 2010

User interface design often makes use of showing and hiding blocks of content. It focuses one’s attention to the right thing, and it’s fun to do with jQuery.

I’ll show you how to toggle the visibility on a group of selected elements. I’ll build up from a simple case to the more complicated ultimate goal.

Read the rest of this entry »


Data Visualization

July 29th, 2010

Sleeping time is a site with an interesting idea. It takes the time of a Twitter user’s Tweets, and it makes a guess at their sleep schedule. The idea is that if you’re sleeping, you won’t Tweet (obviously this only applies to amateur Tweeters). Once you enter a person’s nickname, the site draws out a visualization of the sleep schedule. For example here is my sleep schedule.

sleep scheduleWell, the first impression one gets is that I sleep as much as a brown bat (19.9 hours per day apparently). The red area is much larger than half the clock, so it looks like I sleep the whole day away.

Read the rest of this entry »


A few code snippets.

July 24th, 2010

I often write very short, very simply little code snippets just to test specific things in HTML, CSS, PHP, or Javascript (and jQuery).  These are short little blurbs, that are useful for looking at how certain specific things work. They are mostly notes to self.

Here are links to a few of them:

Short Code Snippets:
CSS Change image on hover.
CSS Creating large clickable areas.
CSS Images sprites exampleExternal CSS is hereSprite is here
DOM Checking how many elements in an ID.
Javascript Basketball animation
jQuery Return ID of clicked LI
jQuery Sliding, fading, and disappearing
jQuery Not this array element
jQuery Using toggle()
jQuery A simple infinite image slider
PHP Algorithm A linear linked list
PHP Recursion Turning digits into words
PHP JSON CSS Retrieving and displaying information from Delicious
Simple Apps:
jQuery PHP Guessing game using Stackapps and Stackoverflow data
jQuery PHP Dynamic Syntax Highlighting

Pimp My Web Page: Simple to Complex

June 21st, 2010

Let’s start with the simplest web page:

<h1>Hello World!</h1>

Well, that’s nice, but there’s certain information missing. We should add a doctype to let the browser know what flavor of HTML, XHTML, etc we’re using. This declares the document type definition (DTD) in use for the document.

We should also add things like the HTML elements, a HEAD element for specifying more information about the page, a BODY for the contents.

We should also let the browser know our character encoding with a meta tag.

So now we have: Read the rest of this entry »


JQuery for a little night time reading

June 14th, 2010

If you use Javascript, JQuery is a great framework to speed up your coding. It’s essentially a collection of really convenient shortcuts. It does more, since JQuery also handles a lot of browser compatibility issues. So, you don’t have to go through your JQuery code to update it for new browsers, all you have to do is download the new version of JQuery, and your old commands will learn new tricks.

Ah, speaking of downloading JQuery, you just might want to understand how JQuery works if you use it. The first time I tried to do this, I simply clicked on my JQuery src file link:

<script type="text/javascript" src="http://peter-ajtai.com/jquery/jquery-1.4.2.min.js"></script>

… and this is what I saw:

Wall o text JQuery

Fun reading, huh? Read the rest of this entry »


The joys of toxic asset ownership

June 11th, 2010

I tend to listen to a lot of podcasts while doing housework. Listening to things like Planet Money makes washing the dishes fun… well, maybe not, but it makes it feel like I’m learning something new while doing the same old same old. Read the rest of this entry »


Three Steps for Using JQuery in Your WordPress Theme

May 30th, 2010

This is a quick post on using Javascript and the JQuery framework in particular within your WordPress theme. It’s quick and pretty painless. This is just for regular themes, not admin themes, plugins, or posts.

Step 1:

Read the rest of this entry »


blog