Thursday, October 31, 2013

How to check if your iPhone is Unlocked or Not


Having your iPhone locked to a carrier can be a pain if you need to switch SIMs. Especially while you’re travelling, and you try slipping in another SIM card only to find that you’re blocked from using it. Knowledge is power, and to be forewarned is to be forearmed. Here’s how to find out, in advance, if your iPhone is locked to your carrier or not.

The basic method

The easiest way is to get a spare SIM card, from a different network to your current provider, and try it in your phone. A few minutes after changing the SIM cards – you should reboot your iPhone to be sure – you will see the new network name in the status bar if your phone is unlocked. If your phone is locked, you’ll get a pop-up error asking you to insert a valid SIM card.
You should do this sooner rather than later if you will be travelling. You don’t want to be stuck in a foreign country and not be able to buy phone service!

The online method

If you can’t get hold of a spare SIM card and you need to know whether you’re locked or not, there’s a website that can help. IMEI.info can access a public database of IMEI codes which tracks which phones in the world are carrier locked or not. To use this service, you’ll need to obtain your iPhone’s IMEI code – which is a code that is unique to your device.
iphone-locked (1)
If you have a SIM card installed, and only if, you can see the IMEI code by dialing*#06#. You can also get the IMEI code via the Settings app by navigating to General > About and scrolling down.
Alternatively, you can plug your iPhone into your Mac or PC and start iTunes. On the device Summary screen, you’ll see a line showing your phone number (the line below the phone’s data capacity). Click on the phone number, which will reveal the IMEI code. The IMEI code is also engraved on the back case near the bottom in case of some iOS devices like the iPhone 5 and the original iPhone or engraved on the SIM card tray in case of the iPhone 3G, iPhone 3GS, iPhone 4 and iPhone 4S.
iphone-locked (4)
Once you have the IMEI code, return to IMEI.info and input the code. You’ll see a table of basic information about your model of phone. Some details may be incorrect. For example, it reported my 16GB iPhone 5 as having 32GB.
iphone-locked (3)
Notice on the right of the page a set of coloured boxes. The “SIMLock and Warranty” check in green is free, however you need to register an account at this stage. After you’ve registered and logged in to your account, click on the “SIMLock and Warranty” button. It will prompt you to spread the word. Click on Check Apple phone details button to continue.
It will take a few seconds to process your request and display if your phone is locked or unlocked (next to the SIM Lock field) as you can see in the screenshot below.
iphone-locked (2)

What to do if you are locked

You can contact your carrier, as in many countries they unlock the device for free or for a fee. In the U.S., carriers like AT&T have also made it easy to unlock off-contract iPhone. There are also many sources of information on the web about how to get your phone unlocked, and there are many websites which, for a fee, will provide an unlock code. The UK MVNO, GiffGaff, has an extensive information resource on this subject called Unlockapedia.
Hope this helps. Let us know how it goes in the comments.

More like this article

10 Good Ways to 'Tell Me About Yourself'

'If Hollywood made a movie about my life, it would be called...' and nine more memorable answers to this dreaded job interview question.

