I had a weird experience with Flex states in Flex 2.0.1. My component had an initialization function. That set currentState to one of two values depending on something. Later on in the same function it checked for a few rare situations, and if any of those occurred then it set currentState to some special values.
Somehow Flex or Flash player didn’t like that and it rendered the 2nd (special/rare) state on top of the 1st state. Solution: instead of setting currentState directly, set some temp variable e.g. state:String. Then once state doesn’t change assign it to currentState. Note that you can’t use any GUI objects specific to that state before you switch to it.
I had a weird problem: a simple HTML form with a file upload input, processed by PHP. It worked in Firefox but in Safari the uploaded file (small size) didn’t make it to the server about half the times. Not even a first line of PHP was invoked.
It’s a known issue. Solution – an extra header. See http://www.webmasterworld.com/macintosh_webmaster/3300569.htm
Searching for RPM packages? Just type package name at rpmseek.com and it lists them by Linux distributions.
When enabling the second vhosts in Apache2 <virtualHost *:80> on a SUSE server, apache restart gave me the following error:
“_default_ VirtualHost overlap on port 80, the first has precedence”
Solution: in /etc/apache2/listen.conf add or uncomment following line:
In JQquery/Prototype: $(‘#id-of-the-element’) is same as document.geleElementById(‘id-of-the-element’)
How to use capistrano to invoke a command remotely:
cap -f deploy.rb invoke COMMAND=ls
Since Capistrano 2 it kind of required ‘Capfile’ in the folder where I run capistrano. deploy.rb can be under ‘deploy’ folder but not in the same folder as Capfile. Capfile then contains:
load ‘deploy’ if respond_to?(:namespace) # cap2 differentiator
How to make capistrano deploy a chosen revision (thanks to Jamis Buck):
cap -S revision=1234 deploy
Capistrano on Suse SLES 10: Latest version of Ruby for SLES 10 is version 1.8.4 – from
http://demeter.uni-regensburg.de/SLES10-SDK-x86/suse/i586/ But the newest capistrano (2.4.0) doesn’t deploy correctly in ruby 1.8.4 – it deploys older revision (24) from Subversion rather the newest revision (HEAD).
To get a list of available packages of a chosen gem (package for ruby language), use:
gem list -r package-name
I had a variable and I wanted to concatenate its value with a string – in a Unix shell script (run by sh or bash). It turns out that quotation marks work well. Apostrophes don’t work all the time. An example:
echo Go “$HOME” — “$HOME”
Today I’ve set up a private and public SSH key on one server, and I copied the public key to our CVS server. However, my login names were different on those machines, and the keys didn’t help.
Then my colleague advised to create a file under ~/.ssh called config, with an entry like this:
And suddenly SSH connected fine!