Tuesday, October 21, 2014

Ravan Dahan Captured on Camera






Hello everyone, I went for Ravan Dahan on the day of Dushehra at Dushehra maidan Indore and I enjoyed every glipmse of it , but for those were not able to live this moment for some reason can have a look and enjoy the festival with this short little video that I shot on that day. Enjoy guys



The video before Ravan Dahan showcasing the Ravan.



and the video of the Ravan Dahan day.





Wednesday, October 8, 2014

Making a wifi hotspot in Ubuntu to be used for Android , ios and Windows phone






Hello guys , we know that people want to use the working internet not on one device but on different devices and there would be the case when on the go you would not be able to carry your wifi router to make it happen, well here comes the wifi hotspot come into play. When one machine would be created as a hotspot which share its network to the other devices as well in Windows machine it is quite easy as you just need to use a software named Connectify (and there might be some more), but in Ubuntu you have in-built options provided by Ubuntu to connect other devices. The following video would show you how to make a wifi hotspot in Ubuntu Operating System please have a look.


Ubuntu Linux Toolbox: 1000 + Commands for Power Users





But one problem everyone would come up , why this does not connect the android phones or ios phones to the internet. For this you need to create an access point supported by your mobile devices because android , windows phone does not support the ad-hoc networks. 

For ubuntu 12.04 use the below commands

sudo add-apt-repository ppa:nilarimogard/webupd8

sudo apt-get update

sudo apt-get install ap-hotspot
For Ubuntu 14.04 you need to downgrade the hostapd so please do that using the following commands

  1. First uninstall the buggy hostapd in Ubuntu 14.04 via:
    sudo apt-get remove hostapd
  2. Copy and paste the command below into terminal that matches your OS type – check out via System Setting -> Details – and hit run to download, install, and hold the old version of hostapd.
    While running the commands below, type in your user password in terminal when prompt.
    For 64-bit system:
    cd /tmp && wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb && sudo dpkg -i hostapd*.deb && sudo apt-mark hold hostapd
    For 32-bit system:
    cd /tmp && wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb && sudo dpkg -i hostapd*.deb && sudo apt-mark hold hostapd


after the whole process use the following command

sudo ap-hotspot configure

and Finally start the hotspot via this command.

sudo ap-hotspot start
after all this you will get your hotspot working enjoy the internet.





-->

Wednesday, October 1, 2014

MOOC (Online Course) to watch out: Learn to Program: The fundamentals Coursera



The course Learn to Program: The Fundamental offered by University of Toronto on Coursera, aims at providing the basic introduction about programming to the beginners using the the easy and readable programming language Python. The course is good for those who has learnt some basic computer science stuff and also for those who wants to get their hands on Python programming language. The Exercises and quizzes are very easy and everyone can complete it by giving just 1-2 hours a day watching videos and doing quizzes and assignments. Moreover you can find a good community in forums to help you out with learning and sharing more and more.

The course offers a certificate so that adds one more reason to do this course. I have completed this course and here is my certificate I am sharing with you.  This is just a stepping stone towards using python to solve the problems.












-->

Monday, September 29, 2014

MOOC (Online Course) to Watch out: Intro to Computer Science 101 CS101 Udacity






Hello, everyone after moving to university from Schools we need some good exposure to the field we are studying. I am studying Computer Applications and I found a good resource to get people started with computer science from the beginning. If the people have taken the introductory course of computer science in college earlier and still do not feel confident about what they have learnt and want to develop themselves. They must do it.

Intro to Computer Science CS101 offered on udacity introduces computer science to the people. The basic stuff like software , hardware and the most important to instruct the computer is the programming language and in this course they have used python 2.7 to introduce the newbees programming and one more benefit is that at the end of the course you would finish up making your own web crawler or web spider written in python. Web crawler is a program search engine like Google uses to find pages and index them according to the page attributes (page rank, most visited pages, max occurrence of the word on the page) of the webpage. Moreover you can find a good community in forums to help you out with learning and sharing more and more. So have a look at that I have completed the course and received a nice certificate and I am very happy to share it with everyone.








