Monday, October 20, 2014

Circular Dubly Linked List in C++

#include <iostream>
using namespace std;

class node 
{
   int value;
   node *head;
   node *tail;
   node *next;
   node *previous;
   node *current;
public:
  
   node()
   {
       value =0;
       head=NULL;
       tail=NULL;
       next=NULL;
   }
  
   bool isEmpty ()
   {
      if (head==NULL) return true;
   else
      return false ;
   }

   void SetFirstElement (int value)
   {
       if (isEmpty () )
        {
           node *n = new node ;
           n->next=NULL;
           n->value=value;
           n->previous=NULL;
           head=tail=current=n;
        }

   }

   void AddItem (int value)
   {
       if (isEmpty () ) SetFirstElement (value);
  
       else
        {
          node *n= new node;
          n->value=value;
          n->previous=current;
          n->next=NULL;
          tail->next=n;
          current=tail=n;
      
        }
    }
  
   void Remove () 
   {
      if (head!=NULL)
      {
         node *temp;
         temp=head;
         head=head->next;
         delete temp;
      }
      else
         cout <<"EMPTY"<<endl;
   }

  
   void print ()
  {
           if(isEmpty ())
           {
               cout<<"List is empty"<<endl;
           }
          
           else
               cout<<"The list is"<<endl;
  
           current=head;
          
           while(current!=NULL)
           {
               cout<<current->value<<endl;
               current=current->next;
           }
   }
   void add_at_begining (int value)
   {
      node *temp= new node ;
      temp->value=value;
      temp->previous=NULL;
      temp->next=head;
      head=temp;
   }

   bool search (int value)
   {
    current=head;
   
    while (current!=NULL)
      {
          if(current->value==value) return true;
          current=current->next;
      }
   }

   void AddItem(int back, int value)
   {
    current=head;
   
    if(search(back))
    {
      while(current!=NULL)
         {
            if(current->value==back)
               {
                  node *temp=new node;
                  temp=current->next;
                  node *temp1=new node;
                  temp1->value=value;
                  temp1->next=temp;
                  temp1->previous=current;
                  current->next=temp1;
               }
            current=current->next;
         }
      }
   }

   void sort ()
   {
       for(int i=0;i<10;i++)
       {
           current=head;
           while(current!=NULL)
           {  
               if(current->next==NULL) break;
               if(current->value>current->next->value)
               {
                      swap(current,current->next);
               }
      current=current->next;
           }
       }
   }
  
   void Remove (int value)
   {
    current=head;
   
    while(current!=NULL)
    {
      if(current->value==value)
      {
         node *temp=new node;
         temp=current;
         node *temp1=new node;
         temp1->previous=temp->previous;
         temp1->value=current->next->value;
         temp1->next=current->next->next;
         current=temp1;
         delete temp;
      }
     
      current=current->next;
    }
  }

  void print_previous (int value)
  {
    if(search(value))
    {
      current=head;
      while (current!=NULL)
         {
            if(current->value==value)
            {
                cout<<"CURRENT"<<current->value<<endl<<"Previous:"<<current->previous->value<<endl;
            }
           
            current=current->next;  
         }
     }
   }

   int check_elements();

   void swap(node *element1,node *element2 )
   {
      node *temp1,*temp2= new node;
      int temp=element1->value;

      temp1=element1;
      temp1->value=element2->value;
      element1=temp1;

      temp2=element2;
      temp2->value=temp;

      element2=temp2;
   }

  void check (int value)
  {
     current=head;
     while(current!=NULL)
     {
         if(current->value==value){ swap(current,current->next);break;}
     
         current=current->next;
     }
  }

  int max_value ()
  {
      current=head;
  
      int temp=0;
      while(current!=NULL)
        {
           if(temp<current->value) temp=current->value;
           current=current->next;
        }
     return temp;
  }

};

int main()
{
    return 0;
}

Checking Parenthesis code - in C++

#include<iostream>
#include<string>
#include<cassert>

using namespace std;

template<class T> class StackADT
{
public:

    virtual void initialstack() = 0;
    virtual bool isEmpty() const = 0;
    virtual bool isFull() const = 0;
    virtual void push(const T& otheritem) = 0;
    virtual T top() const = 0;
    virtual void pop() = 0;
};

