Pages

Thursday, December 29, 2011

How to create a Password Protected folder in Windows 7....

Hi folks,

We all have various kinds of personal things in our computers. Because of some reasons we want to keep those things personal. But it's hard to do that if we are sharing one computer among few people. Therefore we have to our own folder which has password to protect it from other viewers. Below steps will help you to create a hidden folder and password protected files.

  • Create a new folder and name it whatever you would like.
  • Open the folder, right click on a blank area in it, then select New and then select Text Document from the pop up menu.
  • Open the text file you just created by double clicking on it and copy / paste in the following text
cls
@ECHO OFF
title Folder Private
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you want to lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p "pass=>"
if NOT %pass%== PASSWORD_GOES_HERE goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End

In the above code, replace the key PASSWORD_GOES_HERE with the password you want to use. For example, if your password is 123 then,
if NOT %pass%== 123 goto FAIL

  • Save your new file in .bat format with a complete file name being locker.bat. To do this, make sure to change the Save as type: to All Files(*.*).
  • In the folder you created earlier, double click the locker.bat file and there will now be a new folder name Private where you can put anything you want


  • Upon existing, double click on the locker.bat file again. It will prompt you to answer weather you want to lock your folder or not. Press Y and the folder will disappear. 
  • In order to retrieve the folder, all you have to do is double click the locker.bat file and enter the password which you set in step 4 and the folder will be appear again and you can access. 

Wednesday, December 21, 2011

Trick to Automatically shutdown PC in Windows

Hi folks,

Sometimes we were running virus scan, huge file downloads and stuff like that in our computers. those things might take few hours to get it done. Therefore we might not be able to sit in front of the computer until those process get done. In a situation like that, we wont be able to shut the computer after complete those process. therefore it's really helpful if we have some one to do that for us.

There are lot of third party softwares available which can do this for us. these softwares can schedule the shutdown process. By using this method we can shutdown our PC using Windows Scheduler.
  • Go to Start and type Task Scheduler in search box and press enter.
  • You will get a new window and click on the Action and then lick on the Create Basic Task.

  • In the Name field give any name for your task and then click on next button.
  • Select the delay(Daily, weekly, etc) after which you want to repeat this task and click on the next button.
  • Now specify the time at which when you want this task tom execute and click on the next button.

  • Now select Start a Program and then click on the next button.
  • Browse the program which you want to execute and click on the next button.
  • For shutdown copy and paste this location.
    C:\Windows\system32\shutdown.exe

  • After this click on the Finish button.
If someone is logged-on your PC at the execution time of the task, he/she is given one minute to save all data which is open before the computer shutdown.
Task scheduler can also be use to schedule other programs.Even Google Chrome uses Task Scheduler to run the Automatic Update.

Thursday, December 1, 2011

Change the size of the virtual memory paging file.....

You must be logged on as a Administrator or a member of Administration group to do this. If your computer is connected to a network, network policy settings may also prevent you of completing this procedure.



  • Click and open Control Panel.
  • Click Performance and Maintenance and then click System.
  • On the Advanced tab, under Virtual Memory, click Change.
  • Under drive (volume), click the drive that contains the paging file you want to change.
  • Under Paging file size for selected drive, click Custom size.
  • Type a new paging file size in megabytes in the Initial size (MB) or Maximum size (MB) box, and then click Set.
If you decrease the size of either initial or maximum page file settings, you must restart your computer to see the effects on those changes. Increases typically do not require a restart.

To have windows choose the best paging file size, click System managed size.

For best performance, do not set the initial size to less than the minimum recommended size under Total paging file size for all drives. The recommended size is equivalent to 1.5 times the amount of RAM on your system.


Using memory in your storage device to speed up your computer....

Hi folks,

Recently I'm having an issue with my CPU memory. Actually is about RAM capacity. I want to increase my RAM capacity to speed up my computer. ReadyBoost helped me to do this. ReadyBoost can speed up your computer by using storage space on most USB Flash drives and Flash Memory Cards. When you plug a ReadyBoost - compatible storage device to your computer, the Autoplay dialog box offers you the option to speed up your computer by using ReadyBoost. If you select this option, you can choose how much memory on the device to use for this purpose.

