parameters

Insert/update TBlobfield (aka image) using sql parameters

守給你的承諾、 提交于 2019-12-12 06:19:14
问题 I want to store images in a database using sql but cant seem to get it to work: qry.SQL.Clear; qry.Sql.Add('update tbl set pic = :blobVal where id = :idVal'); qry.Parameters.ParamByName('idVal')._?:=1; .Parameters has no .asinteger like .Param has but .Param isn't compatible with a TADOquery - to workaround I tried: a_TParameter:=qry.Parameters.CreateParameter('blobval',ftBlob,pdinput,SizeOf(TBlobField),Null); a_TParam.Assign(a_TParameter); a_TParam.asblob:=a_Tblob; qry.ExecSql; This also

Post Request with Swift Doesn't work

纵饮孤独 提交于 2019-12-12 06:16:02
问题 In my first question I had an error and it has been fixed, but now there is no error but nothing happends. I want to show all the components of this table on here http://blich.iscool.co.il/tabid/2117/language/he-IL/Default.aspx/ but with my gui and other stuff, I want just to pull out information from that table to my app. But, I have a problem I want to pull out the right information from that table, because if you click for example on the rightest button called "מערכת שינויים" the table

An attempt was made to set a report parameter 'studentSignDateParameter' that is not defined in this report

时光总嘲笑我的痴心妄想 提交于 2019-12-12 05:49:26
问题 So I have a report that is being generated that contains parameters. ReportParameter cvrParameter = new ReportParameter("cvrParameter", companyCVR); ReportParameter companyNameParameter = new ReportParameter("companyNameParameter", company.CompanyName); ReportParameter companyAddressParameter = new ReportParameter("companyAddressParameter", company.Address); ReportParameter companyCityParameter = new ReportParameter("companyCityParameter", company.City); ReportParameter studentCityParameter =

Jenkins Groovy extend properties array

佐手、 提交于 2019-12-12 05:47:50
问题 Inside my jenkinsfile I want to set multiple properties based on some dependencies. So in the top of my jenkinsfile I am setting my first parameter: properties([ parameters([ booleanParam( defaultValue: false, description: '...', name: 'parameters1' ), ]) ]) Some lines below I want to set another parameter if a condition is met if(awesomeCondition) { properties([ parameters([ booleanParam( defaultValue: false, description: '...', name: 'parameters2' ), ]) ]) } The problem I am now running

ASP.NET MVC Unbind Action Parameter

纵然是瞬间 提交于 2019-12-12 05:29:33
问题 Is it possible to disable a certain action parameter from retaining its value across requests? [HttpPost] public ActionResult MyAction(string value1, string value2) { if(value1=="hi") ModelState.AddModelError("value1", "Can't have hi"); //do stuff if(ModelState.IsValid) return RedirectToAction("Finish"); else return View() } [HttpGet] public ActionResult MyAction() { return View() } The view consists of a simple form with two input boxes (value1 and value2). Once submitted and validation

Overloading += operator in C++ - How do you pass the left operand?

谁说我不能喝 提交于 2019-12-12 05:19:02
问题 I need to create an operator that accepts a double 'parameter'. myClass myobject(); double mydouble = 10000; mydouble += myobject; My operator: double operator+=(double value, const myclass& object) { value += object.value; return value; } The parameter value is being passed to the operator += as zero, even though mydouble is initialized to 10000. How do you create an operator that can accept the left operand as a parameter? 回答1: The correct prototype is the following: double& operator+=

Return a value from function of the type of a generic function

守給你的承諾、 提交于 2019-12-12 05:06:42
问题 I'm having troubles returning a value of type "T". It's easier to show than to explain so here is the method: Protected Function GetElementValue(Of T)(ByVal nodeName As String, Optional missingIfNotExists As Boolean = True, Optional missingIfEmpty As Boolean = True, Optional ByRef defaultVal As T = Nothing, Optional maxLength As Integer = Nothing) As T 'Set up the node to get the value from Dim node = xmlRoot.SelectSingleNode(nodeName) Select Case True Case IsNothing(node) 'If the node is

How to initialize parameter array in verilog?

落花浮王杯 提交于 2019-12-12 04:48:50
问题 How can one initialize parameter type array in verilog where each of members are 32 bit hexadecimal notation numbers? I have tried the following but it gives me syntax error. parameter [31:0] k[0:63] = {32'habc132, 32'hba324f, ...}; I'm using latest version of iverilog for compiling. 回答1: On EDA Plyground The following example works using modelsim 10.1, the file has a .sv extension, causing it to be interpreted as SystemVerilog: module test; parameter [31:0] k [0:1] = {32'habc132, 32'hba324f}

Unfortunately this works: ROR Comparison in Activerecord - update

会有一股神秘感。 提交于 2019-12-12 04:44:23
问题 Unfortunately this mess works: Do you have suggestings for cleaning up this code: I'm trying to use a activerecord to compare two table columns, "needed" and "amount" then update a boolean column, depending on the returned data. Totally breaking do-not-repeat coding. def update @inventory = Inventory.find(params[:id]) respond_to do |format| if @inventory.update_attributes(params[:inventory]) unless @inventory.needed.nil? if @inventory.needed < @inventory.amount then @inventory.instock = true

Can I pass an array of lambda expressions to a method with a params argument?

送分小仙女□ 提交于 2019-12-12 04:36:12
问题 I want to call a method like this: signature: void Method(object a, object b, params LambdaExpression[] expressions); call: Method(a, b, x => x.A, x => x.B) Is it possible? Let's assume that the type of 'x' is a constant type. For example, if x => x.A and y => y.B were Funcs, they'd be Func<TType,*> , such that the params array always had the same type for TType , but the return value's type * could differ from element to element of the params array. That's why I had to choose something more