Questions tagged [var]
var is a keyword in a number of programming languages.
2,438
questions
0
votes
0
answers
14
views
VAR - add future exogenous variable and evaluate influence - Python
Currently I am forecasting future values using following code:
# Initialize parameters
init_order = 3
init_steps = 6
# Initialize model model with our training data
model = VAR(train_data)
...
0
votes
1
answer
22
views
Cannot assign value from text input field to Javascript Variable [duplicate]
Each time I call the malfun function it keep displaying 0 instead of the product of the two numbers, and I'm not sure why. However, when I hard-code a value to num1 and num2 it works as expected.
...
0
votes
3
answers
33
views
action-btn needs two clicks to perform the click
var button = document.getElementById("action-btn");
button.addEventListener("click", function(){
var container = document.getElementById("mostrarc");
if(...
-2
votes
0
answers
13
views
automate the creation of certificate from google in sheet in pdf file and send it by gmail. all in one click with a macro [closed]
I want you to create a code in google sheet that automates the sending of a personalized email for each client who attends a training using gmail with my email address
In this email I want you to ...
0
votes
0
answers
20
views
Why specify variables in dart?
What is the point of specifying variables at all in dart instead of just using var and dynamic?
I am new to dart and would like to know for future projects.
0
votes
0
answers
16
views
Using variables to call attributes of a class. obj.(variable) (Python) [duplicate]
I hope you guys can see what I am trying to do, I'm just looking to see if there is any syntax missing or if this just is not possible on Python
obj = MyClass()
obj.i = '1'
obj.ii = '2'
obj.iii = '3'
...
0
votes
0
answers
12
views
Are there any R packages that can reproduce this bayesian vector autoregression (VAR) Sims paper?
I am wondering if there is an R package that can be used to replicate the following paper, or if anyne has replicated it using any of the many excellent bayesian and VAR packages available:
...
0
votes
0
answers
21
views
Scaling errors while Time Series forecasting using VAR
I have created a VAR model on scaled features with data from 2016 Jan to 2022 May. After that, I had to deploy my model and use it on data from 2022 Jun to 2027 December. This data was not present ...
0
votes
0
answers
59
views
var keyword not recognized in JDK 11.0.15 in Eclipse 19-03
I am using Eclipse 19-03 with jre 11.0.15 , able to compile and run my other existing projects with jre 11 but in a project where var is being used (this project is deployed in server and running fine ...
3
votes
2
answers
77
views
Ansible nested group_vars (use only if member in group A and B)
My Inventory is nested like so:
customerA:
children:
webserver:
hosts:
host1:
host2:
dbserver:
hosts:
host3:
host4:
customerB:
children:
...
-1
votes
1
answer
43
views
How to initialize var conditionally in c#? [duplicate]
I wanted to add property using var keyword.
public async Task<MyObject> ManageObjectAsync(string actionparam, int objectid)
{
// var bodyObj = { action = "enable"}; //it is ...
-1
votes
0
answers
26
views
Can someone explain me the meaning of this statement in Golang: var _ io.ReadCloser = (*A)(nil) [duplicate]
I am new to Golang and ran into a piece of code I was not able to understand. Can you help me in explaining the meaning of this statement: *var _ io.ReadCloser = (A)(nil)
I tried searching for it in ...
1
vote
1
answer
49
views
Can't clear sessionStorage
i'm creating a js only log in form and i want the browser to hold a variable value in its session data. it seems to work but then i cannot clear it when clicking logout button,
here is my code:
var ...
0
votes
0
answers
55
views
How can I react to event on system variable defined in CAPL script?
I defined a system variable in my CAPL file that I use to set up different modes in my script.
I declared it in my CAPL file and not in my CANAlyzer window in order to allow the script to work with ...
1
vote
1
answer
34
views
Re-declaring arrow function [duplicate]
tried to re-declare an arrow function-- (Check code)
Why is it giving error when var can be redeclared.
I made an arrow function using var then tried re-declaring it using let as var can be ...
1
vote
1
answer
29
views
How do I take data from multiple lists that are all inside a single variable in python and find out the mean mode and frequency
I'm making a blackjack game that requires me to calculate the scores at the end of multiple blackjack games such as what your cards added up to at the end of the games and find out the mean, mode and ...
0
votes
0
answers
12
views
JS bind function doesn't get value of object defined using var keyword
Output of both these snippet is different.
Snippet 1:
var name={
firstname:'abc',
lastName:'xyz'
}
let pname= function(){
console.log(this.firstname+' '+this.lastName);
}
pname.call(name);
OUTPUT:...
0
votes
0
answers
25
views
Variables not present in the function
my variable are grey and its say these variable are not present in the function
function regle() {
var spreadsheet = SpreadsheetApp.getActive();
var p = spreadsheet.getRange('A1').getValue();
...
0
votes
0
answers
30
views
Generalised Impulse response functions (GIRF) for VGAMs (vector GAM) in R
I have 2 variables as time series. I'd like to build semi-parametric VGAM, then analyse GIRF from Koop, Pesaran and Potter (1996) (analogously with IRF of VAR model). Which R function should I use? ...
0
votes
1
answer
36
views
How to update a struct value?
I have some monthly data that I need to calculate a specific value for before it gets displayed, using:
.onAppear{
ForEach(monthlyTilt) {item in
item.degrees = NewValue…
}
...
0
votes
1
answer
79
views
How to fix cannot read properties of null onclick?
So, i am making a login model and i am trying to implement a way to close the model. All went well in creating the login and register models but there was on flaw. The javascript for closing the model ...
0
votes
0
answers
24
views
VaR and Expected shortfall with Garch e VT-ARMA
I am conducting an analysis using the garch model and the VT-ARMA model with R's rugarch and tscopula package respectively.
Now with the quantile function I have calculated the daily VaR via both VT-...
-1
votes
3
answers
113
views
Is there a way to make var a compile-time error in Maven?
We're updating to us Java 17.
Is there a way in Maven to make it so that using var creates a compile-time error without compiling for an older version of java?
In other words, I don't want to have to ...
0
votes
1
answer
25
views
problem in estimating Rolling Value at Risk
I am getting error in Stata by using the following commands:
gen daily=date( Date,"MDY")
tsset daily
rolling cent=r(c_1), window(#) clear: centile lnreturn, centile(5)
but this is not ...
0
votes
0
answers
40
views
I keep running into the same error after trying to run Node User routes
I keep getting an error in my express-promise-router
var wrapHandler = function (handler) {if ("function" !== typeof handler) { var type = Object.prototype.toString.call(handler); ...
0
votes
0
answers
42
views
How to give a value in function to another function
In my app, settings button are initiating a window, in that window you insert your link and this link need to get back to main function and work with button, which open this link in browser
from ...
-2
votes
1
answer
71
views
Variable in a recursive function doesn't update itself C++
Im trying to solve a leetcode problem called Partition Equal Subset Sum
So basically we are given an array of some integers an we need to find out if we can create a subset of equal sum based on the ...
0
votes
0
answers
18
views
Can you assign a numerical value to a 'Prompt'
Apologies if this is very simple but I have spent weeks coding my first project and there is one part of the puzzle missing!
If I put,
var weatherConditions = prompt ("What are the weather ...
0
votes
0
answers
22
views
What is execution context of of globally declared let ,const and Arrow Function In JavaScript [duplicate]
In Global Execution the declaration of var and regular function is executed on the top. But I don't understand how the execution happened to let, const & and arrow functions when are declared ...
0
votes
0
answers
76
views
Granger causality test interpretation
When I ran the below code for my dataset I got the following results. I do not know how to eliminate few features based on the outcome
Code:
maxlag=12
test = 'ssr_chi2test'
def ...
-1
votes
3
answers
41
views
I am trying to increase the count variable using this, but let is creating problem , whereas var works fine
I am trying to understand how "this" keyword works and trying to increase the count variable using a function. But If i use let to declare count, count does not increase , but if i use var ...
0
votes
0
answers
43
views
Firebase cloud functions - Can't create an array from the data after fetching from 3rd party API inside the function
I've been trying to implement firebase cloud functions on my project, currently cloud functions are working fine but whenever I try to fetch something from the third-party API the data is fetched but ...
0
votes
0
answers
45
views
No var directory?
I know this is probably the dumbest question ever, but I just started coding and can't even get past the first lesson. So many things depend on the "var" directory, but I can't find it ...
1
vote
1
answer
43
views
How come "var" works without specifying the namespace?
I have the following code:
var dataExistsResult = await _service.CheckifExists(RequestDto);
if (dataExistsResult != null && dataExistsResult.CountProperties() > 0)
//do something
But ...
0
votes
1
answer
63
views
How do I print the boolean value?
Okay, so I'm currently trying to write the code for a very inaccurate stoplight--one that is only meant to help me understand what I've learned, but I can't seem to figure it out! In my code, at the ...
0
votes
0
answers
12
views
Explanation of Var Scope & Why the Console Logs "3" for This Code [duplicate]
I am newer to learning javascript and still working through the basics. I'm also trying to wrap my head around some of the logic and wanting to make sure I clearly understanding the basics, before ...
0
votes
0
answers
86
views
Pls Advice for Multi select dependent dropdown to display in Select box
The multiselect dependent dropdown code below works perfectly. The issue is that I need this to be displayed in a "Select Option Box," similar to a Pillbox, and when the user clicks on it, ...
0
votes
1
answer
38
views
Why is my python file changing my function inputs?
I recently did Day 5 of Advent of Code 2022 (spoilers for the code down below) and for some reason, the list of stacks that I was passing through to the function for Part A was changing the original ...
0
votes
1
answer
42
views
Using dynamic string as function name is failing with error "...is not a function" [duplicate]
I have a string that I'm trying to use as the name of a function in Jquery 2.2. Here's what that looks like:
var barBaz = 'myFunctionName';
Then I have a function which I want to call, which looks ...
0
votes
1
answer
25
views
How can I print the intermediate results in CPLEX?
Other than decision variables, there must be some other variables in the subject block of the C-PLEX software. For calculations and analysis, we may have to use it. How to print other variables into ...
0
votes
0
answers
35
views
Error trying to apply impulse response function for panel VAR in R
When trying to apply the panel VAR impuse response funtion I get the following error:
pvardAF_1_m_data_oirf \<- oirf(pvardAF_1_m, n.ahead=8)
Error in 1:(nrow(Phi) * lags) : argument of length 0
...
1
vote
1
answer
64
views
How can I make var in *ngIf?
I have situation:
<test-component *ngIf="(items | somePipe).length"
[items]="items | somePipe"
></test-component>
How can I make var from (items | ...
0
votes
2
answers
88
views
how do i decrypt the encrypted string from firebase
I have successfully encrypted the data and store it in the firebase as a string value, how do i retrieve the string and turn it into var type and allow it to be decrypt ?
import 'package:...
0
votes
1
answer
22
views
Is there a simpler way to populate a List<UserType> using Linq?
I have the following code to eventually populate a List<> in C#, though I am having to utilise a var and also a temporary var to get there, is there a single line of code to do this without the ...
0
votes
3
answers
52
views
JavaScript: out of scope variable leads to an error
A rather primitive question, but I can't find how to solve it:
I have an array initiated and in this scope and I need to push an object from a JSON (which got transformed from a XML) into a data array,...
3
votes
0
answers
67
views
var keyword in c# wrongly deduces type as dynamic
My understanding of the var-keyword in c# is that it is basically the equivalent of auto in c++ - deducing the correct type of a variable at compile-time based on what is being assigned to it (i.e. ...
-2
votes
1
answer
60
views
golang how i can get value from []interface {} type
i have var (name result["error_type"]) with type
[]interface {}
and value
[map[reason:map[phone:empty] send_at:1.636697291e+09 status:error]]
how i cat get value from type []interface {}
...
-1
votes
2
answers
35
views
JavaScript return won't update new value
I am trying to determine the distance from the top of the page in JavaScript, and I am faced with a Problem that the return command won't update the new distance.
I tried to get the distance like this:...
0
votes
0
answers
28
views
Line that loads based on the value of a variable in Flutter
I try to explain to you as best as possible what I need. I would like to create a line with the style similar to the loading ones like this:
and to be able to decide the initial and final value (for ...
0
votes
1
answer
23
views
Environment detection functions not working
I face a strange problem with this simple test which refuses to work.
I need to detect on which environment I am (local, Inte, Preprod or Prod).
I wrote the following codes but none are working.
...