When you setup a device to work with ReadyBoost, windows shows you how much space it recommends you allow it to use for optimal performance. For ReadyBoost  to effectively speed up your computer, the flash drive or memory card should have at least 1Gb of available space.

You can enable or disable ReadyBoost for a specific flash drive or other removable storage devices.



 Here are some tips on what to look for when selecting a USB flash drive or memory card to use with ReadyBoost .


  • The minimum amount of available space recommended is 1Gb.
  • For best results, use a storage device with available space of  at least double the amount of memory in your computer (RAM).
  • To work with ReadyBoost, storage device must support USB 2.0 or higher.
  • For best results, plug the device directly to the computer instead of using external cables or hubs.
If your computer has a hard disk that uses solid-state drive (SSD) technology, you might not seen an option to speed up your computer with ReadyBoost when you plug in a USB flash. You may instead receive a message " ReadyBoost is not enable on this computer because the system disk is fast enough that ReadyBoost  is unlikely to provide any additional benefit. " This is because some SSD drivers are so fast they're unlikely to benefit from ReadyBoost.

In some situations, you might not be able to use all of the memory on your device to speed up your computer. For example, some memory devices contain both slow and fast flash memory. But ReadyBoost  can only use fast flash memory to speed up computers.

This function is currently available only on WINDOWS 7 operating system.

Wednesday, November 16, 2011

Change folder or file properties via command prompt....

Hi folks,
Don't you ever had an issue with viewing hidden files or folders in your personal computer or office computer?
I had this issue in my computer few times, because of virus attack. Sometimes this can happen because of some other reasons like problems in system files.
In my case system didn't allow me to change the properties of particular file in my PC. To overcome this problem i found a simple way which can change file or folder properties via command prompt.
Let's see how can we do that......


  • Just imagine you have a wmv file name 'Advertisement'.( Hidden file )
  • File path is C:\Users\udara\Desktop\Personal\Customize\My Advertisement.
  • First open command prompt.
  • Type ' C: ' and press Enter.
  • Then type ' cd Desktop ' and press Enter.
  • Then type ' cd Customize ' and press Enter.
  • Type ' My Advertisement ' and then press Enter.
  • Type ' attrib ' + ' -s ' + ' -h ' + <File name or Folder name> ( In this case 'Advertisement' ) and then press Enter.
You can see your file now in related folder.
You can use this command for a hidden folders also. This command functioning well in WINDOWS XP and also WINDOWS 7 platforms.


To find out more details about these commands, follow
http://www.computerhope.com/attribhl.htm

Friday, November 11, 2011

Trigger (PRE-QUERY), set dynamically properties....


Introduction
A form trigger is a block of PL/SQL code that adds functionality to your application. Triggers are attached to objects in your application. When a trigger is fired, it execute the code it contains. Each trigger's name defines what event will fire it, for instance, a WHEN-BUTTON-PRESSED trigger executes it's code each time click on the button which trigger is attached, or we can say , a form trigger is a set of PL/SQL actions that happen each time an event such as WHEN-CHECKBOX-CHANGED, WHEN-BUTTON-PRESSED, or WHEN-NEW-RECORD-INSTANCE occurs. You can attach several triggers to data QUERY. The most populer of them are PRE-QUERY and POST-QUERY. 

PRE-QUERY Trigger
The PRE-QUERY trigger fires before SELECT statement finalized.The POST-QUERY trigger fires before selected records are presented to the user. It fires after records are retrieved but before they are displayed. So you can use it to enhance a query's in a number of ways. Your POST-QUERY trigger can contain code to calculate or populate control items.

Change an OBJECT PROPERTY DYNAMICALLY
 You can always change object property dynamically. The SET_OBJECTNAME_PROPERTY built_in sub program will change an object property dynamically.

Thursday, November 3, 2011

Insert data in to a table by using simple FOR loop.....

Recently i had to insert several number of data rows to database table related to my oracle form( For the testing purpose). There's few constrains in that particular table. Before insert data, i have to concern about those constraints. Because my insertion can violate those constraints.  I disabled relevant constraints according to my data insertion and run simple FOR LOOP mentioned below.

