Okay, so I got to generate this string to be SHA1 hashed. I have it like this
string = "ACCEPTURL=SOMErandomSITE/betaling1.aspxblablaRANDOMNMBRAMOUNT=" & visabedrag3 & "blablaRANDOMNMBRBGCOLOR=#FFFFFFblablaRANDOMNMBRBRAND=VISAblablaRANDOMNMBRBUTTONBGCOLOR=#9BCC83blablaRANDOMNMBRBUTTONTXTCOLOR=#000000blablaRANDOMNMBRCANCELURL=SOMErandomSITE/betaling4.aspxblablaRANDOMNMBRCATALOGURL=SOMErandomSITEblablaRANDOMNMBRCN=" & Session('fac_cntnaam_tsv') Session('fac_cntnaam')Session('bdr_fac_cntnaam_tsv') Session('bdr_fac_cntnaam') & "blablaRANDOMNMBRCOM=Ordernummer " & Shop.Order.Ordernummer & "blablaRANDOMNMBRCURRENCY=EURblablaRANDOMNMBRDECLINEURL=SOMErandomSITE/betaling2.aspxblablaRANDOMNMBREMAIL=" & Session('bdr_fac_cntemail')Session('fac_cntemail') & "blablaRANDOMNMBREXCEPTIONURL=SOMErandomSITE/betaling3.aspxblablaRANDOMNMBRFONTTYPE=arialblablaRANDOMNMBRHOMEURL=SOMErandomSITELANGUAGE=nl_NLblablaRANDOMNMBRLOGO=logo.gifblablaRANDOMNMBRORDERID=" & Shop.Order.Ordernummer & "blablaRANDOMNMBROWNERADDRESS=" & Session('facadres') Session('facadres_nr')Session('bdr_facadres') Session('bdr_facadres_nr') & "blablaRANDOMNMBROWNERZIP=" & Session('facpostcode')Session('facpostcode_letters')Session('bdr_facpostcode')Session('bdr_facpostcode_letters') & "blablaRANDOMNMBRPM=creditcardblablaRANDOMNMBRPSPID=reservecornerblablaRANDOMNMBRTBLBGCOLOR=#ecececblablaRANDOMNMBRTBLTXTCOLOR=#4d4d4dblablaRANDOMNMBRTITLE=Betalen met VisablablaRANDOMNMBRTP=SOMErandomSITE/logo.gifblablaRANDOMNMBRTXTCOLOR=#000000blablaRANDOMNMBR"
But the error I get now is BC30201: Expression expected. What am I doing wrong? It's been years since I've done ASP.net
You have missed Variable Name
string sss="value";// In this line(Code) means variable declaration
where,
string means variable data type
sss means variable name
"value" means variable value
try this
string data = "ACCEPTURL=SOMErandomSITE/betaling1.aspxblablaRANDOMNMBRAMOUNT=" & visabedrag3 & "blablaRANDOMNMBRBGCOLOR=#FFFFFFblablaRANDOMNMBRBRAND=VISAblablaRANDOMNMBRBUTTONBGCOLOR=#9BCC83blablaRANDOMNMBRBUTTONTXTCOLOR=#000000blablaRANDOMNMBRCANCELURL=SOMErandomSITE/betaling4.aspxblablaRANDOMNMBRCATALOGURL=SOMErandomSITEblablaRANDOMNMBRCN=" & Session('fac_cntnaam_tsv') Session('fac_cntnaam')Session('bdr_fac_cntnaam_tsv') Session('bdr_fac_cntnaam') & "blablaRANDOMNMBRCOM=Ordernummer " & Shop.Order.Ordernummer & "blablaRANDOMNMBRCURRENCY=EURblablaRANDOMNMBRDECLINEURL=SOMErandomSITE/betaling2.aspxblablaRANDOMNMBREMAIL=" & Session('bdr_fac_cntemail')Session('fac_cntemail') & "blablaRANDOMNMBREXCEPTIONURL=SOMErandomSITE/betaling3.aspxblablaRANDOMNMBRFONTTYPE=arialblablaRANDOMNMBRHOMEURL=SOMErandomSITELANGUAGE=nl_NLblablaRANDOMNMBRLOGO=logo.gifblablaRANDOMNMBRORDERID=" & Shop.Order.Ordernummer & "blablaRANDOMNMBROWNERADDRESS=" & Session('facadres') Session('facadres_nr')Session('bdr_facadres') Session('bdr_facadres_nr') & "blablaRANDOMNMBROWNERZIP=" & Session('facpostcode')Session('facpostcode_letters')Session('bdr_facpostcode')Session('bdr_facpostcode_letters') & "blablaRANDOMNMBRPM=creditcardblablaRANDOMNMBRPSPID=reservecornerblablaRANDOMNMBRTBLBGCOLOR=#ecececblablaRANDOMNMBRTBLTXTCOLOR=#4d4d4dblablaRANDOMNMBRTITLE=Betalen met VisablablaRANDOMNMBRTP=SOMErandomSITE/logo.gifblablaRANDOMNMBRTXTCOLOR=#000000blablaRANDOMNMBR"
and also you need to concatenation between separate session .
Like & Session('bdr_fac_cntemail') & Session('fac_cntemail') & Session('bdr_fac_cntemail') & Session('fac_cntemail') & etc
Not
& Session('bdr_fac_cntemail') Session('fac_cntemail') &
Related
I am currently working in R and this is a samople of a task i was assigned:
POINA[1] <-sum(as.numeric(ifelse( (datos1$c_res==1 | datos1$c_res==3) & (datos1$r_def==0) & (datos1$eda>=15 & datos1$eda<= 98) & datos1$emp_ppal==1 & datos1$ambito1 != 1 ,1,0)))
POINA[2] <-sum(as.numeric(ifelse( (datos2$c_res==1 | datos2$c_res==3) & (datos2$r_def==0) & (datos2$eda>=15 & datos2$eda<= 98) & datos2$emp_ppal==1 & datos2$ambito1 != 1 ,1,0)))
POINA[3] <-sum(as.numeric(ifelse( (datos3$c_res==1 | datos3$c_res==3) & (datos3$r_def==0) & (datos3$eda>=15 & datos3$eda<= 98) & datos3$emp_ppal==1 & datos3$ambito1 != 1 ,1,0)))
POINA[4] <-sum(as.numeric(ifelse( (datos4$c_res==1 | datos4$c_res==3) & (datos4$r_def==0) & (datos4$eda>=15 & datos4$eda<= 98) & datos4$emp_ppal==1 & datos4$ambito1 != 1 ,1,0)))
POINA[5] <-sum(as.numeric(ifelse( (datos5$c_res==1 | datos5$c_res==3) & (datos5$r_def==0) & (datos5$eda>=15 & datos5$eda<= 98) & datos5$emp_ppal==1 & datos5$ambito1 != 1 ,1,0)))
POINA[6] <-sum(as.numeric(ifelse( (datos6$c_res==1 | datos6$c_res==3) & (datos6$r_def==0) & (datos6$eda>=15 & datos6$eda<= 98) & datos6$emp_ppal==1 & datos6$ambito1 != 1 ,1,0)))
POINA[7] <-sum(as.numeric(ifelse( (datos7$c_res==1 | datos7$c_res==3) & (datos7$r_def==0) & (datos7$eda>=15 & datos7$eda<= 98) & datos7$emp_ppal==1 & datos7$ambito1 != 1 ,1,0)))
POINA[8] <-sum(as.numeric(ifelse( (datos8$c_res==1 | datos8$c_res==3) & (datos8$r_def==0) & (datos8$eda>=15 & datos8$eda<= 98) & datos8$emp_ppal==1 & datos8$ambito1 != 1 ,1,0)))
POINA[9] <-sum(as.numeric(ifelse( (datos9$c_res==1 | datos9$c_res==3) & (datos9$r_def==0) & (datos9$eda>=15 & datos9$eda<= 98) & datos9$emp_ppal==1 & datos9$ambito1 != 1 ,1,0)))
POINA[10] <-sum(as.numeric(ifelse( (datos10$c_res==1 | datos10$c_res==3) & (datos10$r_def==0) & (datos10$eda>=15 & datos10$eda<= 98) & datos10$emp_ppal==1 & datos10$ambito1 != 1 ,1,0)))
I have several dataframes, that for sake of simplicity, are named "datos1".. "datos120". This dataframes are the results of telephone polls. Each dataframe contains different individuals and each poll corresponds to a specific week in the year.
POINA[i] is a numeric vector where each entry is the total sum of surveyed people who fit the criterion specified above.
As can be seen, the criteria remains the same every week but, since each week is a diferent frame datos[i] changes for every POINA[i].
Is there a way such that i dont have to write the 120 weeks one by one?
I have tried doing it manually but there are just to many cases so, any help in making this more efficient would be deeply apreciated
I have three strings which I want to bind as rows and pass to the clipboard via write.table(). When I do so I find a lot of junk characters are added and I can't find out where they come from. I'm presuming this is an issue with my setup, but here's the data and code to see if this is reproducible.
strings <- c("\\textit{LTG health} & -.91 (-.91, -.90) & -.90 (-.90, -.90) & -.91 (-.91, -.90) & -.85 (-.86, -.84) & -.91 (-.92, -.91) & -.90 (-.91, -.90) & -.91 (-.91, -.90) & -.85 (-.86, -.84) \\\\",
"\\textit{LLTI} & -.85 (-.85, -.84) & -.84 (-.85, -.83) & -.85 (-.86, -.84) & -.79 (-.80, -.78) & -.84 (-.85, -.83) & -.83 (-.84, -.83) & -.83 (-.84, -.82) & -.77 (-.78, -.76) \\\\",
"\\textit{Mortality (2011)} & -.41 (-.43, -.39) & -.39 (-.42, -.37) & -.41 (-.43, -.39) & -.45 (-.47, -.43) & -.56 (-.58, -.54) & -.54 (-.56, -.52) & -.56 (-.58, -.54) & -.59 (-.61, -.57) \\\\"
)
write.table(strings, "clipboard", col.names = F, row.names = F, quote = F)
When I paste into a plain text editor I get the following full of unexpected characters and the third line appears to be lost entirely. I can't post the actual data because SO is detecting the junk characters as spam, so here's a screenshot:
EDITS
If I use paste() to concatenate into a single row, the junk characters don't appear.
Setting the fileEncoding in write.table to UTF-8 does not fix the problem.
i need to replace this part X[,...] in this string with something else
r <- "X[,1]<=-0.00595 & X[,2]<=-0.00605 & X[,20]>-0.00625 & X[,25]>-0.00615"
I would like to get something like this
X[,...] replase to Q
r <- "Q<=-0.00595 & Q<=-0.00605 & Q>-0.00625 & Q>-0.00615"
Here is one possible solution:
r <- "X[,1]<=-0.00595 & X[,2]<=-0.00605 & X[,20]>-0.00625 & X[,25]>-0.00615"
gsub("X\\[,\\d*\\]", "Q", r)
# "Q<=-0.00595 & Q<=-0.00605 & Q>-0.00625 & Q>-0.00615"
I am generating a correlation table with http://myowelt.blogspot.com/2008/04/beautiful-correlation-tables-in-r.html
I am not successful, however, in outputting the file to a usable LaTex file or text file.
I have been unsuccessful using sink() to save the data to a text file.
Suppose I am using the following command:
corstarsl(lpp_axis1)
How would I pipe the output to a text file? I've read the documentation on sink and I'm missing a step somewhere. (I open the connection, execute the command, unlink the file and then I find nothing.)
I've also tried using the output from xtable(cortstarsl(lpp_axis1)) in a tex file yet I receive a "element table not found error. I do not know enough about Tex to track the source of the problem.
Suggestions for outputting this data?
Other suggestions for creating a correlation table?
Using the code from the web page you link to, I get (with the built in airquality data):
> require(Hmisc)
> require(xtable)
> xtable(corstarsl(airquality))
% latex table generated in R 2.12.1 by xtable 1.5-6 package
% Mon Feb 21 20:00:34 2011
\begin{table}[ht]
\begin{center}
\begin{tabular}{rlllll}
\hline
& ozone & solar.r & wind & temp & month \\
\hline
ozone & & & & & \\
solar.r & 0.35*** & & & & \\
wind & -0.60*** & -0.06 & & & \\
temp & 0.70*** & 0.28*** & -0.46*** & & \\
month & 0.16 & -0.08 & -0.18* & 0.42*** & \\
day & -0.01 & -0.15 & 0.03 & -0.13 & -0.01 \\
\hline
\end{tabular}
\end{center}
\end{table}
So the question then is how to get this TeX output to a file. Here capture.output() is one friend:
> capture.output(xtable(corstarsl(airquality)), file = "mytable.tex")
Which outputs the code to file named mytable.tex:
$ cat mytable.tex
% latex table generated in R 2.12.1 by xtable 1.5-6 package
% Mon Feb 21 20:01:03 2011
\begin{table}[ht]
\begin{center}
\begin{tabular}{rlllll}
\hline
& ozone & solar.r & wind & temp & month \\
\hline
ozone & & & & & \\
solar.r & 0.35*** & & & & \\
wind & -0.60*** & -0.06 & & & \\
temp & 0.70*** & 0.28*** & -0.46*** & & \\
month & 0.16 & -0.08 & -0.18* & 0.42*** & \\
day & -0.01 & -0.15 & 0.03 & -0.13 & -0.01 \\
\hline
\end{tabular}
\ end{center}
\end{table}
For "plain" delimited text output, perhaps to dump into a word processor or Spreadsheet, try write.table(), eg:
> write.table(corstarsl(airquality), file = "mytable2.txt")
Which results in a file like this:
$ cat mytable2.txt
"ozone" "solar.r" "wind" "temp" "month"
"ozone" "" "" "" "" ""
"solar.r" " 0.35***" "" "" "" ""
"wind" "-0.60***" "-0.06 " "" "" ""
"temp" " 0.70***" " 0.28***" "-0.46***" "" ""
"month" " 0.16 " "-0.08 " "-0.18* " " 0.42***" ""
"day" "-0.01 " "-0.15 " " 0.03 " "-0.13 " "-0.01 "
You can alter the quoting and delimiter to your heart's content - see ?write.table.
Here is some math code that adds A to B:
Sub math()
A = 23
B = 2
ABSumTotal = A + B
strMsg = "The answer is " & "$" & ABSumTotal & "."
MsgBox strMsg
End Sub
But how can I calculate a square root of ABSumTotal?
Is it possible in PowerPoint VBA?
Use: Sqr()
strMsg = "The answer is " & "$" & Sqr(ABSumTotal) & "."
Have you tried the function Sqr?
See:
http://msdn.microsoft.com/en-us/library/h2h9y284%28VS.85%29.aspx
You can use use ^ to compute X^(1/2)
Edit: added parenthesis