Skip to main content

Questions tagged [var]

var is a keyword in a number of programming languages.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

How to compare variance of distance between two treatments over time?

I am interested in understanding how my variable (distance) changes over time between two treatment groups. I now want to compare measures of variance for distance between the two treatment groups, ...
twilightecologist's user avatar
0 votes
0 answers
15 views

I am try to plot a circle with a condition /// (var) with (if) statement

// Plot circles based on conditions var plot Shape = na if (array.sum(above200) >= 3 and close > sma1m) Shape := shape.circle Colour := color.new(color.green, 60) if (array.sum(below200)...
Jim Cruz's user avatar
1 vote
1 answer
37 views

How to get a formatted line from a dictionary var?

I'm pretty new to Ansible and I'm not sure how to get it right. To start with, I have implemented this dictionary var for an exemple. There is 2 values but it could be a greater number: tf_ETCD: 1: ...
brett's user avatar
  • 13
1 vote
0 answers
81 views

How to Automatically Update a View When a Variable Changes in Swift

I have a Flutter Application that regularly sends me "messages" with Data. In my ViewModel I have the code to decode the data and in my ContentView I make an @State private var viewModel = ...
registrier rp's user avatar
0 votes
0 answers
64 views

How to impose sign restriction in VAR with Stata?

I was trying to impose sign restrictions in my VAR analysis with Stata. Codes are as follows: var cpi0 gdp0 g200 ex0 int0 un0 cro0 ener0 ukr1, lags(1 2 3) **the VAR model, 9 variables included var_nr ...
MarksMan927's user avatar
0 votes
0 answers
23 views

How to calibrate and simulate a copula-garch model in R using rmgarch package

So I have been trying to calibrate and simulate cryptocurrencies for VaR and ES analysis using the rmgarch package in R. I have been using the t-copula, my reason being that cryptocurrencies' ...
ayamathss1's user avatar
0 votes
1 answer
62 views

What means -z ${var+x}? [closed]

I would like to know what means -z ${var+x} if [ -z ${VAR+x} ]; then echo "Variable VAR is unset." else echo "VAR = ${VAR}." I would like to understand in which case I ...
Marta 's user avatar
  • 29
1 vote
1 answer
23 views

caret:: varImp() for caret::bagFDA() in R: Error in .(var) : could not find function "."

I am successfully running caret::bagFDA() in R, but I cannot use the caret::varImp() function to identify the most important variables. The reproducible example is quite simple: library(tidyverse) ...
Rodrigo Nehara's user avatar
0 votes
1 answer
33 views

how using css variable with SASS rails interpreter? (conflict)

I'm using sass-rails gem and I try to use css variable like this : --h: 198 --l: 38% --c: hsl(var(--h), 100%, var(--l)) background-image: linear-gradient(to right, var(--c) 0%, #000 100%) ...
Matrix's user avatar
  • 3,461
0 votes
2 answers
30 views

How can I report a VARX model (MTS class) with modelsummary (or other LaTeX table packages) in R?