template <class T> class Stack : public StackADT<T>{
    int size, tos;
    T *list;

public:
    Stack(int size)
    {
        if(size <= 0)
        {
            cout << "Size of the array must be positive" << endl;
            cout << "By default it is set to 100" << endl;
            this->size = 100;
        }
        else
        {
            this->size = size;
        }

        tos = 0;
        list = new T[this->size];
    }
    void initialstack()
    {
        tos = 0;
    }
    bool isFull() const
    {
        return(tos == size);
    }
    bool isEmpty() const
    {
        return(tos == 0);
    }
    void push(const T& otheritem)
    {
        if(!isFull())
        {
            list[tos] = otheritem;
            tos++;
        }
        else
        {
            cout << "Can not add t a full stack" << endl;
        }
    }
    void pop()
    {
        if(!isEmpty())
        {
            tos--;
        }
        else
        {
            cout << "Canno remove from a empty stack" << endl;
        }
    }
    T top() const
    {
        assert( tos != 0);
        return list[tos-1];
    }
    void copystack(const Stack<T>& otherstack)
    {
        delete[] list;
        size = otherstack.size;
        tos = otherstack.tos;

        list = new T[size];
        for(int j=0; j<tosl j++)
        {
            list[j] = otherstack.list[j];
        }
    }
    ~Stack()
    {
        delete []list;
    }

};


int main()
{

   int i, l;
   Stack<char> stack(100);
   char str[100] = {"{(A+B-C}"};
  
   l=strlen(str);
   for(i=0; i<l; i++)
   {
      
       if((str[i] == '(') ||  (str[i] == '{') || (str[i] == '['))
       {
            stack.push(str[i]);
       }
       else if((str[i] == ')') ||  (str[i] == '}') || (str[i] == ']'))
       {
             if(str[i] == ')')
           {
             if(stack.top() == '(')
                    {
                         stack.pop();
                    }
                    else
                    {
                          cout << "The parenthesis are not balanced "<< endl;
                    }
             }
             else if(str[i] == '}')
             {
                 if(stack.top() == '{')
                 {
                     stack.pop();
                 }
                 else
                 {
                     cout << "The parenthesis are not balanced "<< endl;
                 }
             }
             if(str[i] == ']')
             {
                 if(stack.top() == '[')
                 {
                     stack.pop();
                 }
                 else
                 {
                     cout << "The parenthesis are not balanced "<< endl;
                 }
             }
         }
     }
   
   if(stack.isEmpty())
   {
       cout << "The parenthesis are balanced " << endl;
   }
  

 
   return 0;
}

Convertiong Infix to Postfix code - in C++

#include <iostream>
#include <stack>
#include <string>
#include <cctype>
using namespace std;

class infix_to_postfix
{

protected:
    string exp;
    string infixexp;
    stack<char> charstack;

    bool prcd(char a, char b)
    {
        return a > b;
    }

   public:
            infix_to_postfix(string str)
            {
                 exp = str;
            }

            void push_to_stack()
            {
                  for(int i = 0; exp[i]; ++i)
                  {
                         if(exp[i] == ' ')
                             continue;

                   if(isalnum(exp[i]))
                   {
                         infixexp += exp[i];
                   }

             else
             {
                      while(!charstack.empty() && prcd(exp[i], charstack.top()))
                      {
                              infixexp += charstack.top();
                               charstack.pop();
                      }

                              charstack.push(exp[i]);
             }
        }

        while(!charstack.empty())
        {
            infixexp += charstack.top();
            charstack.pop();
        }
    }

    string print()
    {
        return infixexp;
    }


   
};

class evaluate {
public:
    evaluate(string str)
    {
        exp = str;
    }

    void peform()
    {
        int res;

        for(int i = 0; i < exp.length(); i++)
        {
            if(isalnum(exp[i]))
            {
                nums.push(exp[i] - '0');
            }
            else
            {
                if(!nums.empty())
                {
                    int a = nums.top();
                    nums.pop();
                    int b = nums.top();
                    nums.pop();

                    res = doit(b, exp[i], a);
                }
                nums.push(res);
            }
        }
    }

