Optimise putting headers, add interface to allow caching static headers

I'm opening this PR in draft mode because I don't really understand why the existing logic of putting a header is so complicated and perhaps we're missing something.
Note I haven't updated all headers, although probably all headers could be updated to extend the AsRaw1 interface which allows automatic caching of the value.
Benchmarks
Performance of putHeaders in master, using the same benchmark added in this PR:
[info] Benchmark                                                   Mode  Cnt     Score     Error   Units
[info] HeadersBench.putHeaders                                     avgt   10   891.876 ±  15.552   ns/op
[info] HeadersBench.putHeaders:·gc.alloc.rate                      avgt   10  4635.263 ±  81.338  MB/sec
[info] HeadersBench.putHeaders:·gc.alloc.rate.norm                 avgt   10  4552.203 ±   0.003    B/op
[info] HeadersBench.putHeaders:·gc.churn.G1_Eden_Space             avgt   10  4636.559 ±  90.078  MB/sec
[info] HeadersBench.putHeaders:·gc.churn.G1_Eden_Space.norm        avgt   10  4553.459 ±  32.059    B/op
[info] HeadersBench.putHeaders:·gc.churn.G1_Survivor_Space         avgt   10     0.017 ±   0.007  MB/sec
[info] HeadersBench.putHeaders:·gc.churn.G1_Survivor_Space.norm    avgt   10     0.017 ±   0.006    B/op
[info] HeadersBench.putHeaders:·gc.count                           avgt   10   990.000            counts
[info] HeadersBench.putHeaders:·gc.time                            avgt   10  1054.000                ms

Performance of putHeaders with minor changes in this PR:
[info] Benchmark                                                 Mode  Cnt     Score     Error   Units
[info] HeadersBench.putHeaders                                   avgt   10   822.643 ±  80.883   ns/op
[info] HeadersBench.putHeaders:·gc.alloc.rate                    avgt   10  4998.685 ± 472.242  MB/sec
[info] HeadersBench.putHeaders:·gc.alloc.rate.norm               avgt   10  4512.201 ±   0.002    B/op
[info] HeadersBench.putHeaders:·gc.churn.G1_Eden_Space           avgt   10  5001.228 ± 483.802  MB/sec
[info] HeadersBench.putHeaders:·gc.churn.G1_Eden_Space.norm      avgt   10  4514.091 ±  21.311    B/op
[info] HeadersBench.putHeaders:·gc.churn.G1_Survivor_Space       avgt   10     0.014 ±   0.006  MB/sec
[info] HeadersBench.putHeaders:·gc.churn.G1_Survivor_Space.norm  avgt   10     0.013 ±   0.005    B/op
[info] HeadersBench.putHeaders:·gc.count                         avgt   10  1068.000            counts
[info] HeadersBench.putHeaders:·gc.time                          avgt   10  1087.000                ms

However, the new putHeader (note singular) together with the caching and AsRaw1 trait, we get the following:
[info] Benchmark                                                   Mode  Cnt     Score     Error   Units
[info] HeadersBench.putHeaderRaw                                   avgt   10   100.361 ±  15.176   ns/op
[info] HeadersBench.putHeaderRaw:·gc.alloc.rate                    avgt   10  4597.130 ± 624.751  MB/sec
[info] HeadersBench.putHeaderRaw:·gc.alloc.rate.norm               avgt   10   504.022 ±   0.001    B/op
[info] HeadersBench.putHeaderRaw:·gc.churn.G1_Eden_Space           avgt   10  4603.441 ± 615.393  MB/sec
[info] HeadersBench.putHeaderRaw:·gc.churn.G1_Eden_Space.norm      avgt   10   504.796 ±   4.592    B/op
[info] HeadersBench.putHeaderRaw:·gc.churn.G1_Survivor_Space       avgt   10     0.012 ±   0.005  MB/sec
[info] HeadersBench.putHeaderRaw:·gc.churn.G1_Survivor_Space.norm  avgt   10     0.001 ±   0.001    B/op
[info] HeadersBench.putHeaderRaw:·gc.count                         avgt   10   975.000            counts
[info] HeadersBench.putHeaderRaw:·gc.time                          avgt   10   966.000                ms

As you can see, approximately 9x the performance while maintaining the same GC. In order to further improve performance, we'd need to get rid of the List data structure here which doesn't seem compatible at all with the idea of Headers, given that we need to always append rather than prepend, so every time we add a header to the list, we have to traverse the whole existing list of headers and add it to the end. Sounds like we should be using Chain or something.

