parameters

Functions that take DataArrays and Arrays as arguments in Julia

北城以北 提交于 2019-12-11 04:13:19
问题 I'd like to write a function that can take both a DataArray and a standard Array in Julia. Actually, I'd like to write to methods for a function -- one that takes two vector-like structures as parameters and one that takes two matrix-like parameters. Since Arrays and DataArrays are basically the same, only that a DataArray allows for NA values, I really do not want to write 4 versions of each function, just to incorporate all different combinations of Array and DataArray parameters. Right now

Deleting from sqlite database using IN

眉间皱痕 提交于 2019-12-11 03:59:11
问题 I am deleting from an sqlite database using the ids of the records like this (the dirID is an array of the IDs): Dim i As Integer = 0 Dim conn As New SQLiteConnection("Data Source=" & DBPath) Dim cmd As New SQLiteCommand("DELETE FROM directory WHERE id IN (@ID)", conn) cmd.Parameters.AddWithValue("@ID", Join(dirID, ",")) 'conn.SetPassword(dbPassword) conn.Open() Try mytransaction = conn.BeginTransaction() '// delete directory // If dirID IsNot Nothing Then cmd.ExecuteNonQuery() End If

error: Make sure that the controller has a parameterless public constructor webapi

萝らか妹 提交于 2019-12-11 03:55:58
问题 I am using webapi, unity, and mvc. I am getting the error "Make sure that the controller has a parameterless public constructor". I have seen treads on similar problems but still can't get it to work. I have installed unity.webapi and seem to have all the necessary references: Microsoft.Practices.Unity - runtime: v4.0.30319, version: 3.5.0.0 Microsoft.Practices.Unity.Mvc - runtime: v4.0.30319, version: 3.5.0.0 Unity.WebApi - runtime: v4.0.30319, version: 5.1.0.0 System.Web.Http - runtime: v4

Parameter 'param_name' not found in collection

末鹿安然 提交于 2019-12-11 03:45:47
问题 This is my first attempt at using ADO.NET for MySQL, and I have no idea what's going on. I keep getting the error Parameter '_name' not found in collection on the first parameter I try to define. I have tried reordering, but no matter which way I put it, MySQL always catches up of the first line. mySqlCommand = mySqlConnect.CreateCommand(); mySqlCommand.CommandText = "SELECT MajorEquipment.EquipmentNumber, MajorEquipment.EquipmentType, PlantAreaCodes.AreaCode " + "FROM MajorEquipment e INNER

Defining Parameters in JavaScript reduce

冷暖自知 提交于 2019-12-11 03:43:53
问题 I am looking at this reduce function in JavaScript . . . var colors = ['red', 'red', 'green', 'blue', 'green']; var distinctColors = colors.reduce( (distinct, color) => (distinct.indexOf(color) != -1) ? distinct : [...distinct, color], [] ) I understand that the callback function is called once for each item in the colors array, searching for the color string in distinct and simply returning the array if it is found, and adding color to distinct if not found. What I do not understand is how

Can I change a parameter name in a C# WebMethod?

我们两清 提交于 2019-12-11 03:43:24
问题 Is it possible for a C# WebMethod to accept a different parameter name than its client sends? For example, given a client sending this message: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetStatus xmlns="http://example.com/"> <Arg1>5</Arg1> <Arg2>3</Arg2> </GetStatus> </soap:Body> </soap:Envelope> Can the existing

How can I automate setting SSIS Project Parameters in SSIS 2012?

强颜欢笑 提交于 2019-12-11 03:43:18
问题 I found the catalog.object_parameters view that displays the parameters, but short of creating Environments, which I'd rather avoid, I'd like to find a way to replicate the "Configure" dialog box at the Project level with Stored Procedure calls. I can't seem to find a "catalog" stored procedure that fits the bill. Has anyone cracked this nut? How do I set a Project-level Parameter at deployment (not execution) time? 回答1: I was seeking a quicker way to do it my self In brief I went and manual

Can't Send Parameter Ajax in ExtJs

给你一囗甜甜゛ 提交于 2019-12-11 03:42:52
问题 I have code in View Extjs. Here's the code: var storeTree = Ext.create('Ext.data.TreeStore', { proxy: { type: 'ajax', method: 'POST', url: 'data/newoss_get_paket.php', params: { nopstn:"02318330549", num:"tester" } } }); I call it in newoss_get_paket.php: $pstn = $_POST['nopstn']; $number= $_POST['num']; But the result is null.. parameters can't sent to php file. any solution for me? 回答1: Use the extraParams config instead of params . There is no params config on a proxy. 来源: https:/

Reading request parameter values with UTF-8 chars in JSF

本秂侑毒 提交于 2019-12-11 03:36:00
问题 I have a problem reading request paremeters from a GET request that contain special characters. Here's what I do: I create the request url with javascript, and the value of drivername is encodeURIComponent('sorumluluğumuzu') The result is this URL, which shows up correctly in firefox: http://localhost:8080/driver/list.xhtml?sl=1&drivername=sorumlulu%C4%9Fumuzu However, when I read the request param in my JSF bean: FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap()

No records return when the value being pass in parameter is from Function

廉价感情. 提交于 2019-12-11 03:28:29
问题 I'm a VB guy and slowly migrating to C#. Before i go on the main problem, I would like to show you first the function which i used in manipulating the string. class NewString { public static string RemoveExtraSpaces(string xString) { string iTemp = string.Empty; xString = xString.Trim(); string[] words = xString.Split(' '); foreach (string xWor in words) { string xxWor = xWor.Trim(); if (xxWor.Length > 0) { iTemp += " " + xxWor; } } return iTemp; } } The function simply removes all the