By Scott Ginsberg
FILED UNDER: Interview Questions.
Interviewing
You know it’s coming.
It’s the most feared question during any job interview: Do you think I would look good in a cowboy hat?
Just kidding. The real question is: Can youtell me about yourself?
Blecch. What a boring, vague, open-ended question. Who likes answering that?
I know. I’m with you. But unfortunately, hiring managers and executive recruiters ask the question. Even if you’re not interviewing and you’re out networking in the community — you need to be ready to hear it and answer it. At all times.
Now, before I share a list of 10 memorable answers, consider the two essential elements behind the answers:
The medium is the message. The interviewer cares less about your answer to this question and more about the confidence, enthusiasm and passion with which you answer it.
The speed of the response is the response. The biggest mistake you could make is pausing, stalling or fumbling at the onset of your answer, thus demonstrating a lack of self-awareness and self-esteem.
Next time you’re faced with the dreaded, “Tell me about yourself…” question, try these:
  1. “I can summarize who I am in three words.” Grabs their attention immediately. Demonstrates your ability to be concise, creative and compelling.
  2. “The quotation I live my life by is…” Proves that personal development is an essential part of your growth plan. Also shows your ability to motivate yourself.
  3. “My personal philosophy is…” Companies hire athletes – not shortstops. This line indicates your position as a thinker, not just an employee.
  4. “People who know me best say that I’m…” This response offers insight into your own level of self-awareness.
  5. “Well, I googled myself this morning, and here’s what I found…”Tech-savvy, fun, cool people would say this. Unexpected and memorable.
  6. “My passion is…” People don’t care what you do – people care who you are. And what you’re passionate about is who you are. Plus, passion unearths enthusiasm.
  7. “When I was seven years old, I always wanted to be…” An answer like this shows that you’ve been preparing for this job your whole life, not just the night before.
  8. “If Hollywood made a move about my life, it would be called…”Engaging, interesting and entertaining.
  9. “Can I show you, instead of tell you?” Then, pull something out of your pocket that represents who you are. Who could resist this answer? Who could forget this answer?
  10. “The compliment people give me most frequently is…” Almost like a testimonial, this response also indicates self-awareness and openness to feedback.
Keep in mind that these examples are just the opener. The secret is thinking how you will follow up each answer with relevant, interesting and concise explanations that make the already bored interviewer look up from his stale coffee and think, “Wow! That’s the best answer I’ve heard all day!”
Ultimately it’s about answering quickly, it’s about speaking creatively and it’s about breaking people’s patterns.
I understand your fear with such answers. Responses like these are risky, unexpected and unorthodox. And that’s exactly why they work.
Otherwise you become (yet another) non-entity in the gray mass of blah, blah, blah.
You’re hireable because of your answers. When people ask you to tell them about yourself, make them glad they asked.
Let me ask you this: How much time did you dedicate this week to becoming more interesting? Let me suggest this: For the list called, “61 Stupid Things to Stop Doing Before It’s Too Late,” send an e-mail to me, and you win it for free!

Walk Out of Your Job Interview in a Blaze of Glory

Interview questions that stump employers in any job interview.

By Scott Ginsberg
FILED UNDER: Interview Questions.
Interviewing
Picture this: The job interview is (almost) over.
You’ve answered all their questions.
You’ve jumped through all their hoops.
You’ve taken all their tests, assessments and personality profiles.
Meanwhile, your brain hurts from over thinking. Your butt is numb from over sitting. And by now, you’ve managed to sweat right through that crisp, new white shirt you bought just for today.
“Just hire me already!” You think.
Not so fast. There’s still one thing left to do:
Walk out of that interview in a blaze of glory.
Today I’m going to teach you a job-hunting strategy that will instantlymake you more approachable; hireable; employable; promotable; buyable; bookable; unforgettable; and, most importantly, call-back-able.
And all of it hinges on your ability to respond effectively to one of the most common (yet one of the most under leveraged) interview questions:
“So, do you have any questions for me?”

Prospective employers almost always ask this one – especially at the end of the interview. And most job-hunting books, interviewing resources and career coaches will advise you to respond with intelligent, creative questions such as:
  • Why is this position vacant?
  • Do you promote from within?
  • Do you have a formal training program?
  • What are the future goals of the company?
  • How will I know that I have met your goals?
  • Why did you choose to work for this company?
  • How would you describe your company’s culture?
  • How will my performance be evaluated, and how often?
  • What is the average work week of the person who will fill this job?
  • Will I be hearing from you or should I contact you?
