2009-05-05
blue-chip company
1. finance definition:
A company that is very strong financially, with a solid track record of producing earnings and only a moderate amount of debt. A blue-chip company also has a strong name in its industry with dominant products or services. Typically, blue-chip companies are large corporations that have been in business for many years and are considered to be very stable. However, there is no formal requirement for being a blue chip. Often, blue-chip companies are found in the Dow Jones Industrial Average.
2. Better explanation
Blue chip (stock market)
A blue chip stock is the stock of a well-established company having stable earnings and no extensive liabilities. The term derives from casinos, where blue chips stand for counters of the highest value. Most blue chip stocks pay regular dividends, even when business is faring worse than usual.
The phrase was coined by Oliver Gingold of Dow Jones sometime in 1923 or 1924. Company folklore recounts that the term apparently got its start when Gingold was standing by the stock ticker at the brokerage firm that later became Merrill Lynch. Noticing several trades at USD$200 or USD$250 a share or more, he said to Lucien Hooper of W.E. Hutton & Co. that he intended to return to the office to “write about these blue chip stocks.” Thus the phrase was born. It has been in use ever since, originally in reference to high-priced stocks, more commonly used today to refer to high-quality stocks. In contemporary media, Blue Chips and their daily performances are frequently mentioned alongside other economic averages like the Dow Jones Industrial Average.
/////////////////////
2009-02-13
The notorious Problem with letterSpacing in Flash
If we are looking at the examples provided by Adobe:
this.createTextField("mytext", this.getNextHighestDepth(), 10, 10, 200, 100);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = true;
var format1:TextFormat = new TextFormat();
format1.letterSpacing = -1;
var format2:TextFormat = new TextFormat();
format2.letterSpacing = 10;
mytext.text = "Eat at \nJOE'S.";
mytext.setTextFormat(0, 7, format1);
mytext.setTextFormat(8, 12, format2);
The problem is, this doesn't work for a dynamic text field, only for dynamic generated text field!
There are a lot of solutions on the internet.
Solution 1:
var styling:TextFormat = new TextFormat();
styling.font = "Blackadder";
styling.color = 0xBA1424;
styling.letterSpacing = 15;
tf.setNewTextFormat(styling);
tf.text="mööööp"
This one doesn't use the method setTextFormat() to set the letterSpacing, instead of that, setNewTextFormat() will be used.
Solution 2:
From the blog "Summit Projects":
function setTextFormatting(){
var fmt:TextFormat = club_name.name.getTextFormat();
club_name.name.setTextFormat(fmt);
club_name.name.setNewTextFormat(fmt);
club_name.name.autoSize = “left”;
}He said, "It’s silly, but it works.". Unfortunately, it didn't work in my case.
Solution 3:
Bob Walton suggests that in his blog "Flash: yourMom.getTextFormat(); //is the key to letterSpacing"
var fmt:TextFormat = myTextField.getTextFormat();
myTextField.setTextFormat(fmt);
myTextField.setNewTextFormat(fmt);This also didn't work for me.
I spent hours to figure out how can I fix it. Now here is the solution from mine.
txtCtrl.html = true;
txtCtrl.htmlText = "<font letterspacing='-3'>Now it is the right one!</font>";
So you can see, I got no sucess on setting the format of a dynamic text field. At the end, a font property can achieve that so easily!
2008-12-19
What we can learn from the online advertising industry? (Part One)
First, the online advertising industry uses Flash based banners mostly nowdays. So there are something that must be taken into consideration.
1. How does a Flash file communicate with the browser?
2. What kind of effects we can achieve with the combination of Flash, Javascript and CSS?
Here is the answer.
Before Flash version 7, a Flash file can tell the commands to the browser with the Actionscript 1.0 function fscommand(argument).
Let's assume that the flash file is called myMovie, which has a size of 728px x 600px. Then the according part in Javascript should be:
function myMovie_DoFSCommand(command, args) {
if (command=="adcollapse") {
document.getElementById("flashad").style.clip=
"rect(0px, 728px, 600px, 608px)";
}
if (command=="adexpand") {
document.getElementById("flashad").style.clip=
"rect(0px, 728px, 600px, 0px)";
}
}
The flash file can use a button to call fscommand("adexpand") and a close button to call fscommand("adcollapse"). Its syntax looks like:
btnClose.onRelease = function() {
fscommand("adcollapse");
}
So what happened in the Javascript function? When one clicks the close button, the Javascript function will be called. Then the function finds that the Flash file wants to exeute a command "adcollapse", so the function will modify the style of the layer where the flash object is.
<div id="flashad">
<object ...>
<embed ...>
</div>
document.getElementById("flashad") is used to find the HTML element which contains the flash object. Then the property clip of the style will be modified. The syntax of clip is: clip: rect(top, right, bottom, left)
See? If the command "adcollapse" is called, the flash will be cut to the size of (728-608)= 120px x 600px to the right, but if the command "adexpand" is executed, the size will be restored to the full size of the flash file.
The end effect can be seen here.
2008-11-09
Time is too slow for those who wait
2008-02-28
COMPUTE clause in MSSQL
Since I am making a migration project from MSSQL 2000 server to Oracle 10i Server, a lot of SQL queries in the applications should be modified to meet the Oracle SQL requirements. What I found in the internet is:
---
> The Compute by clause of MSSQL basically allows you to get a running
> total at the bottom (end) of the report.
> In a way it is similar then using ".. group by .." with aggregate
> functions (sum) but in this case I am not trying to "... group by .."
> does not make sense in the context of the query, just want to get a
> summary (sum and count) of some columns at the end of the record.
The "standard" way to do this is to make a second query to compute the aggragates. However it is possible to combine the two if you really need the aggregates in the same result set.
> > > select A.ProdID, A.Description, A. Qty, A.Price
> > > from SoldItems as A
> > > where A.ListID = 15
> > > order by A.ProdID
> > > compute count(A.ProdID),sum(A.Price),sum(A.Qty)
SELECT ProdID, Description, Qty, Price
FROM
(SELECT A.ProdID, A.Description, A.QTY, A.Price, 1 AS Kind
FROM SoldItems AS A
WHERE A.ListID = 15
UNION ALL
SELECT count(B.ProdID), NULL AS Description, sum(B.Price), sum(B.Qty),
2 AS Kind
FROM SoldItems AS B
WHERE B.ListID = 15
) AS C
ORDER BY Kind, ProdID
;
---
After that I must stil fight with SHAPE clause... What a life!
2008-02-18
Strange problem with file copying in Windows Explorer
Now I get a big problem. I copied a zip file from a Linux box to my local computer. The copy process was ok and the zip file could be extracted too. Then I tried to copy that zip file to a directory on a machine with windows server 2003 enterprise version using Copy/Paste. The copy process seemed normal, but when I opened the file directly on the target machine and tried to extract it, WinRar told me "the zip file is corrupt!".
If I change the non-Unicode Program's Encoding to something like "German", then the problem will not happen. It seems that the windows explorer is a non-unicode program?!
My Windows is already updated to SP2. The IE version is still version 6.
Until now I haven't find any solution to this problem.
2008-01-31
Hide every application in the system tray!
Yes, it's used normally to hide an application into the system tray.
Usage from the author's website:
It's really useful because many programs don't provide the funtion of "minimize to the system tray". Currently I use it to hide the opera in my system tray and it works!TrayIt! runs on Windows 95/98/Me, NT/2000/XP/Vista and does NOT require any installation.
Simply create a new folder and place TrayIt!.exe and TrayIt!.dll there. When started, TrayIt! will show a dialog box with a short explanation how to use it. You may choose to load TrayIt! on system startup by selecting "Option" and checking "Load TrayIt! on StartUp" box.
You can temporarily put any window in the system tray by keeping down the
button when minimizing the window. To always keep window in the system tray when minimized, click with the RIGHT mouse button on the corresponding icon created in the tray in the previous step and check "Place in System Tray" in the popup menu.
Clicking with the right mouse button on the minimize icon will bring TrayIt! context menu for this window. Just check "Place in System Tray" in the popup menu to make window always go to the tray.
Please note that context menu will work only for the standard minimize icon and will not pop-up if the program use skins like MS Media player.
Download it!
2008-01-24
HOWTO: Set Up a CVS Repository Server under Linux
I try to follow the instruction from [HOW-TO Install and Configure a CVS Repository Server] to get my work done, but there are so many problems happened.
First of all, the Linux is an old SuSE Linux distribution. CVS is already installed on the machine, which can be checked in the graphical config tool "yast" or "yast2".
Since I don't want to specify the passwords for every cvs user, it's better if the cvs server can use the users of the Linux sytem. It can be achieved by adding a line in the /config file.
Assumed that you create a repository in the directory /usr/local/cvsroot with the command:
cvs -d /usr/local/cvsroot initthen CVS will create a directory /CVSROOT under /usr/local/cvsroot. The config file of cvs is right in /usr/local/cvsroot/CVSROOT/. Open it and find a line like:
#SystemAuth=nochange it to
SystemAuth=yesThen CVS knows you want to use the password of the users from the system.
I intend to use the machine as a CVS Repository Server, that means, the repository should be accessed remotely.
In order to do that, the cvs pserver should listen to the port 2041, which is enabled by inetd or xinetd. Since both are not existed in my system, I download the xinetd from its website.
After extract the downloaded source, you can use the command
tar -xvf xinetd-version.tar.gzto extract the source codes.
Change your current path to ./xinetd-version, then just execute the following commands to install xinetd:
Modify the file /etc/xinetd.conf so that it will run the cvspserver automatically:
./configure
make
make install
cp xinetd/sample.conf /etc/xinetd.conf
cp xinetd/xinetd /etc/init.d/
service cvspserver
{
socket_type = stream
protocol = tcp
wait = no
user = root
passenv =
server = /usr/bin/cvs
server_args = --allow-root=/usr/local/cvsroot pserver -f
}
Now start xinetd with
/etc/init.d/xinetdAfter such a long long process, the CVS server should be running on the machine now. You can verify it by:
cvs -d :pserver:username@localhost:/usr/local/cvsroot login
I must say, it's somehow frustrated to set up such a CVS server if you find there are so much difficult on your way. :(
2008-01-18
Faroe Islands
Photo©Marco Paoluzzo
Situated in the heart of the Gulf Stream in the North Atlantic at 62°00’N, the Faroe Islands lie northwest of Scotland and halfway between Iceland and Norway.
Photo©Marco Paoluzzo
The archipelago is composed of 18 islands covering 1399 km2 (545.3 sq.miles) and is 113 km (70 miles) long and 75 km (47 miles) wide, roughly in the shape of an arrowhead. There are 1100 km (687 miles) of coastline and at no time is one more than 5 km (3 miles) away from the ocean. The highest mountain is 882 m (2883 ft) above sea level and the average height above sea level for the country is 300 m (982 ft).My Dream Place.
2008-01-17
Project management
Now, if you like Open Source Software, OpenProj is a very good substitution. It has not only Windows version, but also Linux and Mac version.
So try it.
2008-01-07
Cron job with the log file
So here is the solution:
---------------------------------------------------------------
# Date in Format yyyymmdd_hhmmss:
SQLNAME=/home/sybase/logs/table_`date +%Y%m%d`_`date +%H%M%S`.sql
# Every day at 23 o'clock the sql query will be executed
00 23 * * * root /opt/sybase/SYBSsa9/bin/dbisql -nogui -c "eng=enginename;dbn=dbname;uid=user;pwd=password;" /opt/sybase/SYBSsa9/bin/whatever.sql >> $SQLNAME
---------------------------------------------------------------
Some explainations:
- SQLNAME is a variable name. It consist two parts, the normal text and the date. Notice to that, please always enclose the date part in backticks ( ` ) , otherwise it will be not executed. This variable can be used later with the format $SQLNAME
- dbisql is the command line tool for Sybase. In whatever.sql you can write the sql queries you need.
2008-01-04
Sybase Anywhere SQL
The SQL of Sybase is a little different from the standard SQL, for example:
>> Clearing a table "dummy"
delete dummy;
>> Output to a file
select * from dummy;
output to 'dummyfile.sql'
More helpful commands can be found at [selectorweb]
2008-01-02
Fatal error: Allowed memory size of xxx bytes exhausted
2007 is already the past now. I hope I can keep writing in this new year 2008, not so lazy like in 2007. :)
So today's topic is a PHP error.
During a migration of a Drupal site, after I make a 100% copy of the test site to the new site and change every settings for the new one, then the new site shows me the terrible message!
Fatal error: Allowed memory size of 654321 bytes exhausted (tried to allocate 12345 bytes) in /srv/www/user/bla/blub/file.php on line 123What goes wrong? The test site runs like a charm and the process of migration should be okay.
In PHP, there is a enviroment variable called memory_limit. It varies by your web hosting provider. By default it's 128M, namely 128 MB memory. Since the web hosting provider want to spare some hardware costs and provides more accounts on a shared server, so the value of memory_limit will be changed to 16M sometimes! If you are like me to use some modules in Drupal (that's what makes Drupal attractiver than others!), because every module will eat some memories, so your Drupal installation will reach the memory limit very soon!
Now here is the solution:
- Contact your web hosting provider to beg them for a bigger memory_limit, which is hard to be satisfied.
- Try to switch off some Drupal modules to save the memory. It can be done only through Database manipulation such as in PHPMyAdmin.
If you have to choose the second way:
Go to the table "system", you will find almost every module has a feld called "status". 0 means not selected, 1 means enabled. Try to set the status of some modules such as statistic, color, etc to 0. After that you should see your new site without the above error. If not, eh.... you must switch more modules off. What a pity!
Most important, after the DB manipulation you should go to administer -> site configuration -> modules to save your configuration and run the update.php, otherwise the Drupal will lose some module-special configuraions.
2007-11-04
Don't let people tell you what you can't do
1. Your dream is unrealistic. What’s unrealistic is trying to live your life working at a job you don’t love doing something you hate for the rest of your life while regretting trying to live your dream.
2. You’re screwed if it doesn’t work out. No, you’re not. In fact, the worst possible scenario is that you go back to what you would be doing if you hadn’t pursued your dream. That’s the worst possible scenario.
3. You weren’t cut out for that. Who’s to say that? If you don’t fit the
stereotype for your dream then you’re the one to break the mold. You will
stand out.
4. You can follow your dream someday. Someday will never come. Follow your dream today.
5. Only a few people “make it.” That’s because they lack the drive, determination, and will that you have. You’re one of the few.
6. You should just be safe and get a job. In fact, a job is even more dangerous than pursuing your dream. Not only do you feel terrible doing something you don’t want to do, but with two simple words your livelihood can change. “You’re fired.” When you’re pursuing your dream, you’re the only one that can stop you.
via [Ravi Vora]
2007-10-19
2007-10-15
The Worst Domain Name
Look at the following domain names:
- Who Represents www.whorePresents.com
- Experts Exchange www.expertSexchange.com
- Pen Island www.penisLand.net
- Therapist Finder www.theRapistfinder.com
More can be seen at evarest online.
2007-10-06
How to become a word guru?
What made me surprised is his fancy grammar / vocabulary. He can use different words to describe one thing. This ablity comes from his childhood, when his father forced him to recite a whole american english dictionary!
From the script of Episode 17 "Bad Blood":
YOUNG T-BAG: Ten synonyms for destroy. (closing his eyes, remembering) Annul. Mutilate. Liquidate. Abrogate. Quell. Ravage. Expunge. Demolish. Extinguish. Extirpate.
I always find me short of words, no, no, no, I don't mean I cannot say any word, but only quite normal words, like "destroy". :-)
Internet provides a lot of possibilities to let us learn something online. I used to learn those synonyms of words from the GRE-preparing book. Now we have a better way to explore the world of words - Roget's Thesaurus of English words and phrases.
With the word "destroy", I got 60(!) result with the same meaning of "destroy". So, it's really time to learn some thesaurus [thi-sawr-uh s] if one wants to become a word guru. Like a chinese proverb says: There is no royal road to learning.
2007-10-01
Use WinFlip to simulate the Flip3D effect under XP
For those people who admire the shining effect of switching windows - Flip3D under Windows Vista but have only Windows XP, here is a good news. WinFlip is such a very little eye candy to simulate the cool effect. It's extract & run ready without more configurations needed. Most important, it uses less resource (More precisely, it can adjust its effects on hardware performance automatically) and is free to use.
Usage:
use WinKey + Tab to switch between windows. WinKey + Shift + Tab to switch backwards.
Click here to download the latest version 0.41. More information can be found on:
Main Site: http://www.tokyodownstairs.com/ (already down for a few days :-( )
Official Mirror Site: http://winflip.stylekings.de/
New version comes also with mouse gestures. So just try it.
2007-09-28
Selected Firefox themes
Other Software
FOXSCAPE - Netscape
Office 03 - Microsoft Office 2003
Outlook 2003 Blue - Outlook 2003
Special
Abstract Classic - icons with angles
Baby Blue/ BB - pink and blue
Bible Fox - Christian symbols
Glowy Green - dreamy colors
Littlefox for Firefox - for small resolution
MidnightFox - neon with black
OldFactory Black - old style control panel
PimpZilla - earth
Pink Paula / PP2 - pinkie for teenagers
RedShift V2 Beta - red and black
Scribblies Brite - for kids
ShadowThunder II Sunbeam - bright yellow
Walnut for Firefox - Wooden
Operating Systems
iFox Smooth - Mac
Macfox II - Mac OS
Metal Lion - Vista - Vista
Netscape Windows 3.1 - Windows 3.1
Ubuntu Human Theme - Ubuntu
Ubuntu Tango Theme - Linux
Vista-aero - Internet Explorer 7
Themes
HalloFF - The Nightmare Before Christmas.
Halloween - Browser with ghosts
Lineage 2 - Game: Lineage 2
NASA Night Launch - Can even style numerous extensions.
Red Cats (green flavor) - for cat lover
The Simpsons - German version
tuxof - Unreal Tournament 2004
X-Mas (Light) - Christmas
So what do you like mostly? :-) <- this symbol is 25 years old, btw.
2007-09-27
Pack all in one with Bundled Wrapping Method
More details can be seen at http://www.onebag.com/pack.html