I have a WCF service with operations that all require MyServiceRequest parameter (or derived type)
and returns MyServiceResponse (or dervived type), i.e.:
[OperationContract]
MySeviceResponse FindAppointments(FindAppointmentRequest request);
[OperationContract]
MyServiceResponse MakeAnAppointment(MakeAnAppointmentReques...
Hello.
I have following UI part on JSF - it's simple search form with input field and submit:
<h:form>
<h:commandButton action="#{operation.found}" value="#{msg.search}" />
<h:inputText name="searchParam"/>
</h:form>
And correspondingly, on backend, i attempt to get value of input field next way:
public List<Store> getFound() ...
Hi,
I'm creating in my index page of my ruby on rails program, a list of the most commonly searched for terms in my database and hence each time a user selects a specific category this is written to another database.
What i would like it to create a hyperlink and pass a certain amount of parameters to a form like is usually done with a ...
Hi
I have this code:
def addcar
@car = Car.new(params[:car])
render :action => "list"
end
<%(@allcars).each do |cell|%>
<p><%= link_to cell.to_s, :controller => "car", :action => "addcar", :car => cell.to_s %></p>
<%end %>
and its giving me this error:
undefined method `stringify_keys!' for
"Honda":String
I don't...
Hi
This is my controller:
def addcar
@car = Car.new(params[:car])
render :action => "list"
end
this is my view:
<%(@allcars).each do |cell|%>
<p><%= link_to cell.to_s, :controller => "car", :action => "addcar", :car => cell.to_s %></p>
<%end %>
In the link_to statement I want to pass cell.to_s to the controller. ...
This strikes me as an odd problem.
I have two classes representing tables in my database. The first simply has an int ID field and a varchar NAME field; it's *.hbm.xml mapping file contains the following (everything works as expected with this model):
<class name="CBaseDataProvider.Models.PC, CBaseDataProvider" table="pc">
<id ...
I will explain my question on an example. Let's have following code in C#:
void A(Action block)
{
B(() =>
{
Console.WriteLine(2);
block();
});
}
void B(Action block)
{
Console.WriteLine(1);
block();
}
void Main()
{
A(() =>
{
Console.WriteLine(3);
});
}
The output of this code is:
1
2
3
Now, I want to write this code...
I am writing a small framework in C# for importing data to SQL Server.
I have noticed that if you try to use the ? placeholder for parameters, they do not work if you use the System.Data.SqlClient namespace.
However, if you use the System.Data.OleDb namespace for working with the database, they work just fine. (you just have to add Pr...
Hello I have a problem of understanding what the sig parameter is and how to generate it. I have read the documentation in registerUsers but not sure what and how to get it.
...
What could be a correct way to assign parameters to objects in WPF window (objects as simple as rectangles) and pass them to event handlers on mouse clicks?
Thank you.
...
I'm writing a simple asp page to show a team rota based on some XML. Here's the XML:
<rota>
<shift date="20091201" primary="Chan" secondary="John" notes="notes"></shift>
<shift date="20091202" primary="Mike" secondary="Alex" notes="notes"></shift>
<shift date="20091203" primary="Ross" secondary="Mike" notes="notes"></shift>
<shift date=...
What happens when I call a Javascript function which takes parameters, without supplying those parameters?
...
How to pass an array as a parameter for a user defined function in MS Excel VBA?
Eventually I want to test that if a given date (dateDay) is in several ranges of dates (arrayVacation):
Function CB_IsInRangeArr(dateDay As Date, ParamArray arrayVacation() As Variant) As Boolean
' Test that the array is in the form of 2 columns and n...
In C# you can put a constraint on a generic method like:
public class A {
public static void <T> Method (T a) where T : new() {
//...do something...
}
}
Is there also a way to put a constraint like "there exists a constructor with a float[,] parameter?" The following code doesn't compile well:
public class A {
...
I am still new to asp.net and I'm having a problem that I just can't figure out.
I'm using vb and the .net membership api.
My question is, how do I get the current user's userid into a DetailsView INSERT?
<InsertParameters>
<asp:Parameter Name="UserID"/>
</InsertParameters>
...
For example, a class named Table, with its constructor being:
Table(string name="", vector <string> mods);
How would I initialize the vector to be empty?
Edit:
Forgot to mention this was C++.
...
I'm looking to write a function to replace fprintf
int fprintf ( FILE * stream, const char * format, ... );
I'm not sure how to define a function such as this, because, after the format parameter, this function takes a variable number of parameters. Specifically, it takes at least as many additional arguments as were specified in the ...
Positional parameters become a nightmare when dealing with more than 3 or 4 parameters. Named parameters are verbose. I'm thinking of doing this:
query("SELECT * FROM users WHERE username = ", $username, " AND password = ", $password)
With dynamic parameters (using func_get_args()), every second one being transformed into a positional...
I have the code that change the state of boolean property on mouseclick, depending on name of the clicked object:
private void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
FrameworkElement feSource = e.Source as FrameworkElement;
switch (feSource.Name)
{
case "r1s1":
...
Can you not do the following w/ MySQL stored procedures?/
DROP PROCEDURE IF EXISTS `test`;
DELIMITER //
CREATE PROCEDURE TEST (team varchar(30))
BEGIN
SELECT * FROM TEAMS WHERE TEAM_ID = @team;
END
//
Where @team (or team) is the variable passed to the stored procedure?
...