Nabtron Technology & Programming Guide Tue, 22 Jul 2014 10:29:28 +0000 en-US hourly 1 iPhone 5 not charging [solved] Tue, 22 Jul 2014 10:18:05 +0000

iPhones are amazing, specially iPhone 5. They changed the charger for the new iPhone 5 too to lightening charger. However, this didn’t solve the issue of charger getting bad or iPhone refusing to charge!

The iPhones chargers are really unreliable and I have to always keep a spare charger with me so that I am ready to coup with the situation in which my iPhone 5 is not charging with the default charger.

iphone 5 not chargingThe iPhone 5 not charging problem starts usually with an indicator saying “This accessory is not recognized”. This stops the charging.

In this article we will discuss a few ways to solve the iPhone 5 not charging issue which you might be having with your iphone 5 charger. Before we proceed, make sure that it’s not the iPhone 5 slot or batter which is causing issue and it’s the iPhone 5 charger faulty causing issues.

This could be very frustrating when your iPhone 5 charger stops working. iPhones battery don’t last long already so any fault in charger will lead to a nightmare. Other than the solutions to solve it, it’s always recommended to keep a spare charger or two for your iPhone 5 with you.

If your iPhone isn’t charging, may it iPhone 5, iphone 5c, iphone 5s or previous versions of iphone like iphone 2g, iphone 3g, iphone 3gs, iphone 4 or iphone 4s, follow these troubleshooting steps to solve the iphone not charging issue.

iPhone 5 not charging – How to fix

1. Restart your iPhone 5 – Hard Restart

You can try both restarts, the simple one and the hard one.

Simple one is when you press the power button and it shows the power off slider, slide it to power off and then re press the power button to turn on the iPhone 5.

Hard restart is when you press power and home button until it restart itself.

Make sure that the charger is connected when you do the hard restart.

2. Turn off the iPhone 5 and then charge

Turn off the iPhone 5 and then connect the charger, it usually works with partially faulty chargers whose current flow is intact but data isn’t probably.

3. Turn iTunes on / off and charge

Test by once connecting the charger when itunes is on on your computer and then once when it’s off. It might work one way or the other and your iphone 5 might start charging.

4. Clean the line on iphone 5 charger slot and retry

If resetting your iphone 5 didn’t get it charging again, better to check if the charger port of the charger itself is dusty and has lint.

Blow strongly to clean the iphone 5 charger slot, charger itself, usb slot and the usb slot.

Once done, reconnect the charger to the iphone through computer. If that don’t work either, connect it with the wall charger. Try using any other computers usb port to see if your computer port is faulty and thus not charging your iphone 5.

5. Cross test with another iPhone 5

If you tried the above steps but they failed, try using the same charger with some other iPhone 5 to see if that the charger is fine or not. Once confirmed that the charger is fine, there might be the issue with your iPhone 5 charger slot or battery / circuit.

6. Change the iPhone 5 battery

If the charger is fine but the problem is with your iPhone 5 battery, then better get a replacement battery and change your iPhone 5 battery.

7. Buy a new iPhone 5

Very much self explanatory!

Hopefully this will get your iphone5 not charging issue solved! This might work with all previous versions of iPhones and iPad too!

]]> 0
Facebook not sending Login approval sms – confusion solved Mon, 07 Jul 2014 18:33:07 +0000

This post might seem off topic or sort of too much of common sense, but some people are still having difficulty in crossing this step of facebook login approval when logging into facebook from new browser on their computer.

When logging in on your facebook account for which you have turned on login approvals from your computer, facebook asks you to enter a code on the very next page when you login.

Screen shot 2014-07-07 at 6.45.21 PM

As you can see, it asks you to enter the security code from your code generator which is in your smart phone.

People might get confused that what should they enter, when they haven’t received the text with code from facebook, well this is not the input box for any sms code, so Facebook hasn’t sent the sms yet. If you read “carefully” this is the login box which allows you to enter the code generated from your mobile / smart phone running Facebook already and logged in with same account which you’re trying to login here on your computer. In the settings you can find the code generator.

