Programming

Learn Javascript Online for Free

Learning javascript online is easy now. There are plenty of websites you can download video tutorials from and learn javascript from scratch. You can also signup for classes on different website where you can learn it step by step. Below are the collection of some of the websites for Javascript tutorials. 1. codecademy.com : This(…)

Read More

Delete Duplicate Post from WordPress

If you use auto posters to populate your blog, sometimes you get trouble with duplicate posts. Not all auto posters have feature to remove duplicate posts. I once ran an auto poster and it posts all crap on my blog. Most of the post were duplicate. I could not found any good plugin to remove(…)

Read More

Parser to Download Mp3 Files

This is a simple program which download all Mp3 files from HTML page. Just find a website with Mp3 URLs and run the program on that page. It will download all MP3 files and saved them on your computer. import urllib import re tocrawlmp3=[] tocrawlpdf=[] link_exp = re.compile(‘

Read More

Convert String to Decimal Using C++ Program

Simple and efficient program to convert strings to decimal. take care of more than one periods, letters etc.. #include using namespace std; float decimal(string str) { char ch; int decimal_point = 0; int dec_count = 0; bool flag = 0; float val = 0.0; int len = str.length(); for( int i = 0; i =(…)

Read More

Find Duplicate Charachter in a String

This program will find the first letter which occurred more than once in the string #include using namespace std; char repeat(string s) { int _array[256] = {0}; int index; char ch; int i = 0; int length = s.length(); while(i < s.length()) { ch = s[i]; index = ch; i++; if(_array[index] == 1) return ch;(...)

Read More

Find Sub Array for a Given Sum

Given an unsorted array of nonnegative integers, find a continous subarray which adds to a given number. Examples: Input: arr[] = {1, 4, 20, 3, 10, 5}, sum = 33 Ouptut: Sum found between indexes 2 and 4 Input: arr[] = {1, 4, 0, 0, 3, 10, 5}, sum = 7 Ouptut: Sum found between(…)

Read More

Finding Depth of Tree in C++

This program is a part of previous program written for tree data structure. This code will show you how to delete a node anywhere in the tree. How to find the height and check if the tree is balanced or not. To check if the tree is balance or not we should make sure that(…)

Read More

Tree Data Structure in C++

This will show a simple program written in c++ which insert node in tree and traverse it in preorder, postorder and inorder, comments and suggestions are welcome. #include #include using namespace std; class BinarySearchTree { private: char data; BinarySearchTree *left; BinarySearchTree *right; public: void insert( char value); void preorder(BinarySearchTree *p); void inorder(BinarySearchTree *p); void postorder(BinarySearchTree(…)

Read More

Difficult Interview Questions with Solution

Q1: Why don’t we declare Stings using ‘new’ in Java Ans Take an example : String p =”something” String q = “Something” Here object p and q are pointing to same reference and if we write p==q it will return true as it will compare the objects. String p = new String(“something”) String q =(…)

Read More

Most common java interview questions

Here is the list of most common java interview questions: Question: What is the difference between an Interface and an Abstract class? Question: What is the purpose of garbage collection in Java, and when is it used? Question: Describe synchronization in respect to multithreading. Question: Explain different way of using thread? Question: What are pass(…)

Read More

How to Add Bulk User to PHPBB Forum

I had a list of users that I wanted to add them to phpbb forum and I wanted to add them in bulk. I search for the net and got c++ script which create php file. You just need to run the file which enter all then user entries in database. /** * addusers.cpp *(…)

Read More

PHP Code to Send Email using MySQL Database

Today I was writing a module for my project in PHP. I wanted to send information of all those customers whose subscription will expire after certain date. I wanted to make it automate so I used cron job. How to make this code run automatically . Using following step, you can set cronjob 1.) SSH(…)

Read More