Tuesday, March 30, 2010

MS WORD SHORTCUT KEYS

Ctrl + A Select all contents of the page
Ctrl + B Bold highlighted selection
Ctrl + C Copy selected text
Ctrl + X Cut selected text
Ctrl + N Open new/blank document
Ctrl + O Open options
Ctrl + P Open the print window
Ctrl + F Open find box
Ctrl + I Italicize highlighted selection
Ctrl + K Insert link
Ctrl + U Underline highlighted selection
Ctrl + V Paste
Ctrl + Y Redo the last action performed
Ctrl + Z Undo last action
Ctrl + G Find and replace options
Ctrl + H Find and replace options
Ctrl + J Justify paragraph alignment
Ctrl + L Align selected text or line to the left
Ctrl + Q Align selected paragraph to the left
Ctrl + E Align selected text or line to the center
Ctrl + R Align selected text or line to the right
Ctrl + M Indent the paragraph
Ctrl + T Hanging indent
Ctrl + D Font options
Ctrl + Shift + F Change the font
Ctrl + Shift + > Increase selected font +1
Ctrl + ] Increase selected font +1
Ctrl + Shift + < Decrease selected font -1
Ctrl + [ Decrease selected font -1
Ctrl + Shift + * View or hide non printing characters
Ctrl + f Move one word to the left
Ctrl + g Move one word to the right
Ctrl + h Move to beginning of the line or paragraph
Ctrl + i Move to the end of the paragraph
Ctrl + Del Delete word to right of cursor
Ctrl + Backspace Delete word to left of cursor
Ctrl + End Move cursor to end of document
Ctrl + Home Move cursor to beginning of document
Ctrl + Space Reset highlighted text to default font
Ctrl + 1 Single-space lines
Ctrl + 2 Double-space lines
Ctrl + 5 1.5-line spacing
Ctrl + Alt + 1 Change text to heading 1
Ctrl + Alt + 2 Change text to heading 2
Ctrl + Alt + 3 Change text to heading 3
F1 Open help
Shift + F3 Change case of selected text
Shift + Insert Paste
F4 Repeat last action performed (Word 2000+)
F7 Spell check selected text and/or document
Shift + F7 Activate the thesaurus
F12 Save as
Ctrl + S Save
Shift + F12 Save
Alt + Shift + D Insert the current date
Alt + Shift + T Insert the current time
Ctrl + W Close document

Sunday, March 28, 2010

Sticky Notes as your Browser Homepage

Sticky Screen(http://stickyscreen.org) is a simple online version of the yellow Post-It Note that you can set as your browser homepage.
You just have to type something onto the sticky note and set that website as your browser home page. No need to register anywhere and there’s no save button.
The yellow sticky note will show up whenever you start the web browser. The magic is due to a cookie that gets saved locally so the sticky note will change to the default one if you decide to clear the cookies someday.
For something more permanent, check these Post It Notes for Desktop.

Friday, March 26, 2010

findnocase in CF

Finds the first occurrence of a substring in a string, from a specified start position. If substring is not in string, returns zero. The search is case-insensitive.
The position of substring in string; or 0, if substring is not in string.

Syntax:
FindNoCase(substring, string [, start ])

Parameter Description
substring A string or a variable that contains one. String for which to search.
string A string or a variable that contains one. String in which to search.
start Start position of search.

Program:

#findnocase("the",stringToSearch)#
#findnocase("the",stringToSearch,5)#
#findnocase("no such substring",stringToSearch)#


Source : http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functi81.htm#wp1104504

Wednesday, March 24, 2010

Getting into the .NET runtime

The IISAPIRuntime interface acts as the interface point between the unmanaged code coming from the ISAPI extension (directly in IIS 6 and indirectly via the Named Pipe handler in IIS 5). If you take a look at this class you’ll find a ProcessRequest method with a signature like this:

[return: MarshalAs(UnmanagedType.I4)]
int ProcessRequest([In] IntPtr ecb, [In, MarshalAs(UnmanagedType.I4)]
int useProcessModel);

The ecb parameter is the ISAPI Extension Control Block (ECB) which is passed as an unmanaged resource to ProcessRequest. The method then takes the ECB and uses it as the base input and output interface used with the Request and Response objects. An ISAPI ECB contains all low level request information including server variables, an input stream for form variables as well as an output stream that is used to write data back to the client. The single ecb reference basically provides access to all of the functionality an ISAPI request has access to and ProcessRequest is the entry and exit point where this resource initially makes contact with managed code.

The ISAPI extension runs requests asynchronously. In this mode the ISAPI extension immediately returns on the calling worker process or IIS thread, but keeps the ECB for the current request alive. The ECB then includes a mechanism for letting ISAPI know when the request is complete (via ecb.ServerSupportFunction) which then releases the ECB. This asynchronous processing releases the ISAPI worker thread immediately, and offloads processing to a separate thread that is managed by ASP.NET.

ASP.NET receives this ecb reference and uses it internally to retrieve information about the current request such as server variables, POST data as well as returning output back to the server. The ecb stays alive until the request finishes or times out in IIS and ASP.NET continues to communicate with it until the request is done. Output is written into the ISAPI output stream (ecb.WriteClient()) and when the request is done, the ISAPI extension is notified of request completion to let it know that the ECB can be freed. This implementation is very efficient as the .NET classes essentially act as a fairly thin wrapper around the high performance, unmanaged ISAPI ECB.

ref:west-wind

Monday, March 22, 2010

findoneof in CF

Finds the first occurrence of any one of a set of characters in
a string, from a specified start position. The search is case-sensitive.
The position of the first member of set found in string; or 0, if no
member of set is found in string.

Syntax:
FindOneOf(set, string [, start ])

Parameter Description
set A string or a variable that contains one.
String that contains one or more characters to search for.
string A string or a variable that contains one. String in which to search.
start Start position of search.

Program:

#findoneof("aeiou",stringToSearch)#


#findoneof("aeiou",stringToSearch,4)#


#findoneof("@%^*()",stringToSearch)#



Source: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functi82.htm#wp1104557

Saturday, March 20, 2010

MVS SYSTEM CODES - SC13

An error occurred in opening a concatenated partitioned data set.
1. A concatenated data set was opened for output. 2. A data set was opened twice. Be sure that the concatenated partitioned data set is being opened properly.

Ref: www.ibmmainframes.com

Thursday, March 18, 2010

MVS SYSTEM CODES -SD37

An error occurred in writing to a data set which had not been allocated enough space. 1. A secondary allocation was not specified, and all of the primary space had been used. 2. There was a program loop.

1. Check through the program logic for a loop.
2. Allocate more space to the data set by specifying larger primary and/or secondary quantities in the space parameter in the JCL DD statement.

Ref: www.ibmmainframes.com

Wednesday, March 17, 2010

Notepad as a diary

1. Open a blank Notepad file
2. Write .LOG as the first line of the file, followed by a enter. Savethe file and close it.
3. Double-click the file to open it and notice that Notepad appends the current date and time to the end of the file and places the cursor on the line after.
4. Type your notes and then save and close the file.
5. Each time you open the file, Notepad repeats the process, appending the time and date to the end of the file and placing the cursor below it

Monday, March 15, 2010

OTA, an API for extending Quality Center

Quality Center API
The manipulation API is called Quality Center API and allows the interaction with Quality Center.

It also allows you to interact with the database through the API making the interactions more secure. Also, it avoids your DBA (DataBase Administrator) having to provide an access to the database server(s) hosting the Quality Center database(s).The API has only 1 entry point which is the TDConnection object. From this object, you can access a lot of Quality Center functionalities. The API functions are accessible through VBScript and any COM aware programming languages. It means that you can use this API as a standalone .VBS application, a macro in an Excel file, a script in QuickTest Professional or any other application where you would like to integrate such functionalities.As an example, we are going to download all the defects that are stored on a Quality Center project using the Excel application.The steps involve:
Connect to the project Run a query to retrieve a list of defects Store the result in an Excel worksheet

1. Connect to the project:
Each project stored in a Quality Center server is identified by its pair Domain/Project and a project is accessible only if the user belongs to this project. The connection to a server can be done by using only 4 lines of code:Dim QCConnection‘ Return the TDConnection object.Set QCConnection = CreateObject(“TDApiOle80.TDConnection”)QCConnection.InitConnectionEx “http:///qcbin”QCConnection.login “”, “”‘ DEFAULT = Domain, QualityCenter_Demo = ProjectQCConnection.Connect “DEFAULT”, “QualityCenter_Demo”

2. Execute a query:
To execute a query in Quality Center, you have several options available.The first one is to use the Command object. This object can run SQL queries for any Quality Center table. However, you need to be aware of what table to query and make sure you know what you do because you can mess up Quality Center. Also, this Command object can be used only if you are part of the TDAdmin group in this project.The second one is to use a Factory object. The factory object returns objects that are part of the API, restricting the user from making mistakes. This is the method we’ll be using in this article. To access the defects, we are using the BugFactory:Dim BugFactory, BugListSet BugFactory = QCConnection.BugFactorySet BugList = BugFactory.NewList(“”) ‘ Get a list of all the defects.

3. Store the result in an Excel worksheet:
We assume that you are running this script from a VBS file. Consequently, we have to open Excel first, then store the data in an Excel worksheet:

Dim Bug, Excel, Sheet
Set Excel = CreateObject(“Excel.Application”) ‘ Open Excel
Excel.WorkBooks.Add() ‘ Add a new workbook
‘ Get the first worksheet.
Set Sheet = Excel.ActiveSheetDim Bug, Row
Row = 1
‘ Iterate through all the defects.
For Each Bug In BugList
‘ Save a specified set of fields.
Sheet.Cells(Row, 1).Value = Bug.Field(“BG_BUG_ID”)
Sheet.Cells(Row, 2).Value = Bug.Summary
Sheet.Cells(Row, 3).Value = Bug.DetectedBy
Sheet.Cells(Row, 4).Value = Bug.Priority
Sheet.Cells(Row, 5).Value = Bug.Status
Sheet.Cells(Row, 6).Value = Bug.AssignedTo
Row = Row + 1
Next‘ Save the newly created workbook and close Excel.
Excel.ActiveWorkbook.SaveAs(“c:\QualityCenter_Demo_DEFECTS.xls”)
Excel.Quit

Saturday, March 13, 2010

Workflow Authoring - Workflow Foundation WF32

Workflow Authoring:
Authoring of workflows can use code, markup languages, or a combination of both code and markup.

Types of Authoring modes:
1. Code only:
The default authoring mode for windows workflow foundation is code only. This provides the code behind mode.(C# or VB) to declare the workflow structure. A code only workflow must be compiled. This mode shoud be choosed only if the workflow solution will not change over a time.
2. No Code:
This mode provides the author a workflow by using workflow markup. we can then compile the workflow with the Windows Workflow Foundation command-line workflow compiler, or we can load the workflow markup file into the workflow runtime engine.
If we have a workflow definition entirely in XOML we can use workflow activation and avoid compilation. Activation is useful when building a large number of dynamic workflows. We merely need to pass the XML into the workflow runtime to have a run-able instance of a workflow.
Eg:

3. Code seperation:
This mode provides us to define workflows by using workflow markup and combining it with C# or Visual Basic code-behind implementations—similar to the ASP.NET model.The code only workflow must be compiled. This mode is choosed if the workflow will change over a time.Also complex business rules can be handled in this mode.

Thursday, March 11, 2010

RSS to PDF believe me its possible

Many of you must have felt the same as myself with busy schedule and always on move or offline. Just happen to view your RSS reader found something interesting but don’t have time to read it online. If you are facing the same problem, at last I have found a solution to it. Now you can convert your RSS feeds to PDF online and that too free of cost and read it when you are on move or offline.

RSS 2 PDF (http://www.rss2pdf.com/) is a free online service that turns any RSS feed to PDF document at a lightening speed. Along with RSS, this service also converts other sources like ATOM and OPML to PDF. The only problem with the service is - images of the RSS source are not part of the output PDF. Due to server resource usage restrictions, the creator of the service temporarily disabled images in the output.

So what are you waiting for, start converting your favorite feed and read at your leisure time.

Tuesday, March 09, 2010

Cross-site scripting (XSS)

Cross-site scripting (XSS) attacks exploit vulnerabilities in Web page validation by injecting client-side script code. Common vulnerabilities that make your Web applications susceptible to cross-site scripting attacks include failing to properly validate input, failing to encode output, and trusting the data retrieved from a shared database. To protect your application against cross-site scripting attacks, assume that all input is malicious. Constrain and validate all input. Encode all output that could, potentially, include HTML characters. This includes data read from files and databases.

The injected script code embeds itself in response data, which is sent back to an unsuspecting user. The user's browser then runs the script code. Because the browser downloads the script code from a trusted site, the browser has no way of recognizing that the code is not legitimate, and Microsoft Internet Explorer security zones provide no defense. Cross-site scripting attacks also work over HTTP and HTTPS (SSL) connections.

One of the most serious examples of a cross-site scripting attack occurs when an attacker writes script to retrieve the authentication cookie that provides access to a trusted site and then posts the cookie to a Web address known to the attacker. This enables the attacker to spoof the legitimate user's identity and gain illicit access to the Web site.

source : msdn

Sunday, March 07, 2010

Java program for image decompression

This is a java program to decompress the given image.we have first initialized the given file using file input stream reader and read character by character from input file and copied into the target file and displayed the size of the image.The program is as follows.

import java.io.*;
import java.util.zip.*;
class Izip{public static void main(String args[])throws Exception
{
InflaterInputStream in=new InflaterInputStream(new FileInputStream("Ashes.zip"));
FileOutputStream sout=new FileOutputStream("Ashes.bmp");
int b;
while((b=in.read())!=-1)
sout.write(b);
in.close();
sout.close();
File f1=new File("Ashes.zip");
File f2=new File("Ashes.bmp");
System.out.println("The size of zipped file is "+f1.length());
System.out.println("The size of unzipped file is "+f2.length());
}
}

OUTPUT:
C:\jdk1.3\bin>javac Izip.java
C:\jdk1.3\bin>java IzipThe size of zipped file is 1372The size of unzipped file is 589878

Friday, March 05, 2010

List of EIB fields in DFHEIBLK member in CICS

EIBCALEN(COMMAREA Length): It will be the length of the Communication area.
EIBAID(AID Key pressed): It gives the attention of the user has entered any attention key or not
EIBCPOSN(CURSOR Position): It gives positions of the cursor
EIBDATE(Task DATE (00YYDDD)): It gives Task Date
EIBTIME(Task Time (0HHMMSS)): It gives Task time
EIBTRNID(Transaction ID of Task): It gives the transaction of task has stored
EIBTRMID(Terminal ID of Task): It has the terminal ID and it is different from entry in PCT
EIBRSRCE(Resource Recently): Recently used Resource Name
EIBDS(Data Set): Recently accessed Data Set
EIBFN(Final CICS Command): Last CICS Command
EIBRESP(Response): Completion Status
EIBRESP2(Response2): More Completion Status
EIBRCODE(Response Code (OLD)): Response Code (OLD)

Wednesday, March 03, 2010

compare in ColdFusion

Performs a case-sensitive comparison of two strings.
  • -1, if string1 is less than string2
  • 0, if string1 is equal to string2
  • 1, if string1 is greater than string2

Syntax :
Compare(string1, string2)

Parameter Description

string1 A string or a variable that contains one

string2 A string or a variable that contains one

Compares the values of corresponding characters in string1 and string2.


Coding :


Source: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functi37.htm#wp1101820

Monday, March 01, 2010

Facilities used in CICS.

Facilities used in CICS:
- Transaction Dump
- Execution Diagnostic Facility(EDF)
- Command Level Interpreter

Transaction Dump:
It Contains useful information which shows the status of the program at the time of an ABEND

Execution Diagnostic Facility(EDF):
- CICS supplied transaction
- Monitors the execution of an application program as an interactive debugging aid

Command Level Interpreter:
- CICS supplied transaction that performs syntax checking
- To invoke
  • CECI (CICS command to be interpreted)
  • CEBR Transaction(CICS transaction which browses Temporary Storage Queue (TSQ) Invoking CEBR directly)
Computers Add to Technorati Favorites Programming Blogs - BlogCatalog Blog Directory