The Wikipedia Search for Typeahead sample code - EXCEPTION: No provider for ConnectionBackend - ng-bootstrap

When following ng-bootstrap Wikipedia Search sample code for Typeahead https://ng-bootstrap.github.io/#/components/typeahead, I get "EXCEPTION: No provider for ConnectionBackend!".
It worked well for Simple Typeahead example. But it didn't work for Wikipedia search example.
See here for detailed description of the error and steps.
What should I do to fix this error?

It is very hard to say what is going on without having access to a minimal reproduce scenario but I suspect that you were missing import for the JsonpModule.
In any case here is a minimal plunker that demonstrates fully working example that you are mentioning: http://plnkr.co/edit/kUE4VJclfmtpzb8OfVhk?p=preview. You might want to compare your setup with the one in this working plunk.

Related

How to use syntax highlighting in next js?

I am able to parse the markdwon with the help of remark and remark-html. How can I add syntax highlighting features for the code element?
I've been searched for TWO whole days trying to use remark/rehype ecosystem on syntax highlighting which is way more complex to use. I'm still working on searching, it's better to avoid remark/rehype ecosystem and try another method.
Here I share list of my search, just give you some subjective perspective so that you won't waste you too much time on things that not working. None of them will work as you expected, and their sample code are obscure or just broken codes.
https://github.com/remarkjs/remark-highlight.js
They move to support rehype. Are you a big fan of them wanna move as well?
https://github.com/sergioramos/remark-prism
You will get this error: Module parse failed: Unexpected character '�'
https://github.com/torchlight-api/remark-torchlight
They states on their website: 🚨 This client is still very much a work in progress. Please open issues! 🚨View it on github at github.com/torchlight-api/remark and this link is invalid.
https://github.com/rehypejs/rehype-highlight
It force you to use rehpye althought you can you remark-rehype for you to transfer easily. However, debug your code once you encounter some error will be helpless.
sample code use third-pary v-file to read file showing their code is working but not. and it reads html file not markdown file.
It's hard for you to grasp their concept to use their plugins to easily. It waste most of you valuable time to think what they think.
I give up remark/rehype ecosystem and stay away from them. Good luck! :)

Recaptcha iframe creating a TypeError. I can't find the reason for the error

I know there are similar questions and in fact one has an answer providing a demo:
SO : https://stackoverflow.com/a/65470872/12138644
CodeSandBox : https://codesandbox.io/s/vue-recaptch-v3-demo-gjul7?file=/src/App.vue
Here is my form showing the recaptcha badge as per the codesandbox example
I'm getting the token - but I don't know how to verify it. I can't find an example or explanation - I've read the npm package docs and looked through all examples available.
Most concerning though, I'm getting this error: console error for cs-serp-iframe
In the codesandbox example, there are no such errors in the console and I have practically used the same code aside from passing it the 'submit' action in the executeRecaptcha() function: setup recaptcha execute function for 'submit'
Could someone please help me understand where I am going wrong? It's not my first experience with Recaptcha but it is using it with Vue 3.
I'd really like to use the vue-recaptcha-v3 package rather than the Google Code route if I can.
NB. I only have a front-end setup I am not yet sending anything to a backend because I am sending the form data to Airtable.
I am getting the score in the reCaptcha console, so I don't know what else I should be doing with the token.

SyncFusion Grid's filter is not working and the data is not shown as expected

