Learn

Monday, July 8, 2013

Alexey Ragozin: HotSpot JVM garbage collection options cheat sheet (v2)

JVM Architecture Specification Basic The Heap Area Introduction, teach about the JVM Heap Area in details
http://www.youtube.com/watch?v=c-A7ZzxjWUI

JVM Architecture Specification Basic The Method Area explained, teach about the JVM method area
http://www.youtube.com/watch?v=a5GzF2fSSCE

Saturday, June 22, 2013

Youtube views for free


Earn money with us, Increase the youtbube views, get 100 view free, 50 subscriber free, comments free, youtube earning , online money,Buy YouTube views, likes, comments to your video and subscribers to your channel cheap, fast, safe, and 100% guaranteed. Get Your video go viral easy.

How To Make Money At - YouTube



The view Increase


  1. earn by youtube
  2. earn in youtube
  3. how to earn with youtube
  4. earn on youtube
  5. how to get views youtube
  6. get youtube views
  7. youtube get views
  8. Free YouTube Subscribers.

Thursday, June 20, 2013

Here is the list of 7 alternatives of PayPal payment gateway for users in India.

Skrill.com
Moneybookers is a British e-commerce business that allows payments to be made through the Internet. For individual users, the Moneybookers payment system offers an online deposit account and a low-cost, internet-based alternative to traditional money transfer methods such as cheques, money orders and wire transfers. To merchants, Moneybookers allows accepting online payments made with major payment cards or Skrill's own online accounts.
www.skrill.com

Xoom.com
Xoom Corporation is an online money transfer company based in San Francisco. It provides consumer remittance services to the Philippines, India, Latin America, Europe, Australia, Canada, and South Africa. The company was founded in 2001 and is backed by venture firms including Sequoia Capital, New Enterprise Associates, SVB Capital, and Fidelity Ventures.[1]

Payza.com
Payza is an e-commerce business that allows payments to be made through the internet between users who have registered for the service (Payza members). For personal users, it is a method for transferring money internationally and a platform for the purchase of goods and services online. For merchants, Payza is an online business management tool which they can use to process payments, issue invoices and make payouts.

PayPal.com
PayPal is a global e-commerce business allowing payments and money transfers to be made through the Internet. Online money transfers serve as electronic alternatives to paying with traditional paper methods, such as checks and money orders.
PayPal is an acquirer, performing payment processing for online vendors, auction sites, and other commercial users, for which it charges a fee. It may also charge a fee for receiving money, proportional to the amount received. The fees depend on the currency used, the payment option used, the country of the sender, the country of the recipient, the amount sent and the recipient's account type.[4] In addition, eBay purchases made by credit card through PayPal may incur extra fees if the buyer and seller use different currencies.

CCNow.com
With the CCNow hosted shopping cart, there’s no need to struggle with setting up complex shopping cart software - just create a product and go!

Tuesday, June 18, 2013

