Wednesday, March 20, 2013

500 millisec (ms) delay in 'ACK' of TCP/IP in Visual Studio (VS) VC++ ???

Current post is on how to overcome 500 millisecond (ms) delay in 'ACK' acknowledge of send command in TCP/IP in Visual Studio (VS) Visual C++ (VC++) Application


Are you getting a constant 500ms delay in Acknowledgement of send command in TCP/IP in Visual Studio (VS) Visual C++ (VC++) Application??

Is your application sending lot of small data packets in large frequency over TCP/IP sockets in Visual Studio (VS) Visual C++ (VC++) Application??

If the answer is YES, copy the following lines of code after the 'bind' function call to improve the performance of the application:

Disable the Nagle Algorithm:

int value = 1;
setsockopt(, IPPROTO_TCP, TCP_NODELAY, (char *)&value, sizeof (value));

Note:-
1. Application should be able to handle short and large number of TCP/IP socket calls
2. Network Traffic will increase as the underlying protocol won't wait for threshold bytes before sending.


Enable the Nagle Algorithm:

int value = 0;
setsockopt(, IPPROTO_TCP, TCP_NODELAY, (char *)&value, sizeof (value));

Complie. Run. Test and enjoy coding.

Appreciate your feedback via comments. Thanks.

Thursday, March 14, 2013

Steps to get Google Reader Data through Takeout

Current post is on how to get your Google Reader Data through Takeout

As you might know by now, Google will be closing the Google Reader by 1 July 2013. To preserve the subscriptions you accumulated over a period of time, Google Reader provides a link to download the data via Takeout

Just follow this simple steps:

Short Cut Method:

1. Log on to your Google Reader Account
2. Copy the following url: http://www.google.com/takeout/#custom:reader
3. Jump to Step 6 of Normal Method.

Normal Method:

1. Log on to your Google Reader Account
2. Go to Home Page
3. Click on Settings Icon and select Reader Settings

Google Reader Settings

4. Click on Import/Export Tab

Google Reader Import Export Tab

5. Click on 'Download your data through Takeout' link

5.1. After few seconds (Depending on your subscription list, followers, etc)

Google Reader Takeout


6. Click on Create Archive button.

6.1. After few seconds (Depending on your subscription list, followers, etc)

Google Reader Takeout Download

7. Click on download and save the zip file to your machine.

Zip file will have following files:
  • followers.json - List of people that follow you
  • following.json - List of people who you follow
  • liked.json - Items you have liked
  • notes.json - Notes you have created
  • shared.json - Items shared by you
  • shared-by-followers.json - Items shared by people you follow
  • starred.json - Items you have starred
  • subscriptions.xml - Subscriptions you have along with your folder hierarchy
Appreciate your feedback via comments.

Thanks.

Steps to get Google Reader Statistics

Current post is on how to get your Google Reader statistics


Need to know your google reader statistics? Not able to find the 'Trends' tab under Google Reader Account?

Just follow this simple steps:
  1. Log on to your Google Reader Account
  2. Go to Home Page
  3. Press keyboard 'g' and then 'Shift+t'
Kabooom!!!!

Your Google Reader Statistics will be seen with following information:
  • Number of Subscriptions
  • Number of items read over past 30 days
  • Number of items clicked over past 30 days
  • Number of items starred over past 30 days
  • Number of items emailed over past 30 days
  • Total number of items read from the day you activated the Google Reader Account
  • Read - Time of the day in graphical format
  • Read - Day of the week in graphical format

Google Reader Statistics













Take the snapshot and paste to any social platform you like!!!

Appreciate your feedback via comments.

Thanks.

Wednesday, March 13, 2013

India Public Provident Fund (PPF) Account Opening in State Bank of India (SBI)

Current Post is on how an individual residing in India open a Public Provident Fund (PPF) Account in State Bank of India (SBI)

Public Provident Fund (PPF) is a tax saving route taken by many individuals recently. Due to low risk and government backing, many consider it as safe bet. The interest rate declared by Government of India are close to inflation values.

Following sections will help you open an India Public Provident Fund (PPF) Account in State Bank of India (SBI):

Sections:


1. Locate an State Bank of India (SBI) branch.
2. Required Documents
3. Public Provident Fund (PPF) Form A and E Filling
4. Public Provident Fund (PPF) Passbook
5. Rules
6. Tips

1. Locate an State Bank of India (SBI) branch:


One can search for nearest SBI branch via SBI Branch Locator service.
(Most of the SBI branches will be undertaking PPF serive, but it is better to call \ visit the branch to confirm the PPF service availability)

Visit the finalized nearest SBI branch will following documents photocopy and originals.

2. Required Documents:

  1. One Recent Passport size photograph
  2. Address Proof: (Any One)
    • Passport
    • Driving License
    • Ration Card
  3. Pan Card

3. Public Provident Fund (PPF) Form A and E Filling:


Form A is for opening of PPF Account.
  1. Paste the photograph on top right corner.
  2. Mention the branch name in field at top left corner.
  3. Mention the PAN card. Mandatory
  4. Fill the details like name and if for minor your details as guardian
  5. Sign at lower right where signature is mentioned
  6. Also sign at lower left where additional signature is mentioned
Form E is for nomination of PPF Account.
  1. Fill the details like name and if for minor your details as guardian
  2. Take signature of two witnesses mostly your parents or relative signature can be taken
  3. Sign at lower right where signature is mentioned
Deposit Challan:
  1. Account Number: PPF Account Number
  2. Name: Name as you mentioned in PPF Form A
  3. Address: Address as per proof in PPF Address proof document
  4. Amount Details: As per cash denominations or cheque number
  5. Amount in words
  6. Signature

4. Public Provident Fund (PPF) Passbook:


Submit the Form A and Form E along with photocopy. The person in charge will verified the information in Form against the original documents and any missing information.

Mostly the account will be opened in 20 minutes but some times they ask to come next day to collect the passbook.

Passbook first page will be printed with all the required details like Account Number, Name, Son\Daughter\Wife\Husband of, Branch Name.

The nomination details of Form E will be present as Nomination Registration Number on Page 1 of Passbook

From Page 3 onwards the transaction details will be printed.

5. Rules:


  • Only an Indian resident can open an PPF account
  • Only one PPF account for an individual
  • Exempted under 80C - Indian Tax Laws
  • Minimum Limit for deposit is Rs 500 /- per year
  • Maximum Limit for deposit is Rs 1,00,000 /- per year
  • Maximum of 12 deposited can be made over year
  • Deposit should be in multiple of Rs. 5/-
  • Interest Rate is declared every year by Government of India
  • Nomiations can be made. Fill PPF Form E.
  • Minimum tenure for PPF Account is 15 years.
  • Extended with block of 5 years

6. Tips:

  • The lowest balance between 5th and last working day of the month is used for calculating the interest. Hence, depositing the amount before 5th will fetch more interest

Done. We opened the PPF Account in SBI branch.

Appreciate your feedback & suggestions via comments.

Thanks.

Tuesday, March 12, 2013

Python: Remove Non-printable characters from string

Current post is on how to remove non-printable characters from string.


Need a function to remove non-printable characters in python.


Remove Non-printable function for ASCII String:


def    remove_ascii_non_printable(str)
      """Removes Non-printable chars from ASCII String"""
      return ''.join([ch for ch in str if ord(ch) > 31 and ord(ch) < 126 or ord(c) = = 9])

Remove Non-printable function for Unicode String:



def    remove_unicode_non_printable(str)
      """Removes Non-printable chars from ASCII String"""
      return ''.join([ch for ch in str if ord(ch) > 31 or ord(c) = = 9])



Appreciate your feedback via comments.

Thanks.
Disclaimer:

The above post and all the posts in the blog are derived from facts, information, logical interpretation and logical conclusion of printed and internet materials available to me, perceived and produced by 99 gm brain of mine, which by no means always be accurate, consistent and complete.

All the posts are for personal quick reference only.

If any suggestion, correction, misinterpretation, misconception commented, which will be moderated and deleted if required, to avoid unforeseen issues.

If any trademark / copywrite issue is present, do send in a mail and appropriate tag (logo, name, website link) will be attached to the same.

Additional disclaimer will be attached wherever required in the post.