parameters

Ajax get request with useless parameter

假如想象 提交于 2019-12-11 19:16:36
问题 I'm trying to execute next: $.ajax({ type: 'GET', url: 'http://127.0.0.1:6789/dir', data: "", success: function(data) { /*do something*/ }, dataType: 'html' }); But when it executes, my server receives something like below: http://127.0.0.1:6789/dir?_32567871112 I don't want to pass any parameters. What do I wrong? 回答1: In short, set cache to true in your $.ajax call's options. jQuery adds that for cache breaking. There is an option in jQuery to turn that off: (from http://api.jquery.com

Get request parameters in controller's constructor Zend Framework 2

假装没事ソ 提交于 2019-12-11 18:53:16
问题 I have 10 actions in one Controller. Every action required ID from request. I want to check ID in constructor for every action, so I want avoid to write the same code 10 times in every action. obviously, In constructor I can not use functions like: $this->params()->fromQuery('paramname'); or $this->params()->fromRoute('paramname'); So, the question is how to get request params in controller's constructor? 回答1: Short answer: you cannot. The plugins (you are using params here) are available

How can I use existing variables and their values as parameters for a function (Python)?

点点圈 提交于 2019-12-11 18:47:13
问题 I believe what I am asking is pretty simple, however none of my searches have turned up useful information. So, all I want is to be able to access a preexisting variable in a program and use its value as a parameter of one of my own functions. print("Please enter a number") number = int(input()) def addTwo(number): newNumber = number + 2 print("Your number plus two is ", str(newNumber)) So if you entered the number 4: Please enter a number >>> 4 Your number plus two is 6 That's all I need and

PowerShell Parameter 'ValueFromPipeline' not working

萝らか妹 提交于 2019-12-11 18:45:54
问题 I wrote a function to create HTML files and I'm now in the process to improve it a bit. When feeding the function through the pipeline it works fine but it's not resulting in the desired action. This is ok: Create-FileHTML -Path "L:\" -FileName "Title" "Text1", "Text2" L:\ Title Text1 Text2 The is not ok: "Text1", "Text2" | Create-FileHTML -Path "L:\" -FileName "Title" L:\ Title Text1 Text1 L:\ Title Text2 Text2 How is it possible to feed 2 values to the function to have the same result as my

Sending 2 parameters back to Main function

痴心易碎 提交于 2019-12-11 18:43:49
问题 I got a function which wants to send 2 INT parameters back to where it has been called, but not sure what would be the best option, a Dictionary ? or a List or an Array EDITED I am using .Net framework 2 回答1: I assume you mean return 2 values to the caller. If so: return a Tuple<T1, T2> return your own custom type which stores the desired values, like MyOperationResult use out parameters: http://msdn.microsoft.com/en-us/library/t3c3bfhx(v=vs.80).aspx return a collection It depends on what is

Send userId at java web start from web page

孤街醉人 提交于 2019-12-11 18:22:11
问题 I'm developing a JSF2 site where the users may start a java application through java web start. The app parses mp3 metadata and sends back a xml file with the parsed information. I need some way of identifying the user for each file that is sent to the server and I have not been able to figure out how to do this. In other words the goal is to be able to set the userId in the xml file before the user sends it to the server. In order to do that, I need to somehow have that Id available in the

Is there a way to pass hidden values in Wicket?

时间秒杀一切 提交于 2019-12-11 17:59:04
问题 As described in Wicket redirect: how to pass on parameters and keeps URLs "pretty"?, there are a variety of options for passing parameters in Wicket. However, all of the methods listed on that page use the URL to transmit parameter information. Is there a class that's similar to the PageParameters class except that it hides the information it's transmitting? I don't care about bookmarkability, but I do care about URLs like http://www.example.com/example.html?uniqueId=309308&superSecretValue

lose view page parameter

≯℡__Kan透↙ 提交于 2019-12-11 17:53:45
问题 i have page my.xhtml: <f:metadata> <f:viewParam name="id"/> </f:metadata> ... <h:form> Current id is: "#{id}" <h:commandButton action="#{bean.doSomething}" value="Do some logic.."> <f:param name="id" value="#{id}"/> </h:commandButton> </h:form> and Bean.java: @ManagedBean @ViewScoped public class Bean { .... public void doSomething(){ //do some logick, don't use id parameter } } When I get to page first time with id=10 I can see on page Current id is: "10". . When I click on button page is

Interoperable way to send XML data in WCF?

岁酱吖の 提交于 2019-12-11 17:52:27
问题 I'm using System.Xml.XmlElement as a parameter for sending XML data in WCF. Is this generally the interoperable way to send XML data in WCF, so that, for example, a PHP or Java Web Service will understand it if I'll send it from a WCF Client? I've read that I should never send XML directly as string in WCF. In WSDL generated by WCF the XmlElement object is mapped to the xsd:any element in the following way: <xsd:element name="SendXMLData"> <xsd:complexType> <xsd:sequence> <xsd:element

Correctly assigned parameter valuecan not be used

我只是一个虾纸丫 提交于 2019-12-11 17:50:50
问题 I want to get a cmb-value before the entry is changed, by using ".oldValue". The value is correctly assigned (according to debugger), but running the SQL Access is asking for a manual entry. Doing the entry manually works fine, so the remaining code should be fine. My Code: Dim CategoryNameBeforeChange As String CategoryNameBeforeChange = Forms!frmCategory!txtCategoryName.OldValue SQL = "UPDATE CategoryTbl " & _ "SET CategoryTbl.CategoryName = Forms!frmCategory!txtCategoryName " & _ "WHERE