Network traffic was growing, and it was getting hard to really "see" what was sucking up the capacity. It could be spam, or YouTube, viruses, hack attempts, or anything.
One day, I wish I can write this in PHP
while( $filename = $files->next() )
{
[ $a, $b, $c, $d ] = getimageinfo($filename);
$sizes[] = [ $filename, $a, $b ];
}
Coroutines are back! They never really left, but, it looks like different languages are adding native support for coroutines.
I've been reading up on it, and, not being up-to-date on PHP development news, didn't know about the discussion about the design on PHP's new lambda and closure features in 5.3.
if you have an ajaxy library that can edit divs in-place:
<div id="story.1234">
<div id="story.1234:title">the title</div>
</div>
<div id="story.1235"> A JavaScript Module Pattern is a fantastic example of how to use closures.
Javascript Closures has more detailed information.
Douglas Crockford brought the style over to JS, and his site has a lot of important articles about Javascript hacking (as a functional language).
I was toying with some SEO ideas, and wanted a CSS-based layout that puts the content at the top.
Attached are two scripts that contain code for two styles of iterator. One is the traditional Iterator, and the other is what I'll call an IterObj.
A few years back, there was a trend in the PHP community to make alternative templating languages that ran inside PHP.
Here are some Excel macros that help to clean up data. Once cleaned, it's easier to remove duplicates. (I used these to de-dupe a list exported from Outlook.)
This page will describe the difference between GET and POST, and the typical uses for each.
As clever as it is to alter the URL to pass values to your script, the normal way to pass values is through a web form.
Here's some HTML that will display a form with two fields.
In the previous chapter, we explored evaluation, evaluation order, variables, numbers and strings.
In this chapter, we explore how to send input to our short programs.
<p>
<php echo 1; ?>
</p>
<p>
<php echo 1 + 2; ?>
</p>
<p>
<php echo 2 * 3; ?>
</p>