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.

10,198 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7votes
1answer
2kviews

Notify handler or register ansible variable when change is detected in include_role?

After lots of searching, I come to the conclusion that ansible (I use the latest stable as of now version, v2.5.3) most likely does not support registering variables or notifications from include_role ...
user avatar
7votes
1answer
1kviews

Copy the doxygen of the initial value of a static variable to the \file block

I am trying to copy the doxygen of the initial value of a static variable to the top of my code in the \file block. That is, in something like this: #include <iostream> /*! \file Test.cxx * ...
user avatar
  • 9,273
6votes
1answer
341views

change vuetify scss variables in specific component

I've used Vuetify in Vue-cli project. I have variables.scss file in src/styles directory of the project. Now I want to change the Vuetify Scss variable in only one component without effects on other ...
user avatar
6votes
1answer
1kviews

Declare a global variable with certain type

In python, is it possible to declare a global variable with a type? I know this is fine to declare a local variable like this. student: Student Or global student But I'm looking for something like ...
user avatar
  • 61
6votes
0answers
767views

nginx module to set variable value for log module

I want to define an nginx variable, set its value during a request, and use the variable inside a log format. I am currently implementing a custom module in C (not interested in LUA at the moment). ...
user avatar
6votes
0answers
1kviews

How to use Grafana dashboard variable in another variables regex?

I created a Grafana dashboard variable and tried to filter the values via the regex field. This works for static regex definition. I would now like to use another variable inside the regex which ...
user avatar
  • 2,499
6votes
0answers
267views

Language with dynamic store and calculation of variables

I work with computational geometry in C++. In particular I calculate properties of a triangulation with moving vertices. For optimization purposes I end up considering an interface design for the ...
user avatar
5votes
1answer
449views

applescript getInputByClass2 with Safari 10.1

My Applescripts I used to run everyday to get text from Safari isn't working since my last system update It used to work only in Safari, and not in Safari Preview, I guess the system for Safari ...
user avatar
  • 954
5votes
2answers
349views

Selecting multiple nodes using Nokogiri and an upper ancestor node within a variable

Last days I was searching for any solution to get multiple nodes using Nokogiri in subject to a reference variable in an ancestor node. What I need: Actually I am collecting all "Id"s of "Segment" ...
user avatar
5votes
0answers
702views

Bokeh: Passing a variable to a url on MouseClick - OpenURL vs. CustomJS

I have a Bokeh graph with some points in it and I'm trying to catch a variable belonging to any point on MouseClick. Code examples are below this text. Using the OpenURL method everything works as ...
user avatar
  • 51
5votes
1answer
349views

Alternate way to do Iterative name/variables in Pythonic while loop

So I know that it is a kind of pythonic heresy to modify a variable name while iterating over it but I have been searching for a good pythonic way to do this and can figure it out. In statistical ...
user avatar
  • 1,936
5votes
1answer
9kviews

Lua adding/changing global variables from C