IN the syncfusion grid the filters are showing the correct and expected filters. But after a modal is being opened and closed it is giving an error and the data shown in the filter is hanged and only the last clicked filter data is showing.
The error is shown as :
Uncaught TypeError: Cannot read property '_expands' of undefined
at t.excelFilter._processListData (ej.web.all.min.js:10)
at t.excelFilter.openXFDialog (ej.web.all.min.js:10)
at Object._mouseClickHandler (ej.web.all.min.js:10)
at HTMLDivElement.<anonymous> (ej.web.all.min.js:10)
at HTMLDivElement.dispatch (jquery-3.2.1.min.js:3)
at a (ej.web.all.min.js:10)
at HTMLDivElement.s (ej.web.all.min.js:10)
at HTMLDivElement.dispatch (jquery-3.2.1.min.js:3)
at HTMLDivElement.q.handle (jquery-3.2.1.min.js:3)
I have tried many different things like setting the e-type as string and then showing the dataSources but nothing seems to help. Any help regarding can be really great.
Thanks in Advance
Based on your query we suspect that you are facing an issue while perform filtering in the Grid. In this you also mentioned that after a modal is being opened and closed it gives the error, so we suspect that you have used the menu Filter or excel filter in the grid.
So, we have prepared a sample with the excel filter and tried to reproduce the issue but we did not face the mentioned issue at our end.
For your convenience we have attached the sample and please find the sample for your reference
Sample : https://www.syncfusion.com/downloads/support/directtrac/313492/ze/filter_core-1339169973.zip
Documentation: https://ej2.syncfusion.com/aspnetcore/documentation/grid/filtering/#excel-like-filter
If you are still facing the issue, kindly share the following details that will be helpful for us to provide better solution.
Share the complete Grid rendering code.
If possible please replicate the issue in the attached sample.
Share us a Pictorial representation or video demonstration of the issue.
Have you bound local or remote data to the Grid? If remote data which adaptor have you used.
Syncfusion Package version.

Rewrite the Next.js example with-react-intl in Typescript

I'm trying to rewrite the Next.js official example with-react-intl in Typescript , but I'm having trouble with the HOC component PageWithIntl.js
My code is here https://github.com/soulmachine/with-react-intl.
Any ideas? Thanks!
Any pull requests is welcome.
I was trying the same thing by going through the Basics but got stuck on the "Fetching Data for Pages". There are too many typings missing for TS development.
I created some interfaces for page and component properties and I see that you have too. And the types under #types/next seem to be very lacking/incomplete.
Perhaps its time to write a comprehensive d.ts for next.js/ts?
I am game.
edit: just saw that your typeRoots point to src/#types instead of #types. Maybe nothing but still.
Now my code totally works, with only two minor flaws:
Line 50 of PageWithIntl.tsx, IntlProvider doesn't have the initialNow prop
Line 47 of PageWithIntl.tsx, Rest types may only be created from object types

Web API Help Samples - C#

ASP.NET Web API has an easy install Nuget help page with sample generator. It's easy to get it to generate and display sample requests, but not so easy it seems to get it to display sample responses (httpsampleresponses) so that when developers look at the help page they'd see examples of generated responses / not static/typed in responses, but actually generated. I've seen it done before on another project, but still having trouble figuring out how to do it. MSDN's YAO has a good blog but it's just not getting me all the way to success for some reason.
From what I've seen work live and based on what there is to read about it online, it's definitely in getting the HelpPageConfig file right in terms of the config.SetSampleResponses() set up. I've discovered the configuration file that sets the parameters for the SetSampleResponses() method, but still, nothing I try is working. It was suggested to me that I should create a custom type and use extension methods, but getting that to correspond and display what I need hasn't happened yet. I can get it to compile without errors, but it still doesn't show the generated response sample on the page. It was easy with the SetSampleForType piece to get a section to show up in the requests section, but it's the response part that has given me trouble.
Has anyone out there done this with the SetSampleResponses() successfully and is there any kind of trick you can clearly define for getting it to work? Do you have any tips on setting up a specific generic type and making that work?
I'm thinking this must be something really simple and I'm just not clicking to make it happen....
Thanks for any potential info...
SetSampleResponse extension on HelpPageConfig is for statically defining samples for you action.
config.SetSampleResponse("\"Hello World!\"", new MediaTypeHeaderValue("application/json"), "Values", "Get", "id");
if you are looking for generated sample for a particular type, have you tried using SetSampleObjects extension which allows you to set sample objects for different types and this same object is used in all cases where that particular type is returned from an action.
config.SetSampleObjects(new Dictionary<Type, object>
{
{typeof(string), "Hello World!"}
});
Could you share more specific(code) details as to how you are using SetSampleResponse extension?

Resources