The purpose of this blog is to provide tutorials and information related to web development and web design.
28
Normal Functions vs Anonymous Functions: Speed and Extensibility
No comments · Posted by joshtime in PHP
PHP5.3 comes out with a new anonymous function feature. This new feature adds a lot of new flexibility to PHP scripts. What caught my eye more is that a function can be stored inside a variable. Normal functions can not be unset. This is usually fine. But, when inplementing a plugin system to a php [...]
anonymous functions · function · PHP · plugin · speed
For ages, JoshTime.com has not used a syntax highlighter for code. Today, I added syntax highlighting to this blog by using Alex Gorbatchev’s Syntax Highlighter. This syntax highlighter works like a charm and line numbers are not copied when text is copied (using Ctrl + C or Right click > Copy). /* * This PHP [...]
code · highlighter · highlighting · joshtime.com · syntax
9
jButton – A simple ActionScript 3 button class
No comments · Posted by joshtime in ActionScript 3
In May 2010, I started programming in ActionScript 3 using FlashDevelop, a free and open source code editor. Currently, the last update is from July 9th, 2010. Since I like to have total control on the code I use, I have created my own class for making buttons in ActionScript 3. This class is just [...]
ActionScript 3 · AS3 · button · class · jButton · public domain
FIRST Robotics is a program where students from many teams create robots to compete in competitions over the world. Many teams maintain their own website and at each regional competition, a Regional Best Website Award is awarded to the team with the best website. I am the website officer of Saints Robotics Team # 1899 [...]
1899 · First Robotics · Microsoft Seattle Regional · Regional Best Website Award · Saints Robotics · website
As one can see, there is a new section called “New Cube”. By cubing, I mean puzzles such as the Rubik’s Cube. Hopefully, I can get enough content up there to be useful. For now, I will try to get my beginners method (which has a little steeper learning curve but is a very good [...]
cubing · Rubiks cube · section
Recently, I saw some weird links but they worked. An example is http://1249745770/ or http://0x4a7d9b6a/. Both those links go to Google. How? It is simply one of Google’s ip address at 74.125.155.106 but in the form of an integer or a hex value. But, to convert the ip address, a converter is needed (unless one has [...]
converter · hex · integer · ip · ip address · obfuscation
Remember back then when you may have tried to solve a 3×3 rubiks cube? Many people have tried to solve a 3×3 rubiks cube. Some have learned and can actually solve it in less than 8 seconds! I just got a 7×7 cube today and started to learn how to solve it. I fully scrambled it [...]
30
Adding Separator Between List of Items with PHP
2 Comments · Posted by joshtime in PHP, Tutorials
This is my first real PHP tutorial on this blog. I hope you enjoy it. Level: Easy Ending result: Item 1 | Item 2 | Item 3 | Item 4 Sometimes, a script may want to add a separator between items in a list. This is not as simple as it seems though. In this [...]
list · list of items · PHP · separator
20
Faster PHP Hit Counter (Counting Number of Views with MySQL)
2 Comments · Posted by joshtime in PHP, Tutorials
Sometimes, a PHP script may want to keep track of how many times the page has been viewed. The normal solution would be to do: mysqli_query(“UPDATE `table` SET `views`=`views`+1 WHERE `page`=5″); But, what if your site gets very high traffic? Then, the MySQL would be overloaded. A fix to this would be to use a [...]
Normally, when scrolling with Google Chrome, the movements are very jerky and is not visually appealing. Fortunately, there is a great new Google Chrome plugin for making the scrolling smoothly glide. Click on the link below to download this plugin. A Chromium Browser with extensions enabled is required (Google Chrome Version 4+). http://chromium.exxe.ath.cx/smoothscroll/ This comes [...]
