Skip to main content

Posts

Showing posts from May, 2013

How to find the top 2 salaried employees in each department

Let us take the table having different departments Table Name:-  employee +------+------------+------------+--------------+ | id | dept_name | emp_name | salary | +------+------------+------------+--------------+ | 1 | ECE | Raj | 10000 | | 2 | ECE | Ravi | 12000 | | 3 | ECE | Malli | 14000 | | 4 | CSE | Madhav | 12000 | | 5 | CSE | Jaani | 14000 | | 6 | CSE | Jack | 15000 | | 7 | IT | Mill | 16000 | | 8 | IT | Pawan | 17000 | | 9 | IT | Jack | 18000 | +------+------------+------------+--------------+   From above table for top 2 salaried employees see below query

Difference between LEFT and RIGHT OUTER Joins in SQL, MySQL Join example

There are two kinds of OUTER joins in SQL, LEFT OUTER join and RIGHT OUTER join. Main difference between RIGHT OUTER join and LEFT OUTER join, as there name suggest, is inclusion of non matched rows. Sine INNER join only include matching rows, where value of joining column is same, in final result set, but OUTER join extends that functionality and also include unmatched rows in final result. LEFT outer join includes unmatched rows from table written on left of join predicate. On the other hand RIGHT OUTER join, along with all matching rows, includes unmatched rows from right side of table. In short result of LEFT outer join is INNER JOIN + unmatched rows from LEFT table and RIGHT OUTER join is INNER JOIN + unmatched rows from right hand side table. Similar to difference between INNER join and OUTER join, difference between LEFT and RIGHT OUTER JOIN can be better understand by a simple example, which we will see in next section. By the way joins are very popular in SQL interviews, a

How to Compress Image Size without Change in Quality

Do you want to compress or optimize your images size before uploading it into your WordPress posts? If yes, this post is specially for you to reduce your bandwidth and unwanted loading time due to the no. of images containing in the post. In addition, the compressed images can also help you to improve your SEO rankings. The minimum loading time your WebPages have the better ranking you will get. Compress Images for WordPress. Having high quality images (as images size: +1 MB) into your webpages give the bad user experience. If you are using three or four such type of images in a webpage, it will load more slower. Keep in mind, everyone doesn’t surf the internet with more than 2MBps. There are a lot of users who surf the internet over GPRS (2G) or a limited data plans. You can’t ignore them. You should make your post for everyone (i.e., for 2G, 3G, 4G users). There are many image compressors that reduce the size of your high quality images without losing quality. We have als

Try out natural remedies to cure skin problems

Are you looking for some natural remedies to get rid of skin related problems. Try out rose water as it helps in removing skin clogs and blackheads or you can also opt for aloe vera pack for glowing skin. Navin Sharma, head of research and Development at Cholayil Private Limited shares some useful tips that can help in attaining a "healthy" skin. Pearl pack: It improves the skin texture, balances moisture and makes the skin glow. It helps reduce dark marks, pimples and acne. It can be used both in form of paste and powder. Pearl helps in minimising the large pores on the skin and therefore reduces redness. Rose water pack: Wash your face regularly with rose water for softer skin. It effectively removes skin clogs, blackheads and reduces stickiness from the face. It helps clear all the impurities and dust. Rose oil contains anti-inflammatory properties. Proper face massage with rose water will remove excess oil in the skin, keeping it evenly moisturised and exfoliated, thus re

Nokia to unveil new Asha models in coming days: CEO

Nokia will unveil new models in its Asha range of mid-tier phones, after first-quarter results showed a sharp fall in sales of mobile phones while management focused on boosting sales of Lumia smartphones. We are continuing to renew our portfolio,which includes plans to announce innovation and new products in the Asha line in the days immediately ahead, Chief Executive Stephen Elop told investors at an annual general meeting on Tuesday.

HSBC profits nearly double as costs and bad debts fall

HSBC aims to keep the pressure on costs after first-quarter earnings nearly doubled due to the bank's three-year efficiency drive and a halving in bad debts charges. The jump in profits reinforces HSBC's position as one of the strongest global banks after the financial crisis partly as a result of a radical overhaul to simplify its sprawling structure and improve profitability. Its strong focus on Asia, which generated around two-thirds of profit in the first quarter, has also helped offset a harsh business environment, particularly in the euro zone. Europe's largest bank moved faster and more aggressively than many of its peers to cut costs after the crisis. And it will continue to wield the knife - with a further 6,000 job cuts expected this year from businesses already put up for sale, on top of 40,000 already culled. HSBC has closed or sold more than 50 businesses since 2011. "We're moving into calmer waters but there are still challenges ahead," Chief Exe

Case against Dhoni for hurting sentiments