    int retres()
    {
        return nums.top();
    }

protected:
    string exp;
    stack<int> nums;

private:
    int doit(int a, char c, int b)
    {
        switch(c)
        {
        case '+':
            return a + b;
            break;

        case '-':
            return a - b;
            break;

        case '*':
            return a * b;
            break;

        case '/':
            return a / b;
            break;
        }
    }
};

int main()
{
    string infixstr;
    infix_to_postfix itop("5 * 2 + 3 * 1 - 9");

    itop.push_to_stack();
    infixstr = itop.print();

    cout << infixstr << endl;

    evaluate ev(infixstr);
    ev.peform();

    int res = ev.retres();

    cout << res << endl;

    return 0;
}

Josephus Problem Solvation code in C++

#include<iostream>
using namespace std;

struct node{

    int val;
    node *next;
};

void insert_node(int);
void print();
void josephus(int);
node *head,*nptr,*tptr;

int main(){

    head = NULL;
    int start,n;
    cout << "Enter node number: " << endl;
    cin >> n;
    insert_node(n);
    cout << "The persons are:" << endl;
    print();
    cout << "Enter start number: " << endl;
    cin >> start;
    josephus(start);
    return 0;
}

void josephus(int start){

    node *ptr,*qptr;
    qptr = ptr = head;
    for (int i = 1; i < start; i++){

            ptr = ptr->next;
            qptr = ptr;
    }
    while (ptr->next != ptr){

        qptr->next = ptr->next->next;
        ptr = qptr->next;
        qptr = ptr;
    }
    head =  ptr;
    cout << "The person survived is :" << ptr->val << endl;
}
void insert_node (int n){

    for(int i = 0; i < n; i++){

        nptr = new node;
        nptr->val = i+1;
        nptr->next = NULL;
        if (head == NULL){

            head = nptr;
            tptr = nptr;
        }
        else{

            tptr->next = nptr;
            tptr = nptr;
        }
    }
    tptr->next = head;
}
void print(){

    tptr = head;
    cout << tptr->val << "->";
    tptr = tptr->next;
    while (head != tptr){

        cout << tptr->val << "->";
        tptr = tptr->next;
    }
    cout<< endl;
}

Monday, June 23, 2014

Live streaming Brazil world cup 2014 with low connection and video of goals.

Live streaming Brazil  world cup  2014 with low connection and clear . You can also see the most popular video of world cup .Click on the Start Live Streaming button  then page down and wait 10 second .

Start Live Streaming.... 



Friday, June 20, 2014

Online Youtube Converter (Convert video to mp3)

Online YouTube converter site .You can convert any YouTube video in online with in short time and download it .



1. First of all you have to fine your choice able video song then copy the link .

2. Got this site      Video Converter    and pest your video link on the space and Press  Convert Video.

3. After all download your song in audio format  .

Thank You

Saturday, March 22, 2014

International Channels live streaming with low internet speed

To  get the  international  channels  click here  : 
                                                     
                                         International channels 

watch Indian channels live streaming with low net speed

Net speed is a big problem for all of us .we can't watch the channels for low net speed .But now you can watch all channels of Indian  with low network .I am using this links .( the video Quality may little bit of low )
clink here to get the channels  :
   
                                                                     Indian Channels

watch all the bangla Channels live streaming with low net speed

Net speed is a big problem for all of us .we can't watch the channels for low net speed .But now you can watch all channels of Bangladesh  with low network .I am using this links .( the video Quality may little bit of low )
clink here to get the channels  :    
 Bangladeshi Channels

watch T20 cricket world cup 2014 live streaming with low speed 100% sure

I face a lot of problem to watch world cup by live streaming because of my low speed internet ,but Now I can watch matches by thins websites .So I share the link .You can use this link .      
click here  :      
 sports channels 

Tuesday, March 18, 2014

find out Odd and even numbers by C programming

#include <stdio.h>
int main(){
      int num;
      printf("Enter an integer you want to check: ");
      scanf("%d",&num);
      if((num%2)==0)     
           printf("%d is even.",num);
      else
           printf("%d is odd.",num);
      return 0;
}

Get Maltification table ( Namota ) By C programming

