CentOS:

Setup VNC

http://wiki.centos.org/HowTos/VNC-Server

Service Status:

service –status-all
service –status-all | grep ntpd
service –status-all | less
service httpd status

Continue reading »

I encountered a problem with passing xml file to Flex using Httpservice.
If the XML file I pass to the flex has only one item, e.g.:

<DATA>

<SoftwareName>Photoshop </SoftwareName>

</DATA>

Then if you use an arraycollection to save the data.

e.g.

[Bindable]
public var SoftwareData:ArrayCollection;

[Bindable] public var SoftwareData:ArrayCollection;

http://casario.blogs.com/mmworld/2006/07/arraycollection.html

<s:HTTPService id=”getSoftware” url=”{SoftwareServer}” result=”getSoftware_resultHandler(event)” fault=”getSoftware_faultHandler(event)”  />

if we use “SoftwareData=getSoftware.lastResult.DATA.Software; “, it will not work for only one item.

The solution is :

if(getSoftware.lastResult.DATA.Software==null)

{ Alert.show(“No record”); }

else if(getSoftware.lastResult.DATA.Software is ObjectProxy)

{ SoftwareData=new ArrayCollection([getSoftware.lastResult.DATA.Software]); }

else{SoftwareData=getSoftware.lastResult.DATA.Software as ArrayCollection; }

Reference:  from a guy called chunk

http://casario.blogs.com/mmworld/2006/07/arraycollection.html

Singapore spends 180 bln creating world’s highest sky garden

Today I spent some time working on the date arithmetic. I don’t believe there is built-in Date arithmetic in Flex. Therefore, there probably only two solutions.

One is using DateUtils open source library: http://flexdateutils.riaforge.org/

The other one is converting date into milliseconds and then do deductions or additions.

public static const millisecondsPerMinute:int = 1000 * 60;
public static const millisecondsPerHour:int = 1000 * 60 * 60;
public static const millisecondsPerDay:int = 1000 * 60 * 60 * 24;
public static const millisecondsPerWeek:int = 1000 * 60 * 60 * 24*7;

var startDate:Date;
startDate = new Date(dateNow.getTime() – (millisecondsPerHour));
Note here, if we set millisecondsPerWeek to 1000 * 60 * 60 * 24*30, if will exceed the maximum value of a int number!(2^31)-1, which is 2,147,483,647 !

PR2 Plays Pool

by Willow Garage, a robotics research lab and technology incubator devoted to developing hardware and open source software for personal robotics applications.It was started in late 2006 by Scott Hassan, an early Google employee who helped develop Google’s technology Steve Cousins is the president and CEO. Willow Garage is located in Menlo Park, California.

Selfridges today became the first department store in Britain to accept China’s only debit and credit card brand.

由于目前来自中国客户的购买力逐渐加强,继法国老佛爷之后,英国Selfridges购物商场也引进了中国银联卡系统来直接进行刷卡消费,不过据非官方称需要是美金银联卡。

Until now, China Union Pay – the only Chinese bank card to operate as Visa and Mastercard do in Europe – had been accepted by only a few small businesses, making Britain the only major European nation not to welcome it.

Stores on the continent that have adopted CUP, including Galeries Lafayette in Paris, found they doubled sales to Chinese customers within the first year of trading with the system.

Selfridges claims to have seen double-digit growth in sales to Chinese customers each year since 2008. A spokesman for the retailer said: “We are very excited by the CUP system. We have one-year department store exclusivity in the UK.”

Can’t wait to try my UnionPay debit card out this weekend!

Reference:

http://www.thisislondon.co.uk/standard/article-23839978-chinese-credit-card-accepted-at-selfridges.do

Google (Nasdaq:GOOG) and Kingsoft (3888.HK) have suspended a cooperation that included the provision of a co-branded version of Kingsoft’s “Powerword” translation software, Sina reported May 4.

A Kingsoft employee said that the two-year contract for Google’s cooperation with Powerword had “basically expired,” the report said, without specifying the employee’s name. The parties will not continue to cooperate, and Kingsoft will no longer provide a product under the “Google KingsoftPowerword” name, the employee said.

Internet users said May 4 that the “Google” brand had been removed from both the name of the version’s official website and the translation software’s search function.

Previous rumors had said Kingsoft might suspend the partnership if Google withdrew from China, DoNews reports.

I have just checked the PowerWord which was installed in my laptop earlier, I remembered when I typed some word for translation some time ago, it used to came up some translations from Google web. Now all it came up is from Kingsoft Web Dictionary.


Today, It took me a while to develop a program that can create and modify a Contact file in Windows Mobile 6.5.

If you are not clear how to use PocketOutlook class in Windows Mobile, then continue to read:

1 . add a Namespace and Assembly reference(like most C# programs):
using Microsoft.WindowsMobile.PocketOutlook;

2. Make an instance of class OutlookSession and setup parameters.

OutlookSession mySession = new OutlookSession();
Contact con = mySession.Contacts.Items.AddNew();
con.MobileTelephoneNumber = “11111111″;
con.FileAs = “name”;
con.SetPicture(“filenamehere”);
con.Email1Address=”youremail@email”;
con.Update();

3. Modify an existing contact using a “for” loop
(please note here: foreach loop can not be used for modifying contacts in Windows Mobile)

for (int i = 0; i < collection.Count; i++)
{
Contact c = collection[i];
if (c.FileAs == “leon”)
{
c.MobileTelephoneNumber = i.ToString() + “1111″;
c.BusinessAddressStreet = i.ToString() + “dfdfd”;
c.SetPicture(loc);
c.Update();
}
}

Hope that helps! I also managed to download image files from other sites and save them to mobile storage, this can be useful for adding contact pictures.

Gordon Brown has announced he is resigning as UK prime minister.

gordon_brown

Gordon Brown's Political Career

His decision comes as the Tories and Liberal Democrats are poised to agree a deal to form a government.

Labour’s attempts to negotiate a deal of their own with the Lib Dems, after last week’s inconclusive election result, ended in failure on Tuesday.

BROWN’S CV:

Born: 20 February 1951
Educated: Kirkcaldy High School, Edinburgh University
Family: Married, two sons (daughter died shortly after birth)
1972: Rector, Edinburgh University
1975: Temporary lecturer
1976: Politics lecturer,Glasgow College of Technology
1980: Television journalist, STV current affairs
1983: Labour MP, Dunfermline East
1985: Opposition front bench trade and industry spokesman
1987: Shadow chief secretary to the Treasury
1989: Shadow trade and industry spokesman
1992: Shadow chancellor
1997: Chancellor

Good news!

中新社北京5月10日电 (记者 曾利明) 自2011年1月起,中国内地将在所有室内公共场所、室内工作场所、公共交通工具和其它可能的室外工作场所完全禁止吸烟。

Smoking in public places such as hospitals, schools, gymnasiums, restaurants, libraries, shopping malls, bookstores and public transport vehicles, will be banned from 2011.

My friend Jibran just sent me this: LaTex editor for Google Docs via GData API. It is hosted on top of Google AppEngine infrastructure(cloud environment).

latex google doc editor

LaTeX Lab link : http://code.google.com/p/latex-lab/

Preview link: http://docs.latexlab.org/

“Cloud Computing” is becoming one of the hottest buzzwords in the IT industry. It has been brewed over the last few years, now it is publicly recognized as the fifth paradigm shifts in computing. Some leading IT companies such as Amazon, IBM, Microsoft and Google begin to develop the cloud computing concepts with enormous investment. Also, in many countries, governments have launched many schemes to catalyse the development of this new technology. In this paper, fundamental concepts of cloud computing, utility computing and existing price models of major cloud providers are described.

Concepts of Cloud Computing

Cloud computing was first visualized by a Stanford professor John McCarthy, who predicted in 1961 that “Computation may someday be organized as a public utility”.

Even by now, cloud computing is still an evolving concept. For this reason the definition of cloud computing varies widely. From technical aspect, “Cloud computing is a model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.”

Utility Computing

Utility computing is the packaging of computing resources, such as computation and storage, as a metered service similar to a traditional public utility (such as electricity, water, natural gas, or telephone network) .Cloud computing and utility computing are similar. Users are able to request and use a specific amount of resource on demand as through services.



References:

NIST Definition of Cloud Computing v15 , http://csrc.nist.gov/groups/SNS/cloud-computing/index.html

Decision support and business intelligence 8th edition page 680

A hung Parliament explained- By Professor Robert Hazell, UCL

Wiki: hung parliament: 悬吊国会/无多数议会

In parliamentary systems, a hung parliament is one in which no political party has an outright majority of seats. In nations in which single member districts are used to elect parliament, and there are weak regional parties, such as the United Kingdom, a hung parliament is a rarity, as in these circumstances one party will usually hold enough seats to form a majority. A hung parliament will usually force either a coalition government, a minority government or a dissolution of parliament. Frequent hung parliaments can result in smaller parties staying in power for decades as they switch support between the two or three major parties.

Google was forced to give its e-mail service Gmail a different name, Googlemail, because of a trademark dispute in the UK. These disputes take a long time.  This @googlemail address has been annoying me for ages…Finally…

According to Google:

“As of May 3, 2010, Google’s email service is changing its name to Gmail in the United Kingdom. From now on, anybody who signs up for a new Gmail account in the UK will get an @gmail.com address instead of @googlemail.com. The good news is that “gmail” is 50% fewer characters than “googlemail,” and with so much emailing going on these days, we estimate this name change will save something like 60 million keystrokes a day. At approximately 217 microjoules per keystroke, that’s about the energy of 20 bonbons saved every day!If you already use Google Mail and would prefer an @gmail.com address, you have the option to change to the matching @gmail.com username. If you make this address swap, it only affects your address; your account settings, contacts, and existing mail won’t change, and any mail sent to your old @googlemail.com address will automatically redirect to your new address. ”

http://mail.google.com/mail/googlemail/rebrand

For some reason, the link is not working. I hope they can fix this asap so I can switch back to GMAIL!