rss
twitter
  •  

Peacock Suit » Zend framework: Logging Database Queries to FireBug

| Posted in web design |

0

Logging database queries to FireBug is sinfully simple with the new component Zend_Db_Profiler_Firebug in ZF 1.6, now available, you can download it here Zend Framework Download Page.

Requirements:

  1. Firefox Browser ideally version 3 but version 2 is also supported.
  2. Firebug Firefox Extension.
  3. FirePHP Firefox Extension.

More information on requirements at the Zend Framework Documentation -  Profiling with Firebug

Let’s look at some examples.

< ?php  // Instatiate the database  $db = Zend_Db::factory('Pdo_Mysql',  array(  'host' => 'localhost',  'dbname' => 'zf_feature_testing',  'username' => 'user123',  'password' => 'pass123'  )  );     // Instantiate the profiler in your bootstrap file   $profiler = new Zend_Db_Profiler_Firebug('All Database Queries:');  // Enable it  $profiler->setEnabled(true);  // Attach the profiler to your db adapter   $db->setProfiler($profiler);     // Run your queries  $result1 = $db->fetchAll('SELECT * FROM zf_test');  $result2 = $db->fetchAll('SELECT * FROM zf_test where id = ?', 3);

Alternatively you can add the profiler parameters to the Zend_Db factory.

< ?php  // Instatiate the database, passing in the profiler parameters.  $db = Zend_Db::factory('Pdo_Mysql',  array(  'host' => 'localhost',  'dbname' => 'zf_feature_testing',  'username' => 'user123',  'password' => 'pass123',  'profiler' => array(  'enabled' => true,  'class' => 'Zend_Db_Profiler_Firebug'  )  )  );

Or from an .ini file using Zend_Config_Ini

$config = new Zend_Config_Ini('../application/config.ini', 'development');  $db = Zend_Db::factory($config->database);

config.ini

[development]  database.adapter                    = pdo_mysql  database.params.host                = localhost  database.params.username            = user123  database.params.password            = pass123  database.params.dbname              = zf_feature_testing  database.params.profiler.enabled    = true  database.params.profiler.class      = Zend_Db_Profiler_Firebug

Show me my profiling data?

Open FireBug, you will see a link under console.

Profiling with FireBug

Click it open and it will list all the queries that were run.

Profiling with FireBug

Enjoy!

just found out that the zend framework has a built in component to allow me to use firePHP, ive always wondered how to go about setting this add on up and using it to debug my work and now here it is, thanks @sitepointdotcom for the initial post talking about using firePHP http://www.sitepoint.com/blogs/2010/02/09/debug-php-firebug-firephp/

Posted via web from Dans World

morning coffee!

| Posted in web design |

0

47 Amazing CSS3 Animation Demos

| Posted in web design |

0

Feb 03

Tagged in: , Comments:Add

47 Amazing CSS3 Animation Demos

TechSmith

Here is a compilation of 47 jaw-dropping CSS3 animation demos. They demonstrate the possibilities of the CSS3 transform and transition property. Some are very useful and can be used as Javascript alternatives. Most of them are simply to look cool. In order to veiw these effects, you need a webkit browser such as Safari and Chrome (sorry to the Internet Explorer users). Enjoy!

CSS3 Clock With jQuery

css3 clock

Analogue Clock

analogue clock

3D Cube That Rotates Using Arrow Keys

3d cube

Multiple 3D Cubes (Slide In/Out)

multiple 3d cubes

CSS3 Accordion

css3 clock

Auto-Scrolling Parallax

auto scrolling parallax

Isocube

isocube

Image Gallery

image gallery

Matrix

matrix

7 Javascript-effect Alternatives Using CSS3

javascript effect alternatives

Image Hover Effects

css3 clock

Turning Coke Can (Control With Scrollbar)

coke can

3D Meninas

3d meninas

Polaroid Gallery

polaroid gallery

Space