However, if you want Facebook to send you the approval code sms, you have to click “Can’t find your code?” and it will open a popup which looks like this:

Screen shot 2014-07-07 at 6.45.43 PM

Instead of getting confused with the given details and options, simply click “Text me a security code” and Facebook will send a security code to your mobile phone number which you added earlier while turning on the Login approvals in security settings.

Hope this helps! :)

]]> 0
How to get WordPress current post author ID and other details Mon, 07 Jul 2014 08:39:14 +0000

wordpressYesterday while coding a function to show different adsense code for different author, I needed to find the author ID of that post to show the relevant google adsense code with it. The issue was solved by the wordpress builtin function get_the_author_meta.

The official reference page for get_the_author_meta function for wordpress says that it has to be used within the loop. Well let me make it clear here that this doesn’t mean that whole code has to be there. You can place the code in functions.php and call it within the loop. I used it entirely within the functions.php and added the adsense code before the content.

The get_the_author_meta function gives you various details of the author of particular post including his id, email, username and so on.

However, it don’t publish it directly, to echo or print the author meta you have to use the_author_meta function and it will echo it directly.

The function works like this:

<?php $user_email = get_the_author_meta('user_email'); ?>

You can use ID, nickname, first_name and other parameters too. For details check the get_the_author_meta functions page on WP Reference

]]> 0
How to secure your Facebook account with Mobile text verification / Login Approvals Sat, 05 Jul 2014 13:27:07 +0000

There are numerous accounts of Facebook accounts being hacked and misused. Facebook provides you an option to add mobile text verification to your account to enhance its security. Facebook calls it “Login Approvals” which asks user to verify it’s authority on the account before logging in.

How it works:

Once the mobile text verification for facebook has been setup, it will work like this on your login:

1. you goto and login with your id and password

2. facebook stops the login process in between and sends a text to your mobile number with a security text or pin.

3. you enter that pin on that facebook page and continue with the login.

So this way, only the person who has access to that mobile phone number or sim can login to your account.


Make sure that the mobile number which you’re giving to be used for this purpose of text verification by facebook is yours and is in your own name. Because there is no way to login to your account if you lose access to your mobile number!

How to setup Facebook Mobile text verification / Login Approvals

1. Login to your facebook profile

2. make sure that the number you want to add is in your own name, so that if you miss the sim or some issue arises, you can get the new sim card yourself.

3. Goto your facebook profile, top right corner is a “lock” icon next to home , friend requests, messages, notification, click on it

Screen shot 2014-07-05 at 10.56.33 AM

4. On this popup, click “See More Settings” to goto the main settings page

5. On settings page, left menu, click “Security”. On the security settings page, we have to do three things. Turn on Login notifications, login approvals and clear the Trusted browsers list and start from new browser.

Screen shot 2014-07-05 at 6.01.19 PM

6. First of all we setup Login Approvals, hover (take mouse over) Login approvals and click on it (or the edit button link which appears). It lets you use your phone as an extra layer of security to keep other people from logging into.

Screen shot 2014-07-05 at 6.02.08 PM

7. Click login Approvals will open a popup which will explain you how to proceed with setting up login approvals. Please note this is “one” thing we’re doing here, we have to make 2 more changes once login approvals are set up.

Screen shot 2014-07-05 at 6.02.53 PM

8. One login approvals are setup, we have to setup login notifications on the same security settings page. Click on Login Notifications and turn on mobile / text notifications (and email if you want to) and save changes.

Screen shot 2014-07-05 at 6.04.28 PM

9 Now on the same page, second last option, click on “Trusted Browsers”. It will open the list of all the browsers that are saved with Facebook Server. Remove “ALL” of them. This is very important step otherwise those people who logged in once from your computer will be able to access it again without login approvals.

Screen shot 2014-07-05 at 6.03.55 PM

10. Done, once removed them and security setup on the correct number and verified, your account is now much much secure than it was before!

]]> 0
How to Remove your cell number from Facebook profile Sat, 05 Jul 2014 06:26:20 +0000

Most of the facebook settings are not straight forward and scare its users. Cell phone number is one of them. User might add phone number while doing “something” on facebook or any other associated application from their cell phone probably which will add cell number to their profile, but then boom, that cell number goes either public or visible to all their friends.

