Marker is unknown in angular2-google-maps - angular2-google-maps

I am declaring a array for markers but it is not available .
error is "Cannot find name 'marker'."
What might be the issue?

Related

I am getting "Index -1 out of bounds for length 17" error in WEKA, can you please tell me how to fix this?

I am trying to run the 'glass' dataset in WEKA for Attribute Selector function. Here, I have chosen 'CfsSubsetEval' for the Attribute Evaluator Method and 'BestFirst' as the Search Method with default parameter values and I am getting the above mentioned error in the error log in WEKA. Can anyone help me how to fix it?
You need to set the class attribute for BestFirst.
Choose (Nom) Type from the combobox below the Attribute Selection Mode box and then click on Start again.

TypeError when using torch.autograd.profiler.profile

I am trying to analyze memory consumption for my model as described here:
https://pytorch.org/tutorials/recipes/recipes/profiler_recipe.html
using these lines:
with profiler.profile(profile_memory=True, record_shapes=True) as prof:
tubes, _, _ = zip(*model(imgs, img_metas, return_loss=False))
print(prof.key_averages().table(sort_by="self_cpu_memory_usage", row_limit=10))
but I get this error
TypeError: init() got an unexpected keyword argument
'profile_memory'
So, what would be the reason and/or the solution for this error?
You need to upgrade your version of PyTorch. Looking at the code, one can see that the profile_memory argument was added to the function signature first in PyTorch v1.6.0.
You can also see this through the documentation of torch.autograd. You can see that the argument is not present in PyTorch v1.1.0.

Octave: Subscripts for the text function?

I'm running Octave 5.1.0. I try to reproduce the code on this page:
https://octave.sourceforge.io/octave/function/text.html
For example, I try to reproduce Demonstration 3 there, i.e. this code:
clf;
axis ([0 8 0 8]);
title (["1st title";"2nd title"]);
xlabel (["1st xlabel";"2nd xlabel"]);
ylabel (["1st ylabel";"2nd ylabel"]);
text (4, 4, {"Hello", "World"}, ...
"horizontalalignment", "center", ...
"verticalalignment", "middle");
grid on;
I get the following error message:
text(,,,,,,): subscripts must be either integers 1 to (2^63)-1 or logicals (note: variable 'text' shadows function)
I tried changing the code to:
clf;
axis ([0 8 0 8]);
title (['1st title';'2nd title']);
xlabel (['1st xlabel';'2nd xlabel']);
ylabel (['1st ylabel';'2nd ylabel']);
text (4, 4, 'Hello','horizontalalignment', 'center','verticalalignment', 'middle');
grid on;
Then I get the following error message:
text(4...[x6]...): but text has size 1x39 (note: variable 'text' shadows function)
I'm a bit stumped as to how to solve this. I also fail to reproduce other code with the text function. I started running Octave a few weeks ago, so it wouldn't be impossible that my installation failed somehow. Other functions work as expected though.
I have installed the io and statistics packages. Can they interfer somehow?
Can anybody figure out what's going on?
The key is in the error message:
note: variable 'text' shadows function
It means you have defined "text" as a variable in your workspace, and have assigned a value to it.
Therefore, now each time you try to access the text function, you are accessing your variable instead.
Clear your workspace (or just the text variable) and try again.
PS. While this is not conventional practice, I personally tend to name all my non-function variables starting with a capital letter, to avoid name-clashes with functions, since most functions in octave start with a small letter.
In general, always check that a name is not taken before you assign something to that name, to avoid 'shadowing' as in this case.

Arangoimp sporadically throws error "expecting array"

when doing large json imports with arangoimp (using ArangoDB 2.4.0), sporadically a warning comes up:
2015-01-15T11:30:30Z [1268] WARNING at position 22213: invalid JSON type (expecting array)
The encording lines (here 22213) contents a proper json object. Is there a way to let arangoimp print for which attribute it expects an array?
As we are using schemeless documents, why is arangoimp insisting in getting an array anyway?
If this is a WARNING why is it reported as error at the end?
created: 25416
errors: 297
total: 25713
The warned documents indeed where not imported.
I have just pushed a change that will improve diagnostics for these cases:
https://github.com/triAGENS/ArangoDB/commit/d7fa7e7a928d3d998fc8dddb372d07417c3d6646
It will produce better error messages, print the offending document and may also print the offending line in case of parse errors.
It also addresses the issue that warnings and errors are effectively the same when importing. So it now prints "warnings/errors" instead of just "errors".

Is there any way to interpolate colors when using a structure grid in VTK?

I want to make a color map on vtkstructuredgrid and I need the colors to be interpolated between cells. The other option is using point data but when ever I use
structuredgrid->PointData()->SetScalars(Floatarray);
it says I cant have a pointer to a incomplete class type.
Any help would be greatly appreciated.
Your approach should work...
However, PointData is not a method, for the vtkStructuredGrid class: you should avoid (), and that's the reason for the error (Pointer to incomplete class type is not allowed).
Moreover, PointData is protected, in the "standard" definition of vtkStructuredGrid, and you should derive the entire class to access it from your code.
Before trying that, by the way, can you try with
structuredgrid->GetPointData()->SetScalars(Floatarray);
?
It should work too (not sure about the parameter type passed to SetScalar(), BTW).

Resources