Drug preguntas

The chicken theory

Thoughts 2 Comments »

When I arrived in Australia, I’ve been amazed how much chicken we could eat: KFC, Subway,  Red roster, asian food,…  It comes really hard to find a restaurant not serving these poultries. In France I’ve been used to eat chicken once a month at most.

Another thing I noticed was that heaps of girls had big breasts. Didn’t take long to make a parallel. But the most funny part has been a French friend sent me an email saying exactly the same thing about England (Liverpool). British girls have big breasts because they eat too much chicken. My theory was validated when my mother came over to visit Australia and noticed three things about Australian girls. There are a lot of fair skin girls, heaps wearing high-heels and they have big breasts.

I also did some searches on Google about the subject. The next step, calling Mythbuster.

French Backpacker

Ubuntu, XP and Vista

Moodle, PHP No Comments »

For the last 6 months I’ve switched from Vista to Ubuntu. In this beginning of 2009, here is my opinion about the different operating systems that I used at Moodle HQ for developping PHP web applications.

Windows Vista: when I first arrived at Moodle HQ I asked for Vista. I hadn’t used it before. First it’s been really cool. I like the UAC, make me feel more secure. But WAMP server started to crash really often, and due to some bad memory I had a lot of blue screens.  I switched to Ubuntu. I don’t use Vista anymore. The automatic update system is just the worst I know. Every few time I boot on Vista, it blocks me to work during minutes. The same thing happens when I turn off the computer. I don’t feel to be blocked by XP when it updates. And Ubuntu is even smoother than XP.

Ubuntu 64: I had to deactivate the crappy file indexation system and set apache in order to run a unique server instance at the same time. Once these two things done, all worked fine. Excepted that 2Go of RAM wasn’t enough to runs Firefox + Netbeans + 1 virtual machine. In order to run these three softwares I would advice at least 4Go, and 6Go to be comfortable. For running that much memory on your computer, you need the 64bits Ubuntu version and a Dual/Quad core processor.
In Ubuntu, I love the update system,  I feel more secure about virus and other malwares, and the apache server never crashes.

Ubuntu screenshot with XP running on VirtualBox

Windows XP: I installed it in a virtual machine. It runs on Virtualbox. VirtualBox is free and really give its carrot to VmWare. Windows XP with VirtualBox starts/stops way quicker than on a normal install. I gave 1G of RAM to the virtual machine. I installed Multiple IE so I can test every IE versions (5.5, 6 and 7).
I find XP very cool to run Flex Builder 3 and all Adobe softwares. Windows XP is also the system I installed years ago on my personal notebook. On this old computer, Chrome on XP runs faster than Firefox on Ubuntu 8.10.

I think that Ubuntu + XP on virtualbox is an excellent choice for PHP developers.

How to create a Flex client for a Zend_amf server

Flex, PHP No Comments »

Here are some steps to help to set up a basic working Flex client / Zend_amf server.

You can find the Zend_amf library and some explanation on Wade Arnold blog

First create the server.php
include “Zend/Loader.php“; //this will probably need to be different for you (see here)

Zend_Loader::registerAutoload();
$server = new Zend_Amf_Server();
$server->addFunction(‘hello’);
$response = $server->handle();
echo $response;
function hello($name, $greeting = ‘The server say Hi to’)
{
return $greeting . ‘, ‘ . $name;
}

Then into Flex Builder create a new project. Into the Project Properties > Flex Compiler, add the argument
-services “C:your_project_locationsrcservices-config.xml”

Create this “services-config.xml” under /src
<?xml version=”1.0″ encoding=”UTF-8″?>
<services-config>
<services>
<service id=”zend-service”
class=”flex.messaging.services.RemotingService”
messageTypes=”flex.messaging.messages.RemotingMessage”>
<destination id=”zend”>
<channels>
<channel ref=”zend-endpoint”/>
</channels>
<properties>
<source>*</source>
</properties>
</destination>
</service>
</services>
<channels>
<channel-definition id=”zend-endpoint”
class=”mx.messaging.channels.AMFChannel”>
<endpoint uri=”http://your_amf_server_url/server.php
class=”flex.messaging.endpoints.AMFEndpoint”/>
</channel-definition>
</channels>
</services-config>

Finally in your main.mxml
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute”>

<mx:RemoteObject id=”myservice”
showBusyCursor=”true”
source=”your_flex_client_project_name
destination=”zend”
result=”Alert.show(event.result.toString())”>
</mx:RemoteObject>

<mx:Script>
<![CDATA[
import mx.controls.Alert;
]]>
</mx:Script>
<mx:Button label=”Call service” click=”myservice.hello(‘Yourself‘)”/>

</mx:Application>

Hello world!

Thoughts No Comments »

Welcome to my WordPress blog. It’s about my though about IT and everything.

Theme by NattyWP