I'm calling a Java method from another language (R). Some of the parameters are optional in my R function. What's the best way to handle uninitialized parameters in a Java method? (Ideally without using exception handling...)
Edit: Follow-up based on the first response:
"2.Initialize with predefinied defaults and continue"
How can...
A simple question about accessing array information through pointers that I can't seem to figure out. I'm passing a bunch of multi-dimentional arrays into a function. Now they are not dynamic but even if static, I have to pass them as pointers right? (If I'm wrong, please do correct me)
So once I do pass them into a function, how do I a...
Hi folks,
from my C#-programm, I access a SQL Server 2008 Database. I have a table with a fulltextindex and want to search for an indexed entry:
SELECT page_id FROM page_categories WHERE page_title LIKE @title
When 'title' has no withespaces everything is fine, but when title does contain withespaces, the request fails. It throws no ...
In c# 4.0, are dynamic method parameters possible, like in the following code?
public string MakeItQuack(dynamic duck)
{
string quack = duck.Quack();
return quack;
}
I've many cool examples of the dynamic keyword in C# 4.0, but not like above. This question is of course inspired by how python works.
...
In AS3 I can retrieve data via Zend just fine using this:
nc.call("Service.addNewService", responder);
But I'm having trouble when I want to ADD data to the database. To do so I need to pass in parameters to the php class. I can't find any documentation on how to pass multiple parameters.
var params = new Array("one", "two", "etc");
...
Hey there,
I have two JSPs where I am displaying some info from database in a h:dataTable. One of them is showing all the info, and one of them user specifically.
I have showXML.jsp that shows the "XML" column of a dataTable row detailedly, since a String that big wouldn't be nice in the dataTable. So what I'm doing is passing the row i...
Hi all,
I have this type:
TYPE tipo_TableVarchar2 IS TABLE OF VARCHAR2(1000) INDEX BY BINARY_INTEGER;
and procedure procedure get_array (p_arr out TableVarchar2 ) is ...
OracleParameter param = new OracleParameter();
param.OracleDbType = OracleDbType.Varchar2;
param.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
param.P...
Specifically I'm trying to capture all the POST parameters from a payment gateway as a single string and then parse them looking for the string 'ERROR'. I'm aware there's a $c->request->parameters method but I'm not quite sure how its used and couldn't figure it out from the CPAN documentation. Thanks in advance!
...
I'm just beginning to learn python and the program I'm writing requires parameters for it to run with a specific task. For example (programs name is Samtho)
samtho -i Mozilla_Firefox
How can I do that?
...
I noticed something with SubSonic 2.x that I'm sure others have run into...
Calling a sproc with results = SPs.SpGetCountryList().GetDataSet(); I kept getting a Null reference exception.
To get around this, I added a dummy parameter in my sproc, and called the same function with an irrelevant number - SPs.SpGetCountryList(1).GetDataSe...
I have a 200 line long stored procedure, which gets a parameter 'prmtr',
What I want to do is add an "sql part" to my stored procedure, according to my parameter.
example:
SELECT A.* FROM
(
SELECT * FROM table1
) A
IF (my parameter) = a
LEFT JOIN
(
SELECT * FROM table2
) B
ON A.ID= B.ID
...
Hi,
What is the common preference to name a method that has an out parameter inside?
Usually I use Get as a prefix to mention that the method returns a value (like GetMyBusiness).
But what if there is an out parameter that will be set after the method call?
Should the method name mention this and focus only the return value?
thanks...
Hi.
Sorry if this sounds like a newbie question, but the other day a Java developer mentioned about passing a paramter by reference (by which it was ment just pass a Reference object)
From a C# perspective I can pass a reference type by value or by reference, this is also true to value types
I have written a noddie console application...
I am attempting to access a web service using SOAP through Perl and am having issues calling the service's functions that require parameters. The XSD that dictates the SOAP call says,
<xs:complexType name="getVersion">
<xs:sequence/>
</xs:complexType>
<xs:complexType name="getVersionResponse">
<xs:sequence>
<xs:element minOccurs="0...
As mentioned in this question, "LINQ to SQL allows table mappings to automatically convert back and forth to Enums by specifying the type for the column - this works for strings or integers." However, I am having trouble with this when using stored procedures (instead of auto-generated SQL) to create and update entities.
In my database...
I have the following extension method to add the elements in one collection to another collection:
public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T> list)
{
foreach (var item in list)
{
collection.Add(item);
}
}
This works fine if the IEnumerable list is the same type as the...
I have an application BACK which is packaged in an Merge Module, and installed with another application FRONT which is in the main MSI package. These are created via projects in MS VisStudio 2008.
The user can configure the FRONT application through the MSI's UI with a small set of parameters. I need to access at least one of these pa...
Hello, I was wondering if it's possible to write a function that accepts multiple generic types as follows:
public int void myfunction(Set<T> a, Set<T> b) {
return 5;
}
Set<Integer> setA = new HashSet<Integer>();
Set<String> setB = new HashSet<String>();
int result = myfunction(setA, setB);
Will that work? Does the generic in ea...
Unfortunately this mess works: Do you have suggestings for cleaning up this code: I'm trying to use a activerecord to compare two table columns, "needed" and "amount" then update a boolean column, depending on the returned data. Totally breaking do-not-repeat coding.
def update
@inventory = Inventory.find(params[:id])
respond_...
There must me a more elegant way to build a URL with parameters in .NET then for example
Response.Write("<a href=HeadOfMarketView.aspx"+Session["HOM"] != null ? Session["HOM"]+">Head of Market</a> / ")
I mean the concatenation of strings is a litte bit old school, no?
...