Android registerForActivityResult not found in - kotlin

Recently I had updated my dependencies on activity-ktx according to this
https://developer.android.com/jetpack/androidx/releases/activity#1.2.0
However, the registerForActivityResult() is not found. It is working before this update. Is there anything changes in androidx.activity:activity-ktx:1.2.0?

I managed to solved my question. I think I will post my answer here in case it helps for the others.
My solution is to update this dependencies.
implementation 'androidx.appcompat:appcompat:1.3.0-beta01'
My AS didn't warn me about the update only when I changed the version to 1.3.0.
PS: I am referring to this Cannot access 'androidx.activity.result.ActivityResultCaller'

Related

How to install vue-router 4 in vue ^2.6.14 version

Hi i have a requirement to use vue-router4 on vue:^2.6.14 app because i want to use the latest api regarding dynamically registering a route.
Problem: i tried to move vue:^2.6.14 app to vue:3.*.* as there is a requirement of using new vue-router api which supports https://router.vuejs.org/guide/advanced/dynamic-routing.html#adding-nested-routes based on that i asked a question which is un-answered Dynamically registered route is not working when it is just pushed
Note: i tried for complete migration but facing so many errors
My Expection: i want to use vue-router#4 in vue:^2.6.14 only for addRoute('parent',{...Route Object}) method https://router.vuejs.org/guide/advanced/dynamic-routing.html#adding-routes if overriding is possible to get this feature in vue-router3 for vue2 then it is most welcomed!
Note2: after overriding it should work as this example https://codesandbox.io/s/vue-router-test-hvzes5?file=/src/main.js , Note: in main.js only 2 routes are defined.
Issue with vue-router3 for vue2: https://github.com/vuejs/vue-router/issues/1156
Please help me thanks in advance !!
It's not possible to use vue-router#4 with vue#2. They're incompatible with each other.
And the question assumes that addRoute is only available in vue-router#4, but that's not true. addRoute() was introduced in vue-router#3.5.0, which is compatible with vue#2.
Based on your other question, I think the confusion might be caused by the answer you linked, which only applies to vue-router#2, which does not support addRoute. The workaround provided in that answer would not work properly with vue-router#3, as you had observed.
Here's a demo of your Codesandbox written in vue#2.6.14 with vue-router#3.5.4. Your original code to dynamically add routes was untouched.

problem compiling a switch case statement in chisel

I was writing a simple switch-case for my state machine. However, after calling sbt test I receive the following error:
It's very important to include the version of Chisel and your code when asking a question, but fortunately this one rings a bell as https://github.com/chipsalliance/chisel3/pull/1595.
You can workaround this by importing chisel3.util._. The better solution would be to update your version of Chisel, this bug is fixed in versions v3.2.8, v3.3.3, and v3.4.0 (and newer).

Browserify require stream with expose

I have a problem with requiring programmatically created modules for browserify.
var File = require("vinyl"),
browserify = require("browserify");
bundler = browserify();
bundler.require(new File({contents: new Buffer(...)}), {expose: "mymodule"});
bundler.bundle();
...
In the output file i have the content of buffer, but not exposed to "mymodule".
Does anybody used this case?
This was a bug in browserify, but was fixed with this patch: https://github.com/substack/node-browserify/pull/907
and your above code should work in version 6.0.1 and above
Since this question was posted James Halliday (substack, creator of browserify) has been hard at work coming up with the browserify handbook: https://github.com/substack/browserify-handbook
This resource is excellent. It goes really deep into how requires work and resolve dependencies in general. It is by far the best resource I have ever seen on the subject. Perhaps if you (or anyone else landing on this question with a similar problem) give it a read, the answer might jump out at you.
I know it's not a direct answer to your question, but I only recently found this resource, and I wish I knew it existed earlier.
For an introduction to browserify, I recommend watching this tagtree video: http://tagtree.tv/browserify-an-intro?share_code=uncoopered-inspirer

Getting the latest version of Bootstrap

It looks like I can use:
//getbootstrap.com/dist/css/bootstrap.css
//getbootstrap.com/dist/js/bootstrap.js
to automatically use the latest version of bootstrap.
Does anybody ever do that?
You have CDN's that have a similar functionality (BootstrapCDN for example), but I wouldn't recommend to automatically get the latest version. If the new version breaks something you wouldn't know it until it's too late.
Besides, what would the benefit be? Anything major is very likely to break something, and anything minor is, well, minor.
At http://getbootstrap.com/, they say
"Downloads are pulled directly from the latest committed code on
GitHub, and as a result our docs may at times be out of sync."
Your page will load faster if you get your bootstrap from their site but it may be outdated.
Hope it helped!

What is the correct way to upgrade a Lazarus project?

Some months ago I installed Lazarus 0.9.28 + FPC 2.2.4 to work on a new project. Some time after it I ran into some bugs related with image loading on a TImage. After googling a bit I found some information pointing to the fact that the bugs I was facing were already solved in a later version of FPC (can't remember the link now).
So I decided to download and install a newer version. This was around January and the latest stable version was not released yet, so I choose to install the snapshot Lazarus 0.9.31-29128 + FPC 2.4.2-2011-01-20. I opened my project with the new IDE and compiled it.
Luckily the bugs I faced were gone, but I have run into an IDE (?) one. After the upgrade, when I am on the code tab of some of my forms I do not see the code formatted. Instead I only see plain text, like this:
But on some forms I see the code formatted correctly, like this:
Anyone has run into this before? If yes, could you solve it and how? Or can anyone tell me what the correct way to upgrade a Lazarus project between versions is?
It is more of a nuisance than a real problem but still I would like to solve it. Any help would be appreciated.
EDIT
I noticed that in the forms where the code shows correctly highlighted the LCLVersion in the .lfm file is 0.9.28.2, while in the forms where the code shows like plain text that property in the .lfm file is 0.9.31. Could have something to do with the problem? I tried changing the value but it did not change anything.
Thanks in advance and best regards
I don't know if this is actually causing your problem, but Lazarus keeps a set of settings in application local. ($user\AppData\Local\lazarus on my vista).
This config dir is not erased upon deinstallation, and the new installation will reuse this.
In case of strange problems, remove the config dir, and let the current installation generate a new one.