Now the settings might be obvious to few, but they are really confusing for many facebook users and this results in misuse of their numbers and getting calls and texts from people they don’t know! So in this post we will discuss how to remove your mobile number from facebook, or atleast make it “invisible” to everyone on facebook.

How to remove your mobile number from Facebook Profile – About page

1. Login to your facebook profile.

2. Goto your profile timeline page (Click on your name on top right, next to “home” button)

Screen shot 2014-07-05 at 11.00.52 AM

3. One in your profile, click “About” to go to your facebook profile about page

Screen shot 2014-07-05 at 11.07.44 AM

4. On About page, go down to “Contact Information” section. There, take the mouse cursor on your cell phone number and it will highlight and show a “edit” icon next to it like following picture, click on that edit icon:

Screen shot 2014-07-05 at 11.09.21 AM

5. This will open up the mobile phones settings editing panel. Click on the privacy icon next to the desired mobile phone number that you want to be hidden. It will open up list of options for privacy of that number like this:

Screen shot 2014-07-05 at 11.18.16 AM

6. Select “Only Me” if you want it to be hidden from everyone or any other settings if you intend to do so!

7. Click Save Changes. Facebook will ask for your password to confirm.

8. Once done, make sure that there is “lock” next to your cell phone number in the Contact Information section of your Facebook About page. You can take your mouse over the icon to see if it says “Only Me” for confirmation.

Screen shot 2014-07-05 at 11.21.43 AM

Voila you’re done! I hope it helps you keep your personal contact number from getting public :)


]]> 0
How to appear offline on Facebook chat Fri, 20 Jun 2014 09:37:21 +0000

Most of us are online on facebook almost all the time, while eating, while working, while sleeping, while this while that! but not all the time we’re in a mood or capacity to talk to the online friends. Facebook allows you to appear offline.

Appear offline feature allows you to either become offline for all of your contacts on facebook or to appear offline to specific friend of a group in your facebook profile.

How to appear offline to Everyone on Facebook Chat

To appear offline to everyone on your facebook contact list, simply click the settings wheel icon at the bottom right corner of your facebook window.

It will open a list of options, select : “Turn off Chat” from the options (see image below)

appear offline on facebook

This will make you appear offline for all your friends in your facebook friendlist.

Please note, this will make you appear offline from your computer, however if you’re logged in from your cell phone too you will need to turn off chat from the cell phone too!

How to appear offline to specific group or friend on Facebook chat

If you want to appear offline to specific group of people or some specific friend in your facebook profile friendlist, simply follow the same initial steps of clicking the settings wheel on the bottom right corner of your facebook page window and from the list, select “Advanced Settings…” instead.

Screen shot 2014-06-20 at 2.35.40 PM

This will open a popup which lets you appear offline for specific groups you have on facebook or some specific person.



]]> 0
How to monitor data transfer on Mac OS X Thu, 12 Jun 2014 19:47:22 +0000

One of the easiest way to check the bandwidth or data transfer on any network is by checking the data transfer in your routers admin panel. However for any reason if you’re not able to do that, or if you want to be able to access the data transfer details on your mac os x directly from your macbook, you can do that by a built in app for data transfer.

Activity Monitor – mac built in app

You might have used this app before too for checking system load and other stuff.

This app also has a tab for Network which shows network and bandwidth details.

Screen shot 2014-06-13 at 12.40.55 AM

This tool tells you the details of packet in and packets out plus data received and data sent along with a graphical representation.

However, there is one limitation that this tool shows you the data transfer of current logged in session too. After logout / restart of your mac os x it will get reset.

]]> 0
Mobile Phones That Supports 3G/4G Internet in Pakistan Sun, 01 Jun 2014 13:00:53 +0000

Way #1

If you want to know that your phone supports 3G or not. You can go into the settings of your phone and look for network settings, see if it has any of the options available. 3Gs, UMTS, WCDMA, HSPA, HSPA+. If it has, then your phone is 3G enable. Don’t worry if it has not, you can look into the phones listed below.