What confuses me the most is why putHeaders is currently so indirect.
Say we want to add a Content-Length: 1000 header.
This is the process (I'll be tracking approx total allocations in parenthesis):

Create a Content-Length case class (1 alloc).
Call putHeaders: this accepts a vararg, hence Seq (2 allocs) and it must be a Header.ToRaw
We convert Content-Length into Header.ToRaw with Primitive (3 allocs)
Header.ToRaw with Primitive we need a List[Header.Raw] so we create a list (4 allocs)
Message.putHeaders calls Headers.put. Let's assume we started with no headers, so we calling this ++ Headers(in).
Headers.apply(in) is actually more conversion steps: Seq[Header.Raw] is converted into Header.Raw using scalaCollectionSeqToRaw, which converts the Seq into List (5 allocs). We also call foldMap which does many more allocations (to keep it simple let's say we're at 6 allocations), but it depends on the amount of headers.
scalaCollectionSeqToRaw also calls convert implicit, which is identityToRaw. This creates another Header.ToRaw with Primitive instance with a List inside (8 allocations now).
scalaCollectionSeqToRaw gets called a second time inside when doing Headers.apply(in), but this time with rawToRaw implicit (12 allocations now)

And we're done!
@SystemFw @rossabaker @bplommer your names are in the Header code. I was hoping one of you would know if there's a reason why we can't just go Content-Length() -> Header.Raw and simply replace/add it to the headers in final class Headers(val headers: List[Header.Raw]). This PR basically does that (or rather, enables doing that).

I updated CORS middleware to use my new putRawHeader and putRawHeaders methods (pushed in the last commit). I then ran the following benchmark:
@BenchmarkMode(Array(Mode.AverageTime))
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@State(Scope.Benchmark)
class CORSHeadersBench {
  val CorsMiddleware = CORS.policy
    .withAllowOriginHeader(_ => true)
    .withAllowCredentials(true)
    .withAllowHeadersIn(Set("Content-Type", "Authorization", "*").map(CIString(_)))
    .withMaxAge(1.day)

  private val routes = HttpRoutes.of[IO] {
    case req if req.pathInfo === path"/foo" =>
      Response[IO](Ok).withEntity("foo").pure[IO]
  }

  private val app = CorsMiddleware(routes).orNotFound

  private val exampleOrigin = Origin.Host(Uri.Scheme.https, Uri.RegName("example.com"), None)
  private val exampleOriginHeader = Origin.HostList(NonEmptyList.of(exampleOrigin))
  private val request = Request[IO](uri = uri"/foo").putHeaders(exampleOriginHeader: Origin)

  @Benchmark
  def corsHandling(bh: Blackhole): Unit = {
    bh.consume(app.run(request).unsafeRunSync())
  }
}

Using old putHeaders:
[info] Benchmark                                                       Mode  Cnt      Score     Error   Units
[info] CORSHeadersBench.corsHandling                                   avgt   10  16523.222 ± 667.241   ns/op
[info] CORSHeadersBench.corsHandling:·gc.alloc.rate                    avgt   10    748.393 ±  29.224  MB/sec
[info] CORSHeadersBench.corsHandling:·gc.alloc.rate.norm               avgt   10  13609.781 ±   0.070    B/op
[info] CORSHeadersBench.corsHandling:·gc.churn.G1_Eden_Space           avgt   10    754.788 ±  24.535  MB/sec
[info] CORSHeadersBench.corsHandling:·gc.churn.G1_Eden_Space.norm      avgt   10  13728.009 ± 206.675    B/op
[info] CORSHeadersBench.corsHandling:·gc.churn.G1_Survivor_Space       avgt   10      0.003 ±   0.001  MB/sec
[info] CORSHeadersBench.corsHandling:·gc.churn.G1_Survivor_Space.norm  avgt   10      0.048 ±   0.020    B/op
[info] CORSHeadersBench.corsHandling:·gc.count                         avgt   10    461.000            counts
[info] CORSHeadersBench.corsHandling:·gc.time                          avgt   10    312.000                ms

Using new putRawHeaders/putRawHeader:
[info] Benchmark                                                       Mode  Cnt      Score      Error   Units
[info] CORSHeadersBench.corsHandling                                   avgt   10  14390.159 ± 1065.625   ns/op
[info] CORSHeadersBench.corsHandling:·gc.alloc.rate                    avgt   10    710.729 ±   49.141  MB/sec
[info] CORSHeadersBench.corsHandling:·gc.alloc.rate.norm               avgt   10  11241.467 ±    0.037    B/op
[info] CORSHeadersBench.corsHandling:·gc.churn.G1_Eden_Space           avgt   10    717.102 ±   51.975  MB/sec
[info] CORSHeadersBench.corsHandling:·gc.churn.G1_Eden_Space.norm      avgt   10  11341.475 ±  114.635    B/op
[info] CORSHeadersBench.corsHandling:·gc.churn.G1_Survivor_Space       avgt   10      0.003 ±    0.001  MB/sec
[info] CORSHeadersBench.corsHandling:·gc.churn.G1_Survivor_Space.norm  avgt   10      0.045 ±    0.010    B/op
[info] CORSHeadersBench.corsHandling:·gc.count                         avgt   10    438.000             counts
[info] CORSHeadersBench.corsHandling:·gc.time                          avgt   10    291.000                 ms

Note all CORSSuite tests are passing so I believe I didn't break anything.
You can see the improvement is quite significant (around 13% more performant).

Although caching might have a value of its own, I think a lot of the problems stem from name not being part of ToRaw
(hence my comment in https://github.com/http4s/http4s/pull/6718#discussion_r980415544). Looking at what ToRaw means, it obviously couldn't be: values of ToRaw is a List[Header.Raw], and they can all have different names, as (for example) a list of ("header-name", "value") is supported by the ToRaw implicit conversions.
That's all very well, except that a lot of the put calls are for just a single header value, and pretty much every call to put needs the header name, it becomes very inefficient to have to (first) convert that header to a list of raw headers (even if it's only going to be a single element list, and we know it, and this conversion may happen many times without the caching) and then not have any guarantee (unless we check that it's a singleton list, as in #6201) that all the headers in this list have the same name.
If ToRaw had a values: Map[CIString, List[Header.Value]] (or Chain, or NonEmptyVector, or whatever) instead, this would be less problematic. Caching might still be useful, and removing implicits and implementing the ToRaw trait directly where possible might also reduce the number of allocations (although the JVM might be able to make them practically free), but at least Headers could access the names of headers directly in an efficient manner.
That brings us to https://github.com/http4s/http4s/issues/6720, but that's mostly for 1.x, so this PR or some version of it may still be very useful for 0.23.
It may seem like this is fighting modeled headers, but perhaps it's fighting ToRaw even more, or in addition?

@wjoel so what you're describing is basically what I'm trying to do in this PR. Header.Raw is the actual case class being stored in Headers. As you said, we need the name and the value of each header really, and that case class (Header.Raw) already has everything we need. For whatever reason (historical, probably), Message.putHeaders actually accepts Header.ToRaw. For another, currently unclear to me reason, the way we convert headers into Header.Raw is rather complicated and requires many intermediate steps.
This is what the key idea in this PR is to change that: simply allow ~adding~ putting Header.Raw into Headers as that doesn't require any conversions.
We can probably separate this into two PRs:

Just adding method on Message which is something like putRawHeader(header: Header.Raw)
Update middleware to use putRawHeader for better performance

For whatever reason (historical, probably), Message.putHeaders actually accepts Header.ToRaw. For another, currently unclear to me reason, the way we convert headers into Header.Raw is rather complicated and requires many intermediate steps.

@CremboC I've tried to give an answer to both of these questions in two comments already, not quite sure how else to get the point across :)

Message.putHeaders actually accepts Header.ToRaw.

The reason putHeaders accepts Header.ToRaw is to support both modelled headers and raw headers (and in fact it also supports key value pairs, and foldables of headers).
This is actually in the scaladoc for ToRaw:
  /** Target for implicit conversions to Header.Raw from modelled
    * headers and key-value pairs.
    *
    * A method taking variadic `ToRaw` arguments will allow taking
    * heteregenous arguments, provided they are either:
    *
    * - A value of type `A`  which has a `Header[A]` in scope
    * - A (name, value) pair of `String`, which is treated as a `Recurring` header
    * - A `Header.Raw`
    * - A `Foldable` (`List`, `Option`, etc) of the above.
    *
    * @see [[org.http4s.Headers.apply]]
    */
    ```
In particular, right now you can do
```scala
putHeaders(Accept(..), Allow(..), "myHeader" -> "myValue")

another, currently unclear to me reason, the way we convert headers into Header.Raw is rather complicated and requires many intermediate steps.

The reason for that is that modelled headers guarantee correct treatment of duplicate headers, which depending on the header can mean "replace old one", "merge with old one", or "have a list with both"


Support using flutter with specific version

Add a version command in flutter_tools to support using flutter with specific version.
flutter version: list a flutter versions.
flutter version 1.1.5: use flutter version 1.1.5.

Is there any other problem? Can this pr be merged?

Thanks for this contribution.
In the future please first file a bug to discuss the rationale for a change.
For details see: https://github.com/flutter/flutter/wiki/Tree-hygiene

can you help me guys..I have a flutter version 1.22.4 ,dart sdk version 2.10.3 but i need dart sdk less than 2.0.0... how to solve this

can you help me guys..I have a flutter version 1.22.4 ,dart sdk version 2.10.3 but i need dart sdk less than 2.0.0... how to solve this

Found your answer @Denesh11?

can you help me guys..I have a flutter version 1.22.4 ,dart sdk version 2.10.3 but i need dart sdk less than 2.0.0... how to solve this

Found your answer @Denesh11?

yes, I have found a solution.

can you help me guys..I have a flutter version 1.22.4 ,dart sdk version 2.10.3 but i need dart sdk less than 2.0.0... how to solve this

Found your answer @Denesh11?

yes, I have found a solution.

@Denesh11 do you really think I was just worried about you?? We don't know each other man, I was asking for the solution. But never mind, I found it too.


Possibly unnecessary Sync

The following code:
use std::io::Read;

use firestore::{FirestoreDb, FirestoreListenerTarget};
use tower_controller_rs::temp_file_token_storage::TempFileTokenStorage;

#[tokio::main]
async fn main() {
    let db = FirestoreDb::new("my-project-id").await.unwrap();

    let mut listener = db.create_listener(TempFileTokenStorage).await.unwrap();

    db.fluent()
        .select()
        .from("my-col")
        .listen()
        .add_target(FirestoreListenerTarget::new(1), &mut listener)
        .unwrap();

    listener
        .start(move |r| {
            let db = db.clone();
            async move {
                db.fluent()
                    .select()
                    .by_id_in("mycol")
                    .one("mydoc")
                    .await
                    .unwrap();
                Ok(())
            }
        })
        .await
        .unwrap();

    std::io::stdin().read(&mut [1]).unwrap();

    listener.shutdown().await.unwrap();
}

Fails to compile with the following error:
error: future cannot be shared between threads safely
   --> src\bin\error_example.rs:20:10
    |
20  |         .start(move |r| {
    |          ^^^^^ future created by async block is not `Sync`
    |
    = help: the trait `Sync` is not implemented for `dyn Future<Output = Result<gcloud_sdk::apis::google::firestore::v1::Document, FirestoreError>> + Send`
note: future is not `Sync` as this value is used across an await
   --> D:\Repos\firestore-rs\src\fluent_api\select_builder.rs:330:17
    |
322 |               match self
    |  ___________________-
323 | |                 .db
324 | |                 .get_doc_at::<S>(
325 | |                     parent.as_str(),
...   |
328 | |                     self.return_only_fields,
329 | |                 )
    | |_________________- has type `Pin<Box<dyn Future<Output = Result<gcloud_sdk::apis::google::firestore::v1::Document, FirestoreError>> + Send>>` which is not `Sync`
330 |                   .await
    |                   ^^^^^^ await occurs here, with the value maybe used later
...
338 |           } else {
    |           - the value is later dropped here
note: required by a bound in `FirestoreListener::<D, S>::start`
   --> D:\Repos\firestore-rs\src\db\listen_changes.rs:231:57
    |
231 |         F: Future<Output = BoxedErrResult<()>> + Send + Sync + 'static,
    |                                                         ^^^^ required by this bound in `FirestoreListener::<D, S>::start`

This is due to the start function requiring a Sync future and the fluent api not returning a future with Sync. It is possible to remove this requirement from the start function (and a function it calls) without it causing an error. Not guaranteed everything still works. I will open a draft pull request (#71 ).

This is maybe more convenient for people in general:
https://github.com/abdolence/firestore-rs/pull/73

Still considering if #73 is needed or not. Until then I've released your fix in 0.26.2. Thanks for the PR!


Add MobX Awesome list

Add MobX Awesome List

By submitting this pull request I confirm I've read and complied with the below requirements.

Failure to properly do so will just result in the pull request being closed and everyone's time wasted.


Fix fmad issue

Resolves #550 . The issue was indeed to do with the sharing of mutable state. The fix was simply to ensure that indexing gives copies of vi.vals rather than views into vi.vals.

Maybe it would be better to change the behaviour of getval and getall instead?

I would just copy on use instead of changing the behavior of getindex. If the underlying data type of an indexable is mutable or has mutable fields at any level, then a shared state is the right mental model IMO. If this is a problem, then the following seem like reasonable fixes to me:

Make the underlying type isbits, i.e. all fields and sub-fields are immutable,
Make a copy or deepcopy at call site after indexing, or
Make a convenience function that copies on indexing and call that instead.

I agree with you in principle @mohamed82008, but in this case I believe our indexing behaviour should essentially behave the same as indexing into an array, so copying is appropriate. We should probably support a separate view operation to support a non-copying version.

@willtebbutt can I help with something to fix this PR? It's breaking quite a lot at the moment and I'm happy to help if possible.

Apologies for the delay on this. I've been out of action for the last 7 days due to illness. I'm back in the office for the first time today and am working on this issue currently. I'll give you a shout if I get stuck.

@yebai @xukai92 is there any particular reason that we have getval, getvals, and getall? ctrl-f-ing through the code base indicates that we don't use them other than to implement the internals of getindex for VarInfo.

@willtebbutt Functions like getval, getvals and getall are probably not necessary. I don't think they are used anywhere else apart from inside the VarInfo module.


Add title to the dialog directing to the setting page.

Sometimes we really need to set a title to the dialog.

Sorry I have got confused with the method need to set title.


Updated README

The commit 5ed5602a2aa44ff654d4eab8f81a70498ca78e98 added a new banner to the project README that promotes a non-technical cause unrelated to the project.
The wording of the banner states "We stand […]" and among other folks I am listed by name in the Contributors section in the README, which is likely to be understood that the We in the banner includes all Contributors.
Yet, I was not asked whether I agree to be associated with said cause. Understanding the world is complex and controversial I'd much prefer for projects I contribute to stay clear from non-technical topics.
Do think it would be possible for you to show your support for the cause outside of this project?
If not, how can the README or banner be updated to not misrepresent folks, like me, who wish to keep politics and other societal topics out of their open source work due to the often divisive and heated nature?

@afh,
The word "We" was intended to refer to the organization members and not the individual contributors, although I understand the potential for misinterpretation.
I will update the banner to something like "Palestine needs your help" or "Send Aid to Palestine".
However, I won't remove the banner entirely. During the invasion of Ukraine, major open-source projects and companies displayed banners supporting the Ukrainian cause without any notable complaints. If GitHub had taken action to remove those banners and informed people to maintain neutrality in their projects at that time, I wouldn't have put up this banner either. Yet, many projects openly supported the Ukrainian cause without objection. Therefore, if you request the removal of this banner, I expect the same to be applied to every other open-source project.
Moreover, the purpose of the banner is to softly remind individuals of the tragedies caused by this conflict and to show support for those affected. If Israel were facing similar hardships as the Palestinian people, I would display a banner for them as well.
It's crucial to remember that these aren't just numbers, they're real people with aspirations and dreams, and most tragically, children are being greatly affected by this crisis. Therefore, this banner serves as a call to action to provide aid to the Palestinians affected by this tragedy.
It's easy to remain apolitical from a privileged position, but if we were in the shoes of the Palestinian or Ukrainian people, our stance would likely differ.
Therefore, I can't do more than update the wording of the banner. If you disagree, you're welcome to cease your contributions to this project, and I respect your decision.

Thank you for your quick response, @humblepenguinn, and detailing your point of view.
Updating the wording of the banner as you propose would help avoid misunderstanding or misrepresentation, thank you. Especially as the envio-cli organization currently has no public members (see screenshot below).
The tragedies that are currently unfolding in the world more often than not feel too much to bear and it is important to do what is possible to help and resolve them.
I myself am deeply passionate about various political, societal, and systemic issues, at times driving me to the brink of despair.
I choose to address them in other areas of my life and leave these out of my open source work; others choose to include them. Both are legitimate and equally valid choices.
I'll gladly continue to make contributions to this projects as long as they are welcome and considered useful.
Screenshot of envio-cli organization page

Thank you for updating the README, @humblepenguinn, and going further into the details about your motivation.
Glad to you hear my contributions are valued and appreciated 🙂


Add tox scripts for common commands

Please let me know what you think. This PR basically add the same commands as in https://github.com/starlite-api/starlite/pull/578 but with tox instead of  poetry scripts:

tox - runs tests

Can accept specific directories/file and will run only them, for example: tox -- tests/caching
By default, it runs on all python versions mentioned in tox.ini. To run it on a specific version: tox -e py39 -- tests/caching

tox -e docs - build docs
tox -e lint - runs pylint from pre-commit

Can accept specific directories/files and will run only them, for example: tox -e lint starlite/cache/**

tox -e fmt - runs black, isort, prettier, blacken-docs, trailing-whitespace, end-of-file-fixer, docformatter from pre-commit

Can accept specific directories/files and will run only them, for example: tox -e fmt starlite/cache/**

tox -e typecheck - runs mypy from pre-commit

Can accept specific directories/files and will run only them, for example: tox -e typecheck starlite/cache/**

tox -e all-checks - runs all pre-commit checks

Can accept specific directories/files and will run only them, for example: tox -e all-checks starlite/cache/**

NOTE: I can add this information to CONTRIBUTING.md. I haven't done it yet because I want to see if you're okay with this approach
PR Checklist

[x] Have you followed the guidelines in CONTRIBUTING.md?
[ ] Have you got 100% test coverage on new code?
[ ] Have you updated the prose documentation?
[ ] Have you updated the reference documentation?

@Goldziher are you ok with adding this?
If yes I'll add usage info to CONTRIBUTING.md and merge


Fix API gateway to follow the same function syntax that worker service expets

Please note, the sole purpose of this PR to get as minimal changes as possible into the API Gateway's Rib, and unblock dynamic-resource-allocation feature, and have the existing function calls tested with Rib to follow the new syntax.
I gave it some thoughts if I could do it in the best possible way within a day of time, before deciding to make this particular PR (which is not the best possible way).  The thoughts are tangible, but very raw documentations here mainly for myself: https://www.notion.so/golemcloud/Rib-Supporting-New-Function-Syntax-ed92a3f1b92e4dd2a768402127f9aa7f. I would like to continue with this as a separate work
More details
The only function syntax Rib tested ever was of the structure namespace:package/interface/function-name(param1, param2), or simple function-name(param1, param2).
I have made just enough changes to change all these structures in tests to follow the new syntax which is namespace:package/interface.{function-name}(param1, param2)
Summary

we will document in Rib that the only supported function calls are only of the form namespace:package/interface/function-name(param1, param2) and that syntax consistent with rest of the worker-service, cli etc.
For supporting the newer syntax properly for all possible functions with Rib, with cleaner changes, I would like it to be a separate work as mentioned above

Ticket for the proper integration: https://github.com/golemcloud/golem/issues/582


Completion thoughts

OptParser has a horrible API, but one of the great things about it - at least in theory - is its built-in support for command completion. (I say "in theory" because it looks like you have to know to install rb_optparse.bash in your profile, and then manually define each command that might use it, and there's no documentation that would tell you that, so I'm not sure anyone's ever used it.)
I took a look at optparse.rb to see how they do it; there's a lot of code there, but it's mostly around ruby/ruby@ 644f0445e86034dde399d6db8261c82cf34b8e07 and ruby/ruby@91c0ff4f7d28856645b72d09f58dbabfa5e862ad. Looks like they add two secret options, --*-completion-bash=X and --*-completion-zsh=X, where X is the phrase being tab-completed, and then rb_optparse.bash sets up bash to use that option to generate the completion file.
Kinda hackish, but doable. Have you given any thought to doing that in slop eventually?  I think you could/should go one further, and skip the shim.  Allow me to say Slop.parse :auto_complete => true, and have slop itself install the compgen/compsys completion (if it's not present).  The first time I run the script anywhere, boom - magic auto-completion.
It's a lot of work, but it'd be a killer feature ☺

I have thought about this. But I'm not sure I'm comfortable with Slop installing something even with :auto_complete => true, as it gives the end user no choice. This is definitely something I'd love to implement, it certainly needs to be done right, though. I'm rebuilding Slop in the v3 branch, so perhaps I can target this feature for that release, or at least have a play around with it before I finalize version 3.
I do agree, this would be a pretty killer feature.

Yeah, good point - my intent with :auto_complete was to give the user the choice, but obviously I was looking through a wrong-way mirror.. perhaps if the user opted in with export SLOP_AUTO_COMPLETE=true, any slop-based (or slop-wrapped!) tool would add autocompletions on first run.


Support for firebase 6.x.x

I've tested this with firebase 6.3.1 with my app, everything seems to work. Are there plans to update package.json peer dependencies?

Thanks @nodkrot! I'm working on a PR now.
We're also way behind on the firebaseui dependency. They moved to 4.x back in May. The problem is that 4.x is not backwards compatible with the Firebase 5.x SDK.
Does anyone have strong opinions against this repo dropping support for Firebase 5.x? It would let us stay up to date with firebaseui-web.

That’s great, dropping shouldn’t be a problem since people can still install current version in the future. Am I missing anything?

Good point! I'll release this as 4.0.0 since we're breaking backwards compatibility

Released 4.0.0!

Awesome, I will test it out.


Release v1.1.3

This is a draft of changelog for the v1.1.3 release.
Here you can find all related translations changes: v1.1.2...main.

⚠ Do not merge this pull request manually ⚠
You should approve this pull request instead. After approving, I will automatically update it (release date needs to be adjusted), merge, and tag a new release. You can read more about the process on forum.

Show release notes preview
v1.1.3

General changes:

Updated Flarum core translations.

Updated translations for extensions:

flarum/likes
flarum/lock
flarum/mentions
flarum/sticky
flarum/tags
fof/byobu
fof/forum-statistics-widget
fof/links
v17development/flarum-user-badges

All changes: v1.1.2...v1.1.3.

Success! Now you can announce new release on forum:
## Version [`v1.1.3`](https://github.com/flarum-lang/dutch/releases/tag/v1.1.3)

**General changes**:

* Updated Flarum core translations.

**Updated translations for extensions**:

* [`flarum/likes`](https://github.com/flarum/likes)
* [`flarum/lock`](https://github.com/flarum/lock)
* [`flarum/mentions`](https://github.com/flarum/mentions)
* [`flarum/sticky`](https://github.com/flarum/sticky)
* [`flarum/tags`](https://github.com/flarum/tags)
* [`fof/byobu`](https://github.com/FriendsOfFlarum/byobu)
* [`fof/forum-statistics-widget`](https://github.com/FriendsOfFlarum/forum-statistics-widget)
* [`fof/links`](https://github.com/FriendsOfFlarum/links)
* [`v17development/flarum-user-badges`](https://github.com/v17development/flarum-user-badges)

All changes: [v1.1.2...v1.1.3](https://github.com/flarum-lang/dutch/compare/v1.1.2...v1.1.3).

In order to update run these commands:

```console
composer update flarum-lang/dutch
php flarum cache:clear
```


javadoc deprecation warnings

With each build of the Frank!Framework the following warnings are displayed when executing the FrankDoc:
Warning:  Javadoc Warnings
Warning:  javadoc: warning - The old Doclet and Taglet APIs in the packages
Warning:  com.sun.javadoc, com.sun.tools.doclets and their implementations
Warning:  are planned to be removed in a future JDK release. These
Warning:  components have been superseded by the new APIs in jdk.javadoc.doclet.
Warning:  Users are strongly recommended to migrate to the new APIs.

Please analyze and do the needful to solve this.

When I Google on ..., I get page https://docs.oracle.com/javase/9/docs/api/jdk/javadoc/doclet/package-summary.html. The warnings are saying that from Java 9 onwards, we need to use a new Doclet API. I do not think that the new API exists for JDK 8.
I think we should implement the wrapper API for the new doclet API. Then we will have the old Java 8 implementation of the wrapper API next to the new Java 9+ implementation. When we move to Java 9+ with the Frank!Framework, we switch to using the new Doclet API.
This is quite a big task. When should we do it?

Is solved by #166


the floatingActionmenu's icon dont show

the floatingActionmenu's icon dont show

where's your code


fix is_enabled flag with ap-northeast-3

vpc_enable was being ignored in certain regions.

@opapy Oops, thanks for pointing it out. LGTM!


[KYUUBI #725] Upgrade Spark 3.0.2 to 3.0.3

Why are the changes needed?

Upgrade Spark 3.0.2 to 3.0.3
How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[ ] Run test locally before make a pull request

thanks, merged to master


role:duplicity: duba.json is not re-configured correctly

Assume you have a duba.json with just the defaults, no further host-based duplicity__ config settings. The generated config then looks like this:
...
  "backup_sources": [
    {
     	"divide": false,
        "path": "/backup"
    },
    {
     	"divide": false,
        "path": "/etc"
    },
    {
     	"divide": false,
        "path": "/home"
    },
    {
     	"divide": false,
        "path": "/opt"
    },
    {
     	"divide": false,
        "path": "/root"
    },
    {
     	"divide": false,
        "path": "/var/spool/cron"
    },
...

Configure a host-specific setting:
duplicity__host_backup_sources:
  - path: '/opt'
    divide: true

A wrong config file is generated (/opt is configured twice with contrary values):
  "backup_sources": [
    {
     	"divide": false,
        "path": "/backup"
    },
    {
     	"divide": false,
        "path": "/etc"
    },
    {
     	"divide": false,
        "path": "/home"
    },
    {
     	"divide": false,
        "path": "/opt"
    },
    {
     	"divide": false,
        "path": "/root"
    },
    {
     	"divide": false,
        "path": "/var/spool/cron"
    },
    {
     	"divide": true,
        "path": "/opt"
    }
...

Even if you change duba.json on the server and delete
    {
     	"divide": false,
        "path": "/opt"
    },

beforehand.

sadly currently a known limitation - see section in the main readme.
its not easily possible to distinguish which setting should be use using jinja2 filters - we would need a python scripts, something like debops does.
as a workaround you can manually set duplicity__role_backup_sources in the host_vars.


cmd/go: module 0400 permissions are annoying

I use go build as part of larger build systems, such as gradle, xcodeproj, and cmake. In these cases, I'm generally putting various artifacts into a predefined build directory that I don't control. I'm only allowed to write files there, and so that's where they go. So, for example, downloaded go modules go into this intermediate/temporary build structure.
When it's time for the parent build system to clean up its various temporary or intermediate directories, it of course chokes when hitting the 0400 directories. It's not very pleasant or clean (in error paths) to have to unconditionally run chmod -fR +w .../pkg/mod everytime that either go build or go get is called.
Rather, would you consider adding an option to these tools or perhaps even an environment variable that doesn't chmod anything and just uses the ordinary boring file permissions?

Probably, but that misses the point: most of the time I don't really have control over how temporary/intermediate build tree is cleaned up. A parent build system is responsible for that. Here's another example: imagine a Jenkins setup where I don't have any place to persist files in between builds and where the whole tree is supposed to be trivially clearable after builds. Again in this case, the 0400 permissions go sets are super annoying. Hence, a desire for some means of suppressing this.

This was intentional. See @rsc's comment here - https://github.com/golang/go/issues/27455#issuecomment-417997868.
There is a duplicate bug which tracks slight improvements on this https://github.com/golang/go/issues/27161. Feel free to add your suggestions there.


[Event Hubs] Expose SharedKeyCredential that allows for key rotation

We have a class for SharedKeyCredential in core-amqp which is not exposed via Event Hubs library. If a user wants to use SAS tokens they generated or use the SAS keys from the portal, there is no clear way to do it or to allow key rotation

Closing in favor of #11892


Sickbeard/sickrage issues

I'm using sickrage for my tv downloads. When using styxit/HTPC-Manager I can use the sickbeard module to make use of my sickrage setup. This works perfect. You have got a seperate sickrage module which works, but with one downside. I have added The Blacklist. Next Aired is 2015-02-01. Which is showed in the 'tv shows' tab as 'next ep'. However, the 'Next Aired' tab says 'No future/missing episodes found'. Any ideas?
What is the difference between your sickbeard module and the one from styxit? Because with the of styxit i got my sickrage setup connected, but with yours it fails.

The Next Aired on dash is showing the next episode, so that's great!
One other question. Is it right that your branche is more stable than the one of styxit? It's loading much faster when i'm using it as reverse proxy through apache2.

I wouldnt call it that. But there are some improvementents in mine

Regarding the differance, add with tv rage id in addition to tvdbid, manual postprocess and some more that I don't remeber.. I'll look into the black list thing

Well The Blacklist works fine here, its listed as it should,  both on the next aired tab in the module and in the dash. If you go to http://yourip:port/sickrage/GetNextAired is something returned there?

That's weird. If I try http://yourip:port/sickrage/GetNextAired or even http://yourip:port/sickrage/home/GetNextAired it returns me to the home screen of sickrage

Just to be clear its the ip and port to htpc-manager not sickrage!

I'm sorry, I was thinking of a sickrage api call. If I try ip:8085/htpc/sickrage/GetNextAired (htpc is my webroot) it asks to open or save GetNextAired.json

Is this via your reverse proxy? Can you try directly against Htpc manager? What briwser are you using?

Can you start htpc manager with --loglevel debug and upload the log to pastebin?

I'm on IE 11. Initially, but switching to Firefox gives the same problem. I'm trying it directly to HTPC manager (not through the proxy), but with the webroot enabled.
With the webroot disabled, I got the same. IE ask me to open or save the GetNetAired.json.
Firefox returns:
{"message": "", "data": {"later": [], "missed": [], "today": [], "soon": [{"paused": 0, "episode": 9, "network": "NBC", "airdate": "2015-02-01", "quality": "HD", "show_name": "The Blacklist", "ep_name": "Luther Braxton (1)", "tvdbid": 266189, "airs": "Sunday 9:00 PM", "weekday": 7, "season": 2, "indexerid": 266189, "ep_plot": "When the elusive Reddington is arrested and taken to a secret detention facility Liz and the task force set out to save Red before he disappears forever. Meanwhile, Red encounters Luther Braxton at the detention facility, a thief that he shares a complicated history with.", "show_status": "Continuing"}, {"paused": 0, "episode": 10, "network": "NBC", "airdate": "2015-02-05", "quality": "HD", "show_name": "The Blacklist", "ep_name": "Luther Braxton: Conclusion (2)", "tvdbid": 266189, "airs": "Thursday 9:00 PM", "weekday": 4, "season": 2, "indexerid": 266189, "ep_plot": "As chaos ensues at the Factory leaving the fate of Red and the task force unknown, FBI boss Cooper struggles to rescue his team from the detention facility. Meanwhile, it\u2019s a race against time to stop Luther Braxton from attaining confidential information.", "show_status": "Continuing"}]}, "result": "success"}

Okei if you check the same page if firefox does the the blacklist show up in the in all the tabs/dash?

No, same thing as in IE. Two next aired on my dash (the second appeared tonight). The Sickrage module shows the next epsiode under the 'Next ep' (maybe this should be Next Episode, btw? Space enough) header within the "TV Shows" tab. But under showname (Next Aired tab) it says No future/missing episodes found

The same on my mobile device (Safari browser)

Works fine here. As you can see the info is retured from the server. Can you try directly against htpc manager and delete the cache? I have no idea why this doesnt work.

I choose the Next ep since thats the one that its listed in show list inside sickrage. I wanted something familiar to the user

Sickrage is using a 'Coming Episodes' tab. Maybe, that's better?
I added 2 Broke girls. No next episodes show up, nor in tv shows tab, nor in next aired tab. However, on my dash I can see them all? (three of them, 2 blacklist, 1 '2 broke girls'). I removed the blacklist and added it again and the result is even worse. Even no 'next ep' under the tv shows tab anymore.
I will try with a clean clone of the master.

Done, no change. I can't see what's going wrong here.

I enabled the sickbeard module to work with my sickrage setup and that is working fine.

Is there any errors in the console log in the browser? Wtf is going on...

Can you try this branch? https://github.com/Hellowlol/HTPC-Manager/pull/23 i think im a retard..

Same result, unfortunately... :(

Sure your cleared your cache?

I cloned that branch in a new folder and ran it on a different port. HTPC-Manager created a new folder userdata in it. Of course, I removed cookies as well.

Ctrl f5 would be enough. Mate I don't how to fix this..

I know this would be a pita but I need a list off all your shows to I can add them to try to recreate the problem

Is this enough? Btw, thanks for taking so much time to dig into this weird shit!

Yeah, that would do.

Can you update and try again?

Yeah! It's fixed. Great job!


Unknown variant segment_arena

Describe the bug
When using shardlabs devnet with the cairo_vm env var set to rust, if my contract uses a dictionary, I run into:
Traceback (most recent call last):  File "/Users/username/cairo_venv/lib/python3.9/site-packages/starkware/starkware_utils/error_handling.py", line 266, in wrap_with_stark_exception
    yield
  File "/Users/username/cairo_venv/lib/python3.9/site-packages/starkware/starknet/business_logic/transaction/state_objects.py", line 120, in apply_concurrent_changes
    return self._apply_specific_concurrent_changes(
  File "/Users/username/cairo_venv/lib/python3.9/site-packages/starkware/starknet/business_logic/transaction/objects.py", line 1454, in _apply_specific_concurrent_changes
    call_info, remaining_gas = self.run_execute_entrypoint(
  File "/Users/username/cairo_venv/lib/python3.9/site-packages/starkware/starknet/business_logic/transaction/objects.py", line 1500, in run_execute_entrypoint
    call_info = call.execute(
  File "/Users/username/cairo_venv/lib/python3.9/site-packages/starkware/starknet/business_logic/execution/execute_entry_point.py", line 206, in execute
    call_info = self._execute(
  File "/Users/username/cairo_venv/lib/python3.9/site-packages/starknet_devnet/cairo_rs_py_patch.py", line 186, in cairo_rs_py_execute
    runner = CairoRunner(  # pylint: disable=no-member
ValueError: unknown variant segment_arena, expected one of output, range_check, pedersen, ecdsa, keccak, bitwise, ec_op, poseidon at line 1 column 76

To Reproduce
This typically hapenned when I used this snippets of code:
  use nullable::{match_nullable, FromNullableResult};

let after_hook_data = data.get(12);
let span = match match_nullable(after_hook_data) {
    FromNullableResult::Null(()) => {},
    FromNullableResult::NotNull(val) => {
       // Do stuff
    },
};

  let mut responses: Felt252Dict<Nullable<Span<felt252>>> = Default::default();

  loop {
      match hooks.pop_front() {
          Option::Some(something) => {
              let data = get_data()
              responses
                  .insert(
                      12, nullable_from_box(BoxTrait::new(data))
                  );
          },
          Option::None => {
              break;
          },
      };
  };
  responses

Expected behavior
It shouldn't crash
What version/commit are you on?
using:
cairo-lang==0.12.2
starknet-devnet==0.6.1
cairo-rs-py==0.2.0
cairo-compiler==2.2.0

It could be shardlabs devnet that uses an old version of the vm, I forwarded them this message

Hi @gaetbout !
Do you have any update about this?

Hey @pefontana
Apparently it is due to shardlabs using an old version of the vm 🙁
Had some talk and their main focus is their devnet in rust, so they won't be updating their python devnet 😞


Fix HTMLIframeElement remove/removeNode issue in removeResizeListener…

Fixes https://github.com/nnnick/Chart.js/issues/1537

thanks @lpaluszk

Much better would be to use a polyfill for this: http://stackoverflow.com/questions/32949934/object-htmldivelement-has-no-method-remove


Support for websockets

Required for Azure Event Hub SDK as documented in issue #67.

sorry for this very late update, but we have already got websocket supported for uamqp and azure-eventhub .
for azure-eventhub library, set transport_type to azure.eventhub.TransportType.AmqpOverWebsocket to enable websocket connection during client creation: TransportType


Provide viewBox for svg wrapper element in stack mode

When using stack mode, the most outer svg tag in the result file does not contain a viewBox attribute.
This causes an undesired rendering in Safari (8.0.5), Chrome (42.0.2311.90) and Firefox (37.0.1) (I didn't test IE), when the svg file is included via fragment identifiers in an object tag:
<object data="/path/to/sprite.stack.svg#terminal" type="image/svg+xml"></object>

And here a screenshot of Safari:

See that <object> does not fill whole <div> by width? Even style="width: 100% on <object>-Tag wouldn't change that.
The solution I've found out till now, is to include the viewBox attribute in the most outer svg of the file in the form:
<?xml ... ?><svg xmlns="..." xmlns:xlink:="..." viewBox="0 0 maxWidth maxHeight">...</svg>

maxWidth is hereby the maximal width of all included svgs. Same applies for maxHeight.
Again a screenshot in Safari after applying this rule:

I build a quick fix for that, modifying: lib/svg-sprite/mode/stack.js. Adding the following lines to the _buildSVG function will solve that problem:
    svg = new SVGSprite(...

    var maxWidth = 0, maxHeight=0;
    _.each(this.data.shapes, function(obj){
        if (obj.width.outer > maxWidth) maxWidth = obj.width.outer;
        if (obj.height.outer > maxHeight) maxHeight = obj.height.outer;
    });
    svg.rootAttributes.viewBox = "0 0 " + maxWidth + " " + maxHeight;

    return svg.toFile(...

Attention:
This is a quick fix. I didn't analyze the code base, so I don't know if this is the right place to put this or if there exists already an option for this. That's also the reason why I didn't provide a pull request.
However I can provide one as soon as I get feedback, if this is the right place and this fix is needed.

Hey @rqelibari,
thanks for reporting this. To be honest, I probably never really checked using the stack sprite in conjunction with an <object> element. The only reason for skipping the viewBox attribute was to save some bytes — I can't think of any downsides. I'll incorporate it as you suggested. :)
Cheers,
Joschi


KML doesn't load on iOS

Hi,
I'm having trouble with loading KML files on iOS. That's works perfectly on android, but on iOS, if i load only one KML file, there is the "Please wait...' loader appearing and disappearing but no KML showed on the map, and when i try to load more than one KML file, there is an infinite loader.
I tried to create a new project, but i got the same problem.
Here is my log:
2015-06-15 16:27:49.264 preventionIncendieIos[333:26027] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/9078B2AC-756E-4467-A978-C9F585F91634/Library/Cookies/Cookies.binarycookies
2015-06-15 16:27:49.406 preventionIncendieIos[333:26027] Apache Cordova native platform version 3.8.0 is starting.
2015-06-15 16:27:49.409 preventionIncendieIos[333:26027] Multi-tasking -> Device: YES, App: YES
2015-06-15 16:27:49.426 preventionIncendieIos[333:26027] Unlimited access to network resources
2015-06-15 16:27:49.685 preventionIncendieIos[333:26027] [CDVTimer][keyboard] 0.513017ms
2015-06-15 16:27:49.761 preventionIncendieIos[333:26027] [CDVTimer][file] 74.562967ms
2015-06-15 16:27:49.762 preventionIncendieIos[333:26027] [CDVTimer][TotalPluginStartup] 77.108026ms
2015-06-15 16:27:50.490 preventionIncendieIos[333:26027] Resetting plugins due to page load.
2015-06-15 16:27:51.987 preventionIncendieIos[333:26027] Finished load of: file:///private/var/mobile/Containers/Bundle/Application/A1A2DE01-6683-49E2-A5D7-486D2AE7D019/preventionIncendieIos.app/www/index.html#/tab/dash
2015-06-15 16:27:53.231 preventionIncendieIos[333:26027] This app uses phonegap-googlemaps-plugin version 1.2.5
2015-06-15 16:27:55.211 preventionIncendieIos[333:26027] THREAD WARNING: ['GoogleMaps'] took '24.461182' ms. Plugin should use a background thread.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/22118830-kml-doesn-t-load-on-ios?utm_campaign=plugin&utm_content=tracker%2F637500&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F637500&utm_medium=issues&utm_source=github).

I suggest you should provide your KML file for other people to help you.

Here is one of my KML files (but this is working as well on Android):

massif_2A_12

8.897764375218925,42.060555901532638 8.88665908902378,42.061445291305411 8.88643317738223,42.063597771234875 8.887858388917488,42.06636974180779 8.889703038922219,42.067691302411895 8.891023550321314,42.068147583038119 8.895466945606763,42.071280212212812 8.896569528955439,42.072327355082898 8.899243957650482,42.072064990571363 8.900959499967296,42.071543429715454 8.90204069264021,42.072382897904781 8.903722446614708,42.07282010504256 8.904934670624886,42.073535964462813 8.906660407700596,42.073807253982913 8.907698875530612,42.073538717856451 8.909735429406199,42.074000071621796 8.911242985501485,42.074871170938927 8.912519659345728,42.074796869449145 8.9138627593767,42.074774069909289 8.91486710261519,42.074869839569395 8.915487712778395,42.075367020419257 8.916625987874914,42.075355981526172 8.918911932806847,42.075540413194489 8.920891561954194,42.076744831793285 8.923697914770903,42.077856084241759 8.926118110423184,42.080624826249377 8.928486300945293,42.081598779281826 8.929317679760439,42.082715724261362 8.9312363785446,42.083445067319559 8.933765087456028,42.085845885186629 8.935911662068479,42.08609159953108 8.937757312282949,42.085298643043018 8.938854572983606,42.08560575368903 8.939620424685238,42.086194413516068 8.94122440735643,42.086580263187798 8.942181586145354,42.087636301729979 8.943702868568392,42.087917984455132 8.944477821449656,42.089191645468993 8.946298729360994,42.089564876934077 8.948780624957614,42.089530328894831 8.952119878142719,42.091558128041576 8.954439289871278,42.092055938468086 8.956503714025706,42.092786277274456 8.957064347897775,42.095597810197681 8.956563224480965,42.096837237296228 8.956982841001594,42.098193878518565 8.955913736309439,42.100847992454007 8.957475412777951,42.100812069016882 8.95917430308185,42.100127253092218 8.96010727591031,42.100234807731887 8.961957483382744,42.099495658321068 8.966440696027707,42.100979271499057 8.970654480329122,42.102531900007456 8.971914242370923,42.102405283026584 8.973819590136229,42.102881213144798 8.975226413271441,42.104171611951244 8.976175643312368,42.104433405379105 8.977492247368186,42.106109295689315 8.977889172051794,42.108515183428516 8.979487046688439,42.1095328900319 8.98049730185507,42.111063155483087 8.982490552222327,42.111688316709532 8.986913707110642,42.113969155540381 8.992533435616625,42.113424567128824 8.996564587841592,42.113930905794994 8.99811501887282,42.113796024837235 9.000014659054266,42.112945373586321 9.002102828495911,42.11319329825853 9.003357583029564,42.112903278140898 9.005935583998921,42.104309111464381 9.010760712596724,42.100379287775574 9.006901103191728,42.094463627333234 9.006995434667305,42.087756716664003 8.997221612692821,42.083115769790645 8.997353288020749,42.075350689027438 8.991603159320004,42.072425431557086 8.98011969697102,42.075739096508421 8.974569894534422,42.074824182432231 8.966732024406959,42.07358999062626 8.963741194465696,42.067929876258084 8.954933726892783,42.067852674740855 8.945271907829749,42.071201926360118 8.939238088889978,42.070990830941774 8.933564686413064,42.066316002924758 8.924608119095494,42.065143581347563 8.919803772601089,42.064859750950951 8.912737770115497,42.058295958588815 8.901610165509142,42.059197043524456 8.897764375218925,42.060555901532638

I too have the same problem . Any news ?

Do you load from remote? Or cdv / www / files ?

I have KML file in local project folder.

I still have this problem, and i load from the local project folder as for android version. I also tried to load from distant url, didn't work too. Any help could be appreciated.

Hi, I have the same problem (I load from local folder), did you find a solution? Thanks in advance.


Get-MsalToken shows no output in PowerShell ISE

MSAL.PS\Get-MsalToken -ClientId 'd1ddf0e4-d672-4dae-b554-9d5bdfd93547' -DeviceCode gives no output in PowerShell ISE terminal, but it does in regular Windows PowerShell 5.1 and 7.1 from MS Store. Is it a known issue/ intended?
README does not mention this, and I found no GitHub issues on the subject.
Running Windows 10 21H1 (19043.1165) and MSAL.PS v<IP_ADDRESS>.
Screenshots
PowerShell ISE

PowerShell 5.1 terminal

PowerShell 7.1 from MS Store

I get the same issue running Windows 11 21H2 and MSAL.PS v<IP_ADDRESS>

getting the same results when connecting to the same clientid.
DEBUG: Using Application with ClientId [d1ddf0e4-d672-4dae-b554-9d5bdfd93547] and RedirectUri [https://login.microsoftonline.com/common/oauth2/nativeclient] from cache.
DEBUG: Aquiring Token for Application with ClientId [d1ddf0e4-d672-4dae-b554-9d5bdfd93547]
it gets stuck on acquiring token and then the above after CTRL+C.
DEBUG: Canceling Token Acquisition for Application with ClientId [d1ddf0e4-d672-4dae-b554-9d5bdfd93547]
works fine on a regular PS console


inotify not available on Mac OS

Collecting pyinotify==0.9.6 (from putio-automator)
  Using cached pyinotify-0.9.6.tar.gz
    Complete output from command python setup.py egg_info:
    inotify is not available on macosx-10.12-x86_64

It wouldn't be as much of a problem, except that the app documentation assumes you'll only use the Docker container via the included commands.

Sorry for the terribly late response, do you know of any alternative python packages that would work with MacOS in the same manner?

this should be resolved in #34


refactor: better error handling for scoring, update logs

:tada: This PR is included in version 1.4.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


No such image: gaiadocker/iproute2

When you try to do for example:
pumba --debug netem --duration 2m --tc-image gaiadocker/iproute2 delay --time 10000 re2:^web
you will get 'Error: No such image: gaiadocker/iproute2' until you will do 'docker pull gaiadocker/iproute2'.
From local run it's ok. But if run it on Jenkins or inside docker (brand new OS\container\etc.) you should run 'docker pull gaiadocker/iproute2' before test run.
Can you provide docker pull if use '--tc-image gaiadocker/iproute2'  ?

OK, I see, the issue.
Currently, you need to have any tc image (where tc is an entry point) near to pumba.
I can change pumba to pull image, but it won't work with private images (or will need to add credentials too).
Anyway, will try to do something soon. Meanwhile "preload" image on Jenkins server

Yes, i do docker pull before run, so this isn't big problem. But as a enhancement will be good.


[Enhancement] Long press on the games scroll button: add a behavior

Good morning,
Current situation: unlike the system list (systemlist), a long press (joystick) in the games list (gamelist) scrolls the games but also makes all the artwork disappear from the screen (first part of the video 0:00 to 0:08). Moreover, if an animation is planned, it is not launched once the joystick button is released. Sometimes it also causes a bug two game artworks that overlap if it is not provided in the theme.
WISH for ES: The long press on the games scroll button (up/down in the video) scrolls the artwork and video at the same time as the games (video from 0:08) main wish.
The secondary wish that accompanies this wish, to be able to activate/deactivate it from the ES menu or better, to be able to configure the behavior of the long press on the game scroll button according to the artwork (static/dynamic) from the theme .
Current workaround to achieve this: Use mouse auto-scroll button hotkey (scroll wheel pushed right or left). When the button stops being pressed, the animations are played correctly unlike the current situation. Why is this solution not enough? It constrains the use of a shortcut on the mouse: this shortcut is not available on all mice (manual configuration) and this shortcut cannot be used in a standard way from ES on a pad (via antmicro).
Advantages: The workaround avoids the bug of animations (storyboard) which do not start when stopping the long press on the pad (game scroll button) / Allows more aesthetic game scrolling for many existing themes /
Video of 18 seconds, example taken on the Carbon theme.
https://www.youtube.com/watch?v=dwj-QF61MQw

this option ?


Gun: streaming response body breaks with Tesla.Middleware.Timeout

The Timeout middleware breaks the ability to read the stream and an error is thrown due to no case clause matching
** (CaseClauseError) no case clause matching: {:error, :recv_chunk_timeout}
    (tesla 1.11.0) lib/tesla/adapter/gun.ex:493: anonymous fn/2 in Tesla.Adapter.Gun.format_response/6
    (elixir 1.16.3) lib/stream.ex:1626: Stream.do_resource/5
    (elixir 1.16.3) lib/enum.ex:1560: Enum.reduce_into_protocol/3
    (elixir 1.16.3) lib/enum.ex:1544: Enum.into_protocol/2
    iex:4: (file)

Observed with Tesla 1.11.0

Hey @feld do you have a code snippet I could use to replicate this? I am gonna give it a try


successfully added FAQ page

#1538
https://github.com/user-attachments/assets/1be71be9-74d8-4d92-b0e4-6b98e49454aa
Welcome to the FAQ page for the Master Web Development repository! Here, you’ll find answers to the most common questions about our collection of frontend projects designed to elevate your skills as a developer. Whether you’re curious about the technologies we cover, the types of projects available, or how to get the most out of this resource, our FAQ section is here to provide clarity.
Explore topics such as HTML, CSS, and JavaScript. This page aims to support your learning journey, ensuring you have all the information you need to successfully navigate and utilize the projects within the repository. If you have any further questions, feel free to reach out!

@iamrahulmahato Could you please suggest the level that best reflects my contributions to the project?

fix #1531


Add Simulation for CyberPi MBot 2

Add simulation feature for MBot2 to the lab.

We would like to have it but the Open Roberta team can't do it


Potential Breaking Change in b4deda0 or recent?

Working on a project that uses GRPC streaming to send data between services, and we're finding that after this last week or so, if we do a full dep ensure -update for our repos,  marshal and unmarshal is partially working.
Here's the lockfile entry for the commit we'd been on previously:
[[projects]]
  name = "github.com/golang/protobuf"
  packages = [
    "proto",
    "ptypes",
    "ptypes/any",
    "ptypes/duration",
    "ptypes/timestamp"
  ]
  revision = "e09c5db296004fbe3f74490e84dcd62c3c5ddb1b"
  version = "v1.1.0"

We're using this command to generate the protos:
protoc --go_out=plugins=grpc,import_path=protos:. *.proto

The behaviour is:

String()'ing the deserialized message shows all fields present and accounted for in the buffer.
Examining the individual fields reveals they're all at their blank/zero values.

Simply reverting back from master/head b4deda0 down to e09c5db296004fbe3f74490e84dcd62c3c5ddb1b causes the issue to disappear.

Can you give more details about what exactly is shown to be different? It's hard to debug without specific reproductions.

Closing as stale.


Cast limit to int before slicing

Hi, it looks like you've sent a pull request without filing a Trac ticket. Please file a ticket to suggest changes. Pull requests should be send to the master branch and a test is also required. Thanks.

There is no problem in master. Only branch 1.8.x is vulnerable.

I have created a ticket for this issue:
https://code.djangoproject.com/ticket/27405#ticket


[Feature] Encourage version control in SaaS Connectivity docs

Per this forum post: https://developer.sailpoint.com/discuss/t/saas-connector-recovery/7400/2
Since connector source code is not recoverable from IDN, we need to update the connector docs to make this fact known and to encourage users to use version control or regular backups to avoid data loss.

I added an advisory note recommending that users use version control or backups to the saas connectivity docs: https://developer.sailpoint.com/idn/docs/saas-connectivity/.


FEVER user agent

Hi,
i found an issue about this UA:
Mozilla/5.0 (Linux; Android 5.1; FEVER Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.105 Mobile Safari/537.36
I'm not sure this is a crawler. I think this is a valida UA provided by this company: wikomobile.com.
You can read something here: http://www.tera-wurfl.com/explore/?action=wurfl_id&id=wiko_fever_ver1
What do you think?

Good catch, it is indeed a false positive.
I shall fix later this evening...

Fixed. Thanks for reporting!


Issue6 1

Ⅰ. Describe what this PR did
TestDetachVolume
Ⅱ. Does this pull request fix one issue?

fix #1761
Ⅲ. Describe how you did it
I add some code for testing method Core.DetachVolume
I make two test cases in this issue
case 1 is for testing condition that detach volume not exists or not attached
case 2 is for testing condition that detach an attached volume
Ⅳ. Describe how to verify it
the run Test cases an it can pass
Ⅴ. Special notes for reviews
In my work, I found that the parameter string[] labels is never used in the code, I suspect that is a bug

#1824 which has been merged solves the same problem with this PR, so close it.
Thanks for your work !


Publishing a kata sometimes returns an uninitialized page

A fully initialized kata editor page should be this:

However, after re-publishing sometimes an uninitialized page is returned:

Performing a diff on the html page returned by both occasions shows these differences:

Language versions are not hidden, so all of them are shown (from 20041219 to 2.4/ES3)
Description is not rendered
All 5 editors (preloaded, initial code, example tests, actual tests, author solution) is not initialized with content, and text-editor-container class is missing

There's also this error from the console:

App.controller.options has reinit = true, so this probably means that something called the init to fail. Indeed when I run App.controller.init() again the same error occurs, with a much simpler stack trace:

Fixed when #2056 was closed.


Add more categories of unsupported features.

Fixes #11815
For non-generic missing features that are errors I've prefixed them with "error."

/botio unittest

Thank you!


feat: Migrate to async traits for EthStorage

Note that in the file src/eth/executor.rs in the functions EthExecutor::transact and EthExecutor::call, I aquire the evm_lock, do nothing with it, and then create a new Revm object and pass that to spawn_blocking. There are two ways that I thought of to circumvent this, but I'd like further discussion before implementing either of them.

Run the EVM in a dedicated thread (instead of spawning a thread for each call) with some form of communication, maybe a channel or queue.
Require Clone for EthStorage and Evm. Then I could aquire the lock and clone the underlying struct. However implementing clone for dyn traits is not trivial, to solve this there is a popular crate that includes a macro for it (https://github.com/dtolnay/dyn-clone).

Are either of these approaches desirable at this time?

@carneiro-cw
The EVM approach is desirable, but I am already working on it.
For this PR what you did is enough.
The final approach will use mpmc channels so we can have parallel execution if desirable.


[WIP] Finishing .NET Parser after .NET Core merge and monorepo

Summary
This PR makes the last changes to finish the work on .NET Core support for the .NET parser.

Details
Most stuff is about:

for releasing/creating NuGet packages.
finalizing build configuration for AppVeyor & Travis => this needs still some work, thats the reason why the PR is work in progress.

Motivation and Context
Finish the work that was started in https://github.com/cucumber/gherkin/pull/215

How Has This Been Tested?
By the Unit Tests

Screenshots (if appropriate):
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue).
[x] New feature (non-breaking change which adds functionality).
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

[ ] I've added tests for my code.
[x] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

@aslakhellesoy Is there a reason why no builds were triggered for this PR?

I'm sure there is a reason, but I don't know what it is.
All PRs should trigger a build. I need to look into it.

Hey @SabotageAndi I just enabled Travis builds for PR updates, which is off by default. If you push another commit, the build should run.
However, the build won't actually build and run Gherkin.NET yet, see #177. I'll have to check it manually, but that's OK for now.

@aslakhellesoy What's about the appveyor builds? I am more interested in them, because they build on Windows where we can compile for .NET 4.5 and .NET Core.

Appveyor builds have not been set up for the monorepo yet. Fancy sending a PR for that?

@aslakhellesoy as there is now an appveyor build (https://ci.appveyor.com/project/aslakhellesoy/gherkin), could you enable it for PRs?

With .NET Core 2.0 release today, any chance we can get this done soon?

Hi @SabotageAndi,
Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾
In return for this generous offer we hope you will:

✅ Continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
ℹ Don't feel obliged to help, just do what you can if you have the time and the energy.
🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

Ah - the commitbit bot is working :-) (yes, I know this isn't your first contribution - it only looks if you're already in the committers team)
@SabotageAndi I merged this to master and pushed to the subrepo, but the Appveyor build is failing. Any idea?

Looks like AppVeyor already updated to .NET Core 2.0. The PR was made when 1.1 was the latest.
I will have a look and send a new PR with fixes.


Add several API hooks to emulate through couple of Rust samples.

CreateSemaphoreW()
SetThreadStackGuarantee()
SetThreadDescription()
InitOnceBeginInitialize()
_errno()
fputc()
signal()

thanks!
Once the CLA is signed I'd be happy to merge these updates.

CLA signed, thank you.


[BUG] Flaky tests due to GLU not being installed

pyribs version: 0.4.0
Python version: 3.7
Operating System: GitHub Actions Ubuntu

Description

Looks like we are having some GLU errors in tutorial tests when pyglet tries to render things.
https://stackoverflow.com/questions/52885954/pyglet-fails-to-load-glu-library may provide a solution.
Steps to Reproduce

This happens occasionally in CI tests for the tutorials.

Have not seen this error for a while now. Closing issue.


The description of returned tensor's size in ps_roi_pool.py and ps_roi_align.py are wrong

📚 Documentation

The size of  returned tensor should be
[K, C/(output_size[0]*output_size[1]), output_sizep[0], output_size[1]]
in
https://github.com/pytorch/vision/blob/master/torchvision/ops/ps_roi_align.py#L42
and
https://github.com/pytorch/vision/blob/master/torchvision/ops/ps_roi_pool.py#L36
This can be verified from
https://github.com/pytorch/vision/blob/master/test/test_ops.py#L186
and
https://github.com/pytorch/vision/blob/master/test/test_ops.py#L390

@chengjuzhou Good spot, thanks for flagging it!
Would you like to send us a PR that fixes this?

Fixed in https://github.com/pytorch/vision/pull/3849, thanks @chengjuzhou !


drop rtracklayer dependency

Only the liftover function is used from that package but it has massive  sub-dependencies that are error-prone to install and drive unreasonable install time of this package. The liftover can be re-implemented as one of functions here or in helpers

Upon closer examination it turns out that the format of chain files is not consistent between different files, and this will require the Granges objects anyways, so re-implementing this is not worth time investment. Will leave it as is for now


fix(@angular/build): issue warning when auto adding @angular/localize/init

This commit introduces a warning for when the application builders automatically add the @angular/localize/init polyfill. The current approach has a drawback: the localize polyfill will always be included if it is found in a monorepo, even if an application does not use i18n.
To address this, we will issue a warning to inform users about this behavior and encourage them to explicitly add the polyfill to their polyfills configuration.
Additionally, this commit fixes an issue where the polyfill was not removed when using the build-time Angular i18n.

The changes were merged into the following branches: main, 18.0.x


GITHUB_WORKSPACE environment variable unset by msvc-dev-cmd?

I use this var to switch between cloned repositories in my action. Can this be copied across?
Thanks

Same problem


Debug Apollo 6 in vs code

System information

**OS Platform and Distribution Linux Ubuntu 18.04
**Apollo installed from source:
**Apollo version 6.0

Hi, I would like to debug apollo-6 in VS code IDE. There is no howto document in the repo as well
I could do this in apollo-3.5 and there were launch and task.json files in there, but I dont see those nor bazel-bin and other directories these older .json files refer to. If there is a way to debug in vs code, please also let me know where are the relevant .json files as well.
thank you

I think the 'task.json' and 'launch.json' are same as which in apollo-3.5.

I tried with those files, but it is throwing an error message. For ex : bazel-bin folder is not visible in apollo-6 and hence the launch complains and crashes ( attached is the snapshot

seems not same as in apollo 6.0
with root use, in /apollo/bazel-bin folder, i can run
gdbtui mainboard -d /apollo/modules/planning/dag/planning.dag
to debug
launch.json maybe use the same configure, i have not tried

I am not sure how to access /apollo/bazel-bin folder in apollo-6.0. I switched to root, but didnt see bazel-bin
Also, launch.json in vs code is not accepting .dag file.

is build already？apollo.sh build or build_dbg

in apollo 6.0 only build_gpu works correctly. Other builds wouldn't let u debug

is build already？apollo.sh build or build_dbg

I have built it successfully with ./apollo.sh build_gpu

in apollo 6.0 only build_gpu works correctly. Other builds wouldn't let u debug

I will try this again. Would such build have bazel-bin folder? Should I make any changes to .json files for debugging at all?

in apollo 6.0 only build_gpu works correctly. Other builds wouldn't let u debug

I will try this again. Would such build have bazel-bin folder? Should I make any changes to .json files for debugging at all?

UPDATE : with build_gpu, i dont see bazel-bin directory either

emmmm thx for correct ，after build_gpu , bazel-bin directory is exist in my pc

Well, I built it with build_gpu option, but I dont see the file structure as in your snapshot. This is what I see. Is this correct?

and this is the error message I get if I use the mainboard binary from this directory

I tried with those files, but it is throwing an error message. For ex : bazel-bin folder is not visible in apollo-6 and hence the launch complains and crashes ( attached is the snapshot

You can try that the vscode debug started up in apollo development container.

I am building within apollo docker mode and using .vscode json files, but that is not working
should I build with build_dbg option?

@jpcloud1577 ,HI,Do you meet gdb question:
warning: /apollo/modules/planning/dag/planning.dag is not a directory.
```.
like above.Thank you!!!

I have not yet been able to see bazel-bin folder with all possible builds and apollo versions. I am guessing if this is to do with access privileges on my ubuntu set up. I am logged in as a super user though. Is there anything else that could be preventing me from seeing this folder and hence my issues in debugging?

please let me know the solution to this issue

please let me know the solution to this issue

hey ，i just try install vs-code in the docker environment.
then debug mainboard easily, mayle can help you.

hey ，i just try install vs-code in the docker environment.
then debug mainboard easily, mayle can help you.

@pickteemo, thank you.
Although I am now able to see bazel-bin,  the debug is still not working. Can you please paste the contents of your launch.json and tasks.json files? Also, please let me know the steps you took to debug mainboard

@pickteemo, thank you.
Although I am now able to see bazel-bin,  the debug is still not working. Can you please paste the contents of your launch.json and tasks.json files? Also, please let me know the steps you took to debug mainboard

@jpcloud1577 yep, i try to debug mainboard, and launch.json like this:
"program": "/apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/execroot/apollo/bazel-out/k8-dbg/bin/cyber/mainboard",
"args": ["-d","/apollo/modules/planning/dag/planning.dag","-p","planning","-s","CYBER_DEFAULT"],

@jpcloud1577 yep, i try to debug mainboard, and launch.json like this:
"program": "/apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/execroot/apollo/bazel-out/k8-dbg/bin/cyber/mainboard",
"args": ["-d","/apollo/modules/planning/dag/planning.dag","-p","planning","-s","CYBER_DEFAULT"],

@pickteemo, I am now able to launch mainboard ( in my case, its under /bazel-bin/cyber/mainboard). For launch.json, I am using these for program and args ( as I intend to debug camera driver)
"program": "${workspaceRoot}/bazel-bin/cyber/mainboard",
"args": ["-d","/apollo/modules/drivers/camera/dag/camera.dag","-p","camera","-s","CYBER_DEFAULT"],
I am able to run the debug on planning and control modules successfully. Not sure what are the other modules I can run in apollo similarly though.
However, I am not able to debug as I am not sure what module name should be used for start_gdb_server.sh file under preLaunchTask of launch.json file. I am also unsure if its appropriate to use the argument for -p as  'camera'  in this file. Can you please let me know. Also, please share your lauch.json and tasks.json files. For modules

@pickteemo, I am now able to launch mainboard ( in my case, its under /bazel-bin/cyber/mainboard). For launch.json, I am using these for program and args ( as I intend to debug camera driver)
"program": "${workspaceRoot}/bazel-bin/cyber/mainboard",
"args": ["-d","/apollo/modules/drivers/camera/dag/camera.dag","-p","camera","-s","CYBER_DEFAULT"],
I am able to run the debug on planning and control modules successfully. Not sure what are the other modules I can run in apollo similarly though.
However, I am not able to debug as I am not sure what module name should be used for start_gdb_server.sh file under preLaunchTask of launch.json file. I am also unsure if its appropriate to use the argument for -p as  'camera'  in this file. Can you please let me know. Also, please share your lauch.json and tasks.json files. For modules

😅😅congratulations，
if debug in docker environment，there's no need start gdb_server and configure preLaunchTask.

😅😅congratulations，
if debug in docker environment，there's no need start gdb_server and configure preLaunchTask.

congratulations，
if debug in docker environment，there's no need start gdb_server and configure preLaunchTask.

hi,can you show the detail of how to debug planning module? still not work ....need help...


Add commands for removing local branches

Second command comes in handy especially when you pull branches for doing QA/CR but you don't merge/delete branches.

Thanks for this.


using jax.tree_util.Partial or lambda function triggers compilation

When a new function is created with Partial or lambda, once the function is called compilation happens again. For example:
from jax.tree_util import Partial

@jax.jit
def some_function(x,parameter):
    return x+parameter

def test_compilation():
    some_function(1,1) #compiles
    patial_function = Partial(some_function, parameter=1)
    patial_function(1) #compiles again
    patial_function(1)
    return

And then profiling it %lprun -f test_compilation  test_compilation() I get that the first call of partial_function takes longer than the second.
Line #      Hits         Time  Per Hit   % Time  Line Contents
==============================================================
     7                                           def test_compilation():
     8         1   24826093.0 24826093.0     53.7      some_function(1,1) #compiles
     9         1       8352.0   8352.0      0.0      patial_function = Partial(some_function, parameter=1)
    10         1   21135745.0 21135745.0     45.7      patial_function(1) #compiles again
    11         1     110175.0 110175.0      0.2      patial_function(1)
    12         1        158.0    158.0      0.0      return

Is there a workaround to this? Lambda functions seem not to work either. My understanding that partial_function is a new function and therefore it's compiled again, but conceptually some_function(1,1) is equivalent to Partial(some_function, parameter=1)(1), so I don't see a reason to compile again.
I'm asking this because I'm working with Partial functions inside a loop, which triggers compilation in every iteration.

This is not related to Partial, but rather related to calling the function with different signatures. For example:
In [1]: import jax
   ...: from jax.tree_util import Partial
   ...:
   ...: @jax.jit
   ...: def some_function(x,parameter):
   ...:     print('compiling')
   ...:     return x+parameter
   ...:

In [2]: some_function(1, 1)  # compiles: this signature has not yet been seen
compiling
Out[2]: Array(2, dtype=int32, weak_type=True)

In [3]: some_function(1, 1)  # does not compile: this signature has been seen (In [2])
Out[3]: Array(2, dtype=int32, weak_type=True)

In [4]: some_function(1, parameter=1)  # compiles: this signature has not been seen
compiling
Out[4]: Array(2, dtype=int32, weak_type=True)

In [5]: some_function(1, parameter=1)  # does not compile: this signature has been seen (In [4])
Out[5]: Array(2, dtype=int32, weak_type=True)

In [7]: Partial(some_function, parameter=1)(1)  # does not compile: this signature has been seen (In [4])
Out[7]: Array(2, dtype=int32, weak_type=True)

Now you could imagine a world in which JAX understands that args=(1, 1), kwargs={} is equivalent to args=(1,), kwargs={'parameter':1} for the particular function being called, but that would require a level of introspection into python's calling machinery that might be too expensive to use at dispatch time for JIT-compiled functions.
Does that make sense?

Excellent. I would not have thought that different signatures trigger compilation. Thank's a lot!


(#10) Remove config package dependency

Remove the config package dependency.
There is no hurry to merge this or create a new version of the package.
Closes #10

@pauby your changes have been merged, thanks for your contribution 👍

@pauby your changes have been merged, thanks for your contribution 👍


Unexpected infer result when using enum to union literal keys

Bug Report

🔎 Search Terms

enum as key, enum union to other keys
🕗 Version & Regression Information

This is the behavior in every version I tried

⏯ Playground Link

Playground link with relevant code
💻 Code

enum EKeyA {
  'a','b', 'c','d'
}
export declare type IActionKey = EKeyA | 'extraA'
export declare type IMenuItem<K extends IActionKey> = {kind: 'item', key: K}

export declare type IMenu<Keys extends IActionKey> = (IMenuItem<Keys>)[]

export function createMenu<Keys extends IActionKey>(items: IMenu<Keys>): IMenu<Keys>{
    return items
}

export function createMenuItem<Key extends IActionKey>(key: Key ): IMenuItem<Key> {
  return {
    kind: 'item',
    key: key
  }
}

const ItemA = createMenuItem(EKeyA.a)
const ItemB = createMenuItem(EKeyA.b)
const ItemExtra = createMenuItem('extraA')

const menu1 = createMenu([ItemA, ItemB,])
const menu2 = createMenu([ItemA, ItemB, ItemExtra])

🙁 Actual behavior

ts infer that menu2's type is IMenu<EKeyA.a>
🙂 Expected behavior
ts infer that menu2's type is IMenu<EKeyA.a | EKeyA.b | 'extraA'>

Alternative
replace enum to literal solve this problem but losing convinient in refencing and future refactoring.
// replace enum to literal
export declare type IActionKey = 'a' | 'b' | 'extraA'
export declare type IMenuItem<K extends IActionKey> = {kind: 'item', key: K}

export declare type IMenu<Keys extends IActionKey> = (IMenuItem<Keys>)[]

export function createMenu<Keys extends IActionKey>(items: IMenu<Keys>): IMenu<Keys>{
    return items
}

export function createMenuItem<Key extends IActionKey>(key: Key ): IMenuItem<Key> {
  return {
    kind: 'item',
    key: key
  }
}

const ItemA = createMenuItem('a')
const ItemB = createMenuItem('b')
const ItemExtra = createMenuItem('extraA')

const menu1 = createMenu([ItemA, ItemB,])
const menu2 = createMenu([ItemA, ItemB, ItemExtra])

It's intentional to not always resolve to a union when multiple differing candidates are present, since otherwise generic inference would be unable to indicate most things that people consider to be errors. It is allowed to infer to a union when all constituents of that union have the same "base type".

Could you please give me an example that make it intentional. As a user, I really want to use enum in my case above. Otherwise, if I want to change action 'a', I should change it's usages one by one by searching them. In contrast, it only needs to use refactor feature like press F2 in vscode or shift+F6 in webstorm  to change all usage or this action.,

Could you please give me an example that make it intentional. As a user, I really want to use enum in my case above. Otherwise, if I want to change action 'a', I should change it's usages one by one by searching them. In contrast, it only needs to use refactor feature like press F2 in vscode or shift+F6 in webstorm, idm, change its definition, all usages would be changed automatically.

It's intentional to not always resolve to a union when multiple differing candidates are present, since otherwise generic inference would be unable to indicate most things that people consider to be errors. It is allowed to infer to a union when all constituents of that union have the same "base type".

@Dimitri-WEI-Lingfeng People tend to write functions like
function foo<T>(x: T, y: T) {
}

Clearly the programmer's intent here is that both x and y are the "same type", otherwise they'd use separate type parameters.  But "same type" is a very loose constraint in the presence of untagged union types; If TS were to automatically infer unions across disparate parameters then all calls of this function become legal, regardless of the types involved.

@Dimitri-WEI-Lingfeng People tend to write functions like
function foo<T>(x: T, y: T) {
    /* ... */
}

Clearly the programmer's intent here is that both x and y are the "same type", otherwise they'd use separate type parameters. But "same type" is a very loose constraint in the presence of untagged union types; If TS were to automatically infer unions across disparate parameters then all calls of this function become legal, regardless of the types involved.

@fatcerberus I understand your scenario. But the Keys I've shown is a generic paramater type of IMenu. I think it could be distinguishable. Is there any problems when ts unions the input keys when the generic a parameter?

export function createMenu<Keys extends IActionKey>(items: IMenu<Keys>): IMenu<Keys>{
  return items
}

Another question: why literal keys works but not enum?
// dont work
enum EKeyA {
  'a','b', 'c','d'
}
export declare type IActionKey = EKeyA | 'extraA'

// work
export declare type IActionKey = 'a' | 'b' | 'extraA'


Adds capability to avoid passing unseen levels to rare

Parameter 'encode_unseen_levels' can be set to False. (default True).
If so, the levels present in the training data will be stored in during the fit method call. In transform, any new levels not present in the training data will be added to the mappings_ dictionary and thus not mapped to rare.
Will do examples once someone is happy with this as a fix

thanks @TommyMatthews! Please run the pre-commit hook to hopefully autofix the linting failures for Black and Ruff.  If you use github codespaces this will all be set up automatically for you.

Looks good @TommyMatthews.  Please see above for a couple of nitpicking comments on var names and some redundant tests to remove but I think the solution implemented here is quite elegant and neat :)


Can't prevent the app from resizing

When you turn off "Resize large images before uploading", the applet will still resize the pics.

Did you remember to click the install button after changing your preferences?

Yes. Also, I run the applet with administrator privileges
Il 10 Nov 2017 02:17, "Andrew Sun"<EMAIL_ADDRESS>ha scritto:

Did you remember to click the install button after changing your
preferences?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/apsun/GoogleImageShell/issues/8#issuecomment-343345118,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATMv86VzHV8BNwH56I6MA4yuMqJjfJfQks5s06QkgaJpZM4QY0D7
.


[Direct3D11] SetTarget, allow null

Just a small one, but instead of throwing exception in SetTarget, we should unset the slot instead (as per all other resource bindings)
Thanks

Thanks


Bug/dact 929 create update page green button not appearing

JIRA: https://companieshouse.atlassian.net/jira/software/c/projects/DACT/boards/492?selectedIssue=DACT-929
Green continue button will appear when name is changed through update link

Could you address the code smell? Also coverage should be >80% if possible

Hi, @jditchburn I have updated unit tests along with addressed a bug that was not taking a web user to "Date of Change" skeleton (implemented in DACT-1197), as that was needed for DACT-1198.