#include <stdio.h>
#include<conio.h>
int main()
{
    int n, i;
    printf("Enter an integer to find multiplication table: ");
    scanf("%d",&n);
    for(i=1;i<=10;++i)
    {
        printf("%d * %d = %d\n", n, i, n*i);
    }
    getch () ;
    return 0;
}

Floyed tranggal by C

#include <stdio.h>
#include<conio.h>

int main()
{
  int n, i,  c, a = 1;

  printf("Enter the number of rows of Floyd's triangle to print\n");
  scanf("%d", &n);

  for (i = 1; i <= n; i++)
  {
    for (c = 1; c <= i; c++)
    {
      printf("%d ",a);
      a++;
    }
    printf("\n");
  }
 getch () ;
  return 0;
}

Monday, March 17, 2014

get Fibonnaki numbers from your range by C programming

#include<conio.h>
#include<stdio.h>

int main()
  {
    int max,n1,n2,i;
    printf("\n Enter a Range=");
    scanf("\n%d",&max);
    n1=0;
    n2=1;
    printf("\n%d\n%d",n1,n2);
      for(i=1;i<max;i=i+2)
       {
    n1=n1+n2;
    n2=n1+n2;
    printf("\n%d\n%d",n1,n2);
       }
    getch();
    return(0);
  }

Get Factorial of a Number by C Programming

#include <stdio.h>
#include<conio.h>
 int main()
{
 int c, n, fact = 1;
 printf("Enter a number to calculate it's factorial\n");
 scanf("%d", &n);
 for (c = 1; c <= n; c++)
 fact = fact * c;
 printf("Factorial of %d = %d\n", n, fact);
 getch () ;
 return 0;

}

Sunday, February 16, 2014

Find Out Leap year By C Code / Programming

# include<stdio.h>
#include<conio.h>
int main (void) {
    int a ; printf("Enter the year to know lipear or not : ");
    scanf("%d",&a);
    if (((a%100)!=0)&&((a%4)==0)||((a%400)==0))
        printf ("\n It is a lepiar year ");
    else printf ("it is not a lipear year");
    getch ();
 return 0 ; }

Saturday, February 15, 2014

GET A TO Z BY C CODEING

#include<stdio.h>
#include<conio.h>
void main ()
{ char ch ;
for (ch='A';ch<='Z';ch++)
printf("  %C",ch);
getch ();
}

Friday, February 7, 2014

TUTORIAL OF C PROGRAMMING

First semester of  CIS and CSE there are a subject called Programming Language  (1102) .In this subject students have to learn C programming  Language .Which is first time difficult for the student of CIS and CSE .They can't understand there lesson and feel upset but C is not so hard anything just need to understand some rules and mind some system , procedure ,some code and some logic ,math   and practice more and more .

Now we will provide some easy tricks to learn and understand C Programming Language  shortcut  :

1. what is C programming Language ?

Ans : C programming Language is a language which is read  Compiler software (Translator soft ) easily and translate it to Matching language .Computer can read Matching language  and take it as a command so human create program by C language because it is more easy and friendly for human and then it will translate it to Matching language and  command matching to work . (shortcut ans)

STUDY COMPUTER SCIENCE FROM BUSINESS AND ARTS BACKGROUND STUDENT

It is a great opportunity to study Bachelor of  Science in Computer Science for the student of Business and Arts  background .Because CIS is a subject which one is contain with  BBA and CSE subject so it will very easy to Business background students .Now it is available in Bangladesh .So the student of other background  can admission this subject and get Bachelor Degree from Computer science .

WHAT IS CIS ?

CIS  sis subject of computer science .Full meaning of CIS is Computer Information System .This subject is specially for the student of business and arts Background student who want to study with IT. CIS is a subject which one is contain business and CSE related subject .Maximum  subject of CSE are here and smiler .Some of privet University now provide in Bangladesh this subject but it is a world wide permitted and demanded subject . 

Thursday, February 6, 2014

COURSE DESCRIPTION OF CIS

CIS  is a subject which is almost similar of CSE without  math and Physics .Business math and BBA related some subject are alternative of  math and Physics .without them almost all subject are same .here the course description are given below .

BACHELOR OF SCIENCE IN COMPUTER INFORMATION SYSTEM (BSC IN CIS)