As reported by news agency PTI, a case has been registered by a Bangalore court against Indian cricket team captain MS Dhoni for allegedly denigrating a Hindu god and hurting the religious sentiments of the Hindus. The image in question had appeared on the cover of the April 14th issue of Business Today magazine which is published by the India Today group. The image appears to have been created by the magazine and it is not clear whether Dhoni posed for the photograph or if he provided his consent for the image. Hiremath had alleged that by posing for an advertisement in a business magazine as Lord Vishnu holding several things including a shoe in his hands, Dhoni had denigrated the Hindu god and hurt religious feelings of the Hindus. Taking cognisance of the offence and registering the case, the court has posted it to May 12 for recording of the statement of the complainant.

Rise of young voters shifts Malaysia election balance

KUALA LUMPUR (Reuters) - Malaysian Prime Minister Najib Razak escaped a direct showdown with youth when a 23-year-old student gave up his bid to challenge him in his home constituency in the May 5 general election. But Mohammed Bukhairy Mohammed Sofian's quixotic plan to run against Najib -- which he dropped to avoid diverting votes from the main opposition candidate -- was a reminder of how young voters are shaping politics in the Southeast Asian nation as never before and unnerving the long-ruling coalition. He is one of 2.6 million Malaysians registered to cast their ballots for the first time, making up roughly a fifth of Malaysia's 13.3 million eligible voters. That is much higher than the 638,000 new voters five years ago. Analysts say an upsurge in interest in politics following the opposition's best-ever election showing in 2008 has driven more young people to register. Their numbers make young Malaysians a crucial, possibly decisive, source of support in an electio

New gene therapy trials aim to mend broken hearts

LONDON (Reuters) - British scientists are stepping up clinical tests of gene therapy in a bid to help people with advanced heart failure pump blood more efficiently. Researchers said on Tuesday they planned to enrol patients into two new clinical trials using Mydicar, a gene therapy treatment made by privately held U.S. biotech company Celladon. After more than 20 years of research, the ground-breaking method for fixing faulty genes is starting to deliver, with European authorities approving the first gene therapy for an rare metabolic disease last November. In the case of heart failure, the aim is to insert a gene called SERCA2a directly into heart cells using a modified virus, delivered via a catheter infusion. Lack of SERCA2a leads to ever weaker pumping in people with heart failure. Although drugs offer some relief, there is currently no way of restoring heart function and the prognosis for those with advanced disease is worse than for many cancers. One of the studies, led by scien

YouTube paid subscriptions from next week

As speculated earlier this year, Google is all set to start the paid subscription model for YouTube and is looking for launching that as soon as next week, according to a new report . Google reportedly is looking for an optional model, which will involve free videos and services as we see today along with paid subscriptions to channels as well. To start with Google will be going in with 50 odd paid channels being made available for subscriptions and users would be able to subscribe to them for $1.99 or Rs 100 as the starting price. The on demand content method will be a great new addition for content providers who struggle with advertisements and other monetizing methods for creating revenue. The subscription model is likely to be adopted for online service to begin things with but will eventually be made available for mobile devices such as smartphones and tablets. YouTube today is a popular source of entertainment for mobile devices and Google can certainly not overlook this oppor

Law Minister made changes to coal scam report, says CBI

NEW DELHI: Law Minister Ashwani Kumar, Attorney General G.E. Vahanvati and PMO and coal ministry officials proposed changes to and even deleted portions from the CBI’s status report on the probe into the coal scam. Ranjit Sinha, Director of the Central Bureau of Investigation, today filed a nine-page affidavit in Supreme Court and said that the law ministry removed a paragraph critical to the Prime Minister’s Office. According to news channel CNN-IBN, Kumar met Prime Minister Manmohan Singh after the CBI filed its affidavit and admitted he made changes to the coal probe report. In the affidavit, CBI Director Ranjit Sinha also said that "there was no deletion of any evidence against any suspect" and the "central theme of the status report" was "not changed".  Sinha said the CBI's tentative findings that the screening committee which scrutinised applications for the allocation of coal blocks had not prepared a broadsheet or chart for its evaluation, was

Judgment reserved on Jagan bail

New Delhi, May 6: Arguments on the bail petition of the YSR Congress chief Y S Jaganmohan Reddy concluded in the Supreme Court on Monday. The court which the heard the arguments of the CBI's counsel Ashok Bhan who said Jagan should not be given bail as the investigation was in a key stage and Jagan's lawyers Harish Salve and Mukul Rohatgi who charged the CBI of overstepping his authority, reserved the judgment. The supreme court judge asked the CBI to state why extension of Jagan's custody was necessary. Jagan's lawyers  had pointed that the CBI putting forth contradictory arguments in the high court and the Supreme Court. Stating that being a MP and the president of a political party Jagan would not run away, Jagan's counsel asked for at least interim bail. Senior lawyers Harish Salve and Mukul Rohatgi who argued Jagan's case, pointed that the CBI told the high court that Jagan's custody was needed on seven issues and in the Supreme Court that no custody wa