Note: this one is graphic intense and takes a while to load, but the result is crazy!

space

Mac Dock

css3 clock

Drop-In Modals

drop in modals

Sliding Vinyl

sliding vinyl

Zooming Polaroids

zooming polaroids

Animated Rocket

animated rocket

Poster Circle

poster circle

Morphing Cubes

morphing cubes

Falling Leaves

falling leaves

Animated Polaroid Gallery

polaroid gallery

Spotlight Cast Shadow

spotlight cast shadow

Colorful Clock

colorful clock

Lightbox Gallery (Draggable)

css3 clock

Elastic Thumbnail Menu

elastic thumbnail menu

Coverflow

coverflow

Snowflakes

snow

jQuery DJ Hero

dj hero

Dynamic Stacking Cards

stacking cards

Another Image Gallery

image gallery

Snow Stack (Control With Arrow Keys)

snow stack

Animated Pricing Column

animated pricing column

Slick jQuery Menu

slick jquery menu

CSS3

sticky notes

CSS Tabs Without Javascript

css tabs

Tab Menus Without Javascript

tab menus

SVG Fisheye Menu

fisheye menu

Dynamic Presentation Without Flash

dynamic presentation

Rotating Gallery

rotating gallery

Dropdown Menu

dropdown menu

Another Fisheye

fisheye

Frame-by-Frame Animation (Hover to Play)

css3 animation

Another Accordion

another accordion

AT-AT Walker (No Flash or Javascript)

css3 animation walker

Delicious Stumbleupon Digg

What to Expect in 2010: UX/UI Design Simplicity

Wix.com

Comments

Pages: 5 4 3 2 1 » Show All

There are 44 comments (+Add)

  • 44 alyssa http://www.twitter.com/pixel8design
    February 4th, 2010 at 11:34 pm

    I am DEFINITELY loving the cover flow and Mac dock ones! I’ve seen the rotating Coke can before, I just wish I knew enough with coding to use it! :) I’m just starting out (in fact I’m working on my very first web page for my midterm), and can use all the help/advice I can get! :D Great post!

  • 43 The Frosty http://austinpassy.com
    February 4th, 2010 at 8:11 pm

    That’s really awesome! Amazing what CSS can do, just give it a few more years!

  • 42 SDC Software http://www.sdc-software.com.mk
    February 4th, 2010 at 5:28 pm

    Great Post. Nice to see what CSS3 is capable of. :)

  • 41 Igor Ivankovic http://www.taptapdesign.com
    February 4th, 2010 at 3:55 pm

    WOW, pretty nice effects using only css and html. I feel it will only get better given in the hand of creative designers! Bravo for this post, and i hope css3 will become standard fairly soon!!

  • 40 Lucho
    February 4th, 2010 at 3:16 pm

    It is not working in Firefox too… that is something to worry about!

  • 39 designfreek http://www.webdeveloperjuice.com/
    February 4th, 2010 at 12:45 pm

    Good Post.. Really very nice collection and thanks for adding my blog link :)

  • 38 Rishi Patel http://www.monazu.com
    February 4th, 2010 at 12:24 pm

    Awesome post! I had no idea CSS could be so versatile.

  • 37 Richard http://www.fruitpixel.com/
    February 4th, 2010 at 10:59 am

    I love CSS3 – just need the browsers to catch up!

  • 36 Words are Pictures http://www.wordsarepictures.co.uk
    February 4th, 2010 at 10:52 am

    Cool that you you can do these things but honestly, some of them are really clunky and again, the browser thing is annoying. You can’t expect users to have to upgrade every time a coder learns a new trick when their old flashplayer3 did exactly the same thing 7 years ago. And it was smoother.

  • 35 Frank Stallone III http://www.iamfrankstallone.com
    February 4th, 2010 at 10:36 am

    I like how Chris Coyier’s CSS3 Clock With jQuery had a clunky analog feeling seconds hand and the Antique Clock has a smooth digital feeling seconds hand lmao.

