Posts

Showing posts from 2013

How to use clrscr() function in c, c++ program in Ubuntu or in Linux

It is very simple to use the substitute of clrscr() function in Ubuntu. I have used it in Ubuntu terminal and i think it would work properly in other Linux OS. #include<iostream> #include<cstdlib> using namespace std; main() { system("clear"); .... ... ... .... ... ... }

What is the difference between direct access and sequential access?

Image
Both terms "direct access" and "sequential access" refer to accessing schemes in the file system. Sequential access must begin at the beginning and access each element in order, one after the other. Direct access allows the access of any element directly by locating it by its index number or address. In sequential access addition of data is fast but retrieval of data is slow. In direct access addition of data is slow as reordering of data blocks may be needed to put current data block after the last used data block for the file. But retrieval of data is fast. Data structure implementing Sequential access is linked list. Data structure implementing Direct access is an Array. Application areas:- A situation where rate of addition of data is much larger compared to retrieval of data Sequential access is preferred, in opposite situation Direct access is more suitable. Magnetic tape has only sequential access, but CDs had direct access. If y

5 Deadly linux commands that can Destroy one System

1. Command > rm -rf /         = It will Delete Everything Explanation : It is a combination of three keywords. First is : rm It will remove all the files followed by this  command. Second is : -rf This will run rm command in more effective  way and will remove everything (all files and folders  inside the specified folder ) without asking confirmation  from the user. Third is : / This will start removing the data from the root   directory  and will delete everything from the computer  including the data of removable media. 2. Command > :(){ :|: & };:                    = Shell function that gets  replicated. This command creates a shell function , which once get  initialized starts to create multiple copies of itself. It results  in taking quickly all the memory and power of CPU. It  makes computer freeze or not responding. This is also known as Denial Of Service Attack. 3. Command > mkfs.ext4 /dev/sda1           = This command will  format the hard

Hide Files or Folders Using Command Prompt

Trick to hide files and folders using Command Prompt The most important thing is that, once hidden with this method, the files/folders cannot be viewed by any search options even if you click "Show All Hidden Files and Folders". Hiding the most wanted files and folders is very important nowadays and it's really a tedious job too. In order to make this tedious job an easy one, i'm going to deliver you a the trick now. For Example: You have a folder named " collegephotos " and this folder is stored in (Disk Drive E). You think that it should not be seen by strangers who use your PC. For that you need to follow the following instructions 1.     Press windowkey+R : Run command dialog box appears. 2.     Now type " cmd " and hit enter. A command prompt window displays. 3.     Now type " attrib +s +h E:\collegephotos " and hit enter. The folder "collegephotos" will be hidden (Note: It cannot be viewed by any search

Setup Any Folder as a Photo Folder

Image
This tricks shows you how to setup any folder to display its contents as a photo folder. In many cases, you save your images/photos in a folder different than " My Pictures " (under " My Documents "). Since this folder you choose is just like any other normal folders, its contents displayed as a listing of files. You can temporary change it by just right-click and select " View " >> " Thumbnails ". But if you want to change the folder so that everytime you come back, the folder itself, as well as all its subfolders, display the contents as photo thumbnails. Here's How ·   Right-click on the folder you choose and select " Properties " ·   Select " Customize " Tab. Then under " Use this folder type as a template ", select " Pictures (best for many files) " ·   Check on " Also apply this template to all subfolders " to apply the setting to subfoders as well ·