Way #2

The second way is that you can look into the below list to see if your phone is 3G enabled.

How to enable 3G on my phone?

There’s certainly a way if you think that 3G is not enabled in your mobile phone.

Samsung Android Phones
Go into settings, connection, more network, mobile networks, network mode, WCDMA/GSM

Other Android Phones
Go into settings, more, mobile network, preferred network type, WCDMA/GSM

Windows Phones (Nokia Lumia, HTC etc)
Settings, Phone, Network Mode, Select 3G

Apple (iOS)
iOS6, iOS7: Settings, General, Mobile Data, 3G/4G
iOS5: Settings, General, Netwok, Cellular Data

Settings, Connections, More Network, Mobile Networks, Network Mode, WCDMA/GSM

]]> 0
[Solved]How to remove Render-Blocking javascripts Fri, 30 May 2014 07:21:42 +0000

When a browser loads a webpage, while rendering it it has to parse the page. During the parsing process, if the browser comes across an external script it has to download it too which stops the parsing process until the JavaScript file is completely downloaded by the browser. With each file, it has to repeat the stop and download process for each file, which adds a network round trip for each file, resulting in considerable delay in the first rendering of the original webpage as that external javascript file keeps the rendering process blocked.

So the solution, how to prevent these round trips and delays in first time page rendering? Well there are few steps to be takes for that purpose.

For small files :

First of all, for very small JavaScript files which contain very little code in them, they should be added directly to the html file using inline script tag. For Example :

Instead of using :

<script type=”text/javascript” src=”verysmall.js”></script>

Use this :

<script type=”text/javascript”>
/* contents of a very small JavaScript file */

This will avoid one round trip to the server while not making much affect to the page code size.

Defer loading JavaScript files

Another thing to be done to prevent JavaScript from blocking the rendering and loading of the page, it’s recommended to use HTML async attribute in your script tag when loading external JavaScript file. For example:

<script async src=”external.js”>

However, in several cases, loading external JavaScript files using asynchronous loading can cause issues or conflicts with your code, so test this technique per JavaScript file when you employ the async technique.

Also, if one js file uses code from other JavaScript file, it’s important to load them in proper order of loading.

]]> 0
[Solved]How to create a HTML table from PHP array Wed, 28 May 2014 13:26:35 +0000

While working on a project last week I encountered a situation in which an array was supposed to be converted to a HTML table.

Basically I was working on a WordPress plugin and required the array to be dynamic with any number of items and keys in it so hard coding the table structure was out of question.

The trick was, to just get an array out of the database and convert it into a html table, without knowing the size and nature of the data in the array!

This code will work for an array of this sort :

$array = array(
array(‘first’=>’somefirstname’, ‘last’=>’somelastname’, ‘email’=>’’, ‘company’=>’example ltd’),
array(‘first’=>’htmlcoder’, ‘last’=>’phpmaster’, ‘email’=>’’, ‘company’=>’example ltd’)

In this case, where the array is in the above mentioned form, the following code will work to convert this array into an html table (array included within the code)

Please note, if you want to use an array which is mysql SELECT result, you can do that by simply replacing the array with the result generated through your mysql query.


function arraytotable($array){
// start generating table
$html = ‘<table>’;
// generate table heading by using data from first row
$html .= ‘<tr>’;
foreach($array[0] as $key=>$value){
$html .= ‘<th>’ . $key . ‘</th>’;
$html .= ‘</tr>’;
// generate table rows from remaining data rows
foreach( $array as $key=>$value){
$html .= ‘<tr>’;
foreach($value as $key2=>$value2){
$html .= ‘<td>’ . $value2 . ‘</td>’;
$html .= ‘</tr>’;
// finish table code and return it
$html .= ‘</table>’;
return $html;
$array = array(
array(‘first’=>’somefirstname’, ‘last’=>’somelastname’, ‘email’=>’’, ‘company’=>’example ltd’),
array(‘first’=>’htmlcoder’, ‘last’=>’phpmaster’, ‘email’=>’’, ‘company’=>’example ltd’)
//show the generated html table to the public
echo arraytotable($array);


]]> 0