“Zend_Db_Select” tricks

Posted by admin | Gadgets | Monday 5 October 2009 4:45 am

More recently, when writing code in a regular model in front of me faced with the task of the subquery (for example to join). Thus for quite some time, I try as little as possible to write queries “in the raw” form, using OOP wrapper for the Zend Framework. However, looking at the manuals, API, I, to my surprise, did not find the necessary funds. But after the treatment directly to the code, it became clear that the subquery can be very simple!

The presence of internal code method _join (file Zend / Db / Select.php) the next line, made it clear that not everything is hopeless:
773. ) Else if ($ name instanceof Zend_Db_Expr | | $ name instanceof Zend_Db_Select) (

* This source code was highlighted with Source Code Highlighter.

Banal based on the fact that for $ name instanceof Zend_Db_Select laid some logic, try the following:
$ firstQuery = $ db-> select ()
-> from (array ( ‘u’ => ‘user’),
array ())
-> join (array ( ’s2u’ => ’site2user’),
’s2u.userId = u.id’,
array ( ’siteId’))
-> columns (array ( ‘userCount’ => ‘count (*)’))
-> group ( ’s2u.siteId’);

$ secondQuery = $ db-> select ()
-> from (array ( ’s’ => ’site’),
array ( ’siteId’ => ‘id’,
’site’ => ‘title’))
-> join (array ( ‘n’ => $ firstQuery),
‘n.siteId = s.id’,
array ( ‘userCount’));

echo $ secondQuery-> assemble ();

* This source code was highlighted with Source Code Highlighter.

And as a result of the script we get:
SELECT `s`. `Id` AS `siteId`, `s`. `Title` AS `site`, `n`. `UserCount` FROM `site` AS `s`
INNER JOIN (SELECT `su`. `SiteId`, count (*) AS `userCount` FROM `user` AS `u`
INNER JOIN `site2user` AS `su` ON s2u.userId = u.id GROUP BY `s2u`. `SiteId`) AS `n` ON n.siteId = s.id

* This source code was highlighted with Source Code Highlighter.

Voila! Plucked absolutely correct query.

This is a very important feature, because Untying the hands when writing more abstract models. For example, create a few methods that do not simply return any data and queries as objects Zend_Db_Select. Then these queries can be modified, embedded in the other, ie avoid writing the same SQL code in different places, and this is a big plus with the support and modify the code.

P.S. This feature has been working for quite a long time and why it has not yet been made to the manual, PHPDoc, which received API, I honestly do not understand at all.


Check out the analysis of delfi.lv, sagepub.com, widgetbox.com, flickr.com, zonamusical.net, webhost4life.com, jugem.jp, adserverplus.com, rurubu.com, home.ne.jp - and much more

Turbo fast browser - Opera 10

Posted by admin | Gadgets | Saturday 3 October 2009 7:15 am

September 1 - Oslo, Norway - The company Opera Software today released the final version of the Opera 10. The company introduced a browser with an elegant interface that includes a number of innovative technologies. Opera 10 is available in 43 languages in versions for operating systems Windows, Linux and Mac. It can be downloaded at www.opera.com

Three innovations Opera 10, which is certainly worth a try

1. Opera Turbo - data compression technology that solves the problem of slow data downloads at work on low-speed channels. Come whether you are in network with 3G-modem in the road or use the overloaded Wi-Fi hotspot at the airport - Opera Turbo speed data transfer and “unfreeze” the Internet.

If you’re tired of waiting for loading Web sites, including built-in browser technology Opera Turbo and work at speeds close to broadband Internet. Opera Turbo automatically determines the data rate and, in the case of its reduction, is able to compress the contents of Web pages for faster loading. Under laboratory conditions, technology has provided the acceleration up to eight times compared with other browsers.

Scandinavians, obsessive wrapping www.youtube.com/watch?v=tYEUFwJXVvw

2. Excellent interface
The Opera browser has never looked so elegant. For Opera 10, we have developed a new interface with a convenient and logical arrangement of menus and buttons, the call options.

3. Improved tab
Opera is a pioneer in the use of tabs. Opera 10 can change their size by stretching the lower boundary, or by double-clicking the mouse. The new browser capable of displaying thumbnails of open tabs for websites.

By default, rendered tab Opera 10 are placed at the top of the screen, but they can move down or side panels, which is especially useful when using widescreen monitors.

Opera 10, and includes other improvements that increase productivity and improve the efficiency of the Internet:

- Custom Express panel
Express panel Opera 10 already recognized the Internet community. Now it has become the custom in accordance with the personal preferences of users. You have a large monitor? Set in the Express-panel 5×5 sites for quick access. Furthermore, now your favorite picture or photo can be done in the background Express panel.

- Quick access to Russian-language services
“Yandex”. In addition to search capabilities of your browser, now “Yandex” has become the default search in the Express-panel.
“VKontakte”. Now from the search bar Opera 10 can send requests in RuNet largest social network “VKontakte.
«Mail.Ru». Favorite browser by default includes a link to the main page of Russia’s largest Internet communications portal Mail.Ru. From Express your browser with one click you can go to the draft Games.Mail.Ru,. Search for information through Poisk@Mail.Ru possible directly from the browser search bar.
«OZON.Ru». Search for books, music, videos and other goods to Russia’s biggest online store even easier. Now it can be done from the search bar Opera 10, and load OZON.ru - with the help of bookmarks and Express-panel, which links to the home page installed by default.

- Automatic update for greater security
Opera 10 is now updated automatically, so you can always work with the latest version of your browser. Thus, users benefit from all the new browser, and a powerful registration system failures is intended to make it more stable.

More information about the security of browsers available at www.secunia.com

- Check your spelling
No more typos! The spelling system is based on open dictionary Hunspell supports 51 languages, including Russian, Ukrainian and Belarusian.

- Improved e-mail
Built-in browser Opera 10 e-mail client gives you access to e-mail at any time. Opera Mail has broad capabilities to organize email messages and contacts, as well as search for them. Monitor the progress of discussions, it became more comfortable with the option sorting in the form of wood, and built-in spell checker eliminates errors and misspellings in the recruitment of text messages.

- How to become the fastest Internet
The high speed of the browser - a combination of several factors. First of all, we have improved the overall performance of the kernel and accelerated loading pages with large amounts of data (such as, eg, Gmail). According to our measurements, the speed of the Opera 10 was 40% higher than Opera 9.6, and this is before you turn on the Opera Turbo! However, this is not all. The Opera browser is not only easy and quick, but smart. Adaptive control system allows the best to expend resources with little computer memory and, conversely, to utilize more resources to a PC with lots of free to use RAM.

- “Toy” for web developers
Web developers will appreciate the newest version of the application for debugging and optimizing Web sites Opera Dragonfly, Opera browser, available in 10. Opera Dragonfly, available in 36 languages, now you can edit the Document Object Model (Document Object Model, DOM) and check the HTTP-headers. In addition, Opera 10 to 100% being tested for compatibility with web standards and supports ACID3 Web fonts for CSS3.

“We are in Opera are constantly working on new ways to improve online experience for everyone and for everyone - said Jon von Tetzchner (Jon von Tetzchner), CEO of Opera. - Each of us is faced with the slow channels of access to the Network, and I think that Opera Turbo will be useful to all users, regardless of how often and at what speed they are working in the web. Now the problem of slow Intenet is a solution, and it is absolutely free. We are pleased to present the final version of Opera 10, and hope that it will attract more users, in addition to the 40 million that have already opted for our browser safe, fun and easy online experience. ”


Check out the analysis of zdnet.co.uk, 10010.com, tapuz.co.il, alfoo.org, milfgf.com, mmo-champion.com, myvouchercodes.co.uk, sportsbook.com, catcatforum.com, akinator.com - and much more

The best photo hosting

Posted by admin | Gadgets | Sunday 20 September 2009 5:02 am

Tired of imageshack, photobucket and tinypic? Try something better! Go to this photo hosting site and enjoy multiple photo uploading, automatic image resizing and tagging, sharing photos with your friends - all of these features are free to try. Dont forget to signup to access more functional version of Pict foto hosting.

Pwnage Tool 3.1 for Mac OS X

Posted by admin | Gadgets | Thursday 17 September 2009 10:07 am

5 Pwnage Tool 3.1 for Mac OS X

Pwnage Tool 3.1 for Mac OS X, users may like Jailbreak iPhone 3G cell mobile and the first issue of the iPhone and IPod Touch running Apple iPhone OS 3.1.

The tool however does not support the iPhone 3GS or second-and third-generation IPod Touch. Jailbreaking allows iPhone and IPod Touch users to run applications that are not available through the App Store Apple.

Unauthorized applications can be installed through programs such as Cydia and ice. The tool was developed by iPhone Dev-Team.

Facebook Acquires FriendFeed

Posted by admin | Gadgets | Thursday 10 September 2009 3:30 am

We have one article on “Facebook Acquires FriendFeed” at main online site Washington Post. IT guy writes about several tragic solutions & tech ideas in connection with “YouTube Adds A Twitter Button” (datpiff.com), “TechCrunch Comes to China” (cmt.com profile), “DocStoc Launches Document Collections (angel-live.com wiki)” and “Sequoia, Greylock Take Stake In OpenDNS (zieloneimperium.pl)”. You can also find tons of published geek articles & documentation on cool tech round tables.Online archives, news sites, startups, media websites, personal blogs, services are all featured in “Why Schmidt Had To Go”. Enjoy and come back again.

When Livestreams Go Wrong: MacRumors Gets Hijacked

Posted by admin | Gadgets | Wednesday 9 September 2009 10:15 am

Read todays post where author talks about “When Livestreams Go Wrong: MacRumors Gets Hijacked” at respected news website Washington Post. The author talks about a whole bunch of interesting issues and tech ideas cooperating with “Yazzem Launches Version 2; Improves Latest Activity Among Users” (movie-blog.org), “Obama’s Crowdsourced Resolutions For 2009″ (funmaza.com), “Live From Startonomics Tokyo (tripadvisor.de)” and “CrunchPad: The Launch Prototype (atura.jp)”. You may also download lots of fresh network news & books about amazing meetings.Online archives, news sites, startups, services, media websites, personal blogs are all reviewed inside “On the Apparent Apple Suicide”. Have a good reading and come back again.

New iPhone 3G - A gadget to adore

Posted by admin | Gadgets | Sunday 6 September 2009 7:54 am

13a New iPhone 3G - A gadget to adore
iPhone 3G combines stylish design with a huge pack of all possible useful Mac Os software inside and all that leads you to much joy sing it. Gadget geeks now may have all in one, a magic bullet mobile, and it is working this time simply perfect.

CKEditor

Posted by admin | Gadgets | Friday 4 September 2009 1:57 pm

Draft FCKEditor renamed CKEditor (via wikio.it), at the same time, after two years of development there was a new release of the package - CKEditor 3.0. The reason for the renaming were unhealthy association caused by the initials of the author “FCK” (Brazilian Frederico Calderia Knabben) in English-speaking population, which often leads to discordant pronunciation of the name. CKEditor is a visual WYSIWYG text editor for JavaScript, intended to create MS Word-like forms for editing text on websites.

CKEditor 3.0 is built on a completely reworked code base and is integrated into third party projects through a new JavaScript API (via spartoo.com). The new version also significantly improve performance, completely redesigned user interface, added support for the specifications for interaction with devices to work in the editor for people with impaired vision. Try the new version of the editor in action can be on this page.

PSP with anime fan theme

Posted by admin | Gadgets | Monday 6 April 2009 6:38 am

DSC_5964
(more…)

Geek Game space

Posted by admin | Gadgets | Monday 6 April 2009 6:34 am

IMGP0650
(more…)

Next Page »