parameters

Cake PHP redirect with parameters in url

I have a page that I want to redirect to that requires parameters in the URL: http://www.mysite.com/myController/myAction/param1:val1/param2:val2 I know that there is a Cake PHP redirect function for redirecting that works as follows: $this->redirect(array("controller" => "myController", "action" => "myAction", ...

Help with SQL query

Hello, I have list of DateTime values, and for each value I need to fetch something from the database. I would like to do this with one query. I know it's possible to pass a table (list) to the stored procedure, but Im not sure how to write the query itself. Let's say I have the following table: CREATE TABLE Shows( ShowId [int] N...

XSLT how to merge some lists of parameters

Hi, I have an URL Structure like this: http://my.domain.com/generated.xml?param1=foo&amp;param2=bar&amp;xsl=path/to/my.xsl The generated XML will be transformed using the given XSL Stylesheet. The two other parameters are integrated too like this: <root> <params> <param name="param1">foo</param> <param name="param2">bar</...

C++ this as thread parameter, variables unavailable

I have three classes: class Rtss_Generator { int mv_transfersize; } class Rtss_GenSine : Rtss_Generator class Rtss_GenSineRpm : Rtss_GenSine Rtss_GenSine creates a thread in his constructer, it is started immediatly and the threadfunction is off-course declared static, waiting for an event to start calculating. the problem: all t...

Conditionally add htmlAttributes to ASP.NET MVC Html.ActionLink

I'm wondering if it's possible to conditionally add a parameter in a call to a method. For example, I am rendering a bunch of links (six total) for navigation in my Site.Master: <%= Html.ActionLink("About", "About", "Pages") %> | <%= Html.ActionLink("Contact", "Contact", "Pages") %> <%-- etc, etc. --%> I'd like to include a CSS clas...

Output Parameter in java

Hi, could u give me a sample code of using output parameter in function? I tried to google it but just found it in function. I'd like to use this output value in another function. I will use this code in Android. ...

How to call a bash script from php passing parameters

I have a php script that execute a bash script. I try to pass parameters like this: $script="/opt/lampp/htdocs/adapt.sh" $file="/opt/lampp/htdocs/videos/video1.mp4" $prefix="Test" exec ('.$script.' '.$file.' '.$prefix.'); What's wrong? How can I pass the parameters? ...

In scala can I pass repeated parameters to other methods?

Here is something I can do in java, take the results of a repeated parameter and pass it to another method: public void foo(String ... args){bar(args);} public void bar(String ... args){System.out.println("count="+args.length);} In scala it would look like this: def foo(args:String*) = bar(args) def bar(args:String*) = println("count...

Passing a parameter in a Report's Open Event to a parameter query (Access 2007)

Hi there, I would like to know if there is a way to set the parameters in an Access 2007 query using VBA. I am new to using VBA in Access, and I have been tasked with adding a little piece of functionality to an existing app. The issue I am having is that the same report can be called in two different places in the application. The fir...

C#: Making sure parameter has attribute

I have an attribute lets call it SomeAttribute and a class i need to make sure the class is passed a type which has SomeAttribute. So this is how i do it now: public class Test() { public Test(SomeType obj) { if(!obj.GetType().IsDefined(typeof(SomeAttribute), false)) { throw new ArgumentException("Err...

Teamcity - Build Number - Pass into ant script

I want to pass the build number from Teamcity into an ant script as a parameter. Does anyone know the exact syntax for doing this? ...

Escape apostrophe when passing parameter in onclick event

I'm passing the company name to an onclick event. Some company names have apostrophes in them. I added '.Replace("'", "'")' to the company_name field. This allows the onclick event to fire, but the confirm message displays as "Jane&# 39;s Welding Company". <a href="#" onclick="return Actionclick('<%= Url.Action("Activate", new {id ...

transfer parameter to next request

I have a situation where clicking a link in one column on the datatable opens A update FORM in the same page. The problem is when I hit the submit button for update, the render is set to false again of that update panel which was previously set true by parameter passed clicking the link. I tried htmlhiddenInput and did setValue and get...

Hibernate parameter typing with functions

Hi all, When using hibernate typically it can figure out the type of your parameters by looking at either the property it is against, or hibernate seems to recognise certain types by default (e.g. java.util.Date). However I have some queries which use functions (dateadd). In these queries using a object that has a custom type binding ...

C# method generic params parameter bug?

Hey, I appears to me as though there is a bug/inconsistency in the C# compiler. This works fine (first method gets called): public void SomeMethod(string message, object data); public void SomeMethod(string message, params object[] data); // .... SomeMethod("woohoo", item); Yet this causes "The call is ambiguous be...

AS3: creating a class with multiple and optional parameters?

I'm creating a slideshow where each slide can have: - a video or a still - 1 audio track or many (up to 3) - 1 button or many (up to 3) I was thinking that each slide can be it's own object, and then I would pass the video, audio, buttons, etc., into it as parameters: package { import flash.media.Video; public class Section ...

Xslt external parameter

In my server side TransformerFactory tfactory = TransformerFactory.newInstance(); Transformer transformer = tfactory.newTransformer( new StreamSource("mytext.xsl")); transformer.setParameter("parametro","hope"); transformer.transform( new DOMSource(document), outputStream ); --mytext.xslt-- . . . ...

constructing paramater query SQL - LIKE % in .cs and in grid view

Hello friends, I am trying to implement admin login and operators(india,australia,america) login, now operator id starts with 'IND123' 'AUS123' and 'AM123' when operator india logs in he can see the details of only members have id 'IND%', the same applies for an australian and american users and when admin logs in he can see details o...

PHP: How do I find (Oracle) parameters in a SQL query?

Suppose you have a string: "SELECT * FROM TABLE WHERE column1 = :var1 AND column2 = :var2" Now, how do I get an array with all the variables like so: Array ( [0] => :var1 [1] => :var2 ) I've tried it with PHP's preg_match_all, but I struggle with the regex. $varcount = preg_match_all("/ :.+ /", $sql, $out); ...

Do you need to release parameters of methods at the end of them in Objective-C?

If I have a parameter passed to a method, do I need to release the parameter at the end of the method? ...