Consider an example of a VARX model estimate in R, using MTS package: library(tidyverse) library(MTS) library(modelsummary) library(vars) library(stats) set.seed(10) ts1 <- rnorm(200, mean = 10, ...
Victor Hugo Schieck Terziani's user avatar
0 votes
1 answer
23 views

BGtest for VAR model in R gives me error message

I am new here, but I checked other threads and have not found solution so far. I am trying to make a VAR model in R, it looks like this: library(vars) library(lmtest) # from loaded data I create ...
Filip Emmer's user avatar
0 votes
4 answers
48 views

Did I use this JS variable correctly in the html document?

<head> <script> var bgcolor = #ff0000 </script> </head> <body style="background-color: var(--bgcolor);"> </body> I want to make a JS function ...
fzytail's user avatar
0 votes
1 answer
38 views

use my calculator data as variables in chart

I have a calculator built in Jquery, I would like to pass these numbers to my chart js program and have the chart dynamically adjust as new results show in the calculations, how would I do this with ...
Beep's user avatar
  • 2,783
0 votes
1 answer
27 views

jMeter - How to escape quotes?

I need help to escape quotes in jMeter! I've to put into a var some words with quotes, for example "dummy", so I've tried with: vars.put("example", '"dummy"') vars.put(&...
EmanueleAmbretti's user avatar
-3 votes
1 answer
21 views

How Would I Make the (x,y,width,height) of a strokeRect a Var?

I'm trying to make a square in a canvas that moves(Tetris), and I want to know if there's an alternative to making a independent fillRect. My line of thought is that I can make the fillRect() position ...
42HitchHikers's user avatar
-1 votes
1 answer
66 views

Having Trouble Figuring out how to get text into my drag and drop scripts in unity

So I am a beginner at unity and am slowly making a game but, I ran into this problem and I can't seem to figure out how to solve it. You see I have several text Mesh Pro UGUI objects within a canvas ...
josh Sparks's user avatar
0 votes
0 answers
46 views

Lua error "mutating non-standard global variable 'love'"

I'm starting to code with love2d, so I installed love2d with the love2d support extension, there is no problem running the code and it works perfectly (I can draw hello world and have it appear on a ...
Lautaro Ezequiel Coppa's user avatar
0 votes
0 answers
30 views

Statsmodel IRF not showing graph

I am trying to plot a graph of IRF for my VAR model. Creating the model went smoothly and now I am interested in IRF figures. However, when I append mymodel firstly into irf = results.irf(10) and then ...
samokosik's user avatar
1 vote
1 answer
89 views

Scala case class: Is public var member possible?

Scala noob here, but while learning about case classes, I see the members are by default read-only. However, if you add var, they become private; and there is no public access modifier. Any way to ...
mishar's user avatar
  • 455
0 votes
0 answers
15 views

Simultaneous VAR + GARCH

Can rmgarch (or another library) handle simultaneous VAR+GARCH without prior transform to a regular VAR? I mean a simultaneous VAR like: x(k) = a11*x(k-1) + b10*y(k) + b11*y(k-1); y(k) = a21*y(k-1) + ...
Alec's user avatar
  • 1
0 votes
0 answers
33 views

"OR" in var selector

I've trying to customise a script that normally triggers a GTM tag to populate a form's hidden field with a variable (session_url_campaign). Here is the script: <script> (function () { var value ...
Xavier Wallach's user avatar
-1 votes
2 answers
55 views

Dax code in Power BI for getting specific column

I need to get specific column which rows are depended on another column. Here is the raw example table, Affiliate Brand x17 B x17 B x17 B x17 B x17 B x17 B 1x2 B 1x2 F 1x2 F 1x2 B 1x2 F ...
Veli K's user avatar
  • 35
0 votes
3 answers
98 views

JS var with multiple values

Something I can't understand : I got a function opening the same page <div id="page"> but with different contents depending the clicked button in menu: <nav> <button ...
Wolden's user avatar
  • 319
0 votes
0 answers
143 views

What is the difference between using is with a specific type and var?

What is the difference between these 2 code snippets? One with the var works but the one with the type string gives an error.(use of unassigned variable error) Aren't they both unassigned until ...
Efe Belli's user avatar
-3 votes
1 answer
65 views

dax formula/calculate days since last orders

days since last orders = VAR currentCustomers = MAX('stats de vente'[client]) VAR currentDate = 'stats de vente'[date] VAR lastOrderDate = CALCULATE( MAX('dim date'[Date]), FILTER( ...
Fokou Serges's user avatar
3 votes
1 answer
114 views

VS 2023 'var' suggestions

foreach (int dirId in dirIds) { serieIds.AddRange((from serie in TableDataGrid.TargetBaseContext.Series where serie.RepertoireId == dirId select serie....
frhubert's user avatar
0 votes
0 answers
33 views

Trying to make a countdown on a filter in Lens Studio, countdown stuck

Im trying to make a countdown in lens studio that ends on a speficic time, but when i try to edit the timer it only goes from 58:45 and 57:00 minutes. How do i fix it, here is the script. Iv`e tried ...
ShopEySwing's user avatar
0 votes
1 answer
137 views

How can I efficiently import all global variables from external globals.js file in JavaScript?

I need to import hundreds of global variables from global.js to the main.js. Does JavaScript have an efficient method to import all exports from that file at once, without importing them one-by-one? I ...
dllb's user avatar
  • 99
0 votes
0 answers
92 views

Issue with getting IRF from VAR model with categorical exogen variables

I am trying run a Vector Autoregression (VAR) model in R. Specifically I have two continous time series that are endogenous, and one exogenous time series as well as a exogenous factor variable. I ...
awend's user avatar
  • 7
1 vote
1 answer
262 views

Non-state variable inside SwiftUI View

I just rewatched Demistify SwiftUI and noticed that some of the examples use variable properties inside a SwiftUI View, without using the @State property wrapper. For example (around 19.04): struct ...
Jack Goossen's user avatar
  • 1,221
0 votes
0 answers
318 views

Statsmodel SVAR (python) - unable to add exogenous variables?

I hope you can help me with an issue I am having with the python time series code for SVAR from statsmodels.tsa.vector_ar.svar_model. When I run the SVAR command below it appears that I am unable to ...
EOmic's user avatar
  • 1
0 votes
1 answer
66 views

variable stores EQUALS instead of string | python based interpreter

I've been making an interpreter in python and I've run into a problem, it identifies strings, variables, numbers and expressions. while testing the .lang file I noticed it outputted {'$var': 'EQUALS'}...
s.s.scriptties's user avatar
0 votes
0 answers
35 views

What is the scope of a variable declared with 'var' inside of a function in JavaScript [duplicate]

I saw another post with the same question and it seemed to have differing explanations. Online resources also seem to have conflicting explanations, unless I am misunderstanding something. MDN says: &...
journeywithjavascript's user avatar
-3 votes
1 answer
59 views

Difference between var Foo struct and type Foo struct [closed]

I have hard time to understand what is the diffrence between: var requestPayLoad struct { Email string `json:"email"` Password string `json:"string"` } and: ...
user63898's user avatar
  • 30.5k
0 votes
1 answer
131 views

Check if a variable is redefined by Tcl

In my script, I will source other owner's TCL script. I try to check all variable if redefined in their tcl script file, Here I try in my script: proc trace_var {args} { set frame [info frame]; ...
JoshTitle's user avatar
2 votes
1 answer
38 views

Scopes captured by an EventListener include all let variables but not var variables?

I have the following code for attaching an event listener to a html element. I understand that the callback for this event listener forms a closure with its lexical environment. var submit = document....
Ends of Invention's user avatar
0 votes
1 answer
118 views

R - Error on one device only: Error in chol.default() : the leading minor of order is not positive definite, BVAR

I am estimating an BVAR model in R and get the following error: Error in chol.default(V_post) : the leading minor of order 1 is not positive definite Thats actually not the problem, since I work ...
Dun02's user avatar
  • 1
0 votes
2 answers
48 views

Problems accessing var in kotlin object (singleton)

Having this object: object BarManager { private var bars = mutableMapOf<String, Bar>() } Can't access bars like this: BarManager.bars[name] It gives me this error: Cannot access 'bars': ...
NullPointerException's user avatar
0 votes
0 answers
8 views

I need to be able to remove all leading letters from user input for var custint = document.getElementById("custint").value;

The input might contain no letters, but could contain two or more letters.I only need the information beginning with the first number for the output. There will be forward slashes between numbers that ...
Kevin's user avatar
  • 1
1 vote
1 answer
35 views

IIFE strange behavior linked to variables declared with let or var

I try to understand why the variable 'Permissions' will be typeof 'function' when Permissions declared with var but typeof 'object' when declared with let (which is the excepted behavior) With 'var' - ...
Edi's user avatar
  • 13
0 votes
0 answers
43 views

I want to display an image from a local folder yet images are not showing

this is the element that i want the images be shown <div id="policyFilesPreviewContainer"></div> and this is my jquery code var policyFilesPreview = $('<div>'); $.each(...
chop bar's user avatar
1 vote
1 answer
27 views

In Kotlin, does the presence of a custom setter affect the necessity of initializing a var property?

class Student (private val age: Int){ var isAdultA get() = this.age >= 20 set(value) {} var isAdultB // "Property must be initialized" get() = this.age &...
Joshua_Shin's user avatar
-1 votes
1 answer
171 views

How can I calculate the Value at Risk of a portfolio 3 assets in Python? Do I have to use arrays?

How can I calculate the Value at Risk with 95% confidence for a Portfolio of 3 assets, simulating 360 daily returns. The assets have equal weights, asset 1 (mean = 0.001, stan dev = 0.02), asset 2 (...
Ande P's user avatar
  • 1
0 votes
2 answers
54 views

Define a Script to Breakup Single Text to multiple Conditions

I am using a simple script on Tampermonkey to change some value on a webpage. in the webpage, there is a input value on a input box i.e "FPPUTHP1100000" This is a material code, The material ...
Sachin Agrawal's user avatar
0 votes
0 answers
32 views

I need help exporting the values of a variable that is in a function

I have a code that aims to create several news on the HTML page. I am consuming an API that is returning the news. In the current code, I have three functions: one to display the news on the screen ...
Gustavo Lopes's user avatar
0 votes
1 answer
59 views

do functional declaration are hoisted before the variable declaration? [duplicate]

If functional declarations are hoisted before the variable declaration .In that case ,Why I am getting the functional definition instead of undefined. function a(){} var a; console.log(a); // ƒ a(){} ...
Praveen's user avatar
0 votes
0 answers
90 views

Can I use CSS variables to add custom Adobe fonts to a website?

I need to import a font family from Adobe to a wordpress site using a theme (BeTheme), and I'd like to streamline how the font's are applied across the site as much as I can. I was trying to utilize ...
Jason Hewitt's user avatar
0 votes
2 answers
108 views

Scala val and var with collections

I want to understand better the following issue. When should i use var and when val? I know that there is a rule of thumb in Scala that we should use val. For primitive types it's easy - we should use ...
ni al's user avatar
  • 11
2 votes
1 answer
106 views

Variance over a 3D array in R

Working on a 3d array: ar3d <- array(floor(100 * runif(100 * 20 * 30)), dim = c(100, 20, 30)) I am confused why length(apply(ar3d, MARGIN = 1, FUN = "sd")) # [1] 100 While dim(apply(...
leparc's user avatar
  • 164
1 vote
1 answer
1k views

What is the correct path for vars_files in ansible controller?

My playbook has no issues when running it on the command line. But in ansible controller, I am encountering this error: [WARNING]: Found variable using reserved name: vars_files ERROR! vars file /var/...
Blitzden's user avatar
  • 169

1
2 3 4 5
50