parameters

How to convert xml as a table or html table in sqlserver

依然范特西╮ 提交于 2020-01-05 04:02:05
问题 xml is a type in sqlserver, now I want to pass a table variable to procedure, but you must define the table as type (use "create type"). So I think I can use xml as a variable to pass into the procedure as parameters. declare @tv table ( id int, username varchar(50), department varchar(50) ) insert into @tv values(1,'tom','finance'),(2,'mark','business'); declare @xml xml; set @xml =(select * from @tv for xml path('row') ,type ) select @xml ; I want to use table like @tv as parameter, pass it

Passing FileWriter as a parameter to a method

微笑、不失礼 提交于 2020-01-04 08:23:44
问题 I'm sure there is a fairly simple answer to this question, so here we go. I'm trying to use a FileWriter to write text to a file. My program reads text in from an already existing file, specified by the user and then asks whether to print the text to the console or to a new file, also to be named by the user. I believe my problem is with passing the FileWriter to the "FileOrConsole" method. Am I not passing or declaring the FileWriter in the "FileOrConsole" method correctly? The file is

Efficiency. Function return values versus output parameters

烂漫一生 提交于 2020-01-04 06:18:17
问题 Function return values versus "output" parameter, which one is faster? I think I best explain using what I am currently working on. // specify identifier and return pointer. SceneNode* createSceneNode(const String& desired_identifier); // f1 // auto-gen identifier and return as string. String createSceneNode(SceneNode*& out_ptr_to_creation); // f2 // auto-gen identifier and return pointer to node SceneNode* createSceneNode(String& out_gen_identifier); // f3 // auto-gen identifier and return

Generic method type and method parameter does not match [closed]

旧街凉风 提交于 2020-01-04 05:27:45
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I just stumbled over that and I can't really explain that. Say I have that code: public interface IFeature { } public class FeatureA : IFeature { } class Program { static void Main(string[] args) { var feature = new FeatureA(); Load(feature); } private static void Load(IFeature featureDefinition) { Activate

Can I parameterize labels and properties on CREATE or SET? (REST and transaction)

一笑奈何 提交于 2020-01-04 04:16:09
问题 I have a query 1. CREATE (a:%1$s {props}), (b:%2$s {props2}), (b)-[:%3$s {relProps}]->(a) 2. MATCH (a:%1$s { value:{value} })-[:%2$s]->(b) WHERE (b:%3$s) SET (b {props}) I'm using underscore.string to allow string format but would love to just stick with parameters. Is it possible to parameterize labels such as { "query": CREATE (a:{label} {props}), "params": { "label":"SomeLabel", "props":{....} } } and is it also possible to parameterize properties on a SET? { "query": "MATCH ..... SET

How to pass a parameter from an activity to a service…when the user stop the service

半腔热情 提交于 2020-01-04 04:15:33
问题 I have an activity with a checkbox: if the chekbox is unchecked then stop the service. this is a snippet of my activity code: Intent serviceIntent = new Intent(); serviceIntent.setAction("com.android.savebattery.SaveBatteryService"); if (*unchecked*){ serviceIntent.putExtra("user_stop", true); stopService(serviceIntent); when I stop the service I pass a parameter "user_stop" to say at the service that has been a user to stop it and not the system (for low memory). now I have to read the

Passing 'build with parameters' to Jenkinsfile from scm in pipeline

喜欢而已 提交于 2020-01-04 03:17:24
问题 I am on jenkins 2.x and using pipeline. I have configured the job to be built with param and have a string param : I also get the Jenkinsfile from github ( pipeline from script) : Now in my Jenkinsfile, I am using the param : ${githubUrl} and it throws error : stdout: stderr: fatal: '${githubUrl}' does not appear to be a git repository So if directly write the pipeline script , this works but fetching from scm fails. Any ideas how to get around it ? 回答1: Use url: githubUrl without dollar sign

matlab ode45 retrieving parameters

时光怂恿深爱的人放手 提交于 2020-01-04 02:55:31
问题 I'm experimenting with ode45 in Matlab. I've learned how to pass parameters to the ode function but I still have a question. Let's suppose that I want to compute the trajectory (speed profile) of a Car and I have a function, e.g. getAcceleration , that gives me the acceleration of the car but also the right gear: [acceleration, gear] = getAcceleration(speed,modelStructure) where modelStructure represents the model of the car. The ode function would be: function [dy] = car(t,y,modelStructure)

Passing an Enum as an argument

我与影子孤独终老i 提交于 2020-01-04 01:39:27
问题 I am playing around with trying to make a simple Roguelike game to learn C# a bit better. I am trying to make a general method that I can give it an Enum as an argument, and it will return how many elements are in that Enum as an int. I need to make it as general as possible, because I will have several different classes calling the method. I have searched around for the last hour or so, but I couldn't find any resources here or otherwise that quite answered my question... I'm still at a

passing a parameter to the link_to method

旧城冷巷雨未停 提交于 2020-01-03 17:07:44
问题 How do you pass a parameter through the MVC using the link_to method? view: <%= link_to "Remove Tag", remove_tag_issue_path(issue)%> How do I use the link_to method, to utilize the remove_tag action? issues_controller.rb def remove_tag(parameter) @issue.remove_it(parameter) end issue.rb def remove_it(parameter) self.users.delete(User.find(parameter)) end 回答1: In controller def remove_tag @issue.remove_it(params[:my_param]) end And in view <%= link_to "Remove Tag", remove_tag_issue_path(issue,