'clusters' in igraph unable to find - cluster-computing

g=get.adjacency(erdos.renyi.game(100,0.5))
clusters(g)
Error in (function (classes, fdef, mtable) : unable to find an
inherited method for function ‘clusters’ for signature ‘"dgCMatrix",
"missing"’
clusters(graph.adjacency(g,mode='undirected',weighted=T))
Error in (function (classes, fdef, mtable) : unable to find an
inherited method for function ‘clusters’ for signature ‘"igraph",
"missing"’
For some reason first it condsiders g as sparse matrix, then when I change it to proper graph objects, it just cannot find the funciton. Until few days ago it was working perfectly, and then on Friday after lunch it just stopped working and I started obtaining these error messages. I would be grateful to anyone that could have an idea about this issue. It seems the function is not in the package anymore, as when I search for it, it just does not appear to be there.

Related

immer's original function is returning undefined for a proxy object

console.log(state, original(state))
prints:
Proxy {0: {…}} undefined
I'm stuck... if I had more time, I'd go into the source to figure out how to re-write original to not fail, but I'm pressed to fix a bug.
Why would original return undefined, if the object is a proxy object?
Important note, this is in a redux toolkit slice function.
Probably you mean console.log(draft, original(draft))?
In Immer 7 you will get an explicit exception if you pass in an undrafted object, rather than getting undefined back, which should help you to catch such problems earlier.
The symbol issue only occurred when using polyfilled symbols and has been fixed in Immer 7 as well.

Compilation problem while running the sdm package in Rstudio

I am getting this error when compiling:
Error in FUN(X[[i]], ...): trying to get slot "presence" from an object of a basic class ("NULL") with no slots
How can I solve this?
You should check the formula to see whether you are indicating the same name
ie
sdmdata<- sdmData(**species~.,** train, test, predictors, bg..)
Writing this in the model will give you an error you described.
sdmmodel<- sdm(**specie~.,** data= methods=c("glm", "brt")).
I solved a similar problem that way

Appinventor : Property setter was expecting a com.google.appinventor.components.runtime.ImageSprite component but got a String instead

i'm currently working on a Naughts and Crosses game in MIT App Inventor 2, and have run into the error in the title, i believe i've narrowed it down to a specific block of my code (the easyBot procedure) but i cannot isolate the issue from there, i have provided source code for perusal, can anyone find the issue here?
source code: https://www.dropbox.com/s/plw8has3df47diw/XOXOXOXO_checkpoint1.aia?dl=0
error : Property setter was expecting a com.google.appinventor.components.runtime.ImageSprite component but got a String instead

Error type go lang

Is error type in Go "Error" or "error"? It bugged me that in the Tour it is with small first letter so I looked around and found here with small e yet here in source code it is with big capital letter.
Also how can it be without big capital letter yet still visible outside of package?
Just started learning Go so I might have missed something basic, thanks.
error is the type, lowercase. Just like with int and string it doesn't need to be visible as it is built-in to Go:
A good blog post on error handling
The runtime package you're referring to has an Error interface. The type there is an interface not error:
Package runtime
type Error interface {
error
// RuntimeError is a no-op function but
// serves to distinguish types that are run time
// errors from ordinary errors: a type is a
// run time error if it has a RuntimeError method.
RuntimeError()
}
The Error interface identifies a run time error.

Microsoft AJAX: Unable to get property 'x' of undefined or null reference

How do I troubleshoot the following error being thrown by a Microsoft AJAX JavaScript framework method? It is an automatically generated line of JavaScript from a custom User Control in a Web Forms App (Sitefinity 5 CMS)
Error Message:
Unable to get property 'FancyBlockDesigner' of undefined or null reference
Here is the JavaScript that is throwing the error:
Sys.Application.add_init(function() {
$create(SitefinityWebApp.Esd.TheLab.SampleHtmlEditor.FancyBlockDesigner, null, null, {"Editor":"propertyEditor_ctl00_ctl00_ctl00_ctl00_ctl00_Editor","propertyEditor":"propertyEditor"}, $get("propertyEditor_ctl00_ctl00_ctl00"));
});
Rather than discuss the ascx and cs files that try to abstract this detail away from me, I want to know what this error means. If I understand the detail, the abstraction might make more sense.
"$create" function in ASP.NET Ajax creates an instance of JavaScript class. Microsoft had their own opinion on how to make JavaScript object orientated and as time had shown, their approach wasn't exactly perfect.
Anyhow, to try to explain what is happening, let me give a bit of an overview oh how it works. We start by a server side control which implements IScriptControl interface which mandates two members: GetScriptDescriptors and GetScriptReferences. The second one is pretty straightforward - it lets you register references to all JavaScript files that you control will require. The GetScriptDescriptors, on the other hand, let's you define all the instances of JavaScript classes you want to use as well as it lets you set their properties - initialize them, if you will.
What the autogenerated JavaScript code you've pasted says is basically that you have defined in GetScriptDescriptors that you will need an instance of type "SitefinityWebApp.Esd.TheLab.SampleHtmlEditor.FancyBlockDesigner" where you want Editor property to be initialized. This code will go and look for a JavaScript constructor that looks like this:
function SitefinityWebApp.Esd.TheLab.SampleHtmlEditor.FancyBlockDesigner(element) {
}
that most probably also has a prototype defined, something like:
SitefinityWebApp.Esd.TheLab.SampleHtmlEditor.FancyBlockDesigner.prototype = {
}
Now, since the error you have posted states: "Unable to get property 'FancyBlockDesigner' of undefined or null reference", most probably one of the following is the problem:
You have not included the JavaScript file which contains the class (constructor + prototype) that I've talked about above
You have forgot to add the "FancyBlockDesigner" to the constructor (it seems that you do have other object, perhaps through MS Ajax namespaces - "SitefinityWebApp.Esd.TheLab"
You have not registerd the "SampleHtmlEditor" namespace. Make sure at the top of your JS file you have this: Type.registerNamespace("SitefinityWebApp.Esd.TheLab.SampleHtmlEditor");
So, short story long, the function with name "SitefinityWebApp.Esd.TheLab.SampleHtmlEditor.FancyBlockDesigner" cannot be found.
Hope this helps,
Ivan

Resources