Questions tagged [scalar]

In computing and programming, a scalar variable or value refers to a single value, as opposed to data structures such as arrays or lists.

In computing and programming, a scalar variable refers to a single value, as opposed to data structures such as or s. A scalar can be of any type, including a complex type such as an object or string. Being scalar only means that it is manipulated as a single value.

As an example, the string type in C++ is considered to be a scalar as it is a primitive type containing a single value, although in the C language there is no such primitive type. Thus, the char array implementation of strings typically used would not be considered as a scalar.

See also:

532 questions
-1
votes
2 answers

Multiplication array with coefficient TypeError: only size-1 arrays can be converted to Python scalars

I try to make a multiplication of an array D_0 with some coefficients for obtaining another array f_0 but I get: only size-1 arrays can be converted to Python scalars, why? Why can I have the paramerter Re as a vector althought I did not initialize…
chrisis
  • 119
  • 1
  • 1
  • 9
-1
votes
2 answers

Must declare the scalar variable "@SSTGroupID"

Private Function GetSvcType(ByVal oCommand As OleDbCommand, ByVal SSTGroupID As Integer) As DataTable Dim sSQL As New StringBuilder sSQL.AppendLine(" Select SSTServiceTypeID AS ID, SSTServiceTypeName AS Name ") sSQL.AppendLine(" from…
-1
votes
1 answer

TSQL Query Calculating number of days and number of occurrences

I'm having some issues writing a query summarizing some stocking information from a query. I've been trying a few CTE (Common table Expressions ) grouping and subqueries and LAG function to try to summarize the data. Oddly I've gotten stuck on…
user12433
  • 1
  • 1
-1
votes
2 answers

The scalar type additionnal in C++

In C the scalar type are: floating_point (double float, ...) integral (int, char, long, ...) pointer enum In C++ the scalar type added are just : integral (bool) nullprt_t member pointer (member object pointer and member function…
Ben
  • 131
  • 1
  • 1
  • 7
-1
votes
1 answer

C# Error Must declare the scalar variable "@EmpID" SQL Insert

I have been stuck on this for weeks, and i've been all over forums trying solutions to the same problem that other people had, but so far it still won't work. I'm not sure what i'm doing wrong. I'm making a user-interactive page that gets data and…
Damon W
  • 25
  • 1
  • 6
-1
votes
1 answer

Login Comparing hash value in a database

I am attempting to make a simple sign on portion of an app I am creating. To confirm sign in, I am just attempting to make sure that the hash value of the password entered, matches that which is stored in my local database: App_Users ) '…
Jponder23
  • 27
  • 6
-1
votes
4 answers

Increasing Multiplier

I have a data frame (df) with two variables shown below: pricePerBusiness num_businesses 1 4228.966 3755 2 4966.552 3243 3 4678.073 3109 4 4752.259 2990 5 4545.194 …
PMc
  • 95
  • 10
-1
votes
3 answers

How to solve error "Incorrect syntax near @parameter"?

Why am i getting "incorrect syntax near @sqlFalse"? The IsConnected column is defined as nvarchar. Thanks. SqlCommand cmd = new SqlCommand($"insert into clientstable (Name, NickName,isconnected) values (@sqlname,@sqlNickname ,@sqlFlase",…
NateS
  • 33
  • 6
-1
votes
1 answer

Making a scalar multiplication function in C

I have written a function definition to get the scalar multiplication for a vector. I was given a prototype to work with but am having confusion with understanding pointers in this. here is the prototype. void scalar_mult(double k, const threeVec_t…
john john
  • 1
  • 1
-1
votes
1 answer

How to use reduction vector variable in OpenMP?

I want to use the reduction directive in openmp, but it's not working. Compiler error says: "reduction: OpenMP 'parallel for' empty factor in directive" (Visual studio 2015 community) or "reduction:^ needed scalar variable" This is my code…
-1
votes
3 answers

Comparing array to scalar

Problem: I want to compare a 2-dimensional array and a scalar variable, both with numerical values with (<=) lessthanorequalto operation and assign all those values in the array to a vector. I want to speed up this task in R. Now, below is the code…
-1
votes
1 answer

Erro on VB "Expecting an existing scalar var"

I was trying to make an function using vb. This function is to collect data for a report. Follows the example: Public Function HeaderData() As String Dim dados As String dados = "" If Not(frm.FormQuery.FieldByName("A").AsString = "S" And _ …
-1
votes
6 answers

Matlab programming error

I am trying out the questions in programming assignment of Coursera course on Matlab programming as an exercise. This is for my self-study. Question: Write a function called classify that takes one input argument x. That argument will have no…
tmgr
  • 1,187
  • 3
  • 14
  • 16
-1
votes
2 answers

C++ returning a vector (conversion of int to non-scalar type)

I am trying to fill a vector with integers starting with -1 and going until the negative of my size parameter. For example: if the parameter is 6, then I want the vector to have 6 items, from -1 to -6. Oh and if the size parameter is less than 1 I…
-1
votes
3 answers

Converting and printing array of hashes - Perl

I really dont know how to do it so I ended up here. I want to convert this input: my @sack_files_1 = ( 'mgenv/1_2_3/parent.dx_environment', 'mgenv/1_2_3/doc/types.dat', 'u5env/1_2_3/parent.dx_environment', …
huksha
  • 13
  • 5