undefined

How to treat a warning as an error in a Makefile?

旧街凉风 提交于 2019-12-23 09:00:00
问题 Is it possible to treat warnings as errors in a Makfile (and thus exit before Makefile proceeds) Furthermore, is it possible to filter out which warning yields an error? My use case: I want to use --warn-undefined-variables in combination with this so that Makefile will exit when a variable is undefined, which is a very common source of error. Obviously I don't want to manually check for each variable as this is error-prone/tedious. I couldn't find anything on this, but it's a pretty

How to check if a variable is defined in Octave?

て烟熏妆下的殇ゞ 提交于 2019-12-23 08:56:52
问题 When writing a script that loads data, it's a waste of time to wait for it to load each time. How to check to see if the variable is defined? 回答1: You can use the exist function in Octave to do the work. It can be used to check the existence of given name as a variable, built in function, file, or directory. In you case, to check the existence of a variable, you may use something like this: if (exist("your_var_name", "var") == 1) printf("varname exists"); else printf("varname not exists");

checking for undefined in javascript— should I use typeof or not?

▼魔方 西西 提交于 2019-12-23 07:49:59
问题 I'm a bit confused about how best to check if a variable is undefined or not in javascript. I've been doing it like this: myVar === undefined; But is it better in all cases to use typeof instead? typeof myVar === undefined; And what about the use of undefined vs "undefined" , which I've also seen? 回答1: This is the best way to check -- totally foolproof: typeof myVar === "undefined" This is OK, but it could fail if someone unhelpfully overwrote the global undefined value: myVar === undefined;

Undefined model prototype in Backbone Collection and Marionette CompositeView

笑着哭i 提交于 2019-12-23 07:46:07
问题 Trying to populate a Collection from a list of values, I am getting an error about the Collection's model 's prototype being undefined. Looking at this question about a similar problem, I have checked that the Model is actually created before the collection is instanced, to the best of my ability. The error is being thrown in one of the event handlers of the Marionette CompositeView that holds the Collection, after fetching the data from the server and trying to reset the collection with the

Forward declaration being ignored?

柔情痞子 提交于 2019-12-23 06:12:35
问题 I have the below class (which is basically a wrapper for std::vector), and one of the functions returns a variable of the type AInteger (which is basically a wrapper for int). Now the type AInteger is used multiple times throughout the class, yet the compiler starts complaining at a very specific position. When I remove the "getSize()" function, everything compiles just fine. There is mutual inclusion, so I need the forward declaration for everything to work. One of the problems is that the

The constructor ArrayAdapter<ArrayList<HashMap<String, String>>>(Context, int, ArrayList<HashMap<String, String>>) is undefined

拟墨画扇 提交于 2019-12-23 05:59:31
问题 I am totally new to Android. This question might be a basic one. But I'm struggling for four days with this. Please Help me. I'm making horizontal listview for providing the contents of several categories from blog. (similar interface with Pulse news app) I got the open source of the horizontal listview and I'm modifying it. This code is CustomArrayAdapter.java . But when I try to write super() ; inside the constructor, it makes an error like this : The constructor ArrayAdapter<ArrayList

'Do something' if key exists in hash1 and not in hash2

别来无恙 提交于 2019-12-23 04:55:19
问题 I've written some code that finds overlapping keys in 3 different HoAs that contain some information on which I sort them later: #!/usr/bin/perl use warnings; use strict; my @intersect; for my $key (sort keys %hash1) { if (exists $hash2{$key} && $hash3{$key} ) { my ($hit1, $percent_id1) = @{ $hash1{$key}[-1] }; my ($hit2, $percent_id2) = @{ $hash2{$key}[-1] }; my ($hit3, $percent_id3) = @{ $hash3{$key}[-1] }; push @intersect, "$key\tC1:[$condition1]$hit1 [$percent_id1]\tC2:[$condition2]$hit2

a Show instance for undefined

送分小仙女□ 提交于 2019-12-22 10:41:01
问题 Can anything be done to define a Show instance for an undefined value? Maybe some GHC extensions exist? I want something like this: > print (1,undefined) (1,"undefined") 回答1: According to the Haskell 2010 report, chapter 9, evaluating undefined should always cause an error: -- It is expected that compilers will recognize this and insert error -- messages that are more appropriate to the context in which undefined -- appears. undefined :: a undefined = error "Prelude.undefined" Since printing

Matlab - Undefined Error for Input Arguments of Type Double [duplicate]

穿精又带淫゛_ 提交于 2019-12-22 10:27:31
问题 This question already has answers here : “Undefined function 'function_name' for input arguments of type 'double'.” (3 answers) Closed 3 years ago . I'm trying to write a function that does what conv2(h1,h2,A) & conv2(...'shape') does without using the built-in function. (speed is currently not an issue). as defined here: http://www.mathworks.co.uk/help/matlab/ref/conv2.html These are my commands: imgC = imread('camerman.tif'); imgC = double(imgC); sigma = 1; inp = (-1 .*2.5 .*sigma):1:(2.5 .

FB is not defined

有些话、适合烂在心里 提交于 2019-12-22 08:10:44
问题 I am trying to redirect to an URL if the Facebook Like button has been pressed, but it doesn't work, and results having an error in the source view saying "FB is not defined" Here's my redirect code: FB.Event.subscribe('edge.create', function(response) { location.href = 'censored'; } ); and here's the FB like button <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src =