Pages: 5 4 3 2 1 » Show All

Post Your Comments

some of this stuff is absolutely superb, i cant wait until i can really start to use this kind of stuff in my work, bring on CSS3!!!

just have to wait for the majority of people to upgrade their browsers now!!! cmon peeps hurry up just look at what you are all missing out on.

Posted via web from Dans World

The Chinese toddler chained through love and fear | World news | The Guardian

| Posted in web design |

0

A 2 year old Chinese boy is chained to a post on roadside

A two-year-old chinese boy is chained to a lamp post outside Huaguan shopping mall in Beijing while his father Chen Chuanliu works nearby. Chuanliu, a pedicab driver who says he is unable to afford to pay for childcare, chains his son up to prevent him from being abducted. Photograph: Quirky China News / Rex Features

It was a picture that shocked viewers around the world: a Chinese toddler chained to a post outside a shopping centre in the freezing Beijing winter.

However, behind the image of two-year-old Jingdan lies a tale not of intentional cruelty but, it seems, one of misplaced love and fear: his sister disappeared from the same spot just two weeks ago.

“I was afraid I would lose him too,” their father, Chen Chuanliu, said today.

Four-year-old Jinghong has not been seen since 22 January, when Chen left her playing with friends while he worked. Although Beijing is generally regarded as safe, he, like nearby residents, believes she has been abducted.

Tens of thousands of children go missing each year in China; most are the offspring of impoverished migrant workers like Chen, snatched and then sold on for anywhere between a few hundred and a few thousand pounds. Officials have warned that the problem is on the rise.

Boys are often sold to families desperate for an heir; girls can be reared as future brides for rural men. Both sexes are taken for labour or to beg for gangs, say experts.

The problem has grown so acute that authorities have launched a campaign to crack down on child trafficking.

Last year they created a national DNA database to reunite families and a website featuring the photographs and details of rescued children. Officials say they have saved around 2,000 children and returned at least some to their parents.

But Chen has little hope of reunion.

“It will be hard to find my daughter because I don’t have a photo,” he said– the family could not afford one.

“The police didn’t tell me anything – I don’t know whether they have opened a case or not. They just told me to look around the area myself.”

Officers told local media this week that they were looking for Jinghong and were obtaining footage from surveillance cameras – well over a week after her father urged them to do so. The Guardian’s calls rang unanswered.

“The police said they saw [the surveillance footage], but I’m not sure if they really did or not,” he said. “I think the most valuable time for watching it was right after she went missing.”

Chen is not an expressive man. When asked about Jinghong it was several minutes before he began to speak: “Her hair is messy, like mine, and quite short. She has a scar on her forehead. Her face is not round, but sort of egg-shaped, and she is about the height of this table.

“But kidnappers could change her clothes and clean her hair so she looks quite different.”

Her birth was particularly precious because he and his wife were already in their late thirties. He supported the family by driving a motorcycle taxi, making 50 yuan (£4.60) a day.

His wife, Yang Caihong, has learning disabilities and is unable to care for the children, and the couple have no relatives in the city. Although the family have lived in Beijing for years, China’s household registration system means they are still regarded as migrants and – unlike official residents – not entitled to free nursery care. So, from the age of just 40 days, Jinghong was taken to the shopping centre while her mother collected scrap there to sell to recyclers.

Chen tried to keep an eye on his children between fares, but people in the area worried. They bought milk and snacks to feed them up and returned Jinghong to her parents if she strayed.

“She was a very brave little girl – she dared to do all kinds of things. I think that was why she [could be] taken away,” said Mr Zhang,a resident who believes she was abducted.

This week’s publicity has led to a potential offer of free care at a private kindergarten for her little brother, Jingdan.

“This boy was noticed because of the locked chain,” a local official told reporters. “But in fact there are many little children from migrant families roaming around in Beijing.”

