parameters

Compiler Optimization with Parameters

Lets say you have some functions in some classes are called together like this myclass::render(int offset_x, int offset_y) { otherClass.render(offset_x, offset_y) } This pattern will repeat for a while possibly through 10+ classes, so my question is: Are modern C++ compilers smart enough to recognise that wherever the program sto...

Split parameters from ExecutionLog in SSRS (String Functions)

Hello, "Yet another string function" question for TSQL. The ExecutionLogStorage table in the ReportServer$InstanceName database for SSRS 2008 puts all parameters called to the report in a single column - FullName=LastName, FirstName&CalledBy=Lastname, FirstName&DateSelected=MM/DD/YY&CheeseorFries=Fries Some are null values, so the u...

Groovy - reflection on a Java class - methods and parameters

How would you go about this reflection task in Groovy: (1) provide a class type to the Groovy function (2) loop over all the methods of this class (a) print out each parameter name and type from the method (b) print out the return type ...

storing return values then using vs using directly c++

Hey guys, I was writing some code and I found a peculiar error. The function convert_vector2d(&i_scale) converts a string to a vector2d (inherits from sf::vector2f). If you examine the next few lines of code, I am doing the same operation twice. Code: Select all float x = convert_Vector2D(&i_scale).x; float y = convert_Vector2D(&i_scal...

SQL Stored Procedure to handle several null parameters?

On SQL Server I am trying to be able to select * records from a table with four parameters, in some cases the incoming parameter will be a certain string value 'Select', in that case I would like to select * from the specified field. Does anyone know of a good way to handle this? ( @mParameter varchar(50) = Null, @tParameter varchar(...

Dedicated Class Parameter

I have an Interface interface IRepository<T> { List<T> GetAll(string id) List<T> GetAll(string id, string desc) List<T> GetAll(string id, string desc, int[] status) List<T> GetAll(string id, string desc, int[] status, ....) } Many of my classes were implementing this interface. My problem is, more often, when cl...

Passing a structure as a template-parameter - How can I fix this code?

Hi, I'm trying to compile the following code under VC2010. struct CircValRange { double a,b; // range: [a,b) }; template <struct CircValRange* Range> class CircVal { // todo }; const CircValRange SignedDegRange= {-180., 180.}; CircVal<SignedDegRange> x; I'm getting error C2970: 'CircVal' : template parameter 'Range' : 'S...

Dynamic Column from SQL in Reporting Services/SSRS

Right now i am using two rdlc file to achieve. except for the field gender and field age , rest are the same. these are the two queries i use. query 1 :select state,gender,count(*) from table query 2 :select state,age,count(*) from table how do i dynamically set the column frm the dataset to achieve in a single rdlc file. do i need ...

Table Value Parameter missing data table data

I'm new to TVP in SQL Server and trying to understand the basics. I created a sample TVP in the Northwind database in SQL Express. My code from VB.NET is fairly simple (see below). The TVP parameter is empty in the procedure. I've tested the TVP in SQL Server and it works fine. Any ideas? Does SQL Express fully support table value parame...

How to pass an object to the constructor through castle windsor?

Hi, I am building an object through castle windsor and my constructor accepts an argument of a custom type. How do I pass it to my object. public class ArgumentClass { int value1; string value2; } public interface IInterface { } public class CClass : IInterface { public CClass(ArgumentClass arg) { } } All my configuration is...

How to specify a SQL table type input parameter in Crystal Reports?

I need to pass a list of key values to a stored procedure in SQL-Server, and that stored procedure then returns back the values needed for a Crystal Report. Rather than sending a comma separated list and then parsing that, it was suggested that I use a Table Type. So, I've defined that table type as simply made of integers: CREATE TYP...

DirContext search array with multiple parameters

I'm trying to search in a LDAP server all the users that have some profiles. So far I'm able to get all the users with a profile, but I'm unable to do the same with multiples roles. So the following code works [...] filterExpr = "(&(objectclass=person)(memberOf={0}))"; String rol = "myRol"; Object parameters[] ={rol}; context.search(dis...

Passing url to Three20 TTURLMap

I am trying to pass in a URL as a parameter to a TTURLMap like this: [map from@"tt://person/(initWithURL:)" toViewController: [PersonViewController class]]; I then have a TTStyledTableItemCell with links that render like this: <a href="tt://person/http://persons.url.com/blah"&gt;Person name</a> but when I click on these links the l...

help using jquery .ajax() method to pass aggregate data to mvc2 action

Hi, I'm trying to use the jquery ajax function to post to a MVC2 controller action, but my parameters include an array of a (simple) custom class and the action is not getting the data correctly. Client: var element1 = { FirstName: 'Raymond', LastName: 'Burr' }; var element2 = { FirstName: 'Johnny', LastName: 'Five' }; var var2 = [el...

How to pass in parameters to a SQL Server script called with sqlcmd?

Is it possible to pass parameters to a SQL Server script? I have a script that creates a database. It is called from a batch file using sqlcmd. Part of that SQL script is as follows: CREATE DATABASE [SAMPLE] ON PRIMARY ( NAME = N'SAMPLE', FILENAME = N'c:\dev\SAMPLE.mdf' , SIZE = 23552KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) LO...

Ruby: Can lambda function parameters have default values?

I want to do something similar to this: def creator() return lambda { |arg1, arg2 = nil| puts arg1 if(arg2 != nil) puts arg2 end } end test = creator() test('lol') test('lol', 'rofl') I get a few syntax errors: test.rb:2: syntax error re...

Add a string parameter to an AudioUnit

For instance, this AudioUnit has to connect to a host through the network, and the hostname has to be configured in a Cocoa View, and has to be saved so that reloading the project restores the hostname. How would you do that (interface + parameter saving, apart from the network thing of course)? ...

Reporting Services - Giving a formula through Parameters

Hi, I'm using SSRS 2008, I'm building big reports and I use subreports, I need to give a formula by paramaters to a report. How can I do it ? I though about doing reflection on the parameters in order to use it like a formula. Do you have any ideas if it'll work ? Regards, ps : sorry for my bad english. ...

WCF/Rest/UriTemplate variable length query string parameter list?

WCF will match this: http://localhost:8888/test/blahFirst/blahSecond/sdfsdf,wwewe to this: [OperationContract] [WebGet( UriTemplate = "test/{first}/{second}/{val1},{val2}" )] string GetVal( string first, string second, string val1, string val2 ); Is there a way to make the va11, val2 be a variable length list of parameters? So it co...

Access 2003/2007 : Query to find average of one text field grouped by another in table

So lets say I have a table that looks something like this: ItemName ProductType ---------------------------------------------------------- Name1 Type1 Name2 Type1 Name3 Type1 Name4 Type2 Name5 Type3 and so on for thousands of recor...