How they pay out the interest for the F.D


  • If you close your FD before maturity; you get the interest applicable for the period the FD was in force. Usually the interest rates for FD < 1 yr is ~ 6% and for >= ` yr it is 8.5-9 % 
  • If FD is held till maturity, one gets full compounded interest on the principal. If one breaks FD before maturity, then the interest earned will be lessened by 1% (varies from bank to bank).Say if one books an FD with 9% interest for 3 yrs. At the end of three yrs, he will get compounded interest @ 9% per annum on his principal. Say if he breaks the FD after 2 yr 11 months, then he will get compounded interest @ 9 – 1 = 8% per annum for the tenure of 2 yrs 11 months. The penalty % to be deducted varies from bank to bank, but may not cross 1% for most of the banks.Once an FD is created, one can't withdraw the interest or principal before maturity without breaking the FD. So if FD is booked for 5 yrs, then principal and compounded interest will be available only after 5 yrs – unless you want to break the FD in between.

WHY YOUTUBE IS IMPORTANT

YouTube is home to some of the largest libraries of video content on Earth. A single video on YouTube can be seen by tens of millions of people in the span of a week. Once a video or a channel gets subscribers, it’s only a matter of time before the viewership, and the potential to generate positive marketing buzz, goes up. Some people have turned their YouTube channel into their full time job, and earn a living that well exceeds what you’d expect to make. The secret to YouTube’s success relies in its ability to stand out of the way when users want to generate and display content. YouTube puts the power of video creation and marketing in your hands; while you handle the creation, you can let GetSocialJuice take care of the marketin

  • YouTube gets 1 billion unique visitors every month from 53 different countries around the world.
  • YouTube registered 1 trillion views in 2011.
  • 25% of YouTube traffic comes from mobile devices.
  • YouTube applications come standard with many Android and Blackberry devices worldwide.

WHO VIEWS YOUTUBE?

YouTube is a unique content provider for many reasons. While the primary demographic of users will be within the age 18-30 range, you will find that there are audiences that span across many different cultures, age groups, religious backgrounds, careers, and other categories. YouTube is one of the most popular destinations on the Internet, so much so that Google purchased it for $1.65 billion USD in 2006. Their plan was to hone what makes YouTube great, and to continue to allow more avenues for content creation. So far, they have been successful, as well over a billion users visit YouTube every day to find new videos to comment on, like, and share with friends.
The same demographics that use YouTube are also often connected with Twitter, Facebook, and Google+ too. Do you have a social networking account that you need to promote? You can cross promote new videos with your social networking profile, and get more YouTube likes than ever before. This collaborative marketing strategy works well with GetSocialJuice, because we can work with you to both increase your social media subscribers and get more YouTube subscribers as well. We can help to turn your whole marketing presence into a well oiled machine that will catapult your brand to the top.

WHY FACEBOOK IS IMPORTANT

Facebook has almost 160 million users registered in the United States, who are Liking, Sharing, and Commenting on links every day. The market penetration of Facebook has been incredible; in the first quarter of 2012, it was estimated that 12.1% of the world uses the site across every continent. Those numbers are staggering, but not nearly as staggering as what Facebook can do for your business. Companies who actively engage consumers on Facebook can generate a huge increase in leads. 62% of marketers have said that social media sites like Facebook are not only important, but increasingly critical within the past six months. If you are a business, an artist, a politician, or just someone who relies on social media for your career, you need Facebook fans to compete


  • 77% of B2C companies, large and small, have generated leads thanks to Facebook.
  • 77% of buyers are more likely to do business with a company whose CEO uses social media like Facebook.
  • Inbound leads, such as what social media marketing generates, cost as much as 61% less than outbound alternatives.
Social media is the reigning king when it comes to the new age of marketing, and Facebook is a kingdom unto itself. With GetSocialJuice as your guide, you can generate more likes for Facebook that you can convert into real sales. Staying competitive these days means having a strong social presence on sites like Facebook, because consumers respond to businesses that engage them on their own terms. Facebook and other sites allow consumers to freely share links and interests with all of the people that they’re friends with, which creates an avalanche of attention and marketing response that you can’t find anywhere else



Tuesday, June 4, 2013

Investing in SIP

Ways to start SIP ,
1) Demat account , not preferable , you may need to pay yearly monthly charges
2) Go to specific bank
3) Buy online
4) Go to CAMS (where you can buy  SIP of different kind at one place except RELINACE SIP  ) , I feel this is best way as it does not charge you anything and at one place you can buy all kinds of SIP , E.G , DSP BR , HDFC , BIRLA  etc .
Address – Its  near to Manipal centre , Dikenson road , ½ km from MG road petrol pump .
5) For reliance MF go to Manipal centre (address mentioned above )


Documents needed ,
1) PAN copy
2) Bank Cheque  of the bank from which you want to get  automatic money transaction for  every month
3) Now a days KYC  ,If you don’t have you can get it done through banks /CAMS .
4) Filled Mutual fund form , which can download or can get from the CAMS/RELMF center  .


Funds to buy ,
It depends on risk appetite ,
Riskier one’s are  the one  which is small and mid cap funds   , Sector oriented funds like some would power sector , some pharma funds etc .

Safer one’s (lesser gain and lesser loss) – LARGE CAP / BLUE CHIP FUNDS ,funds which invest in mostly big companies . , Balanced fund where only part of your money is invested in equity , funds which is diversified .

Gold ETF’s are also available , which is kind of paper gold ,--e.g –benchmar gold exchange traded fund .


For online info ,
http://www.onlinemutualfundsindia.com/
http://www.mutualfundsindia.com/

can we transfer amount to SBI ppf online

From 1st of Jan this year, SBI has activated online access for all its PPF account. The username is sent to the registered mobile and the password will be mailed to the residence address

Yes, you can transfer. In this case I think you need to visit to Bank and get updated your PPF a/c book to show as proof

LIC or PPF or MF

investments in LIC is a misnomer.


LIC should not be an avenue for any investments.
it is an insurance company.

for investing in MF, a demat account is not absolutely necessary.
so, from the options listed below, you are left with PPF and MF.

PPF: has a lock-in period of 15 years. it is best to open a PPF account now and start depositing small amounts every year, and increase your deposit amount as you move closer to the 15-year endpoint.
the returns are completely tax-free.

MF: other than ELSS(lock-in period of 3 years), every other equity Mutual funds can be redeemed anytime.
returns are linked to market conditions.
choose a MF product which has a reasonably good longterm track record and invest systematically (SIP)

Keep insurance and investment separate!! Buying a term insurance allows you to do this ,Insurance is an EXPENSE, not an INVESTMENT! You DON'T WANT to get any returns out of insurance

Beyond that, LIC is a reasonable option for insurance (term insurance only!) due to their somewhat more liberal payout policies. (Watch the movie "The Incredibles" to understand what I mean!) But private insurance companies are cheaper, and due to strong regulatory practices, there isn't much of a risk of a private insurer going bankrupt.


The problem with ULIP is that you are forced to invest money year-after-year in the same bucket of funds no matter how they perform and the insurance cover is often poor for the money you pay. And you don't have the choice of NOT investing in a particular year if you have some other big-ticket expenses to take care of. Getting out is difficult too. Having said that, there's some evidence that you could come out a winner if you stay invested over a long term, but that'll need expertise and strong will that most of us don't have. And then, you can do as well - or better - in a simple stock index fund without the accompanying worries and risks! And you can invest as much or as little and in whatever fund you choose. You can take out money too if you think the market's gonna crash! So no ULIP!!! ULIP's are good only for the insurance company and the agent. The agent makes a fat commission in the first few years on a ULIP policy. He makes very little on a term policy. So you know where his/her interests lie

Gold ETF or Gold FoF

Gold mutual funds are nothing but Gold Fund of Funds(FoF) or Gold Savings Funds which invests in Gold ETF. Gold FoFs will have an additional 0.5 to 1.25% expenses per annum on top of Gold ETF. The return of Gold mutual funds are also directly proportionate to the gold price in the market but with an extra expense of Gold ETF & Gold FoF expenses per annum i.e. max 2.25% per annum. If you still compare this with owning of gold coins or ornaments the return is safer and transparent in terms of value of Gold

If you are looking for buying gold without the overhead of making changes and wastages (associated with ornaments), Gold ETF is the right option.

Gold mutual fund would also invest in companies that are involved in the extraction of gold from the mines etc. The returns of Gold mutual funds have been bad in recent times

Gold FOF mutual funds invests money in Gold ETF(usually belonging to its own fund house). But Gold ETF buys the gold in the commodity market & it has its own custodian for physical gold.

Gold ETFs can be bought only if you have demat account as they are listed in stock market. For opening Gold FoF you need not have to have any demat account, you can buy directly from any mutual fund houses or through any mf agents.

Gold ETF expense ratio would be less than 1.5%. Even Gold FoF has its own expense ratio below 1% but this will add on top of Gold ETF expense ratio.

In summary if you have demat account buy Gold ETF in open market or else buy Gold FoF through MF houses. You can buy either Quantum Gold ETF or Quantum Gold Savings fund based on your requiremen

Rajiv Gandhi Equity Savings Scheme

Full details of how to invest is RGESS is available from the National Stock Exchange.


In short you need to be a "first time" investor ie new demat account with no trades so far and can invest in eligble exchange traded/list equity / mutual funds to a max limit of Rs 50K to get a Rs 25K tax deduction

saving options

PPF:
-- 9% interest
-- 15 yrs lock-in (However you can withdraw some portion after 7 years).
-- Interest earned is tax free (No TDS).

Recurring Deposit:
-- 8.5% (vary bank to bank, but interest rate is closer to FD)
-- Ideal for small amount periodically
-- Interest is not tax free. Even though bank will not deduct TDS
Individuals are required to show them in ITR and pay tax based in tax bracket

FD:
-- 9% (vary bank to bank and also based on tenure)
-- Ideal for lumpsum investment
-- Interest is taxable based on tax bracket (Bank will deduct TDS unless 15G form is submitted)

Insurance/Pension plans
-- These are not investement plans in the first place. These plans should only be used to buy protection.
Buy pure term insurance plans as insurance. Buy insurance for the earning member of the family only.
Non-earning members are the nominees or beneficiaies.

With reference to investment, if the intention is to avoid tax, please use PPF/VPF (Voluntary
provident fund). VPF is even better than PPF in terms of return (0.5% extra) with no tax on interest.

Once tax related investments are done, think of following as long term investment options

1. Buy equity/Mutual Fund. Return on this is tax free after one year. One can invest in SIP (fixed amount
monthly) for pension corpus. In long term, equity return is better than FD return and also tax effective

2. Try investing in Bonds/NCDs (Non convertible debenture) which are traded in stock market. Once RBI starts
reducing interest rate the value of Bonds/yield will go up.

3. Real estate. Minimum holding must be 3 years to avoid tax in case one makes profit by selling off.

4. Also, one can look at stocks directly. Dividends received from shares are completely tax free apart from
long term capital gains. Many good stocks are available at resonable prices today with 5-6% dividend payout.


TAX Exemption on Housing Loan April 1 ,2013

Your home loan should be less than 25L
Your home price should not exceed 40L
Your loan should be sanctioned after April 1 ,2013

About Stem Cell banking concept, new born

  • Its quite new in India and worldwide it is more of at an inception & research state.
    1. Its storing procedure for pro-longed  period (15-25 years)  in India is not guarantee. The infrastructure for such long storage is not warranted.
    2. For an abnormal birth or child with anomalies, it might be immensely helpful.
    3. It is an expensive proposition , so it you have money to invest , you may or if you cannot invest there is no loss.
    4. 15-25 years is a long duration , and who knows something new and better might crop in.
    5. Personally doctor dint support nor suggested this endeavor and also did not guarantee its fruitful (medical) return on investment.
    6. The stem cell collected from the first child can also help others in the family more so for the subsequent child.
    7. It is stored only for 15-20 years and genetic diseases may not show up within that time frame.
    8. Stem cells can be extracted from grownups also like from base of tooth etc
    9. No major treatment that has been proven viable with stem cell, most things are in lab yet.

    10. refrence 
    11. http://www.cordlife.com.
    12. Stem Cell preservation with the relicord and Cryoba

    Most cost efficient way to call US mobile #'s from India


    1. If you got Vonage from US then you can still use it in India paying the same rent in $$ using your US Bank/India Cr. Card.
    2. You can install ‘viber’ on your iPhoone and then call other ‘viber’ user from India to U.S.
    3. Use actionvoip to call to US and Europe.
    4. install apps like Vonage, MagicJack, etc… on your mobile and get free calling to any number in US and Canada
    5. Activate your Google voice account or use Skype

    Education Loan FAQ

    The EMI starts after 6 months of course completion or when you get job (Whichever is earlier). 

    During the study period the interest charged is simple interest. But after the completion of course, it becomes compound.

    Say you took loan or 2 Lakh and you drew 1 lakh for the admission and the other 1 lakh for 2nd year fee. Rate of interest assume is 10%. 

    During 1st year interest :- 10,000 (10% of 1L)
    During 2nd year interest :- 20,000 (10% of 2L)

    But, after completion of course the interest charged becomes compound (i.e interest will be charged on 2.3L).


    Also, there is an option of paying the interest during the study period only (in the above case repay 30k before study completion i.e 1250 per month repayment) .The bank gives 1% rebate on the interest rate if anyone opts for this.

    Pros and Cons of buying a west facing flat

    If you have all the windows and balcony facing west, you should note that it gets much warmer in the evenings due to direct sunlight

    good known homeopathic doctor around bangalore

    try these options

    1. Bakson Homeopathy1. http://bakson.net/landingpage.html
    2. http://centreofhomeopathy.com/
    3. http://www.krupahomoeo.com/index.html 

    Suggest HD setup box connection

    Which one should be good HD connection north Indian package ?


    My suggestion Videocon d2h.

    I got a good deal, it costed Rs.5990 for 1 yr subscription of Platinum HD pack which has all channels including HD.
    Also the HD setup box comes free with this deal

    Lost My Samsung S3 , How to get the IMEI number

    Lost My Samsung S3,how to get the IMEI number

    If you have ever connected your mobile with the Samsung Kies on your machine, then ur IMEI number is stored in the registry of your system.
    You can retrieve it from HKEY_CURRENT_USER\Software\Samsung\Kies\DeviceDB\x

    IMEI number can be retrieved from your google account if you have ever set it up on S3.
    Go to account->dashboard->Devices 

    Best Medical insurance Policy

    Apollo Munich and Max Bupa seem to have captured the market, cant be sure whether it's best or not

    Authorized HTC Service Center

    Feedback on term plans

    Definition of unfair business practices from the article in economic times:
    "The complaints against insurance companies for selling policies by making false lucrative offers at the point of sale are put under the category of the unfair business practices"

    The case of false lucrative offers may apply more to money-back policies than term policies. As in term policies, they won't be any money returns or surrender value.

    When going for term plans, it is better to check the claim-settlement ratio of the insurance companies. The below link gives the no.s for money-back + term policy settlements combined together.

    http://www.bachatkhata.com/2012/02/claim-settlement-ratio-for-life-insurance-companies-for-2010-11.html

    One more aspect to consider is the rider benefits we get for each term policy. There is a general advice not to club health riders (Accidental death, critical illness, Disability) with term insurance. Instead, better to go for a Health insurance policy separately that will address these needs.

    Reg splitting insurance money – Right now whatever amount we get insured for, we will have to reassess this amount in future – when our responsibilities, liabilities increase + the inflation factor. Personally I think, better to for one insurance policy now keeping in mind our current liabilities. And in future (next 5-10 yrs or more) when we feel there is substantial change in our requirements, we can take one more policy from a different vendor



    Best place for burgers in Bangalore ?

    These are the places around bangalore for Burger Lovers

    1. Peppa Zzing in infantry road. From regular burgers to monster burgers to whammy’s, you get everything there
    2. Truffles in kormangala
    3. Thulp Kormangla

    How to copy multiple lines in VNC

    How to copy multiple lines in VNC  ?

    Select a few lines (highlight them) then scroll to the page you want to select text till (you can use shift + page down) then hold shift and right click to the point you want to select the text.


    How to get Passport for 1 year old

    Procedure:

    0)      Download the form from passportindia.gov.in
    1)      Upload it to passportindia.gov.in after filling the form
    2)      Get the Application No. Take a printout
    3)      Take copies of all the required documents
    4)      For minors there is no need to reserve an appointment  in PSK. For Bangalore PSK, walkin at 9AM.

    Documents required:
    0)      Father and Mother’s passport. This will be used as address proof as well.
    1)      Birth certificate.
    2)      A photo, passport-sized.

    Few points to be noted

    1. Appointment for minor (less than 4yrs) is not required - only in Tambaram PSK in chennai. Rest all PSK’s appointment is mandatory
    2. Either of parents should have valid passport with spouse name added   --  is mandatory
    3. Address proof – Need to submit valid address proof of current address (if your passports are from AP) - Mandatory
    4. Date Of Birth certificate  - Mandatory

    How to apply for ration card?

    How to apply for ration card?

    Appy online, don't trust third party


    How to choose a good helmet ?

    Using open-face helmet is not suggested. You should choose a helmet such that it covers your brilliant brain and your Closeup tooth. So, make sure it has a jaw cover as well. Very Very important

    LS2 helmets are excellent

    LS2 are good helmets indeed, and their price fits the bracket too. If you are a bit inclined towards the designs and all , you may want to look at SOL . Apart from that AVG helmets are really good too. There is just one problem with LS2 though,  on high speeds you will feel a push sideways, whereas that’s not there with AVG ( and SOL , not sure abt SOL) . Considering you’r a RE rider , you would be cruising and not speed riding , so LS2 / SOL would do the job perfectly

    Voter id card not received

    if you have not received the voter cards, then Search for your name in the url 


     

    Best Places to Visit in June (one week trip) Bangalore

    Here are the few places that can be visited in the Bangalore in the month of june 2013

    Option 1

    If you love rain + forest you can try the following,

    1. Chickmagalur – Covers Mullayangiri [safe as per my knowledge], Baba budangiri, Kemmangundi.
    2. Dandeli – Tiger reserve with white water rafting and thick forest.
    3. Agumbe –  Sunset point [Ghat section]. 


    During rainy season water fall is a treat to watch

    1. Amboli waterfalls [nice place there are lot of lodges/hotels/resorts around. Falls is on main road so looks safe] – Border place of Maharashtra – Karnataka.  
    2. dudhsagar waterfalls [you have to treak to reach the falls so family is not advisable] 
    3. Jog falls
    4. Sathodi falls and magod falls
    5. Gokak falls


    Please do your planning in terms of safety, stay, route if you are planning to visit.

    Option 2

    If you want to travel and not stay in one place then here’s the route with days to stay:

    Start –Bangalore to Hubli/Dharwad –to Karwar (either Karwar/Gokarna stay for 1 or 2 days places to visit is Yana, Gokarna beaches, and few nearby places of your interests) – Murudeshwara (beaches and Shiva temple—either stay or travel to Udupi)— Udupi (Krishna temple, near is Malpe beach and also a good visit will be to St Mary’s Islands) – Mangalore (Ullal beach – but be careful here as the sea is very dangerous best will be not to venture at this beach itself) –Coorg (last leg of the trip can stay here for 2 days max if you want to see rain gods at its closest—but in hills don’t venture without local guide and also at this time of the year there‘ll high density of leeches, so be bit careful)—back to Bangalore.

    After planning this, if you have time left for 2 to 3 days, then, you can add Goa which will start after Hubli and after Goa to Gokarna.





    Wednesday, May 29, 2013

    At the Interview | Top Ten Mistakes Candidates Make

    #1 | Practicing on a Computer
    If you were training for a serious bike race in the mountains, would you practice only by biking on the streets? I hope not. The air is different. The terrain is different. Yeah, I bet you’d practice in the mountains.
    Using a compiler to practice interview questions is like this - and you’ve basically been biking on the streets your entire life. Put away the compiler and get out the old pen and paper. Use a compiler only to verify your solutions.
    #2 | Not Rehearsing Behavioral Questions
    Many candidates spend all their time prepping for technical questions and overlook the behavioral questions. Guess what? Your interviewer is judging those too! And, not only that - your performance on behavioral questions might bias your interviewer’s perception of your technical performance. Behavioral prep is relatively easy and well-worth your time. Looking over your projects and positions and think of the key stories. Rehearse the stories. See pg 29 for more details.
    #3 | Not Doing a Mock Interview
    Imagine you’re preparing for a big speech. Your whole school, or company, or whatever will be there. Your future depends on this. And all you do to prepare is read the speech to yourself. Silently. In your head. Crazy, right?
    Not doing a mock interview to prepare for your real interview is just like this. If you’re an engineer, you must know other engineers. Grab a buddy and ask him/her to do a mock interview for you. You can even return the favor!
    #4 | Trying to Memorize Solutions
    Quality beats quantity. Try to struggle through and solve questions yourself; don’t flip directly to the solutions when you get stuck. Memorizing how to solve specific problem isn’t going to help you much in an interview. Real preparation is about learning how to approach new problems.
    #5 | Talking Too Much
    I can’t tell you how many times I’ve asked candidates a simple question like “what was the hardest bug on Project Pod?”, only to have them ramble on and on about things I don’t understand. Five minutes later, when they finally come up for air, I’ve learned nothing - except that they’re a poor communicator. When asked a question, break your answer into three parts (Situation / Action / Response, Issue 1 / Issue 2 / Issue 3, etc) and speak for just a couple sentences about each. If I want more details, I’ll ask!

    Questions, questions, questions

    Many aspiring negotiators make the mistake of doing all the talking. We need to ASK, ASK, ASK, until it becomes second nature to ask questions, and listen for the answer. It is written somewhere, ‘Be quick to listen and slow to speak.’ One of my earliest mentors used to say to me, ‘Oliver, you have two ears and one mouth; you need to learn to use them in that proportion.’
    Let’s face it, the less you say, the more relevant you are likely to be. Let me ask you a few questions myself. If you are talking, who are you normally talking about? Of course the answer is ‘yourself’. That produces a defensive or bored response in the counterpart. Worse still, you will inevitably be giving away information that they can use to their advantage.



    What sort of questions?

    If questioning is so vital, what kind of questions should we be asking? We should be asking open-ended questions. Closed questions are questions to which the only answer is ‘Yes’ or ‘No’. They produce no additional information, they close down the conversation, they close down the proper negotiation process too early. Typical closed questions are prefaced with ‘Do you…?’, ‘Could you…?’, ‘Will you…?’
    Open-ended questions cannot be answered ‘Yes’ or ‘No’; they always produce a response and always yield information. In training circles they are loosely referred to as W questions. They include What?, Which?, When?, Where?, Why?, Who?, and the odd one out: How? They always generate information and they are key to retaining control at every stage of the negotiation process.
    A builder had negotiated a deal with a Baptist church for renovation work valued at £120,000. The deal appeared to be agreed, but the architect simply would not give the builder the start date. The builder was stalled for some weeks and could not get a clear picture from the architect. In a move to get things under way, the MD of the building company approached the church direct and began asking W questions to attempt to discover the nature of the problem. It transpired that the church wanted to carry on meeting in the building while the renovations were going on. They had been told that it would not be possible. The builder simply offered to find alternative accommodation while the work was in hand – offering to pay for it himself. The cost of that was a few hundred pounds but would have the effect of releasing £120,000 of work.
    Subsequently, with the goodwill his gesture generated, he was able to work out a method of working that enabled the church to carry on meeting – with some temporary facilities – within their existing premises. The job got under way.

    Saturday, May 18, 2013

    Creating a memory leak with Java


    Here's a good way to create a true memory leak (objects inaccessible by running code but still stored in memory) in pure Java:
    1. The application creates a long-running thread (or use a thread pool to leak even faster).
    2. The thread loads a class via an (optionally custom) ClassLoader.
    3. The class allocates a large chunk of memory (e.g. new byte[1000000]), stores a strong reference to it in a static field, and then stores a reference to itself in a ThreadLocal. Allocating the extra memory is optional (leaking the Class instance is enough), but it will make the leak work that much faster.
    4. The thread clears all references to the custom class or the ClassLoader it was loaded from.
    5. Repeat.
    This works because the ThreadLocal keeps a reference to the object, which keeps a reference to its Class, which in turn keeps a reference to its ClassLoader. The ClassLoader, in turn, keeps a reference to all the Classes it has loaded. It gets worse because in many JVM implementations Classes and ClassLoaders are allocated straight into permgen and are never GC'd at all.
    A variation on this pattern is why application containers (like Tomcat) can leak memory like sieve if you frequently redeploy applications that happen to use ThreadLocals in any way. (Since the application container uses Threads as described, and each time you redeploy the application a new ClassLoader is used.)

    JVM Architecture

    When a Java virtual machine runs a program, it needs memory to store many things, including bytecodes and other information it extracts from loaded class files, objects the program instantiates, parameters to methods, return values, local variables, and intermediate results of computations. The Java virtual machine organizes the memory it needs to execute a program into several runtime data areas.



    1. The JVM Basic Tutorials, the Method Area
    The Java Virtual Machine has a method area that is shared among all Java Virtual Machine threads. The method area is analogous to the storage area for compiled code of a conventional language or analogous to the "text" segment in an operating system process. It stores per-class structures such as the run-time constant pool, field and method data, and the code for methods and constructors, including the special methods (§2.9) used in class and instance initialization and interface initialization.

    The method area is created on virtual machine start-up. Although the method area is logically part of the heap, simple implementations may choose not to either garbage collect or compact it. This version of the Java Virtual Machine specification does not mandate the location of the method area or the policies used to manage compiled code. The method area may be of a fixed size or may be expanded as required by the computation and may be contracted if a larger method area becomes unnecessary. The memory for the method area does not need to be contiguous.

    A Java Virtual Machine implementation may provide the programmer or the user control over the initial size of the method area, as well as, in the case of a varying-size method area, control over the maximum and minimum method area size.

    The following exceptional condition is associated with the method area:

    If memory in the method area cannot be made available to satisfy an allocation request, the Java Virtual Machine throws an OutOfMemoryError.


    1. The JVM Basic Tutorials, the Heap Area Video
    The Java Virtual Machine has a heap that is shared among all Java Virtual Machine threads. The heap is the run-time data area from which memory for all class instances and arrays is allocated.
    The heap is created on virtual machine start-up. Heap storage for objects is reclaimed by an automatic storage management system (known as a garbage collector); objects are never explicitly deallocated. The Java Virtual Machine assumes no particular type of automatic storage management system, and the storage management technique may be chosen according to the implementor's system requirements. The heap may be of a fixed size or may be expanded as required by the computation and may be contracted if a larger heap becomes unnecessary. The memory for the heap does not need to be contiguous.
    A Java Virtual Machine implementation may provide the programmer or the user control over the initial size of the heap, as well as, if the heap can be dynamically expanded or contracted, control over the maximum and minimum heap size.
    The following exceptional condition is associated with the heap:
    • If a computation requires more heap than can be made available by the automatic storage management system, the Java Virtual Machine throws anOutOfMemoryError.

    GDB Tutorials


    Zariga.com  Present


    What is GDB?

    GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it executes -- or what another program was doing at the moment it crashed.
    GDB can do four main kinds of things (plus other things in support of these) to help you catch bugs in the act:
    • Start your program, specifying anything that might affect its behavior.
    • Make your program stop on specified conditions.
    • Examine what has happened, when your program has stopped.
    • Change things in your program, so you can experiment with correcting the effects of one bug and go on to learn about another

    gdb is in the gnu package on CEC machines. If you don't have this package loaded then type pkgadd gnu at a shell prompt. If you can run g++, then you will be able to run gdb.

    gdb can only use debugging symbols that are generated by g++. For Sun CC users, there is the dbx debugger which is very similar to gdb.
    gdb is most effective when it is debugging a program that has debugging symbols linked in to it. With g++, this is accomplished using the -g command line argument. For even more information, the -ggdb switch can be used which includes debugging symbols which are specific to gdb. The makefile for this tutorial uses the -ggdb switch


    Summary of the info Command

    info ...Information displayed
    address symInformation about where symbol sym is stored. This is either a memory address or a register name.
    all-registersInformation about all registers, including floating-point registers.
    argsInformation about the arguments to the current function (stack frame).
    break [bpnum]Information about breakpoint bpnum if given, or about all breakpoints if not.
    breakpoints[bpnum]Same information as the info break command.
    catchInformation on exception handlers active in the current frame.
    classes[regexp]Information about Objective-C classes that matchregexp, or about all classes if regexp is not given.
    displayInformation about items in the automatic display list.
    extensionsInformation about the correspondence of filename extensions to source code programming languages.
    f [address]Same information as the info frame command.
    filesInformation about the current debugging target, including the current executable, core, and symbol files.
    floatInformation about the floating-point hardware.
    frame[address]With no argument, print information about the current frame. With an address, print information about the frame containing address, but do not make it the current frame.
    functions[regexp]With no argument, print the names and types of all functions. Otherwise, print information about functions whose names match regexp.
    handleThe list of all signals and how GDB currently treats them.

    AliasShort for ...AliasShort for ...
    btbacktraceiinfo
    ccontinuellist
    contcontinuennext
    ddeleteninexti
    dirdirectorypprint
    disdisablepoprint-object
    dodownrrun
    eeditsstep
    fframesharesharedlibrary
    foforward-searchsistepi
    gcoregenerate-core-fileuuntil
    hhelpwherebacktrace

    BreakPoints
    awatchSet an expression watchpoint.
    breakSet a breakpoint at a line or function.
    catchSet a catchpoint to catch an event.
    clearClear a given breakpoint.
    commandsSpecify commands to run when a breakpoint is reached.
    conditionSupply a condition to a particular breakpoint.
    deleteDelete one or more breakpoints or auto-display expressions.
    disableDisable one or more breakpoints.
    enableEnable one or more breakpoints.
    hbreakSet a hardware-assisted breakpoint.
    ignoreSet the ignore-count of a particular breakpoint.
    rbreakSet a breakpoint for all functions matching a regular expression.
    rwatchSet a read watchpoint for an expression.
    tbreakSet a temporary breakpoint.
    tcatchSet a temporary catchpoint.
    thbreakSet a temporary hardware-assisted breakpoint.
    watchSet an expression watchpoint.

    Data Analysis

    callCall a function in the program.
    delete displayCancel one or more expressions that have been set to display when the program stops.
    delete memDelete a memory region.
    disable displayDisable one or more expressions that have been set to display when the program stops.
    disable memDisable a memory region.
    disassembleDisassemble a section of memory.
    displayPrint the value of an expression each time the program stops.
    enable displayEnable one or more expressions that have been set to display when the program stops.
    enable memEnable a memory region.
    inspectSame as print.
    memDefine attributes for a memory region.
    outputSimilar to print, but doesn't save the value in history and doesn't print a newline. For scripting.
    printPrint the value of an expression.
    print-objectCause an Objective C object to print information about itself.
    printfPrint values such as the printf command.
    ptypePrint the definition of a given type.
    setEvaluate an expression and save the result in a program variable.

    GDB Tutorials # 1

    So you now have an executable file (in this case main) and you want to debug it. First you must launch the debugger. The debugger is called gdb and you can tell it which file to debug at the shell prompt. So to debug main we want to type gdb main. Here is what it looks like when I run it:



    GDB Tutorials # 2

    Inspecting crashes

    So already we can see the that the program was at line 28 of main.cc, that this points to 0, and we can see the line of code that was executed. But we also want to know who called this method and we would like to be able to examine values in the calling methods. So at the gdb prompt, we type backtrace which gives me the following output: