Skip to main content

Posts

Showing posts from 2012

Consolidate query executions

UPDATED:  There is an issue whereby this code does not work as expected with MySQL.  As a result, the concept has been reworked and listed under the entry " Consolidated query executions version 2 ." In an effort to adhere to the DRY principle, or don't repeat yourself , the routine defined in this piece can be added to programs that employ a series of queries.  The idea is that it moves a few lines of code that would otherwise need to be in each method or function that calls a query to a database server. This snippet is coded with PHP and represents a method from a larger class.  There are more details about the code itself in the comments of the code. private function run($sql) { // Assumes $this->Conn has been set up in advance as a PDO connection. $Query = $this->Conn->prepare($sql); if((func_num_args() == 2) && is_array(func_get_arg(1))) { $Query->execute(func_get_arg(1)); } else { $Query->execute(array()); } // Assum

SpeedTest Easter egg

There is an Easter egg in Speedtest .  From the results view, pull down the "speedometer-looking" dial.  Behind the dial will be a picture of a disgruntled cat.  Pull the gauge down again and there will be a new pose of the cat.  Repeated pulls keep changing the pose of the cat until the final picture is that of the rage comic, " Y U no…guy ." Speedtest is the popular network speed testing utility from Ookla .  The company offers the speed tester on desktop browsers via Flash as well as iOS and Android devices.  The Y U no guy is a goofy looking cartoon often seen with the caption, "y u no leave me alone."  It's thought to have been derived from the Japanese comic strip Gantz. The Easter egg is only in the iOS version since the interface of the webpage version doesn't allow for this sort of input, and it doesn't work at all on the Android version.  The Y U no guy cartoon is captioned "Y U no leave now" and is the last image.  To d

Scanning to USB with the Xerox WorkCentre 3210 and 3220 (part 2)

The WorkCentre 3210 and WorkCentre 3220 are two variants of an entry level Xerox business level multifunction printer.  The couple bring a lot to the table in terms of features and longevity, but it's not always clear as to how to operate the machines.  While the printers do come with a manual, like most documentation for consumer devices, it's awful.  Well, awful in that it's brief. It's a catch 22 situation really.  Literature for consumer devices is seldom referred to, but there's, for some reason, a demand for it.  As a consequence, it's typically brief and offers no assistance when problems arise.  This is the second of a two-part piece on extending the documentation that comes with the 3210/3220. Scanning to USB:  The document files The WorkCentre's scan to USB feature works out of the root level of the disk.  It will create a new folder for each day and scan the documents to files with names representing the time the file was sc

Scanning to USB with the Xerox WorkCentre 3210 and 3220 (part 1)

The WorkCentre 3210 and WorkCentre 3220 are two variants of an entry level Xerox business level multifunction printer.  The couple bring a lot to the table in terms of features and longevity, but it's not always clear as to how to operate the machines.  While the printers do come with a manual, like most documentation for consumer devices, it's awful.  Well, awful in that it's brief. It's a catch 22 situation really.  Literature for consumer devices is seldom referred to, but there's, for some reason, a demand for it.  As a consequence, it's typically brief and offers no assistance when problems arise.  This is the first of a two-part piece on extending the documentation that comes with the 3210/3220. Scanning to USB:  The media This first piece is actually a log of the troubleshooting steps used to resolve a problem with the scan to USB feature. The WorkCentre has a feature whereby it can scan documents directly to a drive through its bu

PHP KB: No records found when using SQL variables and PDO parameters

Issue The PDO class for PHP throws an error when running queries against SQL Server and returning multiple results sets. Cause Without the benefit of the details around the implementation of SQL Server or the SQLSRV PDO driver, there's no way to know what's causing this issue.  However, the anecdotal evidence points to the the lack of support in the SQLSRV driver for SQL Server's ability to return multiple datasets. One of the errors that has been encountered reported a question mark (?) placeholder in each place where an SQL variable was in the script that was passed to the PDO::prepare() method call.  This was taken to mean that the method was perceiving each SQL variable as a parameter that it should be looking for in the parameters array passed in the PDOStatement::execute() method.  In other words, it was interpreting SQL parameters (variables) as PDO parameters (?). Ultimately, this issue is likely to come down to the use of the table data type or tempora

Mura KB: Pages continue to re-direct after removing 'Go To First Child' content object

Issue Removing a " Go To First Child " content object from a page does not take effect right away. Cause Mura uses a re-direct to "route" users to the first child element of the site.  When the re-direct is removed, the information remains cached in the user's browser. Solution Clear the cache from the browser and reload the offending page. Environment Version Mura Version 5.6 OS Any Browser Any Details Mura has a handy feature that allows a page to re-direct out to a child item.  Clearing the "Go To First Child" content object however, may be problematic since the browser caches the re-direct.  This means for example, that if a top-level page loads another top-level page, but the feature is ever removed via the Mura administration, the page will continue to load the second page. Assume a scenario like this.  A site has a Home section and a News section.  Ignoring the reasons why a site might be implemente

Unanimous U.S. Congressional vote against global Internet regulations

With a vote of nearly 400 to nil, the United States Congress , with the support of both houses, has voted not to support any new global regulations on the Internet.  The resolution states that it is the intent of The Government to implement the position that the Internet can operate free from governmental intervention. Furthermore, the close of the resolution articulates the state of being that the Internet is currently operated as a "multistakeholder" environment and is deemed to be successful as it is. Sources Engadget House passes unanimous resolution to ban UN regulation of the internet http://www.engadget.com/2012/12/05/house-passes-unanimous-resolution-ban-UN-internet-regulation/ The Verge US House votes against government control of internet as ITU conference gets underway http://www.theverge.com/2012/12/5/3732478/house-votes-against-government-control-internet Documents 112TH CONGRESS, 2D SESSION, S. CON. RES. 50 http://thehill.com/images/stories/bl

Adding support for path_info to Tomcat

By default Apache Tomcat does not come configured to handle the path_info server variable information commonly found in SES (search engine safe) compatible URLs.  An SES URL might look like:  www.domain.tld/index.cfm/user/123 .  Combining Tomcat as the servlet container with other technologies like Railo and Mura , this missing feature can become problematic and frustrating (redundancy provided for emphasis). A scenario The path_info data is traditionally available to CFML applications a la the CGI.path_info variable.  Applications often refer to this variable to resolve URLs to specific actions or details of the application.  One such example is Mura.  The CMS (content management system) has the ability to host several sites from a single instance of the application.  While most sites are likely set up to be accessed from their own domain names, in some cases, the sites will be accessed through an identifier in the URL.  For example, assume the case of a news organization ho

Stalled iOS application updates

For whatever reason, iOS has a tendency to suffer from stalled application updates when updating from the device.  This behavior has been observed numerous times since the iOS 6 update was released.  The observations have come by-way-of two 4th generation iPod touches with strong Wi-Fi connectivity.  The issue is independent of software titles. A few Internet searches have yielded some information about store problems, but the issues range from problems with song downloads to 5-year-old forum posts.  The issue at hand here is straight software updates from the “Updates” tab of the App Store application. Fortunately, the apparent solution is simple, and is likely by design.  It’s just puzzling why no-one seems to be posting the fix.  That is, unless it’s so simple that it goes without saying.  At-any-rate, here it is.  Browse the device to the application’s icon and just touch it as though launching the application.  The label on the application should indicate that the update is

Renovation and a word about the name

After a ridiculously long hiatus, orsburn.net is back online.  While true it never went offline, the period of time between the last post and now means that it might as well have.  With the new release, it's probably a good opportunity to describe a little behind the combination of the name, what with both “orsburn” and “static content.” At one point way back when the blog was conceived, the idea was to use the term “static content” as the name.  It was a sort of tongue-in-cheek expression hearkening back to the early days of the Web, when all web pages were updated manually.  Think of it as a sort of antithesis of the way the Web actually works today.  That is, where nearly 100% of the content on the Web is generated “on the fly” and from a host of sources. So the question then becomes,”why not just staticcontent.com or something like that?”  The answer is two-fold.  Well one really, and this is it.  Domain name squatting.  The domain name staticcontent.com was already taken,