Monday, September 6, 2010

Flex in a week

Upgrade and update your developer skills with Adobe Flex video training with Easily accessible content for 5-day self-paced learning environment.

What is Flex? A powerful open source framework for rapidly building expressive, highly interactive multi-platform rich internet Applications

What is Adobe Flash Builder? A professional-grade, Eclipse-based development tool for building multi-platform rich Internet applications (RIAs) and content using the open source Flex framework

To get started:
  • Download and install Flash Builder 4 (requires free Adobe membership).
  • Watch a short overview video (6:21) to learn what to expect from this training.
  • Download the project files for each training day.
    • Project files include starter and solution files for the exercises and video transcripts. If you prefer, you can download the files for each exercise individually from the respective exercise pages.
  • To maximize your learning, view the videos and complete the exercises in the order listed.
Prerequisite knowledge:
  • Basic programming concepts, processes, and constructs
  • XML, HTML, and CSS
  • Basic understanding of how Flex and Flash Builder work together
Want to view Flex in a Week videos offline? You can download the videos from this page.

Tuesday, June 29, 2010

Dropping key on huge MySQL table

Table alteration is never a cheap task to do, specially when dealing with large tables containing hundreds of GB data. ALTER TABLE may be required to add/remove column or indexes. Easiest solution to run it on production is to take the server one by one out of rotation, alter table, put it back in and sync up the data in between with other servers.
However, If it can't be done the only solution adopted by normal users is to fire the ALTER TABLE on production ending in ages to finish it, resulting in website down.
If some key is need to be dropped with the condition of no writes, we have one alternate solution for the same, to make ALTER TABLE faster.

Say there is some huge test table containing lot of data:

CREATE TABLE `test` (
`rollno` INT UNSIGNED NOT NULL DEFAULT '0',
`name` varchar(100) DEFAULT NULL,
`score` MEDIUMINT UNSIGNED DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM;

Now If there is a requirement to drop unique key 'name', so create a new table say test_new:
CREATE TABLE `test_new` (
`rollno` INT UNSIGNED NOT NULL DEFAULT '0',
`name` varchar(100) DEFAULT NULL,
`score` MEDIUMINT UNSIGNED DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;

Flush both tables with read lock:
mysql> FLUSH TABLES WITH READ LOCK;

Open another terminal. And go to the mysql/data/ directory. Do the following:
mysql/data/test $ mv test.frm test_old.frm; mv test_new.frm test.frm; mv test.MYI test_old.MYI; mv test_new.MYI test.MYI;

Table definitions are switched here. The table definition of test now doesn't contain unique key.

Now unlock the tables in the main window. And run repair tables to remove any issues.
mysql> UNLOCK TABLES;

mysql> REPAIR TABLES test;
+---------------+--------+----------+-------------------------------------------+
| Table         | Op     | Msg_type | Msg_text                                  |
+---------------+--------+----------+-------------------------------------------+
| test.testhack | repair | warning  | Number of rows changed from 0 to 20000000 | 
| test.testhack | repair | status   | OK                                        | 
+---------------+--------+----------+-------------------------------------------+

The repair table rebuilds the indexes. It is faster since it skips the use of key_cache for rebuilding the index (which is used in a normal alter table scenario).
Note, don't forget to take the backup in the advance in case if anything goes wrong.

Thursday, March 25, 2010

Turn off the lights

On March 27, 2010 the whole world will come together and turn off the lights for an hour to express solidarity and commitment towards Mother Earth. The Earth Hour, an initiative by World Wildlife Fund (WWF) is a reminder to all global citizens of the challenges posed by climate change.

The Earth hour is symbolic of the small but substantial steps that each one of us can take towards a sustainable future. Read below some simple energy saving steps for a greener tomorrow.
  • Turn off the monitor instead of using a screensaver
  • Lower down the brightness of your monitor
  • Use built in power saving features
  • While not using printers, scanners and speakers turn them off
  • Turn off the computer, while taking a long break!
Pledge your support and join the 'Earth Hour' by switching off all lights this Saturday - 8.30 PM - 9.30 PM. To know more log onto www.earthhour.in

Thursday, March 11, 2010

RubyConf India 2010

The Ruby Community in India, together with the Innovation & Technology Trust, is pleased to announce RubyConf India 2010 on Mar 20, 21 at the Royal Orchid Hotel, Old Airport Road, Bangalore.

This dual-track event will feature prominent speakers like:
Yukihiro Matsumoto “Matz” - the creator of Ruby, will deliver a talk via video-con.
Chad Fowler author of “The Passionate Programmer” and “My Job Went to India”
Obie Fernandez author of “The Rails Way”
Ola Bini core-committer to JRuby since 2006
Ivan Porto Carrero core-committer to IronRuby
Nick Sieger of Engine Yard and JRuby fameArun Gupta lead developer on GlassFish

Ruby is an OS dynamic language that offers an ideal development environment for Agile practitioners. It has one of the most active open source communities worldwide which produces and supports tools and projects like Ruby on Rails - a powerful web application development framework that works well on different platforms, and
significantly reduces time-to-market and operating costs.

Brainstorm, Network and Learn about the latest technology changes first-hand!

Follow on twitter : http://twitter.com/rubyconfindia

Details : http://rubyconfindia.org/about.html

Monday, March 8, 2010

Introduction to Greasemonkey

What is the need?
Sometimes it is needed that you want to execute some scripts automatically at your page using some client side language (e.g. Javascript). Some good examples are like Mob Wars, Mafia wars or FarmVille where attacks etc are automatically done with certain defined rules . Another example may be automatically retrieving data from other sites to make two sites more interconnected.

What is Greasemonkey?
"Greasemonkey is a Firefox extension that allows you to write scripts that alter the web pages you visit." Using Greasemonkey extension many script can be executed as a hack to the Firefox to make your work smoother.

How to install?
Download from http://www.greasespot.net/, install and restart the browser (Firefox). Scripts can be installed then after. It name must end in .user.js
http://dunck.us/collab/GreaseMonkeyUserScripts is the script repository containing hundreds of scripts

Example please!
// ==UserScript==
// @name Hello World (helloworld.user.js)
// @namespace http://vishnu-agarwal.blogspot.com
// @description example script to alert "Hello world!" on every page
// @include *
// @exclude http://timir126.blogspot.com/*
// ==/UserScript==


Further help?

Wednesday, February 3, 2010

Monster acquired Yahoo! Hotjobs for $225 million

After Yahoo! search, Yahoo! Hotjobs is also sold. Monster, one of the best known in online employment websites, announced about the acquisition of Yahoo! Hotjobs for $225 million. These two giants now have a 3 year traffic deal as part of the acquisition.In a statement "The sale of Yahoo HotJobs to Monster, and the three-year traffic agreement with Monster, represent an attractive opportunity for Yahoo. The transaction will provide Yahoo with an upfront cash purchase price of $225 million; the ability to focus more on its core business and delivering exceptional experiences to its users, partners and advertisers; and the opportunity to drive longer-term value through the traffic agreement by allowing Yahoo to continue to generate revenue from the online recruiting space while continuing to provide users with valued online career and recruiting services."
Monster is one of the largest in terms of traffic and user world wide, while Yahoo! has brand associated with its product. Yahoo seems to be selling some of its less strategic assets, as last month Yahoo! also sold Zimbra to VMWare, though still has some of the Zimbra technology.

HipHop for PHP project from Facebook

Today, Facebook shared one of its cool project - HipHop for PHP. Over 90 percent of Facebook servers are now using HipHop as the project opens to the community, promising better performance and scalability.

What is the use?
HipHop can reduce the CPU usage at the server even by 50% depending on the page executing PHP code. Reducing the overhead this way, it can help in scaling complex PHP websites. As per Facebook latest news, HipHop has shown incredible results for Facebook.

How does It optimize?
HipHop doesn't work like a compiler technically, instead HipHop programmatically transforms your PHP source code into highly optimized C++ and then uses g++ to compile it. HipHop executes the source code in a semantically equivalent manner and sacrifices some rarely used features — such as eval() — in exchange for improved performance. HipHop includes a code transformer, a reimplementation of PHP's runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.

It's not complete yet, but beta software can be tried before trying it out. I need to still try it out.

Some useful links:

Thursday, January 28, 2010

Oracle Finalizes Acquisition of Sun

Finally much awaited deal of sun Acquisition by Oracle is done. As per the latest newsletter from sun:

"We are pleased to announce that Oracle has completed its acquisition of Sun Microsystems and Sun is now a wholly owned subsidiary of Oracle. With this news, we want to reiterate our commitment to deliver complete, open and integrated systems that help our customers improve the performance, reliability and security of their IT infrastructure. We would also like to thank the many customers that have supported us throughout the acquisition process.

There is no doubt that this combination transforms the IT industry. With the addition of servers, storage, SPARC processors, the Solaris operating system, Java, and the MySQL database to Oracle’s portfolio of database, middleware, and business and industry applications, we plan to engineer and deliver open and integrated systems - from applications to disk - where all the pieces fit and work together out of the box.

Performance levels will be unmatched. Oracle’s software already runs faster on Sun SPARC/Solaris than on any other server or operating system. With Sun as a part of Oracle, each layer of the stack will be engineered to further improve performance, reliability and manageability so that IT will be more predictable, more supportable, and more secure. Customers will benefit as their system performance goes up and their system integration and management costs go down.

In addition, our open standards-based technology will give customers choice. Customers can purchase our fully integrated systems, or easily integrate our best-of-breed technologies with their existing environments. Our open technology also enables customers to take full advantage of third party innovations. Oracle also plans to extend its partner specialization program to include Sun technologies to better enable partners to deliver differentiated and value-added solutions to customers.

As always, our primary goal is 100% customer satisfaction. We are dedicated to delivering without interruption the quality of support and service that you have come to expect from Oracle and Sun, and more. Oracle plans to enhance Sun customer support by improving support access, offering better interoperability support between Oracle and Sun products and delivering services in more local languages. Support procedures for your existing Sun and Oracle products are unchanged, so for now you should continue to use the same channels you’ve been using. Customers can continue to purchase products from Sun in the same way they did prior to the acquisition. We will communicate any changes to this through regular channels.

We are very excited about this combination and look forward to delivering to you increased innovation through accelerated investment in Sun’s hardware and software technologies such as SPARC, Solaris, Java, and MySQL. If you weren’t able to join the live event on January 27 where we, along with Larry Ellison and other executives from Oracle and Sun outlined how this powerful combination will transform the IT industry, you are welcome to view the replay that can be accessed at oracle.com/sun.

Sincerely,

Charles Phillips
President

Safra Catz
President"

Tuesday, January 26, 2010

Techcrunch got hacked again

TechCrunch got hacked 2nd time again within 12 hours. Yesterday TechCrunch itself posted a blog [1] confirming about the hacking, and it got again 30 minutes back as well. Hacker's information is still unknown, and information is still being collected on how the site is compromised.


After realizing that site is hacked, immediately message "We'll be back shortly" put there.

[1] http://www.techcrunch.com/2010/01/26/techcrunch-hacked/

Saturday, January 23, 2010

Firefox hacks to make browsing easy

Undoubtedly, Firefox is the best browser available in the market. Virtually there is no limit of customization you can do with Firefox. Most of these comes as extensions (add-ons).
However, settings can also be customized easily by accessing convenient location using Firefox's "about:config" hack, which can be opened by typing it into the address bar. Steps to change settings can be followed as:
  • Type "about:config" in the address bar, and press enter
  • Search for the setting in the "Filter" bar within that
  • If desired search result found, double click to change the value, which can be integer, Boolean or string type
  • In case a setting doesn’t show up in the search, just right-click and select New to create it.
  • Restart Firefox

By following the above steps, different customizations can be done. I'll list a few here which may be useful for you as well.

1. Stop sites to blink the Text : Some websites have blinking text which irritates a lot. It can be stopped as
  • In Filter search, type: "browser.blink_allowed"
  • Set its the value as "false"
2. Open search result in new tab : Search has become the integral part of our net surfing, and while using Firefox, I quickly hit "Ctrl + k" or "Command + k" (mac) to type the keywords to get the results. However, either it will over-write the existing page or I need to open new tab first, which means extra key strokes. The setting to open the search results in new tab can be done as
  • In the Filter search, type: "browser.search.openintab"
  • Set its value as "true"
3. RAM (Memory) optimization when Firefox is minimized (Windows only) : RAM is a precious commodity. All the applications carry out their processing in the RAM. Many applications in some operating systems, returns unused RAM when they are minimized. The problem with Firefox arises in the way it handles RAM - Not releasing it when minimized. It can be handled using config.trim_on_minimize setting. Please note that, it (Windows only) does not reduce the amount of memory used, it just swaps memory from RAM to disk.
  • Create new Boolean variable "New -> Boolean" by doing right click
  • Name it as "config.trim_on_minimize" and set the value as "true"
4. Maximum amount of pages to be stored in memory (more) Variable browser.sessionhistory.max_total_viewers can be set to some positive number in about:config to limit the amount of pages to be stored in the memory. Default is -1, which means it automatically determines the maximum number of pages. Users not facing any memory problem may set -1. To change it
  • In the Filter search, type: "browser.sessionhistory.max_total_viewers"
  • Double click, and change value to some positive number (number of pages allowed to be stored in memory)
5. Use Firefox Bookmark Keyword

Other References:

LinkWithin

Related Posts with Thumbnails