property overrideSelector does not exist on type Store<state> ngrx/store#8.2 - ngrx-store

I am adding a test that needs to return a different mock value for a selector. So I found a nice way of doing it using overrideSelecor as mentioned here https://ngrx.io/guide/store/testing. But when adding mockstore.overrideSelector, got this error "property overrideSelector does not exist on type Store". Has anyone fixed this before?

In Angular 7 the mockStore does not have that function indeed. Migrating to Angular 8 will fix your issue.

This is most likely just typings issue. If you use provideMockStore it in fact creates an instance of MockStore that is provided as Store instance on DI so it won't break you apps functionality.
So in your tests you should use it like this:
let store: MockStore<State>;
...
store = TestBed.get<Store<State>>(Store);
...
store.overrideSelector(...);

Related

google's notebook on vertex ai throwing following error: type name google.VertexModel is different from expected: Model

I got this error, when compiling my pipeline:
type name google.VertexModel is different from expected: Model
when running the following notebook by google: automl_tabular_classification_beans
I suppose that kubeflow v2 is not able to handle (yet) google.vertexmodel as type for component input. However, I've been browsing a bit and did not find any good clue, or refs (kfp documentation for v2 is not up to date..) to solve this issue. Hopefully someone here can give me a good pointer? I look forward to all of your ideas.
Cheers
Google.Vertex is defined here:
https://github.com/kubeflow/pipelines/blob/286a49547cce763c502592c822296aa60f50b3e8/components/google-cloud/google_cloud_pipeline_components/types/artifact_types.py#L20
Here is an example on how to define it:
https://github.com/kubeflow/pipelines/blob/286a49547cce763c502592c822296aa60f50b3e8/components/google-cloud/tests/types/artifact_types_test.py#L22
For example,
from google_cloud_pipeline_components.types import artifact_types
model = artifact_types.VertexModel(uri='YOUR_MODEL_URI_STRING')
Can you try specifying your model using the syntax above and let us know if this works for your code?
This was a breaking change with release 0.1.9. Here there are some recommendation:
Pin your release to 0.1.7 and continue to use the Model type.
Use 0.1.9 and switch the output from Output[Model] to Output[Artifact].
Try 0.2.0 release, documentation here.
Hope these suggestions work!

RadAutocomplete issue in {NS}-Vue

I am trying to add a RadAutocomplete in my app and can't populate the component; I followed the tuts but typing something in it lead always to "No results found".
I guess that somehow it is not initialized. My component code is lengthier but I made a shorter playground here, Nativescript playground.
Can anybody tell me what am I missing?
Your code had several issues in the initial version:
- SuggestionView was outside RadAutoCompleteTextView
- searchItems are never initialised / getInitial() is never invoked from anywhere
- You were not using TokenModel etc.,
Your updated version fixed most, but you were still having typos on variable name and missing TokenModel implementation. I have updated it for you.

cfajaxproxy is sending invalid parameters?

For some reason that I don't understand, on my development machine can't call to function of a cfc component from a cfajaxproxy.
In my cfm document:
<cfajaxproxy cfc="#Application.CfcPath#.empleado"
jsclassname="ccEmpleado">
This works, and also I can instantiate an object to get all the functions of that cfc component:
var cfcEmpleado = new ccEmpleado();
But, when I try to call a function of that object:
var nb_Empleado = cfcEmpleado.RSEmpeladoNombreBIND(1,1);
Debug complains:
Error: The ID_EMPRESA parameter to the RSEmpeladoNombreBIND function is required but was not passed in.
I got this from Network tab on Chrome and figured out that something is generating an invalid parameter:
http://127.0.0.1/vpa/componentes/empleado.cfc?method=RSEmpeladoNombreBIND&_cf_ajaxproxytoken=[object%20Object]&returnFormat=json&_cf_nodebug=true&_cf_nocache=true&_cf_clientid=41C92098C98042112AE2B3AAF523F289&_cf_rc=0
As you can see, there's a parameter [object%20Object], that is messing around my request, and that's why it fails. I don't why is happening this. Other people has tested this, and it works, but in mine doesn't.
I have Coldfusion 9, Apache, Windows 8. Is is some configuration issue on Coldfusion, or a bug?
I can't tell if this is your error or not, but it might be. This was a problem that we had for awhile. You should consider using explicit names to avoid any confusion. Add the "js" in there.
<cfajaxproxy cfc="cfcEmpleado" jsclassname="proxyEmpleado">
var jsEmpleado = new proxyEmpleado();
I will try to find a link to an article about this very thing.

how to use fireAnbu in laravel 3?

I've installed the bundle fireAnbu in my local laravel 3 app, but I can't figure out how to use it! (feeling silly)
I've got 'fireanbu' => array('auto' => true), in bundles.php and 'profiler' => true, in fireanbu/config/fireanbu.php, and I've tried:
fireanbu::log('something');
$fireanbu->log('something');
FirePHP::log('something');
$FirePHP->log('something');
FB::log('something');
$fb->log('something');
I've had a look in fireanbu/start.php for clues, but I'm guessing :(
The best clue I've had so far is:
Non-static method FirePHP::log() should not be called statically, assuming $this from incompatible context
I've looked at http://www.firephp.org/HQ/Use.htm and it looks like fireanbu is using the OO API..
What am I doing wrong / how should I call it within my controllers?
I also created a Laravel 4 version for this if anyone finds this thread looking for a L4 version (like I did, and in the absence of finding one created my own):
https://packagist.org/packages/p3in/firephp
There no need to do anything. It would listen to event from Laravel's own Log class and attach it to FirePHP.
Log::info('foo'); would just work nicely.

Cache won't work in Appcelerator

Titanium SDK version: 1.6.
iPhone SDK version: 4.2
I am trying out the cache snippet found on the Appcelerator forum but I get an error: [ERROR] Script Error = Can't find variable: utils at cache.js (line 9).
I put this one (http://pastie.org/1541768) in a file called cache.js and implemented the code from this one (http://pastie.org/pastes/1541787) in the calling script, but I get the error.
What is wrong? I copied the code exactly.
Your problems is whilst the first pastie defines utils.httpcache. The variable utils is not defined outside of this function closure (because it is not defined anywhere in global namespace). As below shows.
(function() {
utils.httpcache = {
};
})();
To make it all work in this instance add the following code to the top of your cache.js file.
var utils = {};
This declares the utils variable in global namespace. Then when the function closure is executed below it will add utils.httpcache to the utils object.
The problem is actually not specific to Appcelerator and is just a simple JavaScript bug. Checkout Douglas Crockfords book, JavaScript the Good Parts. Reading it will literally make you a more awesome JavaScript developer.
You can't use utils.httpcache.getFromCache(url) until you add this to your code:
var utils = {};
That's because how the author created his function, it's called JavaScript module pattern and it's generally used to structure the code.
I seem to lose this value "value.httpCacheExpire = expireTime;" when the code does the "Titanium.App.Properties.setString(key,JSON.stringify(value));" so when I get it back using the getString method, there's no longer the "value.httpCacheExpire.
Anyone else have this issue? Am I missing something to get this working?

Resources