Those are great questions. They’re smart, focused and goal-oriented.
There’s only one problem: Everybody else asks them, too.
And that instantly eliminates the probability of standing out.
Here’s the reality
The less boring and normal you are – and the more rules to which you are the exception – the more hireable you will become.
So, try this: Next time your interviewer asks, “So, do you have any questions for me?” I triple-dog-dare you to answer with one of the following responses :
  • Do you see any gaps in my qualifications that I need to fill?
  • Are there any reasons I’m not fully qualified for this position?
  • Is there anything I’ ve said today that might hurt my chances of being hired here?
  • Now that you’ve had a chance to meet and interview me, what reservations would you have in putting me in this position?
  • What have I accidentally said or done during today’s interview that’s inconsistent with your perfect candidate for this job?
Here’s why this strategy works:
You put the interviewer on the spot. After all, you’re not the only one being interviewed here. So, turning the tables in this manner helps you maintain power because – contrary to popular conditioning – the listenercontrols.
You prove counterintuitive thinking. I don’t care if you’re applying to work the night clean up shift at Reggie’s Roadkill Cafe – employers lovepeople who think this way. Not just someone who “is” unexpected – but someone who actually thinks unexpectedly.
You demonstrate openness to feedback. My great friend, Joe Rotskoff, HR manager at Crescent Plumbing Supply in St. Louis, was the person who first educated me on this interview approach. “The secret is twofold,” Rotskoff said. “First, you display openness to how others experience you. Second, you show a dedication to improving self-awareness. And that’sexactly the type of employee companies seek to hire in this tough economy.”
You exhibit dedication to personal improvement. Which makes you an employee who adds value to the net worth of her human capital – and, therefore, the net worth of the company’s assets – every day. Wow.
You close the sale. Job interviews are sales calls. Period. You’re selling the company on you, your skills and your long-term potential as a valued asset to the team. So, when you ask closer questions like these, you’re essentially “asking for the sale.” And you’re doing so in a professional, tactful, confident manner. How could they not say yes to you?
Now, here’s the worst thing that could happen
Let’s say you ask one of these questions. And let’s say the prospective employer (unfortunately) responds with an answer that indicates you’ve done something wrong. Or missed the mark. Or come up short in regards to the position.
Fantastic! You’ve just received specific feedback that you can leverage to add value to yourself and become more hireable in the future.
So, if this is the case for you, here’s my suggestion: Physically write down his response to your questions, right then and there. This demonstrates active listening and further reinforces your openness to feedback.
Then, when you write your thank-you note to the interviewer later that evening, be sure to:
1. Thank him again for the helpful feedback on your performance
2. Explain what your commitment plan is for remedying that inadequacy in the future. Hey, he might even change his mind after that!
But here’s the best thing that could happen
Picture this: The interviewer’s jaw hits the floor, his pen falls to the ground, and he stares at you like you just told him that his company was going to be featured on the front page of The Wall Street Journal.
Then, once he mops up the puddle of drool on your job application, he racks his brain trying to come up with an answer to your powerful question.
But he can’t find one.
Because there isn’t one.
Because you, my unemployed friend, are pretty amazing.
And you deserve this job a hundred times more than every other candidate who walked in the door before you.
That’s what happens when you stick yourself out there. That’s what happens when you’re approachable.
You walk out of that job interview in a blaze of glory.
And then, come Monday morning, you walk back into that same building. But this time, you’re not there for an interview – you’re there to see how spectacular the view is from your new office.
Good luck.
Let me ask ya this …
How will you turn approachability into hireability?
Scott Ginsberg, aka "The Nametag Guy," is the author of nine books, an award-winning blogger and the creator of NametagTV.com. He's the only person in the world who wears a nametag 24-7 and advises companies on how to leverage approachability into profitability.

Difference between HashMap and HashTable? Can we make hashmap synchronized?

