Variables and Paths
Grok Headline matches for Variables and Paths
Paths of Resistance
Paths of Resistance
07/30/2004 04:57 AMThis image has been in my investor presentation for over a year. Hrm.
That seems like an odd place to put a barrier. It's not like there's a
cliff to fall over. It's from Peter Merholz, who also coined the...
Object-Variables-0.9
Object-Variables-0.9
07/30/2004 12:14 AMObject-Variables-0.4
Object-Variables-0.4
07/25/2004 06:12 AMPaths to Librarianship
Paths to Librarianship
10/30/2003 09:22 PMPaths to Librarianship...
Object-Variables-0.5
Object-Variables-0.5
07/27/2004 12:28 AMTunneling Variables
Tunneling Variables
04/09/2004 04:09 PMIn Bob DuCharme's latest Transforming XML column he explains the use
and virtues of XSLT 2.0's tunneled variables.
Variable Variables in PHP
Variable Variables in PHP
12/19/2002 10:43 PMVariable Variables in PHP
Well since it's late but I'm still grinding and I feel guilty for not
blogging much today, here's a special PHP Treat: A Variable Variable
Tutorial. Yes that's right. There is a feature in PHP called
"Variable Variables".
One of the issues that I had with implementing our Digibuy support was
our old friend and enemy: Parsing. This is such a fundamental thing
but there always seems to be a new wrinkle in it. In this case we had
an existing PHP script which did our registration calculations and was
expecting a certain set of variables. Now this code was fairly
complex and I didn't want to re-write it (much). Here's the input
data we had to parse:
author_id=BillBrown & author_password=HemosRules &
prod_sku=98079949999
With the exception that it had like 30 odd variables in it. Since my
code was expecting a series of variables I needed to parse this and
automatically create a series of variables like $author_id and
$author_password. Now if this data was being given to me by a URL
then it would be easy -- PHP could automatically do it or I could just
pull them out of $_REQUEST. But, instead, I had them going to me as
if they were a file. So ... How do you create a series of variables
on the fly?
Note: Yes I could have made an associative array but that wouldn't
have taught me anything, now would it ? I could also have gotten a
similar effect with the extract function but I found out about that
after this working. And if the code is working then ...
Well deep in the recesses of what I call a brain was a recollection of
"variable variables". I think I heard about this in a talk that
Rasmus gave although I can't honestly be sure. I do know that
whenever you need to do "meta" type tasks like this in a language, you
need to poke around the oddball features since that's usually where
they reside. What I do is look for the sections of the documentation
that I've never read. The idea behind a variable variable is simple:
interpret the value of a variable and make it into a variable itself.
I.e. the "variable variable" nomenclature.
Since php uses $ for indicating a variable they've chosen to use $$ to
make a variable variable. Let's say you have two variables, $part1
and $part2. If $part1 = "author_id" and $part2="HemosRules" how do I
get to $author_id = "HemosRules". Simple: $$part1 = $part2. Yup.
It's just that easy. Of course I did need to wrap it into a string
parsing loop. Here's the guts of it:
$strarray = explode("&",$input); foreach ($strarray as $stritem) {
$stritem = trim($stritem); $part1 = substr ( $stritem, 0, strpos
( $stritem,"=" ) ); $part2 = substr ( $stritem, strpos (
$stritem,"=" )+1, strlen ( $stritem ) ); #magic! $$ is a "variable
variable" i.e. it converts the value #in the variable into a
variable itself $$part1 = $part2; }
The way this works is an input string, $input, contains everything
that needs to be processed. First I explode this into an array using
"&" as the delimiter. Then I loop over the array with a foreach loop
creating a $part1 variable and a $part2 variable. Finally I just do
the magic $$part1 = $part2.
Here's the example Source Code.
Here's the working Example
Thanks again to my favorite Systems Administrator, Apokalyptik, for
showing me how to use PHP to generate code listings. Much easier than
pasting it into a blog entry.
More on Variable Variables from PHP.Net: [_Go_]
Variable Variables. A little confusing but definitely a frothy good
thing!
Predefined Variables
Predefined Variables
06/09/2004 03:40 PMAn Introduction to Variables
An Introduction to Variables
11/27/2002 09:47 PM
This is only for those who are new to php, or maybe programming
altogether. This won't 'enlighten' you, or make you 'one with
everything', but it should make you one with variables.
Application Variables with PHP
Application Variables with PHP
08/05/2002 10:44 PMOne of the most common feature requests that PHP developers ask for is
application variables. These are variables that are globally available
to all PHP scripts on a web server. There are currently several
implementations.
PHP Application Variables
PHP Application Variables
07/02/2002 09:57 AMApplication Variables in PHP
Application Variables in PHP
07/01/2002 08:29 AMThis is the first article of several on developing an architecture
for Enterprise PHP, where we are running dedicated PHP servers tuned
to serve large number of web pages. This work originated in the need
to save the current working database connection as an Application
variable in a primary and fallback database server configuration. This
can be extended to saving other configuration information that rarely
changes... -- John Lim
"zeldman.jayne"
PHP Static Class Variables
PHP Static Class Variables
12/02/2002 01:17 PMStatic class variables are variables that are shared among all
instances
of a particular class. Although PHP supports static variables in
functions,
it has no support for static variables in classes. This functionality
can be pretty important in some situations, and I will now describe
a way to simulate it.
Using hash variables in Perl
Using hash variables in Perl
05/03/2004 09:19 AMCNET May 3 2004 1:48PM GMT
MOM FAQ: Supported Upgrade Paths
MOM FAQ: Supported Upgrade Paths
07/06/2004 06:46 PMInternal Variables for Use in Your
Scripts
Internal Variables for Use in Your
Scripts
08/15/2004 07:36 PMVariables used by the Status Filter
Variables used by the Status Filter
04/15/2004 02:26 PMCrossing paths with SPML
Crossing paths with SPML
01/28/2004 05:15 AMI highlighted Service Provisioning Markup Language last week when
referring to its mention in a survey of identity federation projects.
SPML also came up last week in a conversation I had with former
Waveset Vice President Mark McClain, and it came up again in an
announcement Novell made about a change in product alignment,
packaging and nomenclature.
Hash variables in Perl
Hash variables in Perl
08/23/2004 02:48 AMCNET Aug 23 2004 7:15AM GMT
Paths of eventual glory
Paths of eventual glory
09/24/2004 09:37 AMSometimes our worst nightmares, personal and political, turn out to
just be complicated stories still in progress.
Perl's Special Variables
Perl's Special Variables
06/18/2004 07:05 PMDave Cross goes back to basics to show how using Perl's special
variables can tidy up file-handling code.
Carriers Take Divergent 3G Paths In
China
Carriers Take Divergent 3G Paths In
China
06/22/2004 08:21 PMThe Feature Jun 22 2004 11:59PM GMT
A Guide to Basic Variables That Add To
Site Value
A Guide to Basic Variables That Add To
Site Value
03/17/2005 02:32 AMNice checklist of items to cover before buying or selling a site.
The Paths They Took: Five Gambles, Five
Altered Lives
The Paths They Took: Five Gambles, Five
Altered Lives
12/28/2004 03:40 AMThese lives, abruptly transformed by illness, had one element in
common: they pinned their hopes on experimental or unproven
treatments.
Using variables in Windows batch files
Using variables in Windows batch files
08/29/2004 02:23 PMTech-Recipes Aug 29 2004 6:35PM GMT
Templates with patTemplate, and Form
Variables
Templates with patTemplate, and Form
Variables
05/30/2002 08:10 AMThe Fuzzy Blog on Varaible Variables
The Fuzzy Blog on Varaible Variables
12/20/2002 08:49 AMLearning Cocoa: Repurposing Variables
Learning Cocoa: Repurposing Variables
01/18/2004 02:48 PMSet Roby: "By now we know that every variable is really just a bunch
of bits, which we can look at a certain way and read as an integer, a
pointer, or whatever else we need to remember. Well, what else do we
want to remember?"
Microsoft, Sun Security Paths Diverge
Microsoft, Sun Security Paths Diverge
05/31/2004 08:19 PMMicrosoft and Sun back different ID standards.
Re: Unprivilegued settings for FreeBSD
kernel variables
Re: Unprivilegued settings for FreeBSD
kernel variables
06/16/2004 06:16 PMDag-Erling Smørgrav (Jun 15 2004)
Bush, Kerry Paths Nearly Crossing in
Iowa (AP)
Bush, Kerry Paths Nearly Crossing in
Iowa (AP)
08/04/2004 01:29 PMAP - President Bush and rival John Kerry campaigned Wednesday in the
same crucially important Iowa town, with the president predicting he
will win in November because his administration has improved the
economy and bolstered national security.
Setting the %DSDIT%, %DSLOG%, and
%SYSVOL% Variables
Setting the %DSDIT%, %DSLOG%, and
%SYSVOL% Variables
09/10/2004 01:53 AMCampaigns Cross Paths in Midwest
(washingtonpost.com)
Campaigns Cross Paths in Midwest
(washingtonpost.com)
08/04/2004 10:09 PMwashingtonpost.com - DAVENPORT, Iowa, Aug. 4 -- President Bush and
Democratic challenger John F. Kerry brought their battle for the White
House to this Mississippi River town Wednesday, staging dueling
campaign events within blocks of each other where they painted sharply
contrasting portraits of the economy and U.S. policy in Iraq.
Standardizing MS Office 2000 Save Paths
Standardizing MS Office 2000 Save Paths
04/21/2004 05:09 PMCoffee Houses Cross Paths with History,
Again
Coffee Houses Cross Paths with History,
Again
01/07/2004 02:37 PMFrom the There's Nothing New Under the Sun Department, coffee houses
in the 17th and 18th centuries were the Wi-Fi hotspots of their day:
The Economist writes (without byline, as is its wont) about the
parallels between the political and editorial foment that occurred in
17th and 18th century coffeehouses in England and, to a lesser extent,
France, and how these centers of iquity (as opposed to iniquity,
Wodehouse might write) led to the foundation of insurers and
publications. In fact, coffee houses were often the mailing addresses
for folks before street addresses were common. It all sounds awfully
familiar, doesn't it? Wi-Fi hotspots in coffee houses thus have this
excellent pedigree. The author of this piece is the same fellow who
write the charming and excellent The Victorian Internet, which relayed
the development of the telegraph and its effect on the planetary
infosphere, and how it paralleled (and predicted) Internet trends,
including the bubble. The author is working on a book now about the
coffee house/Internet cafe overlap....
Keep track of stopped processes via
shell variables
Keep track of stopped processes via
shell variables
12/15/2003 11:45 AMEarlier hints discuss how to suspend and resume processes via kill --
very helpful to me, because I had been launching apps from Terminal
and using ^Z, fg and bg to manage them. A summary of previous hints:
kill -STOP and kil...
Working with Environment variables -
Add, Remove and Retrieve
Working with Environment variables -
Add, Remove and Retrieve
12/24/2004 12:49 PMBush, Kerry paths nearly crossing in
Iowa
Bush, Kerry paths nearly crossing in
Iowa
08/04/2004 01:22 PMKerry, Bush Paths Nearly Crossing in
Iowa (AP)
Kerry, Bush Paths Nearly Crossing in
Iowa (AP)
08/04/2004 11:33 AMAP - The stops on John Kerry's cross-country campaign trip are hardly
Democratic bastions. So much so, that on Wednesday he and President
Bush campaigned just a few blocks from each other in this Iowa city.
Grok Description matches for Variables and Paths
GrokA matches for Variables and Paths
No Itsy-Bitsy Bikinis or Suntan Lotion,
Please, We're British
No Itsy-Bitsy Bikinis or Suntan Lotion,
Please, We're British
06/14/2004 06:13 PMThe British love of the beach seems a bit perverse, given how cold and
miserable the beach in England can be.
Turtle offers realistic lighting
rendering for Maya
Turtle offers realistic lighting
rendering for Maya
07/01/2004 08:50 AMSwedish developer Illuminate Labs announced on Wednesday the release
of
Turtle, a new
Maya lighting renderer that was in Beta testing at more than 200 sites
during the previous 13 months. Turtle 1.0 can render scenes both
within Maya and as a stand-alone application. It features raytracing
and global illumination algorithms called LiquidLight, 3D motion blur,
true depth-of-field, animation and batch rendering, support for Maya
shading networks and more. Turtle requires Maya 6 and sells for
US$1,199 per workstation license, which comes with a graphic user
interface (GUI), and $999 per render node license, which lacks a GUI.
Review: Maya Complete 6
Review: Maya Complete 6
12/22/2004 01:43 AMUpdate: Maya 6.5
Update: Maya 6.5
02/01/2005 08:47 PM
Alias "re-architects" Maya for better performance and reliability,
plus requested features, network rendering and scene segmentation.
Update: Maya 6
Update: Maya 6
04/27/2004 10:16 AMThe 3D animation and special effects software adds Motion Retargeting
and Motion Redirecting for character creation and animation, enhanced
scene management, Photoshop integration, and more.
WWDC: Maya Unlimited comes to Mac OS X
WWDC: Maya Unlimited comes to Mac OS X
06/28/2004 04:28 PMAlias shared the keynote stage with Apple CEO Steve Jobs' Worldwide
Developers Conference on Monday to announce that its popular 3D
graphics and animation software package
Maya Unlimited is coming to Mac OS X.
Alias announces Maya 6
Alias announces Maya 6
04/19/2004 11:03 AMAlias today announced Maya 6, the next version of its award-winning 3D
animation and special effects software...
Collada plug-in for Maya
Collada plug-in for Maya
04/15/2005 05:53 PMFirst open-source release of Collada plug-in for Maya
Alias announces Maya 6.5
Alias announces Maya 6.5
02/01/2005 09:21 PMAlias today announced Maya 6.5, the next version of its 3D animation
and special effects package...
Maya Unlimited for Mac OS X now shipping
Maya Unlimited for Mac OS X now shipping
08/10/2004 10:33 AMMaya Unlimited software for Mac OS X is now shipping from Alias...
Announcement: Maya Unlimited 6 for Mac
OS X
Announcement: Maya Unlimited 6 for Mac
OS X
06/29/2004 10:41 AMScheduled for release in late summer, the Mac OS X version of the 3D
animation and special effects software will include special effects
features not found in Maya Complete, plus native Mach-O operation,
AppleScript support for Maya Embedded Language (MELO), Quartz
rendering, and QuickTime implementation throughout.
NAB: Alias announces Maya 6
NAB: Alias announces Maya 6
04/19/2004 08:13 AMAlias used this week's NAB 2004
event in Las Vegas, Nevada to announce Maya 6, the latest major
revision to its popular 3D graphics and animation software. While the
new version gains hundreds of new features and enhancements,
significant changes performance boosts for Mac OS X, new tools for
creating realistic-looking hair, cloth and fur, integration with Adobe
Photoshop and much more.
Introducing Maya 6: 3D for Beginners
Introducing Maya 6: 3D for Beginners
12/17/2004 06:34 PMToday, author Dariush Derakhshani shows you how to create a 3D
representation of our solar system and the mechanics of animating
orbits. You'll learn about creating simple objects, setting simple
keyframes, and stacking your animation to get planets and moons to
orbit each other and the sun. By Sybex. 1101
The Game Artist's Guide to Maya. Pt. 1
The Game Artist's Guide to Maya. Pt. 1
01/04/2005 08:43 AMTo bring life to your model, you must texture it. The main process you
need to be aware of is what is known as UV Mapping. Here, we look at
Mapping UVs, UV Projection Commands, The UV Texture Editor, Texture
Resolutions, Formats, Alpha Channel and Pixel Shader Effects. By
Sybex. 0104
SIGGRAPH: Alias releases Maya 6 PLE
SIGGRAPH: Alias releases Maya 6 PLE
08/10/2004 03:57 PMAlias has also used its presence at SIGGRAPH to release
Maya Personal Learning Edition (PLE), a version of the
digital video animation software that's free for non-commercial use.
It contains most of the features found in Maya Complete 6 -- including
such new character animation technology as Motion Retargeting and
Motion Redirection, integration with Adobe Photoshop and more -- as
well as mental ray software and the ability to preview vector
rendering, two features that are new to Maya PLE. The software also
includes the Web-based Bronze Membership program, which offers access
to Maya learning resources, and, in addition to the downloadable
installer, is available as part of the US$24.99 Maya Beginner's Guide
bundle. System requirements call for Mac OS X v10.2.4 or v10.2.6, a G4
processor, 512MB RAM, 450MB hard drive space and a
hardware-accelerated OpenGL video card.
Maya Unlimited 6 for Mac OS X due in
late summer
Maya Unlimited 6 for Mac OS X due in
late summer
06/28/2004 04:25 PMAlias today announced at Apple's Worldwide Developers Conference that
Maya Unlimited 6 for Mac OS X will be released by late summer for
US$6,999...
Maya Personal Learning Edition 6.0
Maya Personal Learning Edition 6.0
08/10/2004 04:08 PMExplore the award winning Maya software in a non-commercial capacity.
The Game Artist's Guide to Maya, Pt. 3
The Game Artist's Guide to Maya, Pt. 3
02/01/2005 09:07 PMIn our final section, we have a look at the process of UV mapping the
head of the character and applying materials to the model. You'll also
learn about applying a texture to a material, 3D painting tools,
vertex coloring and texture painting tips. By Sybex. 0117
The Game Artist's Guide to Maya, Pt. 2
The Game Artist's Guide to Maya, Pt. 2
02/01/2005 09:07 PMHere we look at UV mapping of the body and armor. While some parts
(such are the sword) are easy to map, UV mapping of characters is
about as complex as you can get and this is our focus today. In
addition, a Layout Tips section is provided to assist you with your
own projects. By Sybex. 0111
Maya maker Alias to break away from SGI
Maya maker Alias to break away from SGI
04/15/2004 09:13 AMAlias, makers of the Maya 3D
rendering and animation software, is breaking away from long-time
owner Silicon Graphics Inc. (SGI). Alias is being acquired by private
equity firm Accel-KKR with participation from Alias' own management in
a deal valued at US$57.5 million, according to a joint statement
offered Thursday.
Imagine the Riviera Maya Screensaver
3.1.1
Imagine the Riviera Maya Screensaver
3.1.1
02/17/2004 11:51 PMA screensaver of this popular touristic region in Mexico.
Alias: Maya Complete 6 now shipping
Alias: Maya Complete 6 now shipping
05/04/2004 01:52 PMAlias announced on Tuesday that
May
a Complete 6 is now shipping globally to both new customers and
those who are upgrading. The new version features re-architected Trax
non-linear animation, new motion retargeting and motion redirection
capabilities, enhanced scene management and more. System requirements
call for Mac OS X v.10.2.4, a G4 or G5 processor, 512MB RAM and 450MB
hard drive space. Pricing is US$1.999 for the full version or $899 for
the upgrade.
Create a 3D Scene with Maya and
Photoshop. Pt. 1
Create a 3D Scene with Maya and
Photoshop. Pt. 1
09/02/2004 03:39 PMIn Maya, one can choose from a multitude of scene generation options,
but even the best 3D applications can benefit from the use of
Photoshop. Here, you'll model a flying saucer in Maya, a Nebula in
Photoshop and bring the two together in Maya to complete the scene. By
Nathan Segal. 0902
Alias releases six new Maya training
titles
Alias releases six new Maya training
titles
12/03/2003 01:23 PMIf you're working with Maya, the high-power 3D rendering tool by
Alias Systems, there might be some new
things to add to your holiday wish-list. Alias has released six new
learning tools, and since they are targeted at three different groups
of Maya users, there's something for everyone.
Cross-cultural podcasting from la Ruta
Maya
Cross-cultural podcasting from la Ruta
Maya
04/05/2005 07:03 PMXeni Jardin:
Boing Boing reader
Dave
Pentecost has been traveling through southern Mexico with his pal
Nicco, and they've just uploaded
some
podcasts and
photos of their travels. Snip:
I just returned to the Maya highlands from Naha, in the Lacandon
jungle. 24 hours ago I was watching young Lacandones struggling to
dock their dugout cayuco, a transport technology now being forgotten
after thousands of years of Maya navigation. 48 hours ago I promised a
traditional elder and his son both VHS and DVD copies of my footage of
them from 25 years ago, then went to see the incense burner gods in
Antonio's temple, and visit his jungle milpa to pick up maize from the
corn crib.
(...) Yes there is leveling, but I have to believe there are still
sharp divides, between two places a 6 hour drive apart, or between two
neighborhoods in New York. Managing this frontier will occupy many of
us in the next years. What interests me is the persistence of culture
and cultural differences through these world-flattening phases. It
happened here to the Maya in the Spanish conquest, the exploitation of
the jungles, and the diffusion of roads and communication. But the old
ways remain embedded in the new. Remix on a global scale.
Link. Dave says there's more to come and adds, "We also want to direct
folks to Ed Barnhart's site -- the
Maya Exploration
Center in Palenque, Mexico -- as we start an experiment in
peer-to-peer exploration."
Image: Dave interviews a group of indigenous girls near a historic
site (link to
full-size pic).
Previously on Boing Boing:
Guatemala -- Xeni's snapshots,
Guatemala: street vendor kids on Pacific coast,

SIGGRAPH: MicroScribe plug-in offered
for Maya
SIGGRAPH: MicroScribe plug-in offered
for Maya
08/10/2004 12:07 PMMore than a year after Immersion Corp. first announced a Mac OS X
software development kit (SDK) for its MicroScribe 3D digitizer, the
company has released
MicroScribe Connections for Maya for Mac OS X. The new
software plug-in enables Maya users to create 3D models using the
MicroScribe device. The plug-in was developed in conjunction with
Digital Element Inc.
SIGGRAPH: Alias ships Maya Unlimited for
OS X, more
SIGGRAPH: Alias ships Maya Unlimited for
OS X, more
08/10/2004 10:13 AMAlias on Tuesday announced the release of
Maya Unlimited for Mac OS X, their US$6,999 3D design
and animation software package that bundles the company's previously
released Maya Complete software with advanced special effects kids
including Maya Hair, Maya Fluid Effects, Maya Cloth and Maya Live.
Maya Unlimited for Mac OS X was first announced at June's Worldwide
Developers Conference (WWDC).
Plug-in connects Maya on Mac,
MicroScribe digitizers
Plug-in connects Maya on Mac,
MicroScribe digitizers
08/10/2004 01:26 AMby Dennis Sellers - Immersion Corp. has announced a plug-in for Maya
on the Mac...
Maya deploys Intel Xenon processor
Maya deploys Intel Xenon processor
08/31/2004 10:10 AMSilicon India Aug 31 2004 2:30PM GMT
Alias launches Maya 6 Learning Tools
Alias launches Maya 6 Learning Tools
07/06/2004 12:10 PMAlias has announced a full lineup of new Maya Learning Tools to
accompany Maya 6, the latest version of its 3D animation and special
effects software...
Variables and Paths