Questions tagged [variables]

THIS IS AMBIGUOUS; USE SPECIFIC-LANGUAGE TAGS WHENEVER APPLICABLE. A variable is a named data storage location in memory. Using variables, a computer program can store numbers, text, binary data, or a combination of any of these data types. They can be passed around in the program.

0
votes
1answer
15 views

How do I loop through column names to compute statistics?

say I have data that looks like this rating repair model 5 0 1 4 0 0 2 1 1 5 1 0 I want to be able to find the mean of rating for every time ...
0
votes
1answer
17 views

Bash script to insert variables into a json payload (slack webhook) question

I am trying to insert a variable into my json payload (working in shell script) but I am unsure of how to escape the characters properly I've tried many different escape methods but I'm a total noob ...
0
votes
0answers
8 views

Is there a similar way to define multiple sub-variables within an overall variable in MATLAB, similar to how Python does it? [duplicate]

Within python you can define specific variable names and their values within an overall variable like in the code below. I think this makes defining whole sets of variables that need to be passed into ...
-2
votes
1answer
13 views

How can I get two variables from a string with Regex

I have the following string that I need to extract two variables from with Regex. I've been looking at tutorials, but not getting the results I need. Can anyone help? AWS-010062347904-uptree-base-...
0
votes
3answers
26 views

Access nodejs static method using a string variable

I have imported a few classes in Adonis const User = use('App/Models/User') const Orders = use('App/Models/Orders') I want to be able to access one of the above classes dynamically. By that I mean a ...
-1
votes
0answers
13 views

Pass variables from to another function using threads

I am trying to run different threads on the time and there is an output form each. The third thread shall sum the outputs of the other threads. But the code is not running. Could you please help me ...
0
votes
1answer
16 views

How to get value of variable entered from user input with really easy way? [duplicate]

i want to Write a piece of code that repeatedly asks for input until the user enters your first name correctly. Once the user enters specific name, print a positive message congratulating the user. if ...
0
votes
0answers
26 views

Arduino GUI to Overwrite variables

I'm searching Any Arduino GUI to overwrite variables. For example I have value speed in my Arduino code. I want to display actual value (not necesarry) of this variable, overwrite it and send changes (...
0
votes
0answers
4 views

PingFederate and Velocity Variable $client_id

Variable $client_id is generated at runtime by the server. It is the Oauth client id from pingfederate. I am trying to change this variable in my html with a simple velocity if statement like this: ...
-1
votes
0answers
26 views

Passing variables to Laravel mail instead of data saved in variables

