Thursday, September 6, 2012

Intersystems Cache Mumps Database


Compile the csp file using terminal

Do $system.CSP.LoadPage("/csp/user/mypage.csp","ck")


Question:
How can I include Caché ObjectScript variables in an alert message?
Answer:
Use #()# syntax. From inside your Caché ObjectScript method, try something like this:
 s error = "Bad password"
 &js
The QuoteJS method provided by the %CSP.Page class returns a properly quoted JavaScript string. It also correctly escapes any quotes contained within the returned result.


Q3:
How do I debug a CSP page?
Answer:
To debug CSP pages, you must check the option Tools > Options > Compiler > Keep Generated Source Code.
Open your Workspace window and add your CSP pages to the CSP folder, if they are not already there.

1àCompile your CSP and click the View Other Code icon in the toolbar (or select View > View Other Code). This lets you see the .cls and .int files. For example, the file A.CSP generates CSP.A.CLS and CSP.1.INT.

2àIn the .cls or .int file, right click the line of code where you want a breakpoint and select Debug > Breakpoints > Toggle Breakpoint (or select the line and press F9).

3àSelect Debug > Debug Target > ZEN or CSP page. From the dropdown, select the target CSP page on which the debugger will run and click OK. (If you dragged your CSPs to the Workspace window, they appear in the dropdown list.)

4àClick Go on the Debug toolbar.

For example, if you have a flow: A -> B; that is, display page A and then follow a link to page B. And there is a bug in page B, you would do the following:
Check that A.CSP and B.CSP are in the Workspace window.
Compile both.
Select View > Toolbars > Debug to open the Debug toolbar.
Select Debug > Debug Target > ZEN or CSP page. From the dropdown, select A.CSP and click OK.
Open B.CSP and select View > View Other Code to open csp.B.CLS.
In csp.B.CLS, right click the first line in the OnPageBODY() method and select Debug > Breakpoints > Toggle Breakpoint.  
Click Go on the Debug toolbar.
Page A is displayed.
Click the link that brings up page B.
The debugger stops on the breakpoint in B

Monday, March 23, 2009

CYBER CRIME

Attention Please               (CYBER CRIME)

PLEASE BE CAREFUL WHENEVER YOU'RE USING A PC AT A PUBLIC PLACE (Like INTERNET CAFES..ETC).

CHECK THE BACK OF THE PC AND SEE IF THE BELOW DEVICE IS THERE...IF SO.DO NOT USE IT!!!!

New storing device fits at the end of the keyboard cable connecting to the PC specialized to save all typed keys in   
Mostly could be used in net cafes, exhibitions, hotels and airports therefore be careful especially the people who use the internet in these places to enter their bank accounts online or any other important sites.
After you enter the bank account and leave the PC it will be easy to open your account again as all what you have typed has been saved in the Black device.  

Therefore, you should check the PC for any suspicious piece behind it before using the net in public places for important sites.