CODE COURSE DESCRIPTION PREREQUISITE CREDIT
SEMESTER 1
CSC 1101 Computer Fundamentals NIL 3/Lab
CSC 1102 Programming Language 1 NIL 3/Lab
MAT 1101 Business Math 1 NIL 3
BBA 2106 Basics in Natural Science NIL 3
ENG 1101 English Reading Skills and Public Speaking NIL 3
Total Credit: 15
SEMESTER 2
CSC 1203 Programming Language 2 CSC 1102 3/Lab
CSC 1204 Discrete Mathematics CSC 1102 3
MAT 1202 Business Math 2 MAT 1101 3
ENG 1202 English Writing Skills and Communication ENG 1101 3
BBA 1102 Principles of Accounting NIL 3
BBA 1203 Principles of Management NIL 3
Total Credit: 18
SEMESTER 3
CSC 2105 Data Structure CSC 1203, CSC 1204 3/Lab
CSC 2106 Computer Organization & Architecture CSC 1203 3/Lab
CSC 2107 Introduction to Database CSC 1203 3/Lab
MIS 3201 Management Information System CSC 1203 3
ENG 2101 Business Communications ENG 1202 3
BBA 1204 Principles of Economics MAT 1205, CSC 1204 3
Total Credit: 18
SEMESTER 4
CSC 2208 Operating Systems CSC 2106 3/Lab
CSC 2209 Object Oriented Programming 1 CSC 2105 3/Lab
CSC 2210 Object Oriented Analysis and Design CSC 2107, CSC 2105 3
CSC 2211 Algorithms CSC 2105 3/Lab
CSC 2212 Advanced Database Management Systems CSC 2107 3/Lab
BBA 2107 Principles of Marketing BBA 1204 3
Total Credit: 18
SEMESTER 5
CSC 3114 Software Engineering CSC 2210 3
CSC 3115 Object Oriented Programming 2 CSC 2209 3/Lab
CSC 3116 Computer Networks CSC 2208 3/Lab
CSC 3118 Computer and Information Ethics MIS 3201 3
CSC 3127 Enterprise Resource Planning MIS 3201 3
MAT 2103 Business Statistics MAT 1202 3
Total Credit: 18
SEMESTER 6
CSC 3792 Software Project 1 Pre-Grad. year 3
CSC 3222 Web Technologies CSC 3115 3/Lab
CSC 3223 Advanced Computer Networks CSC 3116 3/Lab
CSC 3228 Internet Security CSC 3116 3
CSC 3234 Advanced Operating Systems CSC 2208 3/Lab
Total Credit: 15
SEMESTER 7
CSC 4121 Artificial Intelligence & Expert Sys. CSC 2211 3/Lab
CSC 4125 Software Development Project Management CSC 3114 3
CSC 4136 Multimedia Systems CSC 3222 3
CSC 4135 E-Governance CSC 3222 3
CSC **** Elective 1 --- 3
CSC **** Elective 2 --- 3
Total Credit: 18
SEMESTER 8
CSC 4298 Software Project 2 CSC 3197 3
CSC 4296 Internship Final Semester 3
CSC **** Elective 3 --- 3
Total Credit: 6
TOTAL DEGREE CREDITS: 129
ELECTIVES
CODE COURSE DESCRIPTION PREREQUISITE CREDIT
CSC 3119 Basic Graph Theory CSC 2211 3
CSC 4126 Software Requirement Engineering CSC 3114 3
CSC 3230 Formal Methods of Software Engg. CSC 3114 3
CSC 4137 Simulation & Modeling CSC 3223, CSC 2211 3/Lab
CSC 4133 Software Quality and Testing CSC 3114 3
CSC 3232 Embedded System Software CSC 3114 3
CSC 4139 Data Warehouse and Data Mining CSC 4121, CSC 2107 3
CSC 4140 Human Computer Interaction CSC 4121 3
CSC 4180 Advanced Topics in Programming I CSC 3115 3/Lab
CSC 4181 Advanced Topics in Programming II CSC 3115 3/Lab
CSC 4182 Advanced Topics in Programming III CSC 3115 3/Lab


see the courses thing about it .
Thank You