HashMap vs Hashtable in Java
Difference between HashMap and Hashtable in Java question oftenly asked in core Java interviews to check whether candidate understand correct usage of collection classes and aware of alternative solutions available. Along with How HashMap internally works in Java and ArrayList vs Vector, this  is one of the oldest question from Collection framework in Java. Hashtable is a legacy Collection class and it's there in Java API from long time but it got refactored to implement Map interface in Java 4 and from there Hashtable became part of Java Collection framework. Hashtable vs HashMap in Java is so popular a question that it can top any list of Java Collection interview Question. You just can't afford not to prepare HashMap vs Hashtable before going to any Java programming interview. In this Java article we will not only see some important differences between HashMap and Hashtable but also some similarities between these two collection classes. Let's first see How different they are :

Difference between HashMap and Hashtable in Java

Both HashMap and Hashtable implements Map interface but there are some significant difference between them which is important to remember before deciding whether to use HashMap or Hashtable in Java. Some of them isthread-safetysynchronization and speed. here are those differences :
1.The HashMap class is roughly equivalent to Hashtable, except that it is non synchronized and permits nulls. (HashMap allows null values as key and value whereas Hashtable doesn't allow nulls).

2. One of the major differences between HashMap and Hashtable is that HashMap is non synchronizedwhereas Hashtable is synchronized, which means Hashtable is thread-safe and can be shared between multiple threads but HashMap can not be shared between multiple threads without proper synchronization. Java 5 introduces ConcurrentHashMap which is an alternative of Hashtable and provides better scalability than Hashtable in Java.
3. Another significant difference between HashMap vs Hashtable is that Iterator in the HashMap is  a fail-fast iterator  while the enumerator for the Hashtable is not and throwConcurrentModificationException if any other Thread modifies the map structurally  by adding or removing any element except Iterator's own remove() method. But this is not a guaranteed behavior and will be done by JVM on best effort. This is also an important difference between Enumeration and Iterator in Java.

4. One more notable difference between Hashtable and HashMap is that because of thread-safety and synchronization Hashtable is much slower than HashMap if used in Single threaded environment. So if you don't need synchronization and HashMap is only used by one thread, it out perform Hashtable in Java.

5. HashMap does not guarantee that the order of the map will remain constant over time.

Difference between HashMap and Hashtable in Java | HashMap vs Hashtable




Note on Some Important Terms
1)Synchronized means only one Thread can modify a hash table at one point of time. Basically, it means that any thread before performing an update on a Hashtable will have to acquire a lock on the object while others will wait for lock to be released.

2)Fail-safe is relevant from the context of iterators. If an Iterator or ListIterator has been created on a collection object and some other thread tries to modify the collection object "structurally", a concurrent modification exception will be thrown. It is possible for other threads though to invoke "set" method since it doesn't modify the collection "structurally". However, if prior to calling "set", the collection has been modified structurally, "IllegalArgumentException" will be thrown.

3)Structurally modification means deleting or inserting element which could effectively change the structure of map.

HashMap can be synchronized by

Map m = Collections.synchronizeMap(hashMap);

In Summary there are significant differences between Hashtable and HashMap in Java e.g. thread-safety and speed and based upon that only use Hashtable if you absolutely need thread-safety, if you are running Java 5 consider using ConcurrentHashMap in Java.

Other Java collection tutorial from Javarevisited Blog
How to sort ArrayList in Java
Difference between List and Set collection in Java
Difference between ArrayList and LinkedList in Java
4 ways to loop Map in Java
Difference between HashMap and HashSet in Java
I'm having trouble understanding the following syntax:
public class SortedList< T extends Comparable< ? super T> > extends LinkedList< T >
I see that class SortedList extends LinkedList. I just don't know what
T extends Comparable< ? super T>
means.
My understanding of it so far is that type T must be a type that implements Comparable...but what is < ? super T >?
share|improve this question

5 Answers

