https://youtu.be/5E_0LYJ3fL8(This is the video link in youtube)
This blog shows the updates and new information about the things in real life. It also tells the videos in klv productions.
Thursday, 17 December 2015
Tuesday, 15 December 2015
Open virus attacked pen drive in command promt
https://youtu.be/niUydgR30XU(This link in youtube shows how to open virus attacked pen drive in command promt).
Saturday, 12 December 2015
Showing wi-fi password that has stored in your system
https://youtu.be/WcJB9ImzN2c
(the above link shows how to view wi-fi password that has stored in system)
(the above link shows how to view wi-fi password that has stored in system)
Sunday, 29 November 2015
Thursday, 5 November 2015
Sunday, 4 October 2015
Inspirational video about life
An inspirational video about life.
This is the video URL https://youtu.be/Q3FM_8wZBkI
This is the video URL https://youtu.be/Q3FM_8wZBkI
Saturday, 3 October 2015
A video of Life (Everybody must watch it)
https://youtu.be/gX79R-SDhdk(A video about Life).Everybody must watch it.
Friday, 18 September 2015
Wednesday, 16 September 2015
Monday, 31 August 2015
os banker's algorithm for deadlock avoidence
import java.util.*;
class Banker
{
public static void main(String args[])
{
Scanner s=new Scanner(System.in);
int r,p,n,count=0,i,j,flag,safe;
System.out.println("enter no of resources");
r=s.nextInt();
System.out.println("enter no of processes");
p=s.nextInt();
int running[]=new int[p];
for(i=0;i<p;i++)
{
running[i]=1;
count++;
}
int totrs[]=new int[r];
System.out.println("enter system resources");
for(i=0;i<r;i++)
totrs[i]=s.nextInt();
int occrs[][]=new int[p][r];
System.out.println("enter occupied resources");
for(i=0;i<p;i++)
{
for(j=0;j<r;j++)
{
occrs[i][j]=s.nextInt();
}
}
int add[]=new int[r];
int maxrs[][]=new int[p][r];
System.out.println("enter maximum rq resources");
for(i=0;i<p;i++)
{
for(j=0;j<r;j++)
{
maxrs[i][j]=s.nextInt();
}
}
System.out.println("adding resource using by processes");
for(i=0;i<p;i++)
{
for(j=0;j<r;j++)
{
add[j]+=occrs[i][j];
}
}
for(i=0;i<r;i++)
System.out.println(add[i]);
int avl[]=new int[r];
for(i=0;i<r;i++)
avl[i]=totrs[i]-add[i];
System.out.println("available resources");
for(i=0;i<r;i++)
System.out.println(avl[i]);
while(count!=0)
{
safe=0;
for(i=0;i<p;i++)
{
if(running[i]==1)
{
flag=1;
for(j=0;j<r;j++)
{
if(maxrs[i][j]-occrs[i][j]>avl[j])
{
flag=0;
break;
}
}
if(flag==1)
{
System.out.println(i+1+"is executing");
running[i]=0;
count--;
for(j=0;j<r;j++)
avl[j]+=occrs[i][j];
safe=1;
}
}
}
if(safe==1)
{
System.out.println("the process is in safe state");
System.out.println("the avl resource is");
for(j=0;j<r;j++)
System.out.println(avl[j]);
}
else
{
System.out.println("the process is in unsafe");
break;
}
}
}
}
class Banker
{
public static void main(String args[])
{
Scanner s=new Scanner(System.in);
int r,p,n,count=0,i,j,flag,safe;
System.out.println("enter no of resources");
r=s.nextInt();
System.out.println("enter no of processes");
p=s.nextInt();
int running[]=new int[p];
for(i=0;i<p;i++)
{
running[i]=1;
count++;
}
int totrs[]=new int[r];
System.out.println("enter system resources");
for(i=0;i<r;i++)
totrs[i]=s.nextInt();
int occrs[][]=new int[p][r];
System.out.println("enter occupied resources");
for(i=0;i<p;i++)
{
for(j=0;j<r;j++)
{
occrs[i][j]=s.nextInt();
}
}
int add[]=new int[r];
int maxrs[][]=new int[p][r];
System.out.println("enter maximum rq resources");
for(i=0;i<p;i++)
{
for(j=0;j<r;j++)
{
maxrs[i][j]=s.nextInt();
}
}
System.out.println("adding resource using by processes");
for(i=0;i<p;i++)
{
for(j=0;j<r;j++)
{
add[j]+=occrs[i][j];
}
}
for(i=0;i<r;i++)
System.out.println(add[i]);
int avl[]=new int[r];
for(i=0;i<r;i++)
avl[i]=totrs[i]-add[i];
System.out.println("available resources");
for(i=0;i<r;i++)
System.out.println(avl[i]);
while(count!=0)
{
safe=0;
for(i=0;i<p;i++)
{
if(running[i]==1)
{
flag=1;
for(j=0;j<r;j++)
{
if(maxrs[i][j]-occrs[i][j]>avl[j])
{
flag=0;
break;
}
}
if(flag==1)
{
System.out.println(i+1+"is executing");
running[i]=0;
count--;
for(j=0;j<r;j++)
avl[j]+=occrs[i][j];
safe=1;
}
}
}
if(safe==1)
{
System.out.println("the process is in safe state");
System.out.println("the avl resource is");
for(j=0;j<r;j++)
System.out.println(avl[j]);
}
else
{
System.out.println("the process is in unsafe");
break;
}
}
}
}
Sunday, 30 August 2015
Saturday, 29 August 2015
Tuesday, 25 August 2015
Thursday, 20 August 2015
An amazing funny video by life institute students
https://www.youtube.com/watch?v=QyVfKK1-Zh0 (This is the youtube video URL)
Wednesday, 19 August 2015
Tuesday, 18 August 2015
Saturday, 15 August 2015
Sunday, 9 August 2015
Thursday, 2 July 2015
put your brain on this
1) India's individual gold medal in beizing olympic 2008 in which of the following events?
a) Hockey b)Wresting c) Riffle Shooting d)Badminton
2) The world's largest bridge has been established in __________
a) U.S.A b)India c) Japan d) China e)Malaysia
3) If 2=1,
3=3,
4=12,
5=60,then 6=?
a)120 b)180 c)360 d)720 e)none
// please comment your answers
//answers will reveal tomorrow
a) Hockey b)Wresting c) Riffle Shooting d)Badminton
2) The world's largest bridge has been established in __________
a) U.S.A b)India c) Japan d) China e)Malaysia
3) If 2=1,
3=3,
4=12,
5=60,then 6=?
a)120 b)180 c)360 d)720 e)none
// please comment your answers
//answers will reveal tomorrow
Quotation for the day
I have not failed.
I have just found 10,000 ways that won't work.
Thomas Alva Edison
I have just found 10,000 ways that won't work.
Thomas Alva Edison
Tuesday, 30 June 2015
Monday, 29 June 2015
Wednesday, 24 June 2015
simple puzzle questions
1.which word does not belongs with others?Give explanation?
a) inch b) ounce c) centimeter d) yard
2.which number replace the questionmark(?)
7 3 6 2
7 2 5 4
1 1 2 4
4 2 1 ?
3.which three numbers have the same answer whether they added or multiplied together?
a) inch b) ounce c) centimeter d) yard
2.which number replace the questionmark(?)
7 3 6 2
7 2 5 4
1 1 2 4
4 2 1 ?
3.which three numbers have the same answer whether they added or multiplied together?
Monday, 22 June 2015
java progrme for quadratic equation to find roots
import java.util.*;
class Abc
{
public static void main(String args[])
{
Scanner s=new Scanner(System.in);
float a,b,c,d;
float r1,r2;
System.out.println("enter equation numbers");
a=s.nextInt();
b=s.nextInt();
c=s.nextInt();
d=(b*b)-(4*a*c);
if(d<0)
{
System.out.println("roots are imaginary");
}
else if(d==0)
{
r1=(float)(-b+Math.sqrt(d))/(2*a);
r2=(float)(-b-Math.sqrt(d))/(2*a);
System.out.println(r1+" "+r2);
}
else
{
r1=r2=-b/(2*a);
System.out.println(r1);
}
}
}
class Abc
{
public static void main(String args[])
{
Scanner s=new Scanner(System.in);
float a,b,c,d;
float r1,r2;
System.out.println("enter equation numbers");
a=s.nextInt();
b=s.nextInt();
c=s.nextInt();
d=(b*b)-(4*a*c);
if(d<0)
{
System.out.println("roots are imaginary");
}
else if(d==0)
{
r1=(float)(-b+Math.sqrt(d))/(2*a);
r2=(float)(-b-Math.sqrt(d))/(2*a);
System.out.println(r1+" "+r2);
}
else
{
r1=r2=-b/(2*a);
System.out.println(r1);
}
}
}
c programe for linear search
#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],i,n,f=0;// array and variables declaration
printf("enter arry elements");
for(i=0;i<10;i++)
scanf("%d",&a[i]);
printf("enter element to search");
scanf("%d",&n);
for(i=0;i<10;i++)
{
if(a[i]==n)
{
f=1;
break;
}
}
if(f==1)
printf("element found at index %d",i);
else
printf("element not found");
}
#include<conio.h>
void main()
{
int a[10],i,n,f=0;// array and variables declaration
printf("enter arry elements");
for(i=0;i<10;i++)
scanf("%d",&a[i]);
printf("enter element to search");
scanf("%d",&n);
for(i=0;i<10;i++)
{
if(a[i]==n)
{
f=1;
break;
}
}
if(f==1)
printf("element found at index %d",i);
else
printf("element not found");
}
c programe for hashing technique
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int hashtable[40];
int bucket;
int hash(int key)
{
return key%100;
}
int rehash(int key)
{
return (key+1)%100;
}
void insert(void)
{
int data,count=0;
printf("enter data to insert");
scanf("%d",&data);
bucket=hash(data);
if(bucket>=40)
bucket=0;
while(hashtable[bucket]!=0)
{
bucket=rehash(bucket);
count++;
if(count>=40)
{
printf("memory full");
break;
}
}
if(hashtable[bucket]==0)
hashtable[bucket]=data;
printf("data is stored at index%d",bucket);
}
void search(void)
{
int i,isfound=0,key;
printf("enter key to search");
scanf("%d",&key);
for(i=0;i<=40;i++)
{
if(hashtable[i]==key)
{
isfound=1;
break;
}
}
if(isfound==1)
printf("found");
else
printf("not found");
}
void deleteit(void)
{
int key,i,isfound=0;
printf("enter the key to delete");
scanf("%d",&key);
for(i=0;i<40;i++)
{
if(hashtable[i]==key)
{
isfound=1;
break;
}
}
if(isfound==1)
{
hashtable[i]=0;
printf("the key is deleted");
}
else
printf("can't delete");
}
void display()
{
int i;
for(i=0;i<40;i++)
printf("%3d",hashtable[i]);
}
void main()
{
int ch,i;
for(i=0;i<40;i++)
hashtable[i]=0;
while(1)
{
printf("1.insert\n2.search\n3.delete\n4.display\nexit\n");
printf("enter your choice");
scanf("%d",&ch); {
switch(ch)
{
case 1:insert();
break;
case 2:search();
break;
case 3:deleteit();
break;
case 4:display();break;
case 5:exit(0);
default:
printf("entered choice is wrong");
}
}
}
}
#include<conio.h>
#include<stdlib.h>
int hashtable[40];
int bucket;
int hash(int key)
{
return key%100;
}
int rehash(int key)
{
return (key+1)%100;
}
void insert(void)
{
int data,count=0;
printf("enter data to insert");
scanf("%d",&data);
bucket=hash(data);
if(bucket>=40)
bucket=0;
while(hashtable[bucket]!=0)
{
bucket=rehash(bucket);
count++;
if(count>=40)
{
printf("memory full");
break;
}
}
if(hashtable[bucket]==0)
hashtable[bucket]=data;
printf("data is stored at index%d",bucket);
}
void search(void)
{
int i,isfound=0,key;
printf("enter key to search");
scanf("%d",&key);
for(i=0;i<=40;i++)
{
if(hashtable[i]==key)
{
isfound=1;
break;
}
}
if(isfound==1)
printf("found");
else
printf("not found");
}
void deleteit(void)
{
int key,i,isfound=0;
printf("enter the key to delete");
scanf("%d",&key);
for(i=0;i<40;i++)
{
if(hashtable[i]==key)
{
isfound=1;
break;
}
}
if(isfound==1)
{
hashtable[i]=0;
printf("the key is deleted");
}
else
printf("can't delete");
}
void display()
{
int i;
for(i=0;i<40;i++)
printf("%3d",hashtable[i]);
}
void main()
{
int ch,i;
for(i=0;i<40;i++)
hashtable[i]=0;
while(1)
{
printf("1.insert\n2.search\n3.delete\n4.display\nexit\n");
printf("enter your choice");
scanf("%d",&ch); {
switch(ch)
{
case 1:insert();
break;
case 2:search();
break;
case 3:deleteit();
break;
case 4:display();break;
case 5:exit(0);
default:
printf("entered choice is wrong");
}
}
}
}
c progrme for swaping two numbers
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
printf("enter a value and b value");
scanf("%d%d",&a,&b);
c=a;
a=b;
b=c;
printf("after swapping");
printf("%d%d",a,b);
}
#include<conio.h>
void main()
{
int a,b,c;
printf("enter a value and b value");
scanf("%d%d",&a,&b);
c=a;
a=b;
b=c;
printf("after swapping");
printf("%d%d",a,b);
}
Subscribe to:
Posts (Atom)