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
0
votes
1 answer

Perl - Scalars leaking with Win32::GUI and threads

I just played around with the Win32-GUI in combination with threads (Perl 5.16) and I came up with some warnings and errors I do not really understand. Code is the following: use strict; use warnings; use Win32::GUI(); use threads; …
0
votes
1 answer

mysql scalar function with for loop

i have the table 'points_level' with : id | description | level -------------------------- 1 | noob | 0 2 | rookie | 50 3 | The boss | 100 i need to build a function that return the id of the level giving points as integer for…
ilmetu
  • 448
  • 11
  • 27
0
votes
1 answer

Insert not working

I've searched evreywhere and tried all suggestions but still no luck when running the following code. Note that some code is commented out. Thats just me trying different things. SqlConnection connection = new SqlConnection("Data…
0
votes
0 answers

Hibernate 3.4.0: How to query for a scalar value

I have: (MySQL 5.1) CREATE TABLE `poh_faktury` ( `cislo` int(10) unsigned NOT NULL PRIMARY KEY, ... ) ENGINE=MyISAM DEFAULT CHARSET=utf8$$ @Entity @Table(name="poh_faktury") @NamedQueries({ @NamedQuery(name="dalsiCisloFaktury", query="SELECT…
Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
0
votes
1 answer

Passing a Scalar reference into another Scalar

In SQL Server, I have a stored procedure that accepts a date parameter. That date paramater is then passed along to another stored procedure. However, the 2nd stored procedure parameter is named as the first parameter. and then I need to I have…
mikebmassey
  • 8,354
  • 26
  • 70
  • 95
0
votes
1 answer

Core Data: filtering entries based on time component of NSDate

I have an entity with an attribute time, which is of type Date. I only care about the time component of it. When generating the class files, I chose to use scalar properties for primitive data types. So, NSTimeInterval is used instead of NSDate. To…
William Niu
  • 15,798
  • 7
  • 53
  • 93
0
votes
1 answer

Using statement with a scalar query

Can you show a coding example that has the "Using" statement with a scalar query? I could not find any sample coding for this by searching yet.
Emad-ud-deen
  • 4,734
  • 21
  • 87
  • 152
0
votes
1 answer

Limits of integration

How can i make the limits of integration scalars? y = rand(150000,1); x = rand(150000,1); u=y.^x; v=y; z = quad(@(u) 1./log(v),0,u); Error using quad (line 70) The limits of integration must be scalars. Error in lnplot (line…
Speed
  • 27
  • 4
0
votes
1 answer

scalar subquery has an aggregate operation

My oracle version is 10.2. It's very strange when a scalar subquery has an aggregate operation. my table named t_test looked like this; t_id t_name 1 1 2 1 3 2 4 2 5 3 6 3 query string looked like…
user1021531
  • 487
  • 1
  • 7
  • 16
-1
votes
2 answers

ExecuteScalar compilation error

I'm getting an error on ExecuteScalar(). It says I must declare the scalar variable @PicID. How could I declare a scalar varaible? Or am I doing this entire function incorrectly? public int GetTotalNoVotes(int PicRating, int PicID) { …
CsharpBeginner
  • 1,753
  • 8
  • 38
  • 68
-1
votes
2 answers

What is the meaning of `$array[x, y]` in Perl?

I know @array[0,2,6] is an array with multiple values. And I was under the belief that $scalar=3 is a single variable with a single scalar value. However, what is $array[3, 4]? Is it a scalar variable with two values?
Fighter2
  • 43
  • 5
-1
votes
4 answers

(Python) Can't get matrix scalar multiplication output correct

I'm trying to multiply a matrix by scalar, but I'm unable to get my output right. m, n = 3, 3 scalar = 5 A = [ [1, 0, 0], [0, 1, 0], [0, 0, 1] ] B = [] for i in range(n): B.append([]) for j in range(n): …
-1
votes
1 answer

error: conversion from 'double' to non-scalar type '' requested" struct in c++?

I want to change one of attribute in my simple struct. I can't change anything in main function. But the compiler giving me error about scalar type - what does it exactly mean and what do i wrong? #include using namespace std; struct…
-1
votes
1 answer

GraphQL type of mutation variable somehow never changes

this behaviour does not make sense to me anymore. My mutation: export const DEVICE_CREATE_INPUT = gql` mutation CreateDevice( $attributeList: String ) { createDevice( input: { attributeList:…
Johnny
  • 55
  • 1
  • 13
-1
votes
1 answer

C program to multiply a matrix by a scalar

I'm a beginner in C and I'd like to make a program that calculates a random matrix by a scalar input that user gives. I think that either I should change my second part of scalar() and whole print() or just rewrite the matrix() to get the int to…
matxi
  • 11
  • 4