Alternatives to Jeans for the Denim Addict

We are always in for experimenting, breaking the monotony, going that extra mile to look meticulously stylish. Hold on to that thought though. If you’re walking that mile in jeans, take a step back. We know you love those denims, we all do. But let’s give that eternal love some rest and explore greener pastures, wider horizons, because the world of fashion is ever evolving. So why should we stay behind? Let’s get rid of our jeans addiction and jump into other bottoms that are cool, comfortable and super stylish. We give you some of the coolestalternatives to jeans: Linens The best replacement for denims in this hot, scorching weather is linen pants. Thesecool white pants that will hang smoothly from your waist are perfect for those afternoon outings. They don’t stick to your skin, they prevent sweat and are comfortably classy, and they are white! All essential adjectives your summer wardrobe needs. Shorts If you can wear jeans casually, why can’t you wear shorts casually? And we don’t

Types of Shoes to Consider For Running

Running shoes manufactured by high-end brands usually cost a fortune which is why you must make sure that the shoes you want are the shoes you need. If you are passionate about running and are willing to shell a huge amount for a certain brand of shoe, you should know which kind will be the most suitable for you: Motion Control Running Shoes These types of running shoes are for people who don’t have an arch on their feet. Even if there is, it is very low and such folks are said to have flat feet. Motion Control Running Shoes help their feet so that they don’t rotate inward and thus avoid over-pronation. Flat  feet  are a cause for injuries, especially while dancing or running. Motion Control Running Shoes provide stability and help people with flat feet put their best foot forward. The sole is made broader and a little heavier. Stability Running Shoes As the name suggests, Stability Running Shoes are for people with normal feet i.e. feet with a medium arch and not flat from the toes to

Gambhir, Yuvraj out of Champions Trophy squad

MUMBAI: Experienced batsmen  Gautam Gambhir  and Yuvraj Singh  were left out of India's 15-man squad for the Champions Trophy, the  Board Of Control For Cricket In India (BCCI) said on Saturday. Left-handed opener  Shikhar Dhawan , who last played a 50-over match for India in June 2011, got the nod ahead of Gambhir while wicket-keeper batsman  Dinesh Karthik , who can also open the batting, was recalled after almost three years. The other opener in the squad,  Murali Vijay , was a surprise inclusion as the right-hander last played an ODI against South Africa in January 2011 and has failed to score a fifty in his 11 matches in the format. Yuvraj, who made a fairytale comeback last year after battling a rare form of lung cancer, could not find a place in the middle-order with selectors preferring right-handed batsman  Rohit Sharma  ahead of him. Fast bowler Umesh Yadav returned from his back injury while all-rounder  Irfan Pathan  also got a recall. Off-spinner  Ravichandran Ashwin  

Bansal, PM should go over bribery case, says BJP

New Delhi, May 4 (IANS) The  BJP  Saturday sought the resignation of  Prime Minister Manmohan Singh  and  Railway Minister Pawan Kumar Bansal  after the latter's nephew was arrested for allegedly taking a bribe of Rs.90 lakh to ensure the promotion of a top  railway official . "We not only demand that  Bansal  be sacked, he should be prosecuted by CBI under 13 of  Prevention of Corruption Act . If any public servant abuses his position to obtain benefits for himself or any other person, he or she is to prosecuted and convicted," BJP spokesman Ravi Shankar Prasad  said here. The Central Bureau of Investigation (CBI) Saturday arrested Bansal's nephew  Vijay Singla  and three others in Chandigarh for allegedly taking a bribe from the railway official. A total of six people have been arrested so far, CBI said. Singla, a businessman who is Bansal's sister's son, his friend Sanjay Goyal and two others were being brought to New Delhi and will be produced in court. Si

After spat, Gambhir says he respects Dravid

Kolkata:  Aggression is good but not when you get into a verbal duel with the likes of Rahul Dravid. In the heat of battle. Kolkata Kinght Rider skipper Gautam Gambhir learnt his lesson the hard way as his spat with Dravid seems to cost the southpaw more than what he expected as social networking sites were abuzz with the incident. With his image taking a beating, a shaken Gambhir sought to clear the air by tweeting that there was no spat and he always respected Dravid. "Guys, you have got it all wrong. No harsh words exchanged between me and Rahul bhai. He was and will always be a respected teammate. No fuss please," Gautam wrote on his Twitter page. Taking a dig at how the incident was being handled, Gambhir in another tweet wrote: 'Guess we are always obsessed wid some drama or spice. Sorry none existed between me and rahul. Always respect him.' Things got ugly on Friday at the Eden Gardens after an altercation between Shane Watson and Manvinder Bisla saw skipper G