I have a small Lua script: function g () print( AUp); end From C I load the script, add a variable with Name AUp and let it run a few hundred times. for( i=0; i<2000; i++) { num= i; ...
user avatar
5votes
3answers
7kviews

How to access class variables in included ruby modules?

I need to know if it is possible for included ruby modules to have access to class variables. Lets say: require 'bar' class Foo @i_am_important Bar.do_stuff end Module Bar def Bar.do_stuff ...
user avatar
  • 656
5votes
1answer
2kviews

Using environment variables in Firefox browser URL

I was trying to browse some html files in my unix path using Firefox browser.Is there any way to use environment variables as URL in Firefox? And possibly bookmark it? For instance: file://$PATH/index....
user avatar
  • 19.9k
5votes
3answers
10kviews

JQuery AJAX Post - pass variable and navigate URL

I am developing a small puzzle. Users click on blocks of a picture and guess what picture it is. I also count how many blocks they opened before submitting. I use following JQuery AJAx code in ...
user avatar
5votes
3answers
2kviews

less.js - get variable values inside parsers' callback

I am using less.js (1.3.0) to parse less to css on the client side. Inside the parsers' callback I want to get the value for each variable. i tried the following without success. var data = "@colour: ...
user avatar
  • 61
4votes
0answers
1kviews

Selenium IDE pull Parameters/Variables from config file running through Selenium-side-runner

I would like to be able to pull my authentication parameters from a config file. My .side.yml file currently contains: capabilities: user: "admin" pass: "only_4Admin" browserName: "...
user avatar
  • 41
4votes
0answers
1kviews

Variable not incremented in latest Selenium IDE

I attempting to increment a variable in the latest Selenium IDE however the variable does not get updated. Did something change in the latest versions? store | 1 | i store | javascript{storedVars.i+...
user avatar
4votes
1answer
417views

Best approach to passing variables between multi-file Node.js modules?

I have a Node.js module that I have kept as a single file up to this point. It's getting rather large though and has a lot of functionality in it that might be better separated into other modules. For ...
user avatar
  • 83.3k
4votes
1answer
7kviews

How to define a variable within a JSON file and use it within JSON file

I'm trying to find if JSON file supports defining variables and using them within that JSON file? { "artifactory_repo": "toplevel_virtual_NonSnapshot", "definedVariable1": "INSTANCE1", "...
user avatar
  • 15.2k
4votes
1answer
154views

How to list all variables defined by myself in Python, excluding imported variables?

I know there are some ways to list all variable, such as locals(), globals(), dir(). But they also list the variables imported from other modules, and make a very long list, which is hard to find ...
user avatar
4votes
2answers
3kviews

Add gitparameter in jenkins pipeline

I need the userInput when executing the pipeline. The input will be the git branch of a particular repository. As we can configure gitparameter in the jenkins job how do we configure it in the ...
user avatar
4votes
1answer
210views

Registering Variables and Functions Declarations in Java Script

I was watching a video on javascript scopes which said that just before browser interprets java script code, it actually involves a quick compilation step(well not exactly 'compilation' so to speak ...
user avatar
  • 401
4votes
1answer
4kviews

Undefined variable $loop in Laravel Blade loop

according to the latest laravel blade documentation (https://laravel.com/docs/5.3/blade see "loops") I can "[...] use the loop variable to gain valuable information about the loop[...]". My laravel ...
user avatar
  • 121
4votes
0answers
156views

Swift doesn't recognize Type variables

In my project I am having an issue with Swift, that it doesn't recognize variables containing protocol types. This means I can't use a variable that stores a type, to check if the type of an instance ...
user avatar
4votes
0answers
98views

Using ggplot2 to create graphs in separate colors for each condition (time series data)

If this has been answered somewhere before, please point me in the right direction. I've honestly tried, but haven't found anything that addresses this specific issue: I have collected time-series ...
user avatar
4votes
3answers
88views

How do I get a local variable from one function and use it for a different function in my code?

I am making a slot machine, and I want the var 'bet' in betValidation() to be used in the result() function. My goal is if two of the random number generated in firstRandomNumberGenerator() are the ...
user avatar
4votes
0answers
151views

issue accessing lexical scope using B

For debugging purposes I'd like to Access the lexical scope of different subroutines with a specific Attribute set. That works fine. I get a Problem when the first variable stores a string, then I get ...
user avatar
4votes
4answers
3kviews

CodeIgniter How to access session variables in twig templates

somebody can help me please. I'm new in CodeIgniter and Twig. I have declared in my controller the following: $datasession = array( 'nick' => $sess_nick, 'login_ok' => true ); $this->...
user avatar
  • 83
4votes
2answers
70views

MySQL build a variable name?

I am trying to build a variable name dynamically within a user defined function but it seems it does not work. Is there a way to do this or by using an array variable? I have a string of 7 characters ...
user avatar
  • 123
4votes
1answer
1kviews

mutt seems to ignore EMAIL environment variable and .muttrc settings

I just migrated from SUSE SLES9 (mutt-1.5.6i-64.6) to SUSE SLES11 (mutt-1.5.17-42.33.1). In SUSE SLES9 I was able to set the From: clause of mutt messages by instancing the environment variable EMAIL. ...
user avatar
4votes
3answers
1kviews

PHP variables randomly becomes NULL

For quite a while now we experience a very weird problem with our hosting server. Once a while (seems randomly) variables in PHP become NULLs. In general everything works perfectly fine, but once a ...
user avatar
4votes
1answer
2kviews

Passing variables in xcode returns null

I checked the questions here on stack overflow and i do it in the same way but still returns NULL In the first view in the firstviewcontroller.h i have @property (nonatomic, copy) NSString *...
user avatar
4votes
1answer
562views

How to modify type of a local variable in java byte code

I am rewriting bytecode using Javassist. I need to modify type of some local variables to object. How can I access local variables and change their types using Javassist? Thanks.
user avatar
4votes
0answers
634views

Google analytics session-level custom variable not showing all visits

I'm having trouble tracking info through GA Custom Variables. I'm using for the same kind of pages both a page-level and a session-level Custom Variable, both in different slots. As I understand from ...
user avatar
  • 41
4votes
1answer
1kviews

Ansible get the value of the "hosts" key from an ansible play/playbook

Is there any way that I can get the group name for the set of hosts that a play is executing on? I know that ansible has a variable called ansible_play_hosts which is a list of all the hosts that a ...
user avatar
3votes
1answer
41views

Variable is not updating data React

I have in my App.jsx a fetch to the backend to request the user data and then in a child component I use that info to show or not something (depending if we have user or not). With the React Dev Tools ...
user avatar
3votes
0answers
138views

SASS variables to CSS variables (gulp-sass)

I want to change with javascript some SASS/CSS variables to change the color of multiple elements. 😅 How I can send SASS variables to CSS as variables? I tryed it like in the documentation of Sass, ...
user avatar
3votes
0answers
407views

newman CLI '--export-collection' not outputting updated collection variables

When using the newman CLI (version 5.2.2), there is a requirement to save updated collection variables after a run. To achieve this, -export-collection <path> is being used but variables in the ...
user avatar
  • 9,696
3votes
0answers
331views

How do you split large kotlin based Gradle build files with variables?

I have a large gradle.build.kts file and I'm trying to break it into smaller pieces using apply(from = "xxx") (I'm open to better solutions if one exists). The problem is that I've run into ...
user avatar
3votes
0answers
94views

System.Serializable setting variables to zero

Note: This is all being done in Unity. I haven't attempted to replicate it in a regular C# console app. I'm running into an issue that I can't seem to understand. When I apply the System.Serializable ...
user avatar
  • 893
3votes
0answers
226views

Why do MySQL 8 IF and IFNULL return a BLOB result when testing a variable with value NULL?

Note: I have moved the essence of this question to here having learned some of what is happening but still wanting to understand. (In essence, ISNULL and COALESCE behave unusually when a variable is ...
user avatar
  • 3,946
3votes
1answer
146views

Using jquery to show total price in form

What I am trying to do is add the price when user selects an option from a drop down in form.. The from submits data to the database as well so the fields have values assigned as "selfpickup" and "...
user avatar
3votes
1answer
75views

How to create a factor with specified levels and labels, change the levels and adapt the labels step by step

I would like to do three things step by step and I am unfortunately stuck. Maybe someone could walk me through the process in R or point out my mistakes. # Create a dataset containing a factor with ...
user avatar
3votes
1answer
88views

can't use imported var from js file in code

I try to use imported vars from a js file into my code but I can't get it to work the excepted way. location_var.js var location = { place: "Bogotá", lat: "4.710988599999999", lng: "-74....
user avatar
  • 741
3votes
1answer
593views

String to variable name without eval

I want to know if there is any way to convert a string to a var name without using eval. I have the following json declared in a file: { "fields": { "usr_language": {"var": "this.$i18n....
user avatar
  • 31
3votes
0answers
1kviews

How to call a variable from one script into another script with R?

I explain my problem : I have two R scripts. I create a variable into the first script that I would like to call into the secondd script. The problem is that to get this variable into the first script,...
user avatar
  • 143
3votes
1answer
110views

How do I use a js variable in a echo php function call?

My actual application is to do content replacement from a db to an element id. I do it know from text files (1558 of them), and it works great. I* just wanted to try this method. Thank you ahead of ...
user avatar
3votes
0answers
3kviews

Set gitlab-ci variable conditional on another variable

A fairly common need is to set some variable values based on another variable value. I cannot find a way to do this in the "variables" section of a gitlab-ci.yml file. I have a pipeline that builds a ...
user avatar
3votes
1answer
1kviews

$JAVA_HOME not matching with java -version on git bash (last update)

I had to set up back my java installation. Since the installation, the java -version and the $JAVA_HOME don't match in GitBash. The path is false so I can't execute Java CLI from it, I have to use the ...
user avatar

15 30 50 per page
1
2 3 4 5
204