special character coming when i am using & and p - delphi

I dont know what exactly i have to type in title for this ,i tried my best
anyway coming to topic
I am making one acc checker for that purpose ,i am sending user and pass from my bsskinedit1 and bsskinedit2
here is my code
s:='http:\\site.com..premlogin='+bsskinedit.text+'&password='+bsskinedit2.text
but it giving some error ,then i used showmessage whats wrong with it then i came with strange result
see below
observer after 4 & and p combining together and appearing as a some new symbol :(
can any one tell me why its coming like this ?

Your code (where you build the URL) is most likely correct (I guess the above has some typos?!), but when you display the URL in a label for instance, the & character is treated as indicator for an accelerator key.
By Windows design, accelerator keys
enable the user to access a menu
command from the keyboard by pressing
Alt along the appropriate letter,
indicated in your code by the
preceding ampersand (&). The character
after the and sign (&) appears
underlined in the menu.
If you want to display the & character itself, you have to set your string variable to &&.
By placing two ampesands together - you state that the character following the first one is not used as the accelerator - rather you actually want to get it (only one) displayed.
Just use your debugger if you want to see the real value that your string variables have, don't output them to a message box or the like... It may have side effects, as you can see.
Regarding the URL you build: I can't possibly know how it has to be correctly, but at least you should use the right slashes!
s := 'http://site.com...'
(All quotes from delphi.about.com)

In addition to what Mef said, you can use OutputDebugString to add your string to the event log in its raw form, so you don't need to modify it before displaying it. Delphi should capture those strings automatically if you're running from the debugger. If you aren't running it from Delphi you can use DebugView instead, which captures the messages from any running applications.

Related

How do you print different templates in netsuite?

I am trying to find the correct template and id to use for a hotprint of an advanced pdf template of an Item Fulfillment.
The hot print url is (with the id bolded) https://system.na3.netsuite.com/app/accounting/print/hotprint.nl?regular=T&sethotprinter=T&id=7600&label=Packing%20Slip&printtype=packingslip&trantype=itemship&orgtrantype=TrnfrOrd&auxtrans=7605
For some reason only certain id=# seems to affect the outcome and the ids I have got to work for two different templates don't match the Custom Transaction Forms ID or the Advanced pdf script id. (example most ids=template 1, while 168,4954, and seemingly random other ids=template 2) I am very confused on how netsuite resolves the hot print url as it normally doesn't include the template= part though I have seen others use it for invoice print urls.
The parameters at the end of the url (the stuff after the ?) are used by Netsuite to control settings used by the webpage which prints the PDFs for you.
In this case, &id=##### refers to the internal id of the document you are printing. You can see this by going to the document, right clicking, selecting inspect, and typing nlapiGetRecordId() into the console. When you click Print, you should see that same number after &id=#####.
&template=### refers to the template you are printing. If you go to Customization -> Forms -> Advanced PDF/HTML Templates, you'll notice a Script ID field in the table. If you substitute the correct Script ID in for the number in &template=###, you'll notice you generate the same PDF. This Script ID acts the same as the number that was previously there.
The reason you're seeing unusual results when you change those numbers is because you're mismatching a record with a template not built for it. So it won't print exactly right, but will sometimes execute anyways.
Anyways, this sort of parameter scheme is a similar scheme to how Suitelets and Restlets work, so in the future, you might experience this sort of thing again.
EDIT: For those reading this in the future, please read the comments.
To customize a packing slip and return form:
If you are printing packing slips and need some customization, you can use a custom invoice form when printing packing slips. For example, you can customize an invoice form to hide the fulfilled item tax rate and amount, and the order total. Then, when you print the packing slip using the custom form through mass print, choose the the packing slip shows the customized information.

How can I set a hotkey in atom (using their keymap perhaps) to print a string?

I am coding and there is a long string that i cant be asked to type out every time i need to. How could I set a shortcut?
example_coding.bla(bla.bla) *starts typing long string*
Then it recognises the start of my long string so gives me the option to press tab and auto insert the rest of it?
This is using LaTeX in Atom, but would be great if it could be for any coding language.
I know you're asking for how to create a command, but it sounds like what you really want is a snippet. Since you haven't provided any information about your use case, I can't tell you what to put in your snippets.cson, but the Flight Manual has all the necessary information.

Automatically decode URLs in Notepad++

I am working with a lot of URL links which I need to decode.
I want to write a macro (or use any other method, really, whatever is easiest) attached to a keyboard shortcut which will automatically decode the urls into readable text.
For example, I want to press CTRL+A and have the result be that all %20 instances are replaced with a space, all & are replaced with an ENTER (\n, going down one row), all %27 replaced with ', etc.
Is there a way to accomplish this in Notepad++?
So far I have been manually changing at least 2-3 codes each time, but it's maddening as I have hundreds of such URLs to work with.
The URLs are sent to me automatically one at a time by a "report broken link" function and arrive as an openURL, example attached below.
Thank you!
URL examples:
ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&url_ver=Z39.88-2004&rfr_id=info%3Asid%2FElsevier%3ASD&svc_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Asch_svc&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.aulast=GILABERTE&rft.auinit=Y&rft.date=2014&rft.issn=00017310&rft.volume=105&rft.issue=3&rft.spage=253&rft.epage=262&rft.title=Actas%20Dermo-Sifiliogr%C3%A1ficas&rft.atitle=Realidades%20y%20retos%20de%20la%20fotoprotecci%C3%B3n%20en%20la%20infancia&rft_id=info%3Adoi%2F10.1016%2Fj.ad.2013.05.004
And this is how it looks like after changing & and %20:
ctx_ver=Z39.88-2004
ctx_enc=info%3Aofi%2Fenc%3AUTF-8
url_ver=Z39.88-2004
rfr_id=info%3Asid%2FElsevier%3ASD
svc_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Asch_svc
rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal
rft.aulast=GILABERTE
rft.auinit=Y
rft.date=2014
rft.issn=00017310
rft.volume=105
rft.issue=3
rft.spage=253
rft.epage=262
rft.title=Actas Dermo-Sifiliogr%C3%A1ficas
rft.atitle=Realidades y retos de la fotoprotecci%C3%B3n en la infancia
rft_id=info%3Adoi%2F10.1016%2Fj.ad.2013.05.004
As you can see this is much more readable for extracting details, but there are still many more codes in there that need changing.
Lets say you have your single URL or some more in a text file line by line you'd go through following steps:
Ctrl+A
Plugins > MIME Tools > URL Decode
Ctrl+H
Find what: &
Replace with: \n
Search mode: Regular expression
Click on Replace All
If you really need a shortcut like e.g. Ctrl+Alt+A you may use:
Macro > Start Recording the steps from above and Save Currently Recorded Macro when finished.
The snaps below show your sample source and the resulting text.

In transaction NACE, is it possible to find out the print program and form routine, if i know the name of the Smartform?

I want to find out the name of the Print Program, and the name of the subroutine (form) that prints my SmartForm.
Now luckily in NACE (Conditions for Output Control), one can "kinna" figure out the application and the output type by oneself, and then the print program is obviously written there.
So what about if one wouldn't know what application and Output Type, and would have to check all applicatios and output types manually? isn't there an easier way to do this?
The table TNAPR contains some print program -> script links, search for your smartform name in field SFORM. This is by no means an exhaustive list, however.
OR
Do a "where used" search for "SSF_FUNCTION_MODULE_NAME", which will give you a list of all smartform calling programs. You'd still need to go through it manually, but you might find a suitably matching program description or similar.
If you need to find out the actual printing program for a certain form and it is possible to get a print preview, you can always enter the debugger using /h and examine the call stack.

ListGridRecord in smartGWT not displaying items after '<'

I have a ListGrid with ListGridRecords where I am trying to display the straight xml output from a call I'm doing on the backend. Here's an example:
lgr.setAttribute("XML", "<xml><response>Bob</response></xml>");
However, when it goes to display the contents of lgr in the ListGrid, it doesn't display it. (i.e. it is blank). If I make the field editable, I can double click on the cell and it will then display it. Also, if I get rid of the '<' symbols it displays as well. However, that kind of defeats the purpose since I want to display the exact xml used.
Do I need to escape the '<' somehow in the ListGridRecord? What is the best way to do this in GWT?
Ok, just found a thread that seems to solve my problem at least halfway. I would still like to enable the user to copy it without the encoded values, but at least now they can see it. I believe I'll enable some sort of click handler on the fields to to enable the correct copying.
http://www.gwt-ext.com/forum/viewtopic.php?f=7&t=2693

Resources