Can't locate object method "find_md5" via package "DBM::Deep::Engine::Sector::Scalar" - perl

Does any one know why am getting this error ?
Can't locate object method "find_md5" via package "DBM::Deep::Engine::Sector::Scalar" at /u/xref/xref.10/bin/../lib/perl5/site_perl/5.8.8/DBM/Deep/Engine.pm line 1599
Please let me know how to get Rid of this.

Because $o->find_md5 was called where $o is the string DBM::Deep::Engine::Sector::Scalar or an object of class DBM::Deep::Engine::Sector::Scalar, yet that class doesn't have a method named find_md5.
(DBM::Deep::Engine::Sector::Scalar doesn't even seem to exist in newer version of the DBM::Deep distribution, so upgrading DBM::Deep would be a good start.)

Related

How to use recursive_update

I just started to use DBx::Class and begun slightly to understand, but it's complex.
I want to call "recursive_update" but I was not able to manage how I can use it.
If I understand the documentation right, I have to include it in the .../My/Schema.pm which was create by DBIx::Class::Schema::Loader?
__PACKAGE__->load_namespaces(default_resultset_class => '+DBIx::Class::ResultSet::RecursiveUpdate');
When I want to update the data I use the ResultSet with the relationships.
my $result = $schema->resultset('Table')->find($id});
$result->recursive_update({
'rel_table' => [....),
});
unfortunately I got an error:
Can't locate object method "recursive_update" via package My::Schema::Result::Table"
Where is my fault?
recursive_update has to be called on a ResultSet object, not a Result object.
You might want to add a helper method to your Result base class (if you already have one else create it, as it makes sense for many things) which gets a ResultSet restricted to the Result object it is called on and calls recursive_update on it.

Unity URP Can't override virtual function

I'm trying to follow this article: https://bronsonzgeb.com/index.php/2021/03/20/pseudo-metaballs-with-scriptable-renderer-features-in-unitys-urp/
I've gotten to the end of it and tried to compile but got the following message:
RenderWater.cs(38,30): error CS0115: 'RenderWater.RenderObjectsPass.OnCameraSetup(CommandBuffer, ref RenderingData)': no suitable method found to override
The line in question is:
public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData)
I'm new to URP and so I have likely missed something, but I have not idea what
Edit: Just need to make sure you have "Universal RP" installed in the Package Manager.
Are you inheriting the right class? You need to make sure that you're doing the following instead of inheriting from MonoBehavior.
YourClass : TheClassWithThatMethodInIt
Are you running into a namespace issue? Does VS flag it as missing the method to override as well?
Lots of missing functions are added to the 2020 version you might want to update your unity to the newer one. You can check the unity change log:
https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal#12.1/changelog/CHANGELOG.html
"OnCameraSetup" is added on the 2020

How to use configuration in scala play 2.5.8 in an object

I am migrating from play 2.4.x to play 2.5.8
While migrating I am getting a lot of deprecation related warning that I am trying to resolve. Once such error is method current in object Play is deprecated: This is a static reference to application, use DI instead
below is the object
object Foo{
def testURL= {
val test = Play.current.configuration.getString("test.url")
}
If I try to use config = Configuration.load() I get the error overloaded method value load with alternatives:
(environment: play.api.Environment)play.api.Configuration
(environment: play.api.Environment,devSettings:
Map[String,AnyRef])play.api.Configuration cannot be applied to ()
I there a way to use the play.api.configuration here ? I don't want to convert object into singleton class.
I'm basing this answer on this group post because it's about as good an answer as you'll get for this topic.
What you're trying to do is an anti-pattern, because something is an object it should not depend on external state. Technically, configuration is based on the state of a file on the filesystem, so it is state in that sense.
To do this cleanly, you should use a class.

Getting error "self constructor arguments cannot reference unconstructed this" only if class is same name as class file

In a nutshell, if I define a constructor in a class thats named after the same name as the file itself, it returns the following area.
Some example code. Take the filename as ParseWebsiteData.scala for both.
This returns an error.
class ParseWebsiteData(url:String) {
}
This however, works fine.
class Foo(url:String) {
}
The only thing that I'm seeing as the issue are parser bugs from 2013, but this is the latest version of Eclipses's Scala IDE setup so I'm strongly thinking this is not the case, but turns out I'm wrong. Oops :(
As it's still an issue, what are the way(s) to avoid this occurring as I code in the future?
Well, can't tell the root cause but I was getting the same error in Scala Eclipse editor and I just did "project->clean" and it was gone!

Duplicate interface definition for class SBJsonBase?

I added the Facebook sdk code to my project then I got this error because I already had a json library, so I deleted the Facebook json library from my computer and from the project but I still get this error. I search the whole project for "#interface SBJsonBase" and I only get one result. How can it say it's a duplicate when I only have one interface? Is it including the file twice? Does the search not always find everything?
May be this helps? Delete your derived data and do a clean project, then try to build again
I had a simular problem. It was a small search, but I could solve it without creating a new project etc...
The thing was I had a Class B that was importing Class A.
Then I had a class that imported Class B and also Class A.
When I did this, these problems occured.
Eg. A SOAP webservice Class imports all the Entities that are passed over the web.
Class goToSchoolWebservice.
import "person.h"
import "school.h"
...
Then I had a Singleton class used for caching that had the Logged in Person and also a ref to the webservice class.
import "person.h"
import "goToSchoolWebservice.h"
--> this is where is went wrong!!
So watch out for these circular references. ITs not so easy to detect them!
if your using #include instead of import then use this technique to minimize duplicates: at the begining of your interface (actually right before it) do check for a definition and if not defined then define it and proceed to define your interface. here is an example:
#ifndef __NetworkOptionsViewController__H // check if this has every been imported before
#define __NetworkOptionsViewController__H
#import "blahblah.h"
#interface NetworkOptionsViewController : UITableViewController
{
NSMutableArray* somevariable1;
int somevariable2;
}
#end
#endif
-- for me personally, i got this error though because the file path to my class was wrong. I checked file inspector and my class file was not defined in Classes folder even though the IDE said it was. I deleted them and copied them over again.
For those that still get this error, despite following header import conventions: I got this error from importing a header that had been deleted from the project. The missing header was instead found in an old backup of my project in dropbox (That I made before doing some destructive stuff in Git), and that file caused the circular import.
I solved a similar problem by moving all the imports to the prefix header file.