Archive March, 2011

WordPress Snippet: Remove the admin bar

The latest version of WordPress has added a new toolbar frontend side when the administrator is logged. If you want to disable input this code in the file functions.php of your theme:

1
2
3
4
/ / Check that the filter exists show_admin_bar
has_filter ( 'show_admin_bar' ) ) { if (has_filter ('show_admin_bar')) {
, '__return_false' ) ; add_filter ('show_admin_bar', '__return_false');
}

More ...

HTML Output in PHP

The methods (or functions) that return an immediate visual and HTML output can be packaged in two main ways:

More ...

Objective-C: Notifications and Delegates

In Objective-C we have two very used to receive and send messages between classes: the notifications and delegates. The difference between the two, besides being at the implementation level, substantially depends on "how" - objects - can receive a message. First let me show how the concept was born of delegate.

More ...

Very short snippet: NSConnection POST with parameters

che in modalità POST . The object NSMutableURLRequest can be utilized either as GET that mode POST . . The parameters, however, must be formatted as if they are GET , ie in the sequence nome_campo1=valore1&nome_campo2=valore2&... . Here is a useful snippets to simplify the construction of fields:

More ...

Objective-C: public, protected, and private

I wrote a similar article for ActionScript long ago: Actionscript 3.0: public, protected, private and internal . Rereading it I realized two things: the first was the extreme resemblance to Objective-C, although the latter does not include internal .

More ...

iPhone FontsBook: source code to display the system font

Rounding out the article How to: Custom fonts on iPhone OS 3. 2 we propose the sources FontsBook , a simple iPhone application that shows a table all system fonts, grouped by family.

FontsBookFontsBookFontsBook

More ...

Very short trick: how to use NSFileManager

, in quanto quest'ultimo restituisce un'instanza singleton, cioè sempre lo stesso puntatore ad oggetto (non thread safe). Apple recommends using the object instance NSFileManager and not its meotodo class defaultManager , as the latter returns an instance singleton, that is always the same pointer to the object (not thread safe).

More ...


Stop SOPA