So, I’ve built an iPhone app – What Should I Make For Dinner Tonight?.
Please download it and play with it. I’d LOVE to hear your feedback, and will happily code in any improvements we all agree would be beneficial. If you’re interested in the Objective-C source code then let me know and maybe I’ll release it!
How to format NSDate using NSDateFormatter (iPhone Xcode Tutorial)
So, you’re making an iPhone (or iPad) app, and want to know how to format an NSDate in Cocoa? Formatting NSDate in Objective-C is actually not too difficult. Open up Xcode and let’s get’s cracking with some Objective-C goodness!
For those who just smash up Xcode, and get cracking with their iPhone applications – I’m putting the full source code of this tutorial right here at the top:
NSDate *myDate = [NSDate date];
NSDateFormatter *df = [NSDateFormatter new];
[df setDateFormat:@"EEEE dd MMMM, yyyy"];
self.someLabel.text = [df stringFromDate:myDate];
[df release];
Read More…
This is a rundown of my top 10 PHP functions and techniques that I use on a daily basis (pretty-much) and thought I’d share them with you. Hopefully there’s some gems in there that you have never heard of (or used), that will change the way you code. Read More…
Posted in
PHP at October 19th, 2010.
10 Comments.
This tutorial will show you how to create an AJAX form with PHP and jQuery. The AJAX form doesn’t look any different to an ordinary HTML form, with the exception of making sure that when we submit the form, it calls a javascript function rather than pushes the user to a page (causing a new page reload). I’ll also demonstrate how we can use ‘loading’ animation for the AJAX form, whilst we wait for the server to respond. Read More…
Posted in
AJAX,
JavaScript,
jQuery,
PHP at October 12th, 2010.
2 Comments.
This PHP login script / tutorial will show you how you can have users register on your site, and log in to access secure areas. I have seen a few tutorials around the web which show how this can be done, but they all seem to lack in security. This user membership tutorial will show a better way of having users authenticated once logged in by using their session ID. Read More…
Posted in
MySQL,
PHP at October 6th, 2010.
27 Comments.
Need to limit the number of characters that are allowed to be entered into a textarea? I’ve crafted a little snippet that you can drop into your projects to achieve just that! It also provides a counter to the user, showing how many characters are remaining as they type.
This could be extended pretty easily, so that it works on multiple textareas, or even as a jQuery plugin. Read More…
Posted in
JavaScript,
jQuery at October 4th, 2010.
7 Comments.
I was working on a project today, and I needed to convert a PHP based multidimensional array into a Javascript array, so that I could use it for a dynamic select dropdown (depending on the top level category chosen, the next level select dropdown would be populated with the child elements of the top level category options – if you follow me!).
Anyway, I soon realised that converting the PHP array into a Javascript array was a bad idea, as converting it to a Javascript object would be much much better.
Read More…
Posted in
JavaScript,
jQuery,
PHP at September 29th, 2010.
8 Comments.
So just what are class constructors, and how can they be used within PHP classes / OOP programming? When a PHP class is first called, the class will automatically run the class constructor function, which can help automatically configure the class. This can be useful if you need to preset some instance variables, sessions or cookies – prior to using the class methods.
Read More…
Posted in
PHP at September 28th, 2010.
22 Comments.
So – I’ve just started off this new site – All Beginner Tutorials. It’s aimed at becoming a repository for many beginner-focused tutorials. Please take the time to check it out, and even add a tutorial or two!
Posted in
Tools at September 12th, 2010.
No Comments.
Lots of tutorials coming up in the next few days – seeing as you guys are actually enjoying them! This is a really simple tutorial on how to write a jQuery plugin. It’s also a usable “Default Text” plugin, which sets some preset text in a form input, which clears when you focus the fiels.
It’s not as comprehensive as some other articles out there, as I wanted to keep this nice and simple. If you’re like me, you just want the simple tutorial – as you’ll enjoy building on it in the future!
Read More…
Posted in
JavaScript,
jQuery,
Plugins at August 19th, 2010.
3 Comments.