Click here to Skip to main content
15,891,184 members
Everything / Parameter

Parameter

Parameter

Great Reads

by Sergey Alexandrovich Kryukov
Rather insane yet simple approach to the named function parameters
by Uladzislau Baryshchyk
An overview of Dynamic Language Runtime DLR in C#
by Mel Padden
Default keyword in SQL Server
by ToughDev
How to identify used and unused resources in VS Project Resources.resx file

Latest Articles

by Coral Kashri
Fold-expressions in extreme cases
by ToughDev
How to identify used and unused resources in VS Project Resources.resx file
by Illya Reznykov
The post describes PowerShell script which creates WAF resources for the scenario when Application Load Balancer is used to serve content for a public website, but to block requests from attackers and to protect from OWASP Top 10 security risks.
by Uladzislau Baryshchyk
An overview of multithreading in C#

All Articles

Sort by Updated

Parameter 

22 Sep 2023 by OriginalGriff
It calls func up to three times: once when you call it directly: let delay = func() and twice more when the timeouts expire: setTimeout(func, num); setTimeout(func, delay) Depending on what func returns the first time, the second timeout may...
22 Sep 2023 by DesperatelyBadCoder
Hi, I am trying to solve the problem below. Write a function called solution that takes in 2 parameters, a number and a function. solution should execute the input function (which returns a number) after first input parameter milliseconds. The...
25 Jul 2023 by Raf-Reyes
I'm new in VB.NET and I want to pass the value from vb.net to crystal report. I have a problem that the "Enter Parameter Value" keep asking a value even in my code there's already a value. When I remove this code I know "Enter Parameter Value"...
25 Jul 2023 by OriginalGriff
None of that code sets anything in report_Batch other than the two parameters. So at a guess, the command string (which we can't see) that the report is based on contains parameters you aren't setting. Use the debugger: find out exactly what...
22 May 2023 by Coral Kashri
Fold-expressions in extreme cases
8 May 2023 by ToughDev
How to identify used and unused resources in VS Project Resources.resx file
14 Feb 2023 by stdout
Dear community, I try to create an web api endpoint that returns an image in a format that can be defined in the 'Accept-Header' field of the request. I'm using Swashbuckle NugGet Package (Swashbuckle.AspNetCore, Version 6.5.0) and the UI shows...
23 Jan 2023 by leone
Ok I did it on my own: Material m=new Material(URL); process.OutputDataReceived +=(Object _sender, DataReceivedEventArgs _args)=>DoSomething(m, _sender, _args); public void DoSomething(Material mt,object sender, DataReceivedEventArgs e) { ...
23 Jan 2023 by leone
Hi, My problem is that I cant send my custom object to OutputDataReceived method. Details: I have a class called Material which includes properties such as URL, Title, Description etc. Now I start a Process. My goal is to take Title by using...
24 Sep 2022 by Illya Reznykov
The post describes PowerShell script which creates WAF resources for the scenario when Application Load Balancer is used to serve content for a public website, but to block requests from attackers and to protect from OWASP Top 10 security risks.
1 Mar 2022 by Uladzislau Baryshchyk
An overview of multithreading in C#
17 Feb 2022 by Pete O'Hanlon
What is an array and how to use it to manage multiple items
11 Feb 2022 by ronschuster
One of our clients in Russia is reporting this error: "Column name or number of supplied values does not match table definition." This is happening on an INSERT command being sent to SQL Server. When we look at the command in SQL Server Profiler...
11 Feb 2022 by ronschuster
There was absolutely nothing wrong the insert statement. The presence of the commas was totally a red herring. The problem was buried in an insert trigger that called another insert trigger, triggers that the customer had but we did not, which is...
9 Feb 2022 by OriginalGriff
We can't help you - you need to look at the whole query, and count the number of fields in the query, the number of parameters you are supplying, and the number of columns in the table: and with a redacted query like you show, we can't help you...
30 Jan 2022 by Uladzislau Baryshchyk
An overview of Dynamic Language Runtime DLR in C#
16 Dec 2021 by Sauradipta Chaudhury
This is a coding solution to use Application Settings and Connection Strings sections under Configuration Menu in Azure Functions V2.x and above to store configurable entries.
29 Nov 2021 by evedvvv
I have a program that currently distributes chocolates to x people in a list, and I have a general method that handles the sorting and several methods that orders the list by age, first name etc. depending on how you'd like to distribute the...
29 Nov 2021 by Marc Clifton
Here's the full example. Not really sure what you're trying to do with numChocolates, but the rest of it illustrates passing in the order by expression. Note how it handles any type, such as int, string, double. It was interesting to figure...
28 Nov 2021 by Marc Clifton
Pass in the sort as a lambda: public void DistributeChocolates(int choc, Func sorter) { People = People.OrderBy(sorter).ToList(); ChocolatesDistributed(choc); } Call with: DistributeChocolates(5, x => x.Age);
28 Nov 2021 by #realJSOP
You could do it this way: public void DistributeChocolatesByAge(int choc) { ChocolatesDistributed(choc, People.OrderBy(x => x.Age).ToList()); } However, I would probably move the sort operation into the ChocolatesDistributed method so...
25 Jun 2021 by Patrice T
What happens to $query when $_SESSION['user_role'] is neither '1' or '0' ? if($_SESSION['user_role']=='1'){ $query="SELECT post.post_id, post.title, post.description, post.post_date, category.category_name,user.username FROM post ...
25 Jun 2021 by tanim arefin
hello everyone. please help me.i am beginner i am getting 2 error. It is true that similar problem have occurred and answers have published to them. I tried those and still I can't understand where my mistake is. A help to catch my mistake would...
6 Jan 2021 by Lisanas
How to add more parameter value or how can i create array of parameters pls help... thanks in advance What I have tried: rept.setParameterValue("DataToShowinHeader",txtDate.text); is working.. but i need to add more parameter
6 Jan 2021 by thatraja
Learn Crystal report's parameters. C# Crystal Reports String parameter[^] C# Crystal Reports Integer parameter[^] C# Crystal Reports Date parameter[^]
1 Dec 2020 by NaumanMalik
void retrieveDate(int &, int &, int &) const; What I have tried: void Date::retrieveDate(int &a, int &b, int &c) const { Day = a; Month = b; Year = c; } what should I do to? like I want to retrieve parameters into class private members
27 Nov 2020 by Member 14969271
Hi, all. I am a new VB.NET beginner. I am facing an issue on how to pass the dynamic parameter value from SQL query, that will be entered by the user into the textbox, to the SQL command to search on the parameter value on the datagridview...
20 Oct 2020 by Tarun Surana
I have fetched a json array data in paramMap of array object but i get a result null. I pass a parameter of array object in paramMap. "currencies": [ { "code": "BGN", "name": "Bulgarian lev", ...
14 Oct 2020 by temchik_ggg
I'm trying to rewrite the Python algorithm in C++ and it doesn't work correctly. I think the problem is that I can't rewrite the function correctly in C++. How do I write a constant to a function (in Python, this is the 'start' parameter) or an...
14 Oct 2020 by markkuk
The start parameter isn't a constant, it's a parameter with a default value. First, read about default argument values in Python[^] and in C++[^]. In C++ the default argument must be specified in the function declaration[^]. #include ...
10 Oct 2020 by KarstenK
best is to writeint Algorithm(int n, int start) to avoid confusion.
24 May 2019 by Member 14089238
Here are my code .... private void SaveorUpdateLedger(string storedProcName) { DBSQLServer db = new DBSQLServer(AppSetting.ConnectionString()); db.SaveOrUpdateRecord(storedProcName, GetObjectLedger()); } private List...
24 May 2019 by OriginalGriff
Start by looking at your stored procedures: you pass the SP name in to your methods, and build a set of parameters for it to process. And you are passing too many parameters to the SP - but we have no idea what the SP is called, what it does, how many parameters it is expecting, or how many you...
22 May 2019 by lmoelleb
yyyy-MM-dd HH:mm:ss is a format "for human consumption". It is not a good format for a database, nor a good format for a program. And it is certainly not a good format for a program to communicate with a database. It isn't even a good format for Excel, so most likely this is not what is stored...
22 May 2019 by Member 10696161
This time i've created like "Sheet5" in excel Workbook: https://i.stack.imgur.com/HGkKu.png When I load data from this excel to datagridview i get this view (in datagridview of course):...
22 May 2019 by mohamedenew
//Try to use method like that ... cmd.Parameters.AddWithValue("@DATA_ROZPOCZECIA", (DateTime)datagrdStatus_zl.Rows[i].Cells[7].Value); // otherwise i can help u on your pc ..
29 Apr 2019 by Member 14345483
I want to be able to track the source of a site conversion if a user leaves the original landing page that has the UTM tracking code on. Example: 1. User clicks my google ad that leads to www.mysite.com/free-trial?utm_campaign=xyz where the end goal of this page is form submission for a free...
2 Mar 2019 by Member 14141186
I want to try write a code where my program will print information of the employee and then there will be another method where I can pass a parameter (integer) and that will not return anything but when I will call the method it will add that integer with one of the instance variable (in my...
2 Mar 2019 by Richard MacCutchan
Try this: class Information: def __init__ (self,first,last,pay): self.first = first self.last = last self.pay = pay def __str__(self): return self.first + " " + self.last + " will get " + str(self.pay) def extra(self, value): print("adding...
28 Jan 2019 by TheBigBearNow
Hello all, I have a working mysql database with my PHP code. I can create a new row and delete a row BUT when I click the btn delete the page just continually keeps loading and never goes to my header(). For my create btn the page does the same thing just keeps Is PDO one of the best phps to...
28 Jan 2019 by Richard MacCutchan
report as below in SSRS - Google Search[^]
24 Jan 2019 by Member 14128924
I declared it as OUTPUT the error still not solved. I get other error: SendNoticeMail : [Microsoft][ODBC SQL Server Driver][SQL Server]Implicit conversion from data type datetime to int is not allowed. Use the CONVERT function to run this query.(1)
24 Jan 2019 by Member 14128924
Hello there! Working with a server(game server) i got in trouble and i cant get a full fix. My error is SendNoticeMail : [Microsoft][ODBC SQL Server Driver][SQL Server]The formal parameter "@pSvrNo" was not declared as an OUTPUT parameter, but the actual parameter passed in requested...
24 Jan 2019 by Richard Deeming
The code that calls the stored procedure has specified that the @pSvrNo is an OUTPUT parameter. But inside the stored procedure, it's not declared as OUTPUT. You have two options to fix it: add OUTPUT to that parameter, as you have with the following four parameters; or change the calling code...
20 Dec 2018 by CHill60
You have not declared @sql outside the body of the stored procedure. In the SP All you are doing is setting up a variable and doing nothing with it. Try moving the END to after the EXEC Edit: Another thought - that looks like a very poor database design. Firstly you appear to have your...
20 Dec 2018 by DrgIonuţ
I have a database with 40 tables. I want to select data from a certain table by using a single stored procedure. First table (TblSPAU1) has 6 columns, named: ID, COL_SPAU1_EA, COL_SPAU1_EQ, COL_SPAU1_ore, COL_SPAU1_nivel, DateTime. Fourth table (TblSPAU4), for example, has this 6 columns: ID,...
9 Nov 2018 by OriginalGriff
The debugger is pretty much the only way you will find this: if you aren't hitting the breakpoints, then either they aren't in the right place, or you are not debugging the code you are executing. So: try it again. Go to the "Debug" menu and select the "Exceptions..." menu item. In the...
9 Nov 2018 by TheBigBearNow
current error: Object reference not set to an instance of an object I was getting invalid cast exception error but i changed (int) to Convert.toInt32 and that went away. I go to debug it and the on my button click and the code runs all the way through not stopping at any of my breakpoints. The...
31 Aug 2018 by Dineshkumar Ramakrishnan
0 down vote favoriteshare [fb] share [tw] I have created my crystal report using command (sql query) in crytal report itself, by passing two parameters, i.e, say for eg:- Month & Year, While i preview the report, i can able to navigate through all pages by passing different parameters...
22 Aug 2018 by Dave Kreskowiak
Your code doesn't make any sense. If the user doesn't pass in any args, it starts a Windows Forms app. If the user does pass in arguments, you add every argument to what appears to be a List (I have no idea because you never show the definition of mainObject!), assign the first two arguments to...
22 Aug 2018 by Dinesh Kumar Dora
Hello friends, I am wondering if we can pass different count of commandline arguments to a console application. for example: test.exe test.exe arg1 test.exe arg1 arg2 test.exe arg1 arg2 arg3 all the above 4 cmdprompt invocations must work. Is it possible? i tried the params option as shown...
22 Aug 2018 by Richard MacCutchan
string argHTTPS = args[0]; string argCustDBName = args[1]; That will only ever work if you have two or more parameters. If you want it to be dynamic then you need check how many parameters are being passed in. Start by setting default values for all the optional parameters,...
2 Aug 2018 by UpATL
System.ArgumentNullException: Value cannot be null Parameter name : Key Error occurs in conn.open() The application is not able to connect to the database. but connection string is provided in webconfig file. The authentication is through sqlserver and the database tables of the rest of the...
2 Aug 2018 by kijisky
I had the same problem with this provider. Unability of archiver to start was the cause of error. My solution was to increase db_recovery_file_dest_size. Oracle not sending some parameters (named "AUTH_SC_*") during "handshake" if archiver is not working while database is in archivelog mode....
26 Jun 2018 by Gerry Schmitz
Use a "parameter table". Insert parameters to table via "report request"; run report; report retrieves parameters from table and "joins" with reporting data to create parameterized report.
26 Jun 2018 by Member 13887280
I have developed a SSRS Report and now this report is deployed on the SSRS report server. The SSRS report have 4 parameters. Now the problem is that we are trying to pass these 4 parameters from the .net application to report that is deployed on the SSRS report server and we want to launch this...
13 Jun 2018 by Member 13871081
I am hoping I can get some insight to a issue I have been struggling to resolve. I am new to c# Nunit and Visual studio. I have an XML storing usernames and XML storing passwords and .resx file in Visual Studio storing all the browser names. Every password and username has to be parallel tested...
20 Apr 2018 by phil.o
What is the point to create an int64 variable if you already know that you will need an int32 value? Have you tried: Dim xx As Integer = 20 '' ... myEncoderParameter = New EncoderParameter(myEncoder, xx) If you really want to define an int64 in the first place, you should know that VB.NET...
20 Apr 2018 by Member 12809412
Hi All, Im having a hardtime to pass a parameter to below line. 'myEncoderParameter = New EncoderParameter(myEncoder, CType(20L, Int32)) myEncoderParameter = New EncoderParameter(myEncoder, CType(xx, Int32)) Private Sub Button2_Click(sender As Object, e As...
20 Apr 2018 by Member 10329095
Hi, I am faced with a problem. I want to take some html, pass it to some library and convert it to a pdf. I'm reading the html from the frontend, using jquery, and I want to pass it to a HttpHandler which converts it and downloads it.The issue is that the html string is too long and I end up...
18 Mar 2018 by Member 13730132
I am new to programming and java. I have created an application to open a file an display information about that . I want to split that file too. In function with RandomAccessFile there is some problem in the passed parameter. In function split() I want to use field fileName from function...
15 Mar 2018 by Member 13727912
u should use .rdlc paremeters to filter the data from dataset by using setparameters to add parameters to report, like ReportViewer ReportViewer1 = GetReportViewer(); ReportParameter[] parameters = new ReportParameter[1]; parameters[0] = new...
15 Mar 2018 by nina4ever
In my Windows Forms Application, i want to create a report. i have created an .rdlc file and assigned it a "dummy" dataset as a datasource just to get the schema, as described here...
5 Mar 2018 by Member 11977135
Thankyou all for your inputs. I have investigated, asked the SYSOP, and found out where the API003 is stored. C# did not care about this, but after changing the connectionstring, I can now run also in vba!! Solution : Check in iSeries Navigator where the Procedure is stored, and add database...
5 Mar 2018 by Member 11977135
Sub Call_API003_2() Dim cnn As ADODB.Connection Set cnn = New ADODB.Connection kod = "ZX311266012Y56Q9E7EBI38" 'Data Source=S652B48C; cnn.ConnectionString = "Driver={iSeries Access ODBC Driver};System=172.18.0.51;Default Collection=MVX9MOD;Uid=SKS6400;Pwd=password;" ...
26 Feb 2018 by NexGen39
I want to display a few records from my table, but there seems to be a problem with the mysqli part, these are the erros that keeps popping up; Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in D:\xampp\htdocs\Project\add_employees.php on line 78 Warning:...
26 Feb 2018 by Richard MacCutchan
PHP mysqli_select_db() Function[^]
17 Feb 2018 by abdul wadood
Since ref passes the data in two ways and out passes the data in one way.But one thing i am not sure which one is better to use I have done a simple practical using ref and out which have the same output..If it has same output then whats the difference? Here is my code using out keyword: ...
17 Feb 2018 by George Swan
I would say that neither of your options are the best. I would use a Tuple. Something like this: static Tuple Remainder(int dividend, int divisor) { int quotient = dividend / divisor; int remainder = dividend % divisor; return...
17 Feb 2018 by OriginalGriff
As Phil has said, they are very similar. But ... if you aren't using the passed in value - as your example doesn't - then using ref is redundant and just adds extra overhead to each call. Using out parameters instead is more reflective of what you are actually doing. But ... I wouldn't use...
17 Feb 2018 by phil.o
ref and out are quite similar in that they allow to pass parameters by reference rather than by value. The only difference is that out does not need the parameter to be initialized before being passed, whereas ref needs an already initialized parameter. Beyond that, none is better than the...
16 Feb 2018 by david salaman
recently read about Out/ref keywords and i need to know how does the below method(FetchDeviceInfo) return serial number of a device, although the variable "returnValue" is string.Empty. and inside GetSerialNumber(machineNumber, out returnValue) method body there`s nothing? public string...
15 Feb 2018 by OriginalGriff
The simple answer is that there is something in the body of GetSerialNumber, but you haven't found the right code yet. Your assumption that the body of the method is empty from this:Quote: from interface: [DispId(29)] bool GetSerialNumber(int dwMachineNumber, out string dwSerialNumber);...
26 Jan 2018 by Member 13646380
Im sort of new to coding I want to add a parameter to a method but when I type it in, the jgrasp says no main method was found. I think it wants to see the public static void main(String[] args) but my teacher said I can put the method in instead. What I have tried: public static void...
26 Jan 2018 by OriginalGriff
You can't add parameters to main - it needs to have a specific signature - which means it needs to have very specific input and output parameters, and you adding or removing them changes the method signature and means that the system doesn't "see it" when it looks for the method to call at...
7 Jan 2018 by Maciej Los
A common reason of above error is described here: System.ArgumentNullException: Value cannot be null.[^]
25 Dec 2017 by R Hegde
struct queue{ int value; struct queue *tlink; struct queue *blink; }; typedef struct queue* Q; void enqueue(Q top, int val, Q bottom=NULL); error: expected ‘;’, ‘,’ or ‘)’ before ‘=’ token void enqueue(Q top, int val, Q bottom=NULL); What I have tried: I am trying to...
25 Dec 2017 by OriginalGriff
C doesn't have any concept of default parameters, so you pretty much can't do that. (Which is a lie-to-children, becuase you can, but it's horribly complicated and messy: C default arguments - Stack Overflow[^] - see BK's solution, which TBH is worse than the original problem from a...
29 Oct 2017 by Member 13491787
Hey! I'm a complete beginner learning Java so I am sorry for the simple question! The following program outputs a pyramid. I am wondering how the last three methods know what value to assign to their parameters. Where do they get this value? import java.util.Scanner; public class...
29 Oct 2017 by OriginalGriff
You pass them to the function when you call it. When you define a function, you specify what parameters it needs to be given: private static string pyramidLine(int lineNumber) { ... } Says "when you call pyramidLine, you must give it an integer, and it will return a string". Within the body...
7 Oct 2017 by Member 11725507
Can we able to give it as a Optional variable in the below class. Because I don't want Obj1, obj2, obj3 for request type but needed for another request. Kindly suggest me. public Obj1 IsForecasted { get; set; } public obj2 ? IsGenerated { get; set; } public obj3 ? IsPosted...
7 Oct 2017 by Ralf Meier
For what do you need such "optional Variables" ? If your class should have this Variables for the usage 1 and needs not some Variables for usage 2 I don't understand the problem. If you don't need the Variables then don't use them. If the Variables (in your code-snippet I see them as Properties)...
7 Oct 2017 by OriginalGriff
You can't have optional data in a class - a class instance is a fixed size and cannot be altered. Think about it: you have a optional value which is not there for "mode == normal" - so you create an instance of the class as a "normal" instance. Later you change the value of mode to "advanced"...
17 Jul 2017 by The_Unknown_Member
Hi. I was experimenting with this and I found strange behaviour which I cant understand. Consider this code: #include "stdafx.h" void passStructAsParam(Student s); struct Student { int rollno; char gender; int age; }; int main() { Student s; s.rollno = 40; s.gender = 'm'; s.age =...
17 Jul 2017 by Jochen Arndt
When using the struct keyword in your function declaration you have a so called "forward declaration": // Forward declaration // Definition must be present later in this scope struct Student; // Can now use the forward declaration within other declarations void passStructAsParam(Student s); ...
21 Jun 2017 by Member 13271774
The following is a toString( ) method for a GymMembership class. public String toString( ) { return “Member Number: “ + memberNumber + “Member Name: “ + memberName + “ Membership Type: “ + memberShipType; } Write two constructors for the GymMembership class as follows:  A constructor to accept...
21 Jun 2017 by TheGreatAndPowerfulOz
there are basically two ways: public class SomeClass { private int someMember; public SomeClass(int someMember) { this.someMember = someMember; // note the 'this' keyword denoting the constructed class } } or public class SomeClass { private int _someMember; ...
17 Jun 2017 by User 11061201
Hallo community, i have currently this code in C++. I want to pass the reference of a void method so it can be called from another method in another class. //main.cpp #include "A" void Handler(int val); void Handler(int val) { printf("%d", val); //should display 5 } int main() { A fnc; ...
17 Jun 2017 by KarstenK
Using this technique in C++ is named callbacks. Here you find a tutorial about callbacks. As an experienced programmer like interfaces more, because type checking from the compiler, debugging adavantages and cleaner concepts like modularity and maintenance. Here you find some tutorial about...
8 Jun 2017 by Richard Deeming
Try using a generic method: Private Sub CreateChild(Of TForm As {Form, New})() Dim frmChild As New TForm() ... End Sub To call it, you need to specify the type of form you want to create: CreateChild(Of YourCustomForm)() The type must inherit from Form, and must have a public...
8 Jun 2017 by BeginnerCoderPete
I wanted a sub to create child forms but i am having issues Private Sub CreateChild(frm As Form) Dim frmChild As New frm frmChild.MdiParent = My.Forms.frmNavigation frmChild.Show() frmChild.Tag = My.Forms.frmNavigation.intTabCounter ...
31 May 2017 by Menci Lucio
Hi, I wrote a lot of parametrized queries where parameters are inserted by the user. If the user inserts strings longer than the field where parametrized value is referring to, DB2 throws a SQL0302N error. There is a way to avoid it? Example: Create Table Foo (Code Char(3) Not Null, Descr...
24 Mar 2017 by kkakadiya
Hello,I have a requirement to pass comma separate string as a parameter from View to another Controller. Ex:I have parameter in /Home/findaContractor View and want to pass /Postwork/Create ControllerCurrently, I am passing parameters like...
24 Mar 2017 by Richard Deeming
If you don't want the values to appear in the querystring, then you need to make a POST request:var form = document.createElement("form");form.setAttribute("method", "POST");form.setAttribute("action", "/PostWork/Create");var contractors =...
24 Mar 2017 by F-ES Sitecore
str='1,2,3,4,5';window.locat...
22 Mar 2017 by FarhanShariff
I am try in to create a parser with to read configuration fileserror explicit specialisation in non namespace 'class Conversion'What I have tried:#include #include #include #include //holding the pair of parameter-value#include...
22 Mar 2017 by bling
Here are three choices for you:Easiest fix is to get rid of the Conversion class and write specialized versions of getValueOfKey.Alternative 2: make Conversion a template class (instead of a class with template members).template class Conversion {Alternative 3: make...
11 Mar 2017 by Sergey Alexandrovich Kryukov
Rather insane yet simple approach to the named function parameters
26 Jan 2017 by markwhite1
Hi, I am trying to export crystal report in order to mail it. I have used : printbanqoute.ExportToDisk(ExportFormatType.PortableDocFormat, "E:\\ASD.pdf");However I get an error the "Missing Parameter Values".Without using ExportToDisc it works fine.I have used 4 parameters and...