parameters

Send parameters to a web service

被刻印的时光 ゝ 提交于 2019-12-24 01:44:44
问题 Before I start: I'm programming for Iphone, using objective C. I have already implemented a call to a web service function using NSURLRequest and NSURLConnection. The function then returns a XML with the info I need. The code is as follows: NSURL *url = [NSURL URLWithString:@"http://myWebService/function"]; NSMutableURLRequest theRequest = [[NSMutableURLRequest alloc] initWithURL:url]; NSURLConnection theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; i also

SQL Server slow results with parameters

拥有回忆 提交于 2019-12-24 01:25:07
问题 I have a query which selects some data, I pass some parameters in it: DECLARE @FromAccDocNo INT = 1, @ToAccDocNo INT = 999999999, @FromDate CHAR(10) = '1900/01/01', @ToDate CHAR(10) = '2999/12/30', @L1Code INT = 129 SELECT ad.AccDocNo, ad.AccDocDate, add1.Row, add1.RowComment, add1.Debit, add1.Credit FROM AccDoc ad INNER JOIN AccDocDetail add1 ON add1.AccDocNo = ad.AccDocNo INNER JOIN Topic t ON t.TopicCode = add1.TopicCode WHERE t.L1Code = @L1Code -- here is the difference AND add1.AccDocNo

Passing quoted arguments to PowerShell scripts

蹲街弑〆低调 提交于 2019-12-24 01:07:37
问题 Scripting is made for CLI and, in the Microsoft world, script arguments referring to files may often have spaces requiring them to be quoted. This turns out to be problematic for me. Consider this script: #testarg.ps1 for($i=0; $i -lt $args.length; $i++) { write-host "Arg$i = $($args[$i])" } If I run it inside the PowerShell interactive environment, like this: PS C:\script> .\testarg.ps1 "first arg" "second arg" I get, as expected, Arg0 = first arg Arg1 = second arg But the ordinary use of a

How can I access parameters passed in the URL when a form is POSTed to my script?

大憨熊 提交于 2019-12-24 00:59:10
问题 I've run into an issue with mod_rewrite when submitting forms to our site perl scripts. If someone does a GET request on a page with a url such as http://www.example.com/us/florida/page-title , I rewrite that using the following rewrite rule which works correctly: RewriteRule ^us/(.*)/(.*)$ /cgi-bin/script.pl?action=Display&state=$1&page=$2 [NC,L,QSA] Now, if that page had a form on it I'd like to do a form post to the same url and have Mod Rewrite use the same rewrite rule to call the same

Ruby Http Post Parameters

拜拜、爱过 提交于 2019-12-24 00:47:27
问题 How can I add post parameters to what I have right now: @toSend = { "nonce" => Time.now.to_i, "command" => "returnCompleteBalances" }.to_json uri = URI.parse("https://poloniex.com/tradingApi") https = Net::HTTP.new(uri.host,uri.port) https.use_ssl = true https.verify_mode = OpenSSL::SSL::VERIFY_NONE req = Net::HTTP::Post.new(uri.path, initheader = {'Content-Type' =>'application/json'}) req.set_form_data({"nonce" => Time.now.to_i, "command" => "returnCompleteBalances"}) req['Key'] = '******

&$variable in PHP

喜你入骨 提交于 2019-12-24 00:35:56
问题 I have been looking through wordpress's core files and stumbled across this piece of code, I noticed it had an ampersand before a variable name and after an =. I have tried searching this and came across this from the PHP manual and it doesn't explain it well, or I'm looking at the wrong one! I also saw that it is used to modify a variable outside of the method where it is being used, but, thats what a variable is there for, to be modified so if this is correct how would one use it? function

Report Parameter validation in ssrs report

混江龙づ霸主 提交于 2019-12-24 00:12:09
问题 I have created one SSRS report having begin date and end date. If I provide end date< start date it will execute the report as shown in the image But that condition I need to show a pop up "Please Check the start date and end date provided". How to do this? 回答1: Click Report Menu then Report Properties. Go to Code Tab and add similar code as per your requirement: Function CheckDateParameters(StartDate as Date, EndDate as Date) as Integer Dim msg as String msg = "" If (StartDate > EndDate)

Access URL parameters in Angularjs in the Controller

五迷三道 提交于 2019-12-24 00:09:45
问题 How to access the URL parameters through the angularJS controller. For example: i would like to read parameter1 and parameter2 in a controller so that i can take appropriate action in my controller. http://localhost:8080/MyApplication?Parameter1=testresponse&parameter2=1234 回答1: After spending some time, i figured that $location is the one I was searching for. Below is sample code snippet. >>AngularJS v1.4.8 main.js var mainApp = angular.module("app",['ui.bootstrap','ngModal']); mainApp

Round bracket in string with JDBC prepared statement

感情迁移 提交于 2019-12-23 23:34:40
问题 Here is my Java JDBC code (modified and simplified for example): ps = connection.prepareStatement("SELECT a,b,c FROM mytable WHERE category ~ ?"); ps.setString(1, "my/super/category/abc(def"); ^ | +---------------------------------+ | //this character is problem result = ps.executeQuery(); It didn't work because of round bracket in string. How to escape round brackets in prepared statement? EDIT: based on my answer (see below) I do correct to question. 回答1: Will answer myself - problem is in

C# HttpWebRequest POST not sending parameters

[亡魂溺海] 提交于 2019-12-23 21:57:52
问题 I am trying to perform a POST request with parameters using the next code. I'm using a local php script to receive the parameters, but when I perform the request the php script is not receiving the parameters sent form my C# function; it say Notice: Undefined index: detalle. Notice: Undefined index: method:paginar Notice: Undefined index: f_num_pagina Function: public async Task<string> GetHttpStream(Uri HtmlPage, string method, byte[] postData) { HttpWebRequest httpRequest; string Payload =