I'm coming from a .net background and want to know the accepted way of creating a method that returns a boolean and modifies a string that was passed in via parameter. I understand Strings are immutable in Java so the below snippet will always produce an empty string. I am constrained to return boolean only. Exceptions can't be thrown. I...
Hi,
In C#, I am calling a SSIS package. I have to pass it 3 parameters, how do I do that?
...
I need to perform a complicated calculation. In my case it seemed most natural to create a Calculator class (abstracted using a strategy pattern).
To perform the calculation the class needs to accept about 20 inputs, some of which are optional, some of which could change in the future etc. Once the Calculate() method is called, about 20...
I have a PHP application that will on occasion have to handle URLs where more than one parameter in the URL will have the same name. Is there an easy way to retrieve all the values for a given key? PHP $_GET returns only the last value.
To make this concrete, my application is an OpenURL resolver, and may get URL parameters like this:
...
Hello, ive a problem using JQuery..
Im creating a HTML with a loop and it has a column for Action, that column
is a HyperLink that when the user click the link call a JavaScript
function and pass the parameters...
example:
<a href="#" OnClick="DoAction(1,'Jose');" > Click </a>
<a href="#" OnClick="DoAction(2,'Juan');" > Click </a>
<a ...
As the topic suggests I wish to be able to pass Table Names as Parameters using .Net (doesn't matter which language really) and SQL.
I Know how to do this for values, i.e command.Parameters.AddWithValue("whatever",whatever). Using @whatever in the query to denote the Parameter. The thing is I am in a situation where I wish to be able to...
I have to pass some parameter from an action to another action,for example to keep trace of an event.
What is the best way to do that?
I would not use session parameters. Thanks
...
Hi all,
Can it be assumed a evaluation order of the function parameters when calling it in C ? According to the following program, it seems that there is not a particular order when I executed it.
#include <stdio.h>
int main()
{
int a[] = {1, 2, 3};
int * pa;
pa = &a[0];
printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa),...
Below is a stored procedure to check if there is a duplicate entry in the database based upon checking all the fields individually (don't ask why I should do this, it just has to be this way).
It sounds perfectly straightforward but the SP fails.
The problem is that some parameters passed into the SP may have a null value and therefore...
I want to perform this CODE equivlant in the castle xml config file.
// Foo(string name)
IFoo f = new Foo(StaticBarClass.Name);
XML
Now for the XML, I know everything (e.g. the blah) except for the stuff inside the parameter part.
What would the parameter part look like?
<component id="blah"
service="blah"
t...
Can someone point me to an article (or discuss here) that explains how an add-on/extension can read what a user has completed in a form in a browser so you can present data to them based on the search parameters?
An example would be the Sidestep extension that opens a sidebar when a user searches on an airline/travel site and presents t...
I have this method:
public bool CanExecute()
And after 70 commits, I added an extra parameter
public bool CanExecute(IStation target)
Now the problem is I have 7 unit tests covering this CanExecute methods testing various nulls/property combinations.
Adding this simple parameter required a fix of those 7 unit tests. The fix is sim...
I want to specify an argument in an attribute, like this:
[OutputCache(Duration = GlobalSettings.GlobalVar)]
Where GlobalVar is a variable I defined only once (don't care where).
Using a configuration setting doesn't work anyhow, and I can't get it working with some static class either.
I get the error:
An attribute argument must be...
I'm currently trying to make a small application that performs different duties. Right now I have a console app pop up and ask what I want to do, but sometimes I would rather just launch it with something like MyApp.exe -printdocuments or some such thing.
Are there any tutorials out there that can show me a simple example of this?
...
I wrote the following function that works about 95% of the time, but I need it to work 100% (obviously):
Public Shared Function getPassedVars() As String
Const keyCount As Integer = 54 ' 54 seems to be the number of parameter keys passed by default (for this web_app).
' there are more if there i...
Hi.
I develop next application parameters storing paradigm:
There is enum for each parameter roles
enum ParameterRole
{
FileName,
FileDir
}
Parameters are contained in special container as object
class ParamContainer : Dictionary(ParameterRole, object) {
public new object this[ParameterRole role]
{
get
{
if (base.Contain...
I remember there existed a testing program/library that will run your code and/or unit tests, creating all kinds of permutations of the parameters (null values, random integers, strings and so on). I just can't remember what it was called and searching google doesn't seem to come up with anything.
I know it was created for Java code and...
I have a function that identify coordinates on a page, and I am returning them as a
Dictionary<int, Collection<Rectangle>> GetDocumentCoordinates(int DocumentId)
However, later I need information about each page - if it was validated, what is the page resolution, color/bw, etc. I could create another function and run through pretty mu...
I have defined several application parameters for my webapp in the web.xml file, as follows:
<context-param>
<param-name>smtpHost</param-name>
<param-value>smtp.gmail.com</param-value>
</context-param>
If I have a ServletContext Object object available, I can access them easily . For example in my Struts action classes.
Ser...
I have a Python function in which I am doing some sanitisation of the input parameters:
def func(param1, param2, param3):
param1 = param1 or ''
param2 = param2 or ''
param3 = param3 or ''
This caters for the arguments being passed as None rather than empty strings. Is there an easier/more concise way to loop round the func...