BEGIN
    FOR v_LoopCounter IN 1..120 LOOP
        INSERT INTO TABLE_NAME  (col1,col2,col3,col4,col5,col6,col7,col8,col9,col10,col11,col12,col13,
         col14,col15,col16,col17,col18,col19,col20,col21,col22,col23,co24,co25)
        VALUES ('TESTU'||v_LoopCounter,'test'||v_LoopCounter,'94',null,null,null,null,null,      null,null,null,null,null,null,null,'1','Y','val',sysdate,'val1',sysdate,null,
       'E',null,'N');
    END LOOP;
END;


This is very simple sql code for insert several data rows to a table. Nyway you can use any number you want for counter. It depends on the number of data rows you want to insert to your table. This is more suitable for testing purpose. Because it's really hard to edit each and every column value in each insertion. But for the simple testing purpose you can edit unique fields by adding loop counter as a part of that field value.

Running a 'for' loop in ms sql

I just want to insert few rows in to my table at once. It seems complicated for me to do that in a way i want. But i did stumble upon a convenient way for populating lot of new rows using a simple technique that is not using bulk insert. It is actually pretty basic stuff, but useful for my purpose.



DECLARE @count INT
SET @count = 0
WHILE (@count < 40)
BEGIN
   INSERT INTO some_table ([columnA], [columnB]) VALUES ('val1', 'val2')
   SET @count = (@count + 1)
END

All that was really done is a manual 'For' loop using the SQL WHILE loop.  Just set the number in WHILE (@count < 40) to however many times you want the loop to run. 

Tuesday, November 1, 2011

T-sql (Transact SQL) Reference (Database Engine)


Transact-SQL is central to using SQL Server. All applications that communicate with an instance of SQL Server do so by sending Transact-SQL statements to the server, regardless of the user interface of the application.


The following is a list of the kinds of applications that can generate Transact-SQL:
  • General office productivity applications.
  • Applications that use a graphical user interface (GUI) to let users select the tables and columns from which they want to see data.
  • Applications that use general language sentences to determine what data a user wants to see.
  • Line of business applications that store their data in SQL Server databases. These applications can include both applications written by vendors and applications written in-house.
  • Transact-SQL scripts that are run by using utilities such as sqlcmd.
  • Applications created by using development systems such as Microsoft Visual C++, Microsoft Visual Basic, or Microsoft Visual J++ that use database APIs such as ADO,
    OLE DB,
    and ODBC.
  • Web pages that extract data from SQL Server databases.
  • Distributed database systems from which data from SQL Server is replicated to various databases, or distributed queries are executed.
  • Data warehouses in which data is extracted from online transaction processing (OLTP) systems and summarized for decision-support analysis.

Monday, October 31, 2011

Trick to create keyboard shortcut for any program in our computer.....

Shortcuts are a fast and simple way to launch computer applications. Like for opening "Task manager", we use Alt+Ctrl+Del , for opening "My Computer" we use Windows+E. We all have different set of programs that we use frequently.
By using this method we can create our own shortcuts for any computer application we need. We don't need any third party software to create these shortcuts for us. We can use this method in Windows XP , Vista and Windows 7.

This is the method we can use.
  • Click on the Start button and select the program that you need to create shortcut
    (In this case it's Photoshop) 
  • Then right click on the program and click on the properties.
  • Select the Shortcut tab in properties window.
  • In the shortcut key field type any key that you want to use as a shortcut.(We can use P for Photoshop)
  • Now your custom shortcut this program will be Ctrl+Alt+key. In our case its (Ctrl+Alt+P).
  • Then press Apply button and then press OK button to save the changes.
  • Now we can use our custom shortcut to lunch Photoshop application.
We can create as many shortcuts for as many programs as we want.


Tuesday, October 25, 2011

Oracle Forms - When you get "FRM-40401"message when saving...

Hi all,



Recently i had an issue with saving new data to database via my oracle form. When i enter new records via form and press save button , occurs "FRM-40401: No changes to save" message. New records were not in database. To handle this i used "STANDARD.COMMIT" instead of using "COMMIT_FORM".

The COMMIT (COMMIT_FORM) statement analyses blocks that exist in a form. If you change a table independently from the declared blocks, then the form doesn't think that it has any changes to save. It usually leads to the "FRM-40401: No changes to save" message.

But, if you use STANDARD.COMMIT, it will bypass any checking and do exactly what you have asked - commit, now!

It is also suggested to use 'standard.commit' (NOT 'commit') in procedures that reside in a form