Im actually lost for words on this one, i spent some time in beijing myself and didnt see anything like this while i was there.

You have to feel sorry for the poor father, loosing a daughter like that must be heart breaking, but then having to worry daily about it happening to your son..

Posted via web from Dans World

Vodafone eager to become iPad wireless provider in the UK | Business | guardian.co.uk

| Posted in web design |

0

Apple iPad being played with

The Apple iPad at its launch. Photograph: Justin Sullivan/Getty Images

Vodafone has set its sights on selling the Apple iPad in the UK after its success with the iPhone, which it started selling in the UK last month.

Speaking after the world’s largest mobile phone company by sales announced better-than-expected third-quarter results, chief executive Vittorio Colao said he was “very interested” in the iPad, which Apple boss Steve Jobs unveiled in San Francisco last week.

“I have not, personally, touched one but I really look forward to it. I believe it is going to be another important piece of the [mobile] data experience.I think anything that improves the customer experience with mobile data is welcome and as such I would be very interested in having it.”

He refused to say whether any talks have actually taken place, but Apple is understood to be scouting for UK wireless partners for the device. Earlier this week O2 UK chief executive Ronan Dunne said he is also interested in the iPad, but it is unclear exactly how it will be sold this side of the Atlantic.

There is speculation that O2 and Orange have already put in an order for the micro-SIMs needed to provide 3G wireless connectivity in the iPad.

Orange has already started talks with Apple to sell the iPad in the UK. The company, owned by France Telecom, was also the first British network to break O2’s exclusive hold on the iPhone. It started selling the handset last November and is understood to have sold over 200,000 by Christmas.

Vodafone’s third-quarter results yesterday were boosted by sales of smartphones, which pushed the company’s revenues from mobile data services – such as internet browsing – over £1bn in the quarter for the first time in the firm’s history. In the three months to end December, 25% of all new phones sold by Vodafone across the world were smartphones, up from 20% in the second quarter of the year, with the bulk of those sales in Europe. Colao said he expects smartphones to make up between 30% and 40% of all the phones the company sells in its next financial year to end March 2011.

The figures were warmly welcomed by the City as showing signs of recovery in some key European markets such as the UK and Germany, where the company has lost ground to rivals and been battling against the tough economic climate, while its cost-cutting programme is also bearing fruit. Shares in the company were up almost 5% after the company raised its forecast for free cash flow for this year by £500m to between £6.5bn and £7bn and forecast annual operating profits of £11.4bn to £11.8bn, rather than its initial forecast of £11bn to £11.8bn.

On a like-for-like basis, revenues fell slightly in the quarter but the decline was far less than in previous quarters. Overall third-quarter revenues were up more than 10% to £11.5bn as the company benefited from currency fluctuations.

Colao said he was conditionally optimistic about the group’s prospects. “I keep my feet on the ground; I see what I see. I see a few things going in the right direction. I see mobile data continuing to grow. I see a good performance in [fixed-line telecoms]. I see in some markets like the UK and Italy a good performance, but I still see a lot of price pressure in voice and I still see unemployment being a concern in Europe.”

There had been some speculation, ahead of the results, that shareholders were pushing for a break-up of the company as it has consistently underperformed its publicly quoted peers. Colao, however, said the size of the company – which has operations from western and central Europe through to Turkey, India and South Africa as well its Verizon Wireless joint venture in the US – not only gives it scale in purchasing, but also an advantage in international roaming rates and helps it to attract business customers”There is a full set of opinions on how to structure Vodafone and we take due notice of all of them,” he said. “The board regularly reviews our corporate structure but there is unanimous consent now that in our opinion the current structure serves shareholders well.”

so who would you prefer to have first dibs on the ipad? i think after my experience with o2 and the iphone i would like vodafone to get it, surely their 3g network has far better support than o2, and i think they could handle the extra data a lot easier than o2, we all know the troubles that o2 has had in the past few months with the outages.

Posted via web from Dans World