Archive November, 2010

jQuery snippets

Verify the existence of an element in the DOM

There will ever need to check the existence of an element of the DOM. With jQuery could be spontaneously try:

Continued ...

Common Queue, a simple solution

In asynchronous environments, where method calls or events are released daily bread (see Adobe ActionScript or Objective-C), often the same sequence of operations is not identical to the thousandth of a second. In addition, multiple methods can I call a more general function with the risk to cancel the effect of the other one o'clock.

To clarify the concept of a prime example. Environment is often used to activate the iPhone network indicator on the status bar, indicating that there is - precisely - "traffic" network, that you are performing a download or upload (downloading or sending data).

Continued ...

Variety of coding and coding in Objective-C ...

It was a bit 'that dealt with the subject , so I take this opportunity right away. Here are several ways to accomplish the same result in Objective-C. To you to discover what is the fastest and best!

Reverse an array

1
2
3
4
5
6
7
/ / To be implemented in a category
/ / Puts the elements of an array in reverse order
NSMutableArray * ) reverse { - ( NSMutableArray *) {reverse
int i = 0 ; i< ( floor ( [ self count ] / 2.0 ) ) ; i ++ ) for (int i = 0; i <( floor ([self count] / 2.0)) i + +)
i withObjectAtIndex : ( [ self count ] - ( i + 1 ) ) ] ; [ExchangeObjectAtIndex self: the withObjectAtIndex: ([self count] - (i + 1))];
return self;
}

Continued ...

WordPress: retrieve the contents of private pages

Allocation from the post WordPress: retrieve the contents of a page to add some information. First of all, you can retrieve the contents of a page using a function like this:

1
2
3
4
$slug ) { getPageBySlug function ($ slug) {
get_page_by_path ( $slug ) ; ObjectPost get_page_by_path = $ ($ slug);
"the_content" , $objectPost -> post_content ) ; return apply_filters ('the_content', $ objectPost -> post_content);
}

Continued ...

WP 2.7 Bannerize

New major upgrade to WP Bannerize , now in release 2.7. Excluding any bug fixes, I think this will be the last release that will make in 2010! We define an early Christmas present. This latest version introduces a lot of requests (such as impressions or scheduling by date) reported by users and the full list you can read it in detail here .

Continued ...

Very short snippet: increment a field in SQL

The latest release of WP Bannerize I introduced a new field in the table shows how many times a banner is "clicked". To perform the operation valore = valore +1 I used in SQL:

1
`campo` = `campo` + 1 WHERE id = id_record; UPDATE table SET `field` = `the` + 1 WHERE id = id_record;

Continued ...


Stop SOPA