up vote18down voteaccepted
super in Generics is the opposite of extends. Instead of saying the comparable's generic type has to be a subclass of T, it is saying it has to be a superclass of T. The distinction is important because extends tells you what you can get out of a class (you get at least this, perhaps a subclass). super tells you what you can put into the class (at most this, perhaps a superclass).
In this specific case, what it is saying is that the type has to implement comparable of itself or its superclass. So consider java.util.Date. It implements Comparable. But what about java.sql.Date? It implements Comparable as well.
Without the super signature, SortedList would not be able accept the type of java.sql.Date, because it doesn't implement a Comparable of itself, but rather of a super class of itself.
share|improve this answer
 
I see. So then given that class, would Collection< Object > list = new SortedList< Object>(); be a valid statement? –  ShrimpCrackers May 13 '10 at 14:36 
 
@aloh, no it would not because Object does not implement Comparable. –  Yishai May 13 '10 at 14:37 
 
Whoops. Oh, yeah. Thanks Yishai. –  ShrimpCrackers May 13 '10 at 14:40
It's a lower-bounded wildcard.

JLS 4.5.1 Type Arguments and Wildcards

Wildcards are useful in situations where only partial knowledge about the type parameter is required. [...] An upper bound is signified by the syntax:
? extends B
where B is the upper bound. [...] it is permissible to declare lower bounds on a wildcard, using the syntax:
? super B
where B is a lower bound.
List, for example, includes ListList, andList.
Wildcards are used to make generics more powerful and flexible; bounds are used to maintain type safety.

See also


As to how this is useful in >, it's when you have something likeCat extends Animal implements Comparable.
Look at the signature of Collections.sort
public static <T extends Comparable super T>> void sort(List<T> list)
Therefore, with a List listOfCat, you can now Collections.sort(listOfCat).
Had it been declared as follows:
public static <T extends Comparable<T>> void sort(List<T> list)
then you'd have to have Cat implements Comparable to use sort. By using the ? super T bounded wildcard, Collections.sort becomes more flexible.

See also

  • Effective Java 2nd Edition, Item 28: Use bounded wildcards to increase API flexibility
    • Also, PECS principle: "producer extends consumer super"
share|improve this answer
 
It's a bit more complicated than that though - the question isn't about ? super T, it is about T extends Comparable –  oxbow_lakes May 13 '10 at 14:31
 
Ah, I see. Those all implement Comparable. What about the super keyword? –  ShrimpCrackers May 13 '10 at 14:33
 
Not really! If you look at docs, you'll realize it's not simply a bounded wildcard. –  Epitaph May 13 '10 at 14:34
 
Just for clarification, my previous comment was aimed at your initial response which was just 3-4 lines. – Epitaph May 13 '10 at 16:35
It means that T must implement Comparable The sense is that because SortedList is sorted, it must know how to compare two classes of its genericsT parameter. That's why T must implement Comparable
share|improve this answer
It means that the type T must implement Comparable of T or one of its super classes.
For example, if A extends B, if you want to use SortedListA must implementComparable or Comparable, or in fact just Comparable.
This allows the list of As to be constructed with any valid comparator.
share|improve this answer
Consider the following example:
  1. Using a type parameter defined in the class declaration
    public class ArrayList extends AbstractList ... {
    public boolean add(E o) // You can use the "E" here ONLY because it's already been defined as part of the class
  2. Using a type parameter that was NOT defined in the class declaration
    public <T extends Animal> void takeThing(ArrayList<T> list)
                                                // Here we can use  because we declared "T" earlier in the method declaration                  
    If the class itself doesn't use a type parameter, you can still specify one for a method, by declaring it in a really unusual (but available) space - before the return type. This method says that T can be "any type of Animal".
NOTE:
public <T extends Animal> void takeThing(ArrayList<T> list)             

is NOT same as              

public void takeThing(ArrayList<Animal> list)
Both are legal, but they are different. The first one indicates that you can pass in a ArrayList object instantiated as Animal or any Animal subtype like ArrayList, ArrayList or ArrayList. But, you can only pass ArrayList in the second, and NOT any of the subtypes.
share|improve this answer