Taking user request from a form and sending them to admin using LARAVEL Mail. It is delivering the mail but the data is not displayed. Function to mail Mail::send('dynamic_email_template',$data ,...
1
vote
1answer
25 views

Passing a variable using Regex into document.getElementById

i'm attempting to pass a variable HostOne_${Results.SubSysID.replace(/\./g,"")}) which returns a uniquie ID for each JSON entry which goes through the loop. this works for creating an element ID and ...
0
votes
0answers
24 views

The items and structure of Python variables in Pycharm?

Dears I'm a new learner of Python. Viewing the "active console variables" will help me understand the Python language. But I was confused by the structure of the DataFrame type varaible "df2" (size:2*...
0
votes
0answers
24 views

Batch file - for command echoing two variables to external file

Here is my code. The last line has an error I can't find. Notepad++ shows the error with different colors but I can't see what's wrong. setlocal enabledelayedexpansion for %%a in (*.md) do ( set ...
3
votes
1answer
26 views

SSIS - capture “ExecutionResult” / “Data Code” in Variable?

It seems SSIS has some unexposed variables called execution_result in the SSISDB/ Catalog under internal.executable_statistics. But it's also referred to as DataCode in some places but it's ...
0
votes
0answers
10 views

AutoCompleteTextView onItemClick AdapterView set value is null

I have a "Kecamatan" variable. I want to throw a value from a variable (Kecamatan) to jsonParseDesa.java but the result is always null. While the variable is obtained from AutoCompleteTextView. here ...
0
votes
0answers
18 views

Error assigning multiple variable in PostgreSQL

I'm having trouble assigning multiple variables at one in PostgreSQL: This didn't work with temp_table as (select col1, col2 from another_table) select into a, b col1, col2 from temp_table ...
0
votes
0answers
9 views

HP-UX - userdbget - works outside of setting as a variable, otherwise fails

Currently on a HP-UX system, B.11.31. SHELL is /usr/bin/sh. I need some advice on why this works fine... $ sudo userdbget -u joebloggs auth_failures | awk -F"=" '{print $2}' 21 But this fails... $...
0
votes
0answers
26 views

store value to variable returning from function

How can I store a value that is returned in function? I am able to print the value but I am not able to store it inside the variable. Here is my code: exports.realtimeValues = function (req,res ){ ...
-1
votes
1answer
13 views

Is it possible to use Microsoft Flow to post a file to sharepoint a folder that varies by user name?

Lets say we have this Sharepoint folder structure SharepointSite: | |___PersonA |___PersonB How to configure a flow to post to the folder relative to the ...
1
vote
0answers
25 views

shell variable $? not working inside in an at heredoc [duplicate]

ubuntu 18.04 I need to get the value of the last command executed in an at heredoc : test.at.sh #!/bin/bash at now <<EOF ls -la >> test.log; RET=$?; echo -e "\n----" >> test.log; ...
0
votes
3answers
27 views

Swapping hardcoded arguments for variables

I've got a functional script on my site that allows me to open a link in a new window when a specific class is added to the link. I need a lot of those on my site though so I figured I'd make the ...
1
vote
2answers
51 views

How to declare a number variable where I can save th count of table in my loop

I work wirh oracle Database. I have a plsql code where i run a query in a loop for multiple tables. so, table name is a variable in my code. I would like to have another variable (a single number) ...
-1
votes
0answers
7 views

how to store value that coming from module to a variable outside function [duplicate]

I am trying to store a value that is returning from call back function, I don't know it is a good way or not as I am new to this language but i try many different ways but every time it returns me ...
0
votes
1answer
45 views

TypeError: 'float' object does not support item assignment

I understand the message behind the error, but I got lost when understanding how to get over it. What I am trying to do is that in the for/loop the variable called pancake utilizes as input the value ...
-2
votes
1answer
43 views

Why does my boolean variable change (C++)?

Can someone explain to me what's going on here? #include <iostream> using namespace std; int main() { bool x = false; if (x = true) { cout << "x is true" << endl; } if (...
-2
votes
0answers
46 views

Output is always zero [duplicate]

Below is a screenshot of my work. As you can see my value variable gets a value that is equal to 93 (check debugger) and I divide it by 126 in case 5 of the switch loop to assign a new value to a ...
-1
votes
0answers
18 views

Saving Javascript data from output window as a variable

When I run my javascript code I get back some data that looks like this in the output window data: { id: 'bdjif8291sf'}} I wanted to save this data into a variable so I can call it at a later ...
0
votes
1answer
23 views

Assigning a variable to another variable in the current list / file in Ansible

I have a playbook.yml file that reads inventory files, for example service_1.yml and service_2.yml. I need to reassign the ram_min variable and add some number. playbook.yml --- - hosts: 127.0.0.1 ...
1
vote
2answers
41 views

Matrix size in Python

a is a 2x2 matrix b is a 2x1 matrix c is a 1x2 matrix But ... what kind of matrices d is? import numpy as np a= np.array([[1,2],[3,4]]) b= np.array([[1],[2]]) c= np.array([[1,2]]) d= np.array([1,2]...
1
vote
1answer
22 views

SSIS Variable values per deployment configuration

I am using Visual Studio to create a very simple ETL package that reads some Excel file and uploads it into a database. We have a variable configured which contains the location of the source-file. ...
0
votes
0answers
15 views

Bash : Updating a variable in a case statement [duplicate]

Context I'm currently trying to write a bash script in which I use the case statements. I declared a variable above that case statement, and try to update it in some cases. For unknown reason, the ...
-2
votes
2answers
42 views

Is there a way to get the names and values of variables in scope?

I'm trying to write a handler for logger that sends events to sentry. I'd like to include as context the variables in scope for easier debugging. Is there a way to do this ( short of a WriteHeapDump ) ...
0
votes
2answers
39 views

listen to service variable change from component angular

I have service with variable and method that brings data to that variable export class UserService { userDetails; getUserProfile(){ return this.http.get(this.BaseURI+'/UserProfile').subscribe(...
0
votes
3answers
36 views

How do I pass a dynamic variable to javascripts .forEach() function?

How do I pass a dynamic variable image[i] into the .forEach() function? I get this error when I try to use my variable: Uncaught SyntaxError: Invalid destructuring assignment target images.forEach((...
0
votes
0answers
26 views

Using folder name with space as variable in .BAT [on hold]

I'm trying to copy first file in folder to the folder with the same name on the other disc. set "dirname=A B" for /R "e:\%dirname%" %%i IN (*.*) DO ( copy %%i "v:\%dirname%" exit ) If folder name (...
0
votes
0answers
22 views

javascript: use function result outside of function [duplicate]

Hi I am new to js and apologies if I'm asking a simple question. There appears to be much discussion on this topic, but I am as yet unable to comprehend the solutions offered. I want to determine the ...
-9
votes
4answers
76 views

Which of the following are valid C++ variable names? [on hold]

9index, break, user_name, CONSTANT, _member Got this wrong on a test and I'm wondering where I can find the right answer. Would be highly appreciated. Thanks!
0
votes
1answer
20 views

How can function accommodate calls passing different objects as parameters?

I have more than one call to the same function and each call passes a different options object. For example: function masterStart() { A(optionsA); A(optionsC); } I don't know how the ...
1
vote
1answer
30 views

Karate- get value of a field from response in another feature file

I have a scenario where i need to get a specific field from a response of another feature file and re-use it. Scenario:- Feature file A deals with POST where i get a response and save the field ...
-1
votes
0answers
10 views

Ftplib variables not correct data type?

When ever I try and run my code I get this error: TypeError: unorderable types: str() > int() Here's my code: import ftplib from ftplib import FTP host = ("vv.carleton.ca") port = ("22") ftp = FTP()...
1
vote
3answers
51 views

Passing variables from one function to another

I have set a variable in one function and I am trying to use it in another. People seem to be advising against using globals for functions. This code is in my first variable if($this->...
0
votes
0answers
18 views

C++ class attribute scope [duplicate]

I am sorry if this is a duplicate, but I wasn't able to find an answer. When I have code like this: class Car{ public Car(string name) : name(name) {} string getName(){ return this-&...
0
votes
2answers
56 views

Bash float calculations from last line in a file

I have a file text.txt as follows: A B C D E F G F 1.1 2 3 4 5 6 7 8 1.2 20 30 40 50 60 70 80 6.3 70.5 10 20.5 ...
0
votes
2answers
12 views

Accessing an object not working with a variable

This seems simple but I'm banging against a wall. My code gets weights, accesses an object array to get a value then calculates a result using that value * weight. But accessing the object doesn't ...
0
votes
1answer
24 views

Remove specified main Element from divs with different id

I want to remove element with "X" button, but these elements has different ids and goes into the infinit. How should i do? I want to remove the main "Div". Ex. the "blacklisttab1" because i want to ...
-2
votes
0answers
13 views

Problem Defining Variable in Python Net Worth Update Function

I am trying to write code that will allow someone to input original net worth, input a change and receive updated net worth but I am having trouble with one of the variables, everything else works. ...
0
votes
1answer
15 views

Set different initial value for a variable with different sub index at pyomo

I get the following basic setting: model.X = ['A','B'] model.stage = range(1,3) model.Y = ['C','D'] model.area = pyo.Var(model.X, model.stage, model.Y, initialize = 2, bounds=(0,100)) but I wish the ...
-3
votes
1answer
37 views

Cannot use instance member 'month' within property initializer; property initializers run before 'self' is available [duplicate]

I am trying to create a 3 or 4 digit integer variable based on the date. So, if the date were March 4th, the number would be 304, and if the date were November 11th, the number would be 1111. However, ...
1
vote
1answer
30 views

Convert CSV stored in a string variable to table

I've got CSV data stored in a string variable in SQL: @csvContent = 'date;id;name;position;street;city 19.03.2019 10:06:00;1;Max;President;Langestr. 35;Berlin 19.04.2019 12:36:00;2;Bernd;Vice ...
0
votes
1answer
23 views

How to assign value to PHP variable from daterangepicker

Hello guys I found lot of solution about daterangepicker from script but I could not find the answer of that question. How I can retrieve date from script daterangepicker to PHP variable, I will show ...

http://mssss.yulina-kosm.ru