-->

Tuesday, September 16, 2014

Program to print fibonacci series in C





#include <stdio.h>
int main()
{
    int number,i, f1=0, f2=1, f3=0;
    printf("Enter the number: ");
    scanf("%d", &number);
    printf("The following Series is: ");
    for(i=1;i<=number;i++)
    {
  printf("\n %d", f3);
  f1=f2;
  f2=f3;
  f3=f1+f2;
  
 }
 return 0;
}

Output
Enter the number: 5
The following Series is:
1
1
2
3
5





Fibonacci Series using Recursion



#include<stdio.h>

void printFibonacci(int);

int main(){

    int n;
    

    printf("Enter the range of the Fibonacci series: ");
    scanf("%d",&n);

    printf("Fibonacci Series: ");
    printf("%d %d ",0,1);
    printFibonacci(n);

    return 0;
}

void printFibonacci(int n){

    static long int first=0,second=1,sum;

    if(n>0){
         sum = first + second;
         first = second;
         second = sum;
         printf("%ld ",sum);
         printFibonacci(n-1);
    }

}

Output
Enter the range of the Fibonacci series: 5
Fibonacci Series: 0 1 1 2 3 5 8








-->

Program to find a factorial of a given number in C






#include <stdio.h>
int main()
{
    int fact=1, number,i;
    printf("Enter the number: ");
    scanf("%d", &number);
    
    for(i=1;i<=number;i++)
    {
  fact = fact * i;
  
 }
 
 printf("The Factorial of %d is %d", number, fact);
 return 0;
}

Output

Enter the number: 6
The factorial of 6 is 720


Factorial using Recursion




#include <stdio.h>
int fact = 1;
int factorial(int num)
{
 if (num == 0)
 {
  return fact;
 }
 else
 {
  fact = num * factorial(num-1);
 }
 return fact;
 
 }
int main()
{
 int number;
 printf("Enter the number to find factorial: ");
 scanf("%d",&number);
 number = factorial(number);
 printf("The Factorial is : %d", number);
 return 0;
}

Output
Enter the number to find factorial: 6
The factorial is : 720





-->

Tuesday, September 2, 2014

Program to find Sum of Even and Odd terms in the range in C







 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <stdio.h>
int main()
{
    int i=0,range,odd_sum=0, even_sum=0;
    printf("Enter the range for odd and even nos sum: ");
    scanf("%d", &range);
    for(i=1;i<=range;i++)
    {
        if(i%2 == 0)
        {
            even_sum = even_sum + i;
        }
        else if(i%2 == 1)
        {
            odd_sum = odd_sum + i;
        }
        else
        {
            printf("May be 0");
        }
    }
    printf("\nEven Sum: %d", even_sum);
    printf("\nOdd Sum: %d", odd_sum);
    return 0;

}

Output

Enter the range for odd and even nos sum: 10
Even Sum: 30
Odd Sum: 25

Now the same work can be done using the recursion , Here sum_all is a recursive function that is doing the required work of summing odd numerals and even numerals separately.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* using recursion */
#include <stdio.h>
int sum_all(int range, int even_sum, int odd_sum)
{
    if(range == 0)
    {
        printf("\nEven Sum: %d", even_sum);
        printf("\nOdd Sum: %d", odd_sum);
        return 0;
    }
    else
    {
        if(range % 2 == 0)
        {
            even_sum= even_sum + range;
        }
        else if(range % 2 == 1)
        {
            odd_sum =  odd_sum + range;
        }
        else
        {
            printf("Invalid Operation");
        }
        sum_all(range - 1, even_sum, odd_sum);
    }
    return 0;
}
int main()
{
    int i=0,range,odd_sum=0, even_sum=0;
    printf("Enter the range for odd and even nos sum: ");
    scanf("%d", &range);
    i = sum_all(range, even_sum, odd_sum);
    printf("\nEven Sum: %d", even_sum);
    printf("\nOdd Sum: %d", odd_sum);
    return 0;

}

Output

Enter the range for odd and even nos sum: 10
Even Sum: 30
Odd Sum: 25