background preloader

Programmin

Facebook Twitter

URL Rewriting for Beginners. A beginner's guide to URL rewriting, with plenty of examples. Introduction URL rewriting can be one of the best and quickest ways to improve the usability and search friendliness of your site. It can also be the source of near-unending misery and suffering. Definitely worth playing carefully with it - lots of testing is recommended. There are several other guides on the web already, that may suit your needs better than this one. Apache URL Rewriting Guide - The best guide around Before reading on, you may find it helpful to have the mod_rewrite cheat sheet and/or the regular expressions cheat sheet handy. What is "URL Rewriting"? Most dynamic sites include variables in their URLs that tell the site what information to show the user. The problems with this kind of URL structure are that the URL is not at all memorable.

Clearly a much cleaner and shorter URL. Platforms and Tools . 'MySQLi' for Beginners. Introduction Nearly every site that you visit nowadays has some sort of database storage in place, many sites opt to use MySQL databases when using PHP. However, many people haven't yet taken the step to interacting with databases properly in PHP. Here we guide you through what you should be doing - using PHP's MySQLi class - with a hat-tip to the one way that you definitely shouldn't be doing it.

The Wrong Way If you're using a function called mysql_connect() or mysql_query() you really need to take note and change what you're doing. I understand that it's not easy to change current large projects, but look to change future ones. Any of the functions that are prefixed with mysql_ are now being discouraged by PHP themselves as visible on this doc page, instead you should look to use one of the following: Each has its advantages, PDO for example will work with various different database systems, where as MySQLi will only work with MySQL databases.

PHP MySQLi Connecting Querying <? <? Free result. How to: find ANYTHING on the Internet. Photo by Dullhunk Tips, tricks and resources to help you find that digital needle in the huge cyber-haystack. Learning to navigate the World Wide Web effectively is an important skill, and there are lots of different ways for you to find the information you are looking for.

Whilst the following list of tips and websites is by no means exhaustive – and we’ve missed out on some massive topics except travel, which deserve a post in their own right – they should be enough to get you started. Using Google Operator Hacks One of the things I love about Google is its clean layout – just type your query and hit enter. Here is a selection of some useful ones: And don’t forget if you want to visit a site that is down, or that your company’s server won’t let you access, you can view the Cached version to see a Google snapshot of that page from when it was last crawled. Photo by author. Online Research Biblical text: Find specific text from the Bible at BibleGateway.

Photo by Shirone Koeuro. 5 Awesome Learning Resources For Programmers (To help you and your kids to grow the geek neurons) Happy New Year, this is my first post in 2012. I’ll be sharing few awesome learning resources I’ve bookmarked, and will be pointing out some specific computer/programming related courses I've found interesting from these resources. Also, thought about saving this blog post for my kids as well - instead of investing in these Child education schemes (though they are too small as of today, 2 years and 60 days respectively ). Anyway, personally my new year resolution is to see as much videos from this course collections (assuming I can find some free time in between my regular job && changing my babies diapers). 1 – Khan Academy As I mentioned some time back, you and your kids are missing some thing huge if you havn’t heard about Khan Academy.

It is an awesome learning resource, especially if you want to re-visit your basics in Math, Science etc. 2 – MIT Open Courseware and Videos Just in case you are not aware, MIT has a huge collection of open courses, bookmark. Sass vs. LESS. "Which CSS preprocessor language should I choose? " is a hot topic lately. I've been asked in person several times and an online debate has been popping up every few days it seems. It's nice that the conversation has largely turned from whether or not preprocessing is a good idea to which one language is best. Let's do this thing. Really short answer: Sass Slightly longer answer: Sass is better on a whole bunch of different fronts, but if you are already happy in LESS, that's cool, at least you are doing yourself a favor by preprocessing.

Much longer answer: Read on. The Much Longer Answer The Learning Curve with Ruby and Command Line and Whatever The only learning curve is the syntax. Winner: Nobody Helping with CSS3 With either language, you can write your own mixins to help with vendor prefixes. In Sass, you can use Compass, and Compass will keep itself updated, and thus the prefix situation is handled for you. In LESS, there are also some mixin libraries battling to be the best. See that? Easy Server Side Caching in PHP. When developing dynamic web applications there may be many times that data is not updated for a certain amount of time. In PHP it is fairly simple to have a page cached, so that there is not much load on the server. To create this caching you would put some code like the following on the top of your PHP page.

$cachefile = 'caching_folder/cachedpage.html'; $cachetime = 30; // Serve from the cache if it is younger than $cachetime if (file_exists($cachefile) && time() - $cachetime < filemtime($cachefile)) { include($cachefile); exit; } ob_start(); // Start the output buffer The things that you would change in the above code is the setting of the $cachfile variable to the name of the static file that the cache will be saving on the server (you will need to set permissions on the folder where you want to save the cached file). You will also want to change the $cachetime variable to the number of seconds between each caching. C# Source Code , Development , Programming , Free source code. Discover Everything through Code.

JAVA

C++ VBA. PHP.