feat: initial support for cache api

Add initial support for the cache api.
Notable things:

There's some size cost in monomorphization of Into<CacheKey> params, but I'm not sure that's avoidable without presenting a grosser API with a String version and a Request version
The Response params have to passed by value since they don't implement Clone. Attempting to #[derive(clone)] on Response errors with Body has already been used. It can only be used once. Use tee() first if you need to read it twice.
cache.match was renamed to cache.get to avoid conflicting with the match keyword.

I tested this a little bit, put and get are working:
use worker::*;

mod utils;

static ORIGIN: &str = "https://example.org/";

#[event(fetch)]
pub async fn main(_req: Request, _env: Env) -> Result<Response> {
    // Optionally, get more helpful error messages written to the console in the case of a panic.
    utils::set_panic_hook();

    let cache = Cache::default();

    if let Some(cached) = cache.get(ORIGIN, true).await? {
        console_log!("Got response from cache!");
        Ok(cached)
    } else {
        let response = Fetch::Url(Url::parse(ORIGIN)?).send().await?;
        cache.put(ORIGIN, response).await?;
        console_log!("Cached response!");
        Response::ok("cached response")
    }
}

I was able to get your example working, but any thoughts why this example isn't working? I'd expect to see the same timestamp in subsequent responses...
let cache = Cache::default();
let key = req.url()?.to_string();
if let Some(resp) = cache.get(&key, true).await? {
    return Ok(resp);
} else {
    let resp = Response::ok(format!("timestamp: {}", Date::now().as_millis()))?;
    cache.put(&key, &resp).await?;
    return Ok(resp);
}

Is there any way to improve the ergonomics of the API? I tried implementing the example from @nilslice, but for me that doesn't work (as stated in the initial PR) because the implemented cache api can't handle response references. I imagine that you'd want to cache the response you're about to send out, so for subsequent requests you can get it from cache. With the current implementation, you have to do some (in my opinion) awkward workarounds like cloning the content and the headers and creating new requests.
This is the example I came up with:
let cache = Cache::default();
let key = req.url()?.to_string();
if let Some(cache_response) = cache.get(&cache_key, true).await? {
    return Ok(cache_response);
} else {
    let resp = Response::ok(format!("timestamp: {}", Date::now().as_millis()))?;
    let response_content = resp.bytes().await?.clone();
    let response_headers = resp.headers().clone();

   // build response that gets saved to cache
    let cache_response = Response::from_bytes(response_content.clone())
        .unwrap()
        .with_headers(response_headers.clone());
    // save to cache
    let _ = cache.put(&req, cache_response).await;

    // build response that gets sent out to the user
    let response = Response::from_bytes(response_content.clone())
        .unwrap()
        .with_headers(response_headers.clone());

    // send response
    return Ok(response);
}

For me, if I don't do all those .clone() shenanigans I either get corruped data on the first request (the one that saves to the cache) or on subsequent request (because the cache is trashed). I did my experiments with image data, so that the responses were a few hundred KB in case that makes a difference.
But other than that, after implementing those workarounds the cache api implementation seems to work fine for me. I implemented some features using get, put and delete and so far it all looks good.

Maybe @caass has an update here?

You can actually convert into a EdgeResponse (worker_sys::Response), clone that and convert back into a worker::Response, this has the advantage of also working with streaming responses. .clone() is also what the JS docs seem to be using.
This is still very untested, it seems to work in Miniflare though:
impl ResponseExt for Response {
    fn with_header(mut self, name: &str, value: &str) -> crate::Result<Self> {
        self.headers_mut().set(name, value)?;
        Ok(self)
    }

    fn cloned(self) -> crate::Result<(Self, Self)> {
        let headers = self.headers().clone();

        let response1: worker_sys::Response = self.into();
        let response2 = response1.clone()?;

        let body1 = worker::ResponseBody::Stream(response1);
        let body2 = worker::ResponseBody::Stream(response2);

        let response1 = worker::Response::from_body(body1)?.with_headers(headers.clone());
        let response2 = worker::Response::from_body(body2)?.with_headers(headers);

        Ok((response1, response2))
    }
}

Be careful though with streaming responses, they completely ignore modifications on the worker::Request object.

Unfortunately there is bad news:
    let cache = Cache::default();
    let use_cache = req.method() == Method::Get;

    if use_cache {
        // TODO: figure out why this doesn't seem to work on workers -> cache always empty
        if let Some(cached) = cache.get(&*req, true).await? {
            log::debug!("cache hit");
            // TODO: 304 handling?
            return cached.with_header("Cf-Cache-Status", "HIT");
        }
    }

    // TODO: figure this lifetime out, the clone may not be required
    let request_for_cache = req.clone()?;

    let response = f(req, env, ctx).await?;

    if use_cache {
        let (response, response_for_cache) = response.cloned()?;

        ctx.wait_until(async move {
            log::debug!("--> caching response");
            let _ = cache.put(&request_for_cache, response_for_cache).await;
            log::debug!("<-- response cached");
        });

        bindgen::Response::persist(response.with_header("Cf-Cache-Status", "MISS")?)
    } else {
        Ok(response)
    }

This code does not seem to store anything in the cache (every response is a MISS). It makes no difference if I use waitUntil or not and it works on Miniflare.
Also the response body seems to be consumed properly, if I replace it with a dummy response I get the unnecessary clone warning:

Your worker called response.clone(), but did not read the body of both clones. This is wasteful, as it forces the system to buffer the entire response body in memory, rather than streaming it through. This may cause your worker to be unexpectedly terminated for going over the memory limit. If you only meant to copy the response headers and metadata (e.g. in order to be able to modify them), use new Response(response.body, response) instead.

I'll try not using the request as a cache key but the url instead.

Hi, what's the state on this PR at the moment? Is the person maintaining this PR still active? I may pick it up for them if they're not.

Is there anything that needs doing to help get this finished merged? Looks like the separate mangled responses issue was resolved

Closing this due to a messy git history. These changes are now in #182


Fix: Remove unused define env vars in webpack config

This should be released as a hotfix.

Changes Unknown when pulling 0c15b7a97fa9c4b6f9992805450b72b3f3f06b4f on fix/boilerplate into ** on next**.

PR updated

Changes Unknown when pulling 6a79f56ae7bfe12a051b2b78d72b8a5cc6e16887 on fix/boilerplate into ** on next**.


[Suggestion] Split pipes into its own module

If the mechanical and logistical transporters, together with the logistical sorter were splitted into a seperate module like you did with the tools, we finally had an awesome-looking and nicely-working standalone piping system in Minecraft 1.10.2! Even though it wouldn't be fully standalone, I could modify it myself to make it independent, but splitting the mod even further would also allow to have Mekanism's machines, but without the pipes, whyever one would want that. I just like mods that are split into modules, OK? And I'm sure that I am not the only one.

Are there other mods which provide the gas pipe and thermal pipe functionality? I think splitting off the pipes would give people an easy way of breaking their Mekanism without realizing how or why they did so.  Easy enough to choose not to use Mekanism pipes in favor of another mod's should you have that other mod installed.

The recipes would have to be altered to be standalone, and using vanilla materials for Mek pipes would be unreasonably cheap.  Mekanism would probably end up being a dependency anyway, so you would only be making another download and causing confusion.  Plus, Mekanism would become practically unplayable if you don't have all 5 types of pipes (especially Gas and Thermal, which are quite rare in other mods).
Mek Generators and Mek Tools are both separate add-ons partially because Mekanism doesn't really need them.  If you find Paxels or Wind Generators overpowered compared to the other mods in your pack, then you can choose to not install those mods and play Mekanism reasonably fine.

Transmitters are such an essential part of Mekanism that it doesn't make sense to split them from the core.


[Feature Request]how to show envpool games

Motivation
I want to see the gym running state
Solution
Give me a function to show game render
Alternatives
show running game or save gifs

unfortunately you cannot directly call .render() function. You need to save the original observation image (if possible) to either png/jpg format or gif format. Here is an example for atari:
https://github.com/sail-sg/envpool/blob/35f7f28e9d9fa33ee21a5f7018a34c370360d198/envpool/atari/atari_pretrain_test.py#L75-L79


training for larger deformations on public datasets

First of all, thanks a lot for making your research code publicly available. The installation is flawless and running the inference on the provided examples works fine. However, training the models for new datasets has so far yielded disappointing results. A number of PhD students in my group have e.g. attempted to run the code for whole heart MR to CT registration using the public MMWHS dataset without achieving any meaningful improvement over an initial affine alignment.

Would it be possible to check the training code for bugs or is it the case that larger deformations cannot be sufficiently estimated using LabelReg? We have spent a lot of time on trying to resolve these issues with different preprocessing and settings without success and feel it is important to get feedback from your side on how to best train on new data.
In addition there is an issue with the 'composite' option (both global and local transforms), which throws the following error:

Traceback (most recent call last):
  File "label-reg/training.py", line 35, in <module>
    image_fixed=input_fixed_image)
  File "~/label-reg/labelreg/networks.py", line 13, in build_network
    return CompositeNet(**kwargs)
  File "~/label-reg/labelreg/networks.py", line 89, in __init__
    image_moving=global_net.warp_image(),
TypeError: warp_image() missing 1 required positional argument: 'input_'

The provided inference function fails to correctly warp multi-channel inputs (as required for label images). We have written a bug-fix for this, using pytorch's grid_sample function and would be happy to provide this to the interested community.
Thanks a lot for your time.

Thanks for the feedback Mattias @mattiaspaul ,
First of all, I am very interested in generalise this to other applications! So far it "worked" with the prostate example in the publication and a brain image data set.
1 - I will make an effort to check the potential bugs. Admittedly this is not the code I use everyday (and therefore tested more) for my work, is there obvious thing you noticed could be causing or hinting bugs? Otherwise, can you give some more details? When you say "meaningful improvement", did you mean no improved registration during training or testing? how did you pre-process / split your data? How many types of labels did you use?
2 - Thanks! bug fixed see #14. I'd like to note that I stopped using the composite network as it didn't give convincingly better results after our preliminary conference work and seemly uses more memory. As shown in the media paper, I just use the local_net.
3 - Thanks again! issue created - will look into it. I did something similar in the dev branch but didnt come across this though...

oh - I don't think it is because the deformation is large. for the prostate work, I didn't use any initial alignment.

Dear Yipeng, thanks a lot for your answers and sorry for the criticisms: the code works reasonably well on some datasets, but just not as well as expected. So any guidance would be appreciated. To have a reproducible experiment on publicly available data I ran more tests on the medical decathlon (https://drive.google.com/drive/folders/1HqEgzS8BV2c7xYNrZdEAnrHk7osJJ--2) Task 2 MRI Heart. This contains 20 labelled images (with a single structure), which can be easily pre-processed into 160^3 volumes and split into 15 training and 5 test images. To enable pair-wise inter-subject registration I changed line 75 in training.py to
    case_indices2 = case_indices[1:]+case_indices[:1]

and accordingly used

The results of the test on the remaining 5 scans (20 pair-wise registrations) was as follows:
No-Reg:     avg Dice: 52.2%
LabelReg:  avg Dice: 73.2% (stddev of Jacobian=0.71)
this is a considerable improvement, however running our unsupervised discrete registration algorithm deeds (https://github.com/mattiaspaul/deedsBCV) I achieved an avg. Dice of 87.0% (with stddev of Jacobian=0.45 and run-time on CPU <15 secs.)
So it would be great if you could check the same experiment with your private code and see whether it produces comparable results and/or maybe suggest more suitable settings. Thanks.

Criticisms are always most welcome! ;)
We actually have tried this on two different data sets with <50 training volumes, so far, little success at all. So I'm glad you got it to ~70%. I think the reasons are:

training data size. I'd argue that this is, by far, the most deciding factor for enabling weak supervision of this sort;
similarly, anatomical labels. including number of types of labels. I regard these anatomical ROIs are samples of voxel correspondence, with which, one or only a few structures are probably too sparse to generalise. At this end, for applications with a "usable" similarity measure, I'd try label-reg "to assist" instead of "to replace", i.e. adding an unsupervised similarity to the label similarity loss in training - welcome to contribute to #3 :)
memory. As you already mentioned, it is difficult to fit a bigger network with bigger data. Potential solutions include patch-based methods and more efficient network architectures (sure, future GPUs with larger memory...);
loss function. the multi-scale dice is less sensitive to its parameters but also less flexible. For instance, you can use weighted cross-entropy to incorporate application-specific weighting schemes, i.e. loss matrix. on this note, larger variation on Jacobian perhaps means you could try a heavier weighted smoothness penalty - at least make it comparable to your silver-standard deedsBCV when converging?

Last diagnostic question: did you get your Dice very high (~95%) during training, as this would be a good indication that the code is working but the network is over-fitted?

I'm closing this though searching for a large public data set for demo continues...


Create adapter for Miro data in S3

Note that we’re initially scoping this just to cover the image data – shoots, contributor data and deliveries may come later, or not at all.


Update to 5995 Element Controller Behavior

This is an additional fix for #5995.
My fix (PR #6026) "broke" cases such as #6035 of updating elements whose UIs were designed using the Forms API. It seems that these forms were the reason that the code before what I changed in #6026 included all of the acrobatics with the element's data dictionary and messing with ValueProvider.
I've made updates to FormElementDriver so that this case is handled. The code instantiates the involved form and iterates through their fields, copying the appropriate values out of the value provider and assigning them to the data dictionary. This I believe is a better approach than the previous way of simply copying Request.Form into the dictionary.
The other thing is, I had meant for this to be a fix for 1.9.x, since it doesn't break any interfaces and is what I would consider a "bug fix". If I'd made the previous PR against dev, then that was my mistake. I'm submitting both changesets again, as a pull request into 1.9.x.

This is looking good. Regarding 1.9.x, on the one hand you're right, but due to the nature of the changes, certain scenarios could break in unexpected ways (as @infofromca reported), so it is safer to merge it into dev. Also, despite the fact that your code is definitely an improvement, the current code in 1.9 is not causing issues as far as I know, so I think that is another reason to apply your changes to dev rather than 1.9.x.
Perhaps @sebastienros has a different opinion: 1.9.x or dev?

@sfmskywalker i can see that. but please remember I started going down this path because of a bug: I had a problem writing a driver for my own element whose view model didn't have the same property names as the element. But sure let's wait for @sebastienros 's call

@harmony7 Ok. In any case, we think it's safest to merge it into dev in this case. If you could retarget your PR, that'd be awesome. Thanks!

@harmony7 did you see my line note? As seen in my tests, when you re-edit the form element, you don't retreive its data. In UpdateElementData(), I needed to add this
    else // (when context.Updater == null)
        context.ValueProvider = context.Element.Data.ToValueProvider(CultureInfo.InvariantCulture);

Note: maybe here it's better to use _cultureAccessor.CurrentCulture but I would have to change the FormsElementDriver contructor that is used in many places...
Best

Yeah I saw it, haven't had time to think about it yet. Thanks for the input.

I just worked on a fix that handles both updating the ElementData as per @harmony7 's suggestion as well as rebinding the form shape itself with the ElementData if not currently in a postback as per @jtkech 's suggestion. It's indeed best to use ICultureAccessor, but does break the base driver class, but that's easy to update, and since we're still on dev I think it's fine. To prevent breaking changes like this in the future I added a "services" interface that exposes IFormManager as well as ICultureManager, so that we can potentially add more properties to it without breaking the base driver class' signature.


Android version of the library

Hello,
I have created the same library for Android called PeterSmileRate. You can find it in Github: https://github.com/SilicorniO/PeterSmileRate.
I post this message to help people that are looking for the same library for Android.
Best Regards and thanks for your hard work!

Wooo~! Great work !!!


Add support for operator overloading

Hello, do you plan to add support for operator overloading?
The issue #541 was closed without any message.

Please give some Exmaples.

For example, let's say I have a class named BigNumber for working with large numbers.
Right now I would need to define methods for additions etc. and use them like this:
<?php

$bigNumber = new BigNumber(10);
$anotherBigNumber = new BigNumber(10);

$bigNumber->add($anotherBigNumber); // BigNumber instance with value 20
$bigNumber->sub($anotherBigNumber); // BigNumber instance with value 0
// etc.

What I would like to achieve is skip the method call and work with the objects like this:
<?php

$bigNumber = new BigNumber(10);
$anotherBigNumber = new BigNumber(10);

$result = $bigNumber + $anotherBigNumber; // BigNumber instance with value 20
$result = $bigNumber * $anotherBigNumber; // BigNumber instance with value 100

Well i guess in zephir it could be possible(the same way as we can call methods on strings i guess) - but not sure about php-land as it doesn't provide any operator overloading at all - there is just no such thing in php.

Well, it must be possible at least to some extent, because you can for example do this in php-land:
<?php

$date1 = new DateTime();
$date2 = new DateTime('-1 day');

if($date1 > $date2) {
  echo "Today is bigger than the day before";
}

Any change here?
There's also this extension that you could check: https://github.com/php/pecl-php-operator


Allowing joint fits of multiple white-light observations and patching bugs with joint fits

This PR resolves #499.
This PR resovles several bugs in the code that allows joint fitting of spectroscopic channels (e.g. simultaneously fit all 14 MIRI/LRS binned wavelengths). This PR also enables the simultaneous fitting of multiple observations from different times and/or instruments (e.g. repeated visits of one target, or white lightcurves from multiple instruments). This is great for determining the "best" orbital parameters to use for a system when looking at spectra from multiple instruments or repeated visits of target (e.g. the TRAPPIST-1b photometry I was working on).
The beginnings of the code were started by Erin May, and I then copy-pasted those edits many months ago because I couldn't figure out how to merge code from her fork into my branch. I since figured out how to do that and have done my best to give credit where it is due.
The flake8 and pytests both run successfully on my laptop.
I'd request that after this PR gets merged we increment the version to v0.9 (so that I can cite this version in a couple of upcoming papers).

Codecov Report

Merging #510 (e86e8c3) into main (eb6ced2) will decrease coverage by 1.25%.
The diff coverage is 45.30%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##             main     #510      +/-   ##
==========================================
- Coverage   58.60%   57.36%   -1.25%
==========================================
  Files          90       90
  Lines       10465    11002     +537
==========================================
+ Hits         6133     6311     +178
- Misses       4332     4691     +359

Impacted Files
Coverage Δ

...rve_fitting/differentiable_models/CentroidModel.py
26.78% <0.00%> (-7.31%)
:arrow_down:

...itting/differentiable_models/SinusoidPhaseCurve.py
18.65% <0.00%> (-0.73%)
:arrow_down:

...htcurve_fitting/differentiable_models/StepModel.py
21.56% <0.00%> (-4.63%)
:arrow_down:

src/eureka/S5_lightcurve_fitting/models/GPModel.py
9.18% <ø> (-0.19%)
:arrow_down:

...reka/S5_lightcurve_fitting/models/CentroidModel.py
18.00% <3.33%> (-10.58%)
:arrow_down:

...c/eureka/S5_lightcurve_fitting/models/StepModel.py
14.89% <5.88%> (-3.06%)
:arrow_down:

src/eureka/S5_lightcurve_fitting/fitters.py
60.65% <26.19%> (-5.30%)
:arrow_down:

src/eureka/S5_lightcurve_fitting/likelihood.py
64.15% <35.00%> (-6.18%)
:arrow_down:

src/eureka/S5_lightcurve_fitting/s5_fit.py
68.20% <35.44%> (-8.20%)
:arrow_down:

...c/eureka/S5_lightcurve_fitting/gradient_fitters.py
75.00% <39.53%> (-12.21%)
:arrow_down:

... and 14 more

... and 1 file with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

One nuance that this PR doesn't address is that currently all systematics models are applied to all datasets. This is fine if you're fitting repeated observations of a target with the same instrument since you're likely going to want the same model for all the observations, but if you're fitting a NIRCam white lightcurve and a MIRI white lightcurve, then you're forced to fit an exponential ramp to the NIRCam data while you only want to fit it to the MIRI data.
I think this nuance should be left for a future PR though, given how large this PR already is and how helpful it already is.


Bug: HintRetrieveResult.Builder#setHintFromProto will throw exception for valid failure responses

Looks like a simple fix:
private Builder setHintFromProto(@Nullable Protobufs.Hint hint) {
        mHint = (hint != null) ? Hint.fromProtobuf(hint) : null;
        return this;
}

This protobuf runtime implementation returns a default implementation for nested messages.  The conditional check above needs to be modified to check against this rather than null.

Fixed in https://github.com/openid/OpenYOLO-Android/commit/533d5c0d1d8fce0d76ad0de7a579ca70fe758069


Cannot install with :PlugInstall in nvim

I get this when trying to install the plugin with nvim

holst@puff ~
$ nvim --version
NVIM 0.2.0-dev
Build type: RelWithDebInfo
Compilation: /usr/bin/x86_64-linux-gnu-gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/build/neovim-38GZXR/neovim-0.1.7ubuntu1+git201701281330+3091+23~ubuntu16.04.1/build/config -I/build/neovim-38GZXR/neovim-0.1.7ubuntu1+git201701281330+3091+23~ubuntu16.04.1/src -I/build/neovim-38GZXR/neovim-0.1.7ubuntu1+git201701281330+3091+23~ubuntu16.04.1/.deps/usr/include -I/build/neovim-38GZXR/neovim-0.1.7ubuntu1+git201701281330+3091+23~ubuntu16.04.1/.deps/usr/include -I/build/neovim-38GZXR/neovim-0.1.7ubuntu1+git201701281330+3091+23~ubuntu16.04.1/.deps/usr/include -I/build/neovim-38GZXR/neovim-0.1.7ubuntu1+git201701281330+3091+23~ubuntu16.04.1/.deps/usr/include -I/build/neovim-38GZXR/neovim-0.1.7ubuntu1+git201701281330+3091+23~ubuntu16.04.1/.deps/usr/include -I/build/neovim-38GZXR/neovim-0.1.7ubuntu1+git201701281330+3091+23~ubuntu16.04.1/.deps/usr/include -I/usr/include -I/build/neovim-38GZXR/neovim-0.1.7ubuntu1+git201701281330+3091+23~ubuntu16.04.1/build/src/nvim/auto -I/build/neovim-38GZXR/neovim-0.1.7ubuntu1+git201701281330+3091+23~ubuntu16.04.1/build/include
Compiled by root@lgw01-31

Optional features included (+) or not (-): +acl   +iconv    +jemalloc +tui
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

holst@puff ~
$

Missing information. What plugin manager is this? What is the configuration? Did you try cloning manually?

https://github.com/junegunn/vim-plug

Cloning it by hand works just fine.
hholst@fb-hholst3 /tmp
$ git clone https://github.com/vim-airline/vim-airline-themes
Cloning into 'vim-airline-themes'...
remote: Counting objects: 6927, done.
remote: Total 6927 (delta 0), reused 0 (delta 0), pack-reused 6927
Receiving objects: 100% (6927/6927), 1.01 MiB | 892.00 KiB/s, done.
Resolving deltas: 100% (3944/3944), done.

hholst@fb-hholst3 /tmp
$ git clone https://github.com/vim-airline/vim-airline-themes
Cloning into 'vim-airline-themes'...
remote: Counting objects: 6927, done.
remote: Total 6927 (delta 0), reused 0 (delta 0), pack-reused 6927
Receiving objects: 100% (6927/6927), 1.01 MiB | 892.00 KiB/s, done.
Resolving deltas: 100% (3944/3944), done.

In any case then it is rather a vim-plug issue then vim-airline-themes issue, since manual cloning just works.

then it is rather a vim-plug issue, since cloning manually just works.


WIP: Fixes to discuss

voluptouous-serialize misses some advanced functionality..

Handling all types
Deeply nested rules
vol.All with lists..

Need to discuss the best way of handling them to make a better PR

Could you break up your PR into 1 feature/change per PR and include what you're trying to solve, how you're solving it and add tests that show how the change is adjusting the output.


Initial commit

Initial commit for jonathan gallagher's page

Change one issue

Removed _index.html as it is not used


Bumping classgraph for v3.3.x and v3.2.x

Hi,
we are using Neo4j database version 3.5
and now want to update versions of libraries
Latest OGM versions v3.3.3 and v3.2.44 use classgraph v4.8.149 and does not load our classes while creating SessionFactory.

Building interface class map for 0 classes

Previous correct working version is v3.2.34 which use classgraph v4.8.141
Manually changing dependency with maven to latest classgraph v4.8.168 also solves the problem.

Sure, can do.


Prettify Internship Application with missing optional fields

Shift compulsory fields to the top, and flush optional fields to the bottom of the card.

Done by Chifa.


Update dev-time IIS support in VS topic

Fixes #11868

Update, including for 3.0.
Support for either HTTPS (original coverage) or HTTP (new coverage).
Rage Against the Pics ... they're kill'in the name of!

It's been a while since I've looked at this feature, but I was under the impression that instead of creating a sub-app, we now create a new ApplicationPool per project.

I can't remark on the under-the-covers bits beyond it working as a sub-app (and that setup is managed by the tooling) ... it still works today (VS2019). My main add was to address the reader's ask about using HTTP, and it ✨ Just Works:tm: ✨ . However, it won't do both HTTP and HTTPS bindings tho AFAICT. Some part of the built-in tooling support blows up the bindings when both are attempted.
Do you want to ping VS cats?

I'm okay not addressing that in this PR. As long as we file an issue to follow-up eventually

I'm guessing we might do a scrub of the docs at the some point for differences between Dev16 and Dev15.

Yeah ... I'm definitely allowing the "it works in VS2019" outcome be my guide here. I imagine (guess) that if we ask the maintainer that they're going to say that they didn't change anything.

Can't cross-link this to IIS docs. They're ... mmm ... their docs are "very interesting". 😄

I'm pretty sure you can xref to IIS. You just need to update your xref_query_tags in the .openpublishing.publish.config.json file

:smile: That isn't what I meant. Lol


Add support for "files"-archive

i.e. write individual pbf-files to disk in the format BASE/z/x/y.pbf
in order to use that format it must be passed as "--ouput=/path/to/tiles?format=files"
Fixes #536
note: it also supports concurrent writing - just have to pass --tile_write_threads=5

Regarding performance, this is definitely going to be slower but I wonder if there's any performance difference to Files.write from multiple OS threads vs. Files.write from virtual threads vs. something like AsynchronousFileChannel (or others?).
These could also be separate followup issues, but I noticed:

when there are multiple writer threads with --tile_write_threads=5 they each print Finished z11 in 0.4s cpu:0.6s avg:1.7, now starting z12, call tileWriter.printStats() and call archive.finish() - maybe there should be a different way to handle those? Or only do the logging from thread 0 or something?
FileUtils.size looks like a bottleneck because the ProgressLoggers calls it while printing status during the archive write phase. Might make sense to keep a counter of bytes written to the output directory instead of having to scan it each time?

These could also be separate followup issues, but I noticed:

when there are multiple writer threads with --tile_write_threads=5 they each print Finished z11 ... now starting z12, call tileWriter.printStats() and call archive.finish() - maybe there should be a different way to handle those? Or only do the logging from thread 0 or something?
FileUtils.size looks like a bottleneck because the ProgressLoggers calls it while printing status during the archive write phase, and Stats calls it at the end to print a file size summary. Might make sense to either disable (have the method give up a certain number of files or for a certain amount of time) or keep a counter of bytes written to the output directory instead of having to scan it each time?

Addressed those points here: https://github.com/onthegomap/planetiler/pull/761/commits/5371520256376a3b61114d54b0e56be75e19bf5d

archive.finish() being called for each writer was definitely a bug - it's now called after ALL writers finished
Finished z11 ... now starting z12, call tileWriter.printStats() - logging for the first writer only - not 100% accurate but should be good enough for some "zoom-progress logging"
tileWriter.printStats() think that's ok that we print stats for each writer as long as they are writer specific. I introduced printStats on WriteableTilesArchive now for archive related logging.
FileUtils.size in ProgressLoggers  was definitely an issue. I introduced WriteableTilesArchive#bytesWritten in order to handle that correctly (was also an issue for the stream writers).

Regarding performance, this is definitely going to be slower than a single-file archive but I wonder if there's any performance difference to Files.write from multiple OS threads vs. Files.write from virtual threads vs. something like AsynchronousFileChannel (or others?).

Good question/point. Need to investigate a bit on this.

regarding performance: I wrote some benchmark (BenchmarkTileFilesWrites) that loads a mbtiles file into memory and then writes the tiles to files in different modes.
See the benchmark results below from my machine for US (0<=z<=13).  At the same time async seems to be good compromise between absolute and CPU time.
So I impletemented:

async file writing for the files archive with the option to write sync.
a way to use virtual threads for the tile writers (--tile_write_threads=100 --tile_write_executor=virtual) - in case you want to experiment with it

If you agree, then I'd remove the benchmark as well as the option to use virtual threads for writing, again.

mode
run
duration

fixed1
0
4m34s cpu:4m25s gc:1s avg:1

fixed1
1
4m20s cpu:4m21s gc:2s avg:1

fixed2
0
3m12s cpu:5m56s avg:1.9

fixed2
1
2m54s cpu:5m43s avg:2

fixed4
0
2m55s cpu:11m2s avg:3.8

fixed4
1
2m56s cpu:11m2s avg:3.8

fixed10Virtual
0
3m18s cpu:22m21s avg:6.8

fixed10Virtual
1
3m19s cpu:22m30s avg:6.8

fixed100Virtual
0
3m30s cpu:30m14s gc:1s avg:8.6

fixed100Virtual
1
3m33s cpu:30m32s avg:8.6

fixed1000Virtual
0
3m42s cpu:33m47s gc:1s avg:9.1

fixed1000Virtual
1
3m46s cpu:33m56s avg:9

async
0
3m53s cpu:6m56s avg:1.8

async
1
3m54s cpu:7m13s avg:1.8

unboundVirtual
0
4m29s cpu:19m42s gc:3s avg:4.4

unboundVirtual
1
4m37s cpu:20m34s gc:3s avg:4.5

changes are here: https://github.com/onthegomap/planetiler/pull/761/commits/b8cfa56977d98520aa8b62252c3a2726d440afe0

regarding performance: I wrote some benchmark (BenchmarkTileFilesWrites) that loads a mbtiles file into memory and then writes the tiles to files in different modes.
See the benchmark results below from my machine for US (0<=z<=13).  At the same time async seems to be good compromise between absolute and CPU time.
So I impletemented:

async file writing for the files archive with the option to write sync.
a way to use virtual threads (bound only) for the tile writers (--tile_write_threads=100 --tile_write_executor=virtual) - in case you want to experiment with it

If you agree, then I'd remove the benchmark as well as the option to use virtual threads for writing, again.
mode	run	duration
fixed1	0	4m34s cpu:4m25s gc:1s avg:1
fixed1	1	4m20s cpu:4m21s gc:2s avg:1
fixed2	0	3m12s cpu:5m56s avg:1.9
fixed2	1	2m54s cpu:5m43s avg:2
fixed4	0	2m55s cpu:11m2s avg:3.8
fixed4	1	2m56s cpu:11m2s avg:3.8
fixed10Virtual	0	3m18s cpu:22m21s avg:6.8
fixed10Virtual	1	3m19s cpu:22m30s avg:6.8
fixed100Virtual	0	3m30s cpu:30m14s gc:1s avg:8.6
fixed100Virtual	1	3m33s cpu:30m32s avg:8.6
fixed1000Virtual	0	3m42s cpu:33m47s gc:1s avg:9.1
fixed1000Virtual	1	3m46s cpu:33m56s avg:9
async	0	3m53s cpu:6m56s avg:1.8
async	1	3m54s cpu:7m13s avg:1.8
unboundVirtual	0	4m29s cpu:19m42s gc:3s avg:4.4
unboundVirtual	1	4m37s cpu:20m34s gc:3s avg:4.5
changes are here: b8cfa56

Thanks for doing those tests! I saw similar results running this on a linux box with fast SSD - fastest seemed to be with 4 dedicated OS threads.
Given these results, can we just remove the extra code paths and keep the configurable number of fixed threads you had initially since it's the fastest and simplest?

Thanks for making these changes! I'm trying to test it with the custom schemes but getting some errors:
My first attempt was to use --output=tiles/{z}/{x}-{y}.pbf.gz - it would be cool if that worked but looks like it's not currently handled.
Then I tried --output=tiles?format=files&tile_scheme={z}/{x}/{y}.pbf.gz but I get Illegal character in query at index 31: tiles?format=files&tile_scheme={z}/{x}/{y}.pbf.gz.
To make it work I had to do --output=tiles&format=files&tile_scheme=%7Bz%7D%2F%7Bx%7D%2F%7By%7D.pbf.gz which isn't super user-friendly.
Is there another way that I'm missing?

The other option - which I always use - is to use format pre-fixed args => --output=tiles/ --files_tile_scheme={x}/{y}/{z}.pbf
I'll check if we can support your other approaches.

Thanks for making these changes! I'm trying to test it with the custom schemes but getting some errors:
My first attempt was to use --output=tiles/{z}/{x}-{y}.pbf.gz - it would be cool if that worked but looks like it's not currently handled.
Then I tried --output=tiles?format=files&tile_scheme={z}/{x}/{y}.pbf.gz but I get Illegal character in query at index 31: tiles?format=files&tile_scheme={z}/{x}/{y}.pbf.gz.
To make it work I had to do --output=tiles&format=files&tile_scheme=%7Bz%7D%2F%7Bx%7D%2F%7By%7D.pbf.gz which isn't super user-friendly.
Is there another way that I'm missing?

The other option - which I always use - is to use format pre-fixed args => --output=tiles/ --files_tile_scheme={x}/{y}/{z}.pbf
I'll check if we can support your other approaches.

Ah got it, that makes sense.  Could we add a short javadoc to the major new classes and maybe include that cli arg snippet in the javadoc for readable/writeable files archive classes?
The shorthand one would be a nice to have, but might be hard to disambiguate between that and writing to a file archive on disk?

Thanks for making these changes! I'm trying to test it with the custom schemes but getting some errors:
My first attempt was to use --output=tiles/{z}/{x}-{y}.pbf.gz - it would be cool if that worked but looks like it's not currently handled.
Then I tried --output=tiles?format=files&tile_scheme={z}/{x}/{y}.pbf.gz but I get Illegal character in query at index 31: tiles?format=files&tile_scheme={z}/{x}/{y}.pbf.gz.
To make it work I had to do --output=tiles&format=files&tile_scheme=%7Bz%7D%2F%7Bx%7D%2F%7By%7D.pbf.gz which isn't super user-friendly.
Is there another way that I'm missing?

The other option - which I always use - is to use format pre-fixed args => --output=tiles/ --files_tile_scheme={x}/{y}/{z}.pbf
I'll check if we can support your other approaches.

Ah got it, that makes sense. Could we add a short javadoc to the major new classes (don't worry about all of them, the helper classes should be self-explanatory without any javadoc) and maybe include that cli arg snippet in the javadoc for readable/writeable files archive classes?
The shorthand one would be a nice to have, but might be hard to disambiguate between that and writing to a file archive on disk?

I added support for those shortcuts here: https://github.com/onthegomap/planetiler/pull/761/commits/7d0bc26b72d1ee7b95c85d8a5196cbbecf7040d4
Detecting it is rather simple by the templates ({) - which otherwise should not really be used, and even if so users can pass the format-query param to enforce some format.
I also added javadoc where I thought it makes sense but let me know if you want more.

Should be all set now. Let me know if there's anything else.


Fix missing underscoe in readme example

missing underscore in "bath water:" is an invalid example

Thank you!


Migrated to Stardew Valley 1.6

I have migrated this mod to stardew valley 1.6. there are no breaking changes with previous task save files as far as I can tell however I intend to change how tasks are saved to take advantage of the new item system and improve the flexibility between plain text name of items and the items themselves

Hey, just wanted to say I see this and I'll try to take a look at it over the weekend. Thanks for taking the time to do this!

I'm going to be making some very large structural changes, along with various fixes and improvements that I had planned before my hiatus, so I won't be merging this in. I will say that this was great for seeing what broke during the move to 1.6, so thanks again!
Hopefully I'll be able to get everything finished soon so I can get a proper update out.

Sounds good!
I have in my list to develop my fork to add some things such as adding a popup reminder system (with triggers such as location, proximity to NPCs, day/time etc.)  to prevent you forgetting a task and to change the way the data is stored to take advantage of the item ID changes. If these are features you would consider adding to the mod generally then I'd be very happy to work on them with a PR in mind (if I get round to it).
I realise this is getting further away from the original PR but thought I would let you know :)


Mobile UI, send feature, logo, responsive input box

Have made the mobile UI, with send feature, fully responsive layout with a responsive input box, made logo responsive as well!
@DhairyaBahl please check these out! Also, please add labels if you like the changes and want to merge them! Thank you!
fixes #125

Can you provide a padding beside the message bar.

Can you please tell me where you exactly want the padding ? Please tell with screen shot of possible @abhijeet007rocks8

Okay, understood 🙌🏻

Can you please tell me where you exactly want the padding ? Please tell with screen shot of possible @abhijeet007ro
Currently the message bar is stuck to the left side and right side of screen give a little space between edge and input bar.

are you okay with this @abhijeet007rocks8
let me know if you will need further changes

Try clicking on the mobile option in the developer window and send some scshots

horizontal margin approx 0.3rem - 0.5rem

Rest of the code is in px, so keeping in px would be better I feel

Rest of the code is in px, so keeping in px would be better I feel

5px then

i have done 1px, 5px will make the box unresponsive, making 1px solves the white line that comes in the right side of the box, i think that is what you wanted to solve!

i have done 1px, and increased padding! there is a little gap now!

cool push the code

Please add labels as well @abhijeet007rocks8, here is the issue #125


Using two encoders at once - can't initialize

Is there any way to use two encoders with this library on ESP32? When initializing the second encoder, I get a message that I cannot do this. The code for the second encoder is the same as for the first. Is it the timer fault?

@MagicznyHubert Can't help you without looking your code

@MagicznyHubert OH, I see, it's my fault in library in part for esp32. There is initialization of pcnt unit 0. I ll try to make some corrections tomorrow.

@MagicznyHubert I've made small fix. Try release 1.0.5 but not with example esp32Interrupt, use simple.ino. Can you check it and report if it's working?

Here is the output of the Serial terminal:
only encL reads and encR is always 0.

@MagicznyHubert @wcliew  I've update library version. There are two examples with multiple encoders connected to esp32.
enc1.init(0);
enc2.init(1);
...
enc8,init(7);

8 encoders - maximum

@MagicznyHubert @wcliew I've updated library version. There are two examples with multiple encoders connected to esp32.
enc1.init(0);
enc2.init(1);
...
enc8.init(7);

8 encoders - maximum

@levkovigor , It is working now, thank you very much for your effort!!!


cockpit error pages

The following links are producing an error pages
https://quality-test.aydo2.com/cockpit/AYSTemplates
https://quality-test.aydo2.com/cockpit/AYSBlueprints
https://quality-test.aydo2.com/cockpit/Information
https://quality-test.aydo2.com/cockpit/cockpit/AYSTemplates?ayspath=ays_repo_example
https://quality-test.aydo2.com/cockpit/cockpit/AYSBlueprints?ayspath=ays_repo_example

Is this issue still valid ?
Links are broken now, can't really see anything.


I can't get forgot password to work it throws 500 error

Link to reproduction
No response
Describe the Bug
when I try to fetch the token I get 500 error. I have posted this issue on Discord and Dan suggested that it could be a bug.
This is my front end code:
`import { NextApiRequest, NextApiResponse } from "next";
// import { getServerSession } from "next-auth/next";
// import { authOptions } from "./[...nextauth]";
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
if (req.method === 'POST') {
try {
console.log('email ', req.body.email)
const result = await fetch(${process.env.CMS_URI}/api/users/forgot-password, {
method: 'POST',
credentials: 'include',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ email: req.body.email })
});
  const data = await result.json();
  console.log(data)
} catch (err) {
  console.log(err)
}

}
}`
This is the returned data { errors: [ { message: 'Something went wrong.' } ] }
And this error was thrown from the server
ERROR (payload): TypeError: Cannot read properties of undefined (reading 'email')     at Object.generateEmailHTML (/Users/arthurmelkonyan/webdev/ethnicast-cms/payloadcms/src/collections/Users/index.ts:24:32)     at forgotPassword (/Users/arthurmelkonyan/webdev/ethnicast-cms/payloadcms/node_modules/payload/src/auth/operations/forgotPassword.ts:112:59)     at processTicksAndRejections (node:internal/process/task_queues:95:5)     at forgotPasswordHandler (/Users/arthurmelkonyan/webdev/ethnicast-cms/payloadcms/node_modules/payload/src/auth/requestHandlers/forgotPassword.ts:15:5)
To Reproduce
I have created the form on the front end to capture the email and pass to API Route handler
Payload Version
v2
Adapters and Plugins
No response

Hi faizur11786. Yes, I have done it and I don't think it has to do with that. That configuration didn't work for me, throwing error saying that email wasn't configured right, basically it was a mail server issue. So, I'm using "nodemailer-sendgrid-transport module ", tested and it works perfectly fine. I don't think that it's related to SMPT configuration as the error thrown for the server tells that " undefined (reading 'email')"

I fixed it and it works.

Hey @artmelkon - are you still experiencing this issue or has it been resolved?


Add required labels action

This prevents merging PR without setting an appropriate label.

This is how PR fails if it doesn't have labels:


Bump Upload Limit on Certification Wordpress site

(putting here until we get a repo).
Please increase the PHP upload limit for certifications.creativecommons.org  to 10 or 20 Mb

Bumped to 20, please try now. :-)

Works like a champ. Thanks

Awesome!


CSHARP-3240: ImmutableTypeClassMapConvention is ignoring some constructors

My suggested changes to ImmutableTypeClassMapConvention can be summarized succinctly as:

Consider all public constructors (not just the one with the most parameters)
Only map properties that match some constructor argument

Evergreen:
https://evergreen.mongodb.com/version/5fa9792657e85a2ceac433fb

Note: this fix for CSHARP-3240 also fixes CSHARP-2984 (which should be closed as a duplicate).

Dmitry copy/pasted my work on 3240 to his 2984 branch and PR (which is a bit confusing because this is actually a fix for 3240 and 2984 is fixed as a side effect) and we continued the review there at his request.


Add Statement -> Source locations mappings to sierra debug info

This change is

This PR is a foundation for https://github.com/software-mansion/scarb/pull/1506.
This mapping, and the one introduced for cairo-profiler, are going to be used by a new tool we are working on, cairo-coverage.


BUG on the menu's waving animation of Material Design

The animation circle's round is a bit small.
For example, if I click on the left/right edge of the menu button, I can easily see the circle animation cannot reach the opposite edge. Its round is just a bit little.

thanks


Note memory allocators used by interop outside Windows

Summary
Note memory allocators used by interop outside Windows
Follow up on https://github.com/dotnet/runtime/issues/98995#issuecomment-1973784263

cc @dotnet/interop-contrib


So any idea why it's bold?

I think it is fixed now with 1a79d148dc9d409

Cool, thanks @chrisbra


Penman speedtest; 'Chariots', slow-mo

The penmen do not start moving.
http://scratch.mit.edu/projects/95183023/
http://phosphorus.github.io/#95183023
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36

Works on my PC in Chrome here:
http://homepage.ntlworld.com/infinnerty/differences/UAT/itch/#95183023

Yes when I load it in phosphorus by using the  address http://scratch.mit.edu/projects/95183023 the music doesn't start. How did you make the music start?

Please see this issue #260


Fixed compiler warnings in tsdf_integrator.h and block.h.

This fixes some [-Wsign-compare] and [-Wunused-parameter] warnings.

lgtm, however I know helen experimented with different weighting strategies and some of these might need the extra variables getVoxelWeight currently takes in.

Fine from my side, I've pruned all the other experimental weights anyway. :)


ARROW-3072: [C++] Add RETURN_NOT_OK linting rule, use ARROW_RETURN_NOT_OK in header files

This also checks whether RETURN_NOT_OK is defined in case another codebase exposes such a define in its headers and is included first

Is this OK to merge?


⚠ ClamAV has degraded performance

In 09ad2ed, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 207 ms

Resolved: ClamAV performance has improved in b563468 after 5 minutes.


Source does not allow null crossOrigin

Currently Open Layers supports null as a valid value for crossorigin. Currently if you attempt to pass null (which is the default value in ol) it executes the following: crossOrigin: source.crossOrigin ? source.crossOrigin : 'anonymous'.
Since this sees source.crossOrigin as null, it then applies anonymous instead which is not the desired behavior. This breaks any server that does not have CORS enabled.

I am running into this as well.

As am I.

This probbolbly applies to ImageWMS, TileWMS and TileVector

OK, looks like anyone who is having this issue can get rid of it by using the development branch.
in bower.json:

"dependencies": {
"angular-openlayers-directive": "https://github.com/tombatossals/angular-openlayers-directive.git#master"
}

@sjdixon - except "TileVector", I'll try to fix and PR this issue


VScode python binance module not found

hello, I'm running python 3.8.8 I've run pip install python-binance and still unable to import from binance
any help please.

I think you need to look into environments. Create one, and do a pip install in it. Then make sure VSC is running in the said environment.
I recommend Miniconda for creating environments.
conda create --EnvName py38 python=3.8
activate EnvName
pip install python-binance
Now configure VSC to run in that environment and your code should work


[FEATURE] Add support for custom API domain through self-hosted OpenAI forwarding service

Describe the feature you'd like
Add support for custom API domain through self-hosted OpenAI forwarding service
Additional context
Currently, the API domain for this project is fixed and cannot be customized. However, it would be useful to have the ability to use a custom domain for the API, especially for those who want to use a self-hosted OpenAI forwarding service.
I propose that we add a new configuration option that allows users to specify their own API domain, which can then be used to route requests through a self-hosted OpenAI forwarding service.
This would enable users to have greater control over their API requests and provide a more flexible solution for those who want to use their own infrastructure.
Thank you for considering this feature request!

Sorry, I find the repeat.
relate to this - #264

let us know if #264 is able to satisfy your requirement

#264 and it works great for me. Thank you for your help!


Verification code regenerates before verifying user when another user submits initial-modal

Description
Generated verification code is stored as the global variable generatedCode, and is updated on the interaction initial-modal submit. As the first user submit the initial-modal, a verification code is generated for them and stored in generatedCode. If another user were to submit the initial-modal before the first person submits the verification code in the email-verification-modal, the verification code would be regenerated and new code would be stored in generatedCode, rendering the first user's verification code useless.
Affected Files
index.js
Potential Fix
Modifying the global variable generatedCode into a Map object, and store the user id as key and generated verification code as value on the interaction initial-modal submit, remove the key value pair once the verification has been used to verify said user.

Issue resolved in the commit: 4d3fc9d81894653d7b6f3168e5421bae0f1dac44


[Windows] "Windows Update disabled" multiple rollback remediation fails

Tested on Windows 10 Home (with Helper installed), physical device, rollback and remediation to “Windows Update disabled” working for the first time, but rollback and remediation are failing after multiple attempts

The problem was in fact in the implementation, fixed with pull request #35


I'm not able to download facebook video , all though I'm able to download the youtube videos with the same command

I'm facing this issue while try to download the facebook videos, I already checked that i'm using the latest version.
ERROR: [facebook]<PHONE_NUMBER>57533: Cannot parse data; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U

#30839: "... if you were actually using yt-dlp ..."


SDK manager has no path editor for SDK location

In Version 16.7.0 Preview 3.1 the Android SDKs and Tools dialog has no path editor at the top of the window:

I have tried resizing the window and maximising/restoring it, but there is no path editor as mentioned in the documentation.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: dac28e18-875a-cb51-a031-717692255d0a
Version Independent ID: f2e625c7-18a7-c090-fa92-9d635ac39164
Content: Setting up the Android SDK for Xamarin.Android - Xamarin
Content Source: docs/android/get-started/installation/android-sdk.md
Product: xamarin
Technology: xamarin-android
GitHub Login: @davidortinau
Microsoft Alias: daortin

Thanks for submitting an issue and we apologize for the delayed response. The requested updates haven't been made since the creation of the issue, and the timeline for resolution may vary based on resourcing, so the issue is being moved to an internal repo to better track it.


Update SDK version

Update compileSdkVersion and targetSdkVersion to make the library compatible with React Native 0.72

Thanks @nicolascavallin. I tested with React Native 0.72.1, and it works.


Parameterized kuebctl.sh once and for all :)

Parameterizes kubectl.sh.
This is IMO the best solution, it may require a very minor change to your CI.
_output/local/bin/linux/amd64/e2e.test  \
-provider="local" --host="http://<IP_ADDRESS>:8080" \
-ginkgo.focus="kubectl*" \
-kubeconfig=/opt/kube-creds \
-KubectlPath="cluster/kubectl.sh" \
-repo-root=/home/jay/gopath/src/github.com/GoogleCloudPlatform/kubernetes/

@ixdy @timothysc @rrati any  thoughts on this? It will allow us to run kubectl tests alot easier both for dev and CI .

Seems like a reasonable thing to do for now. Eventually I'd like to eliminate the need for a wrapper script -- #8817

okiedokie @bgrant0607 fixed the parameter and rebased ....  thanks for the review

lgtm

okay, now it uses kubectl as the default.   I tested the arg and it works for dev if you just pass _output/local/bin/linux/amd64/e2e.test  -provider="local" --host="http://<IP_ADDRESS>:8080" -ginkgo.focus="kubectl*" --kubeconfig=/opt/kube-creds -repo-root=/home/jay/gopath/src/github.com/GoogleCloudPlatform/kubernetes/ -kubectl-path=cluster/kubectl.sh

okay pushed/updated the comments  ....

I think I'd also feel a little more comfortable about going back to bare kubectl if hack/ginkgo-e2e.sh was updated to set the path as it used to do, e.g. like https://github.com/GoogleCloudPlatform/kubernetes/blob/f4bb6aa37d6dc3f244ad22204812255c6ecb148b/hack/ginkgo-e2e.sh#L120

ill find you on irc for the last batch :)

okay updated PR w/ the change to hack.  looks okay now?  Never used the hack/ginkgo-e2e.sh script so please give that change a good look !

okiedokie updated again

LG, thanks!


Merge pull request #1 from tensorflow/master

update from origin

Can one of the admins verify this patch?


[ISSUE #6558]Optimize ReplyMessageProcessor#parseRequestHeader logic and SendMessageRequestHeaderV2

Make sure set the target branch to develop
What is the purpose of the change

fix #6558
Brief changelog

Optimize ReplyMessageProcessor#parseRequestHeader logic and SendMessageRequestHeaderV2

Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

[x] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[x] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
[x] Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test  to make sure integration-test pass.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

@mxsm Please rebase the develop branch to pass the CI pipeline.


PlugInstall not working

Hi
I just switched on Vim-Plug, and after I followed all the steps and typed :PlugInstall in Neovim in windows10 command prompt , instead of installing the plugins threw me out to the cmd. If it helps this is the path to install the plugins - call plug#begin('~/.local/share/nvim/plugged') -. If there is anyone who knows how to fix this, I would apreciate your help. Thank you.

Type:

[ ] Bug
[ ] Enhancement
[ ] Feature Request
Question

OS:

[ ] All/Other
[ ] Linux
[ ] OS X
Windows

Vim:

[ ] Terminal Vim
[ ] GVim
Neovim

~/.local/share/nvim/plugged looks like a Linux or OS X path while you seem to be on Windows.
Could you write down what you did? 'I followed all the steps' doesn't really enable others to reproduce what you did on their own systems. :wink:

Indeed for windows I should have used an underscore instead of a dot in the path. It still does not work.
I should have mentioned the steps. I followed the steps specified on https://github.com/junegunn/vim-plug for windows.

I ran this commands in PowerShell :
md ~\AppData\Local\nvim\autoload
$uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
(New-Object Net.WebClient).DownloadFile(
$uri,
$ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(
"~\AppData\Local\nvim\autoload\plug.vim"
 )
)

Then I placed this in the init.vim :
call plug#begin('~/_local/share/nvim/plugged')
Plug 'scrooloose/nerdtree'
call plug#end()

Then I typed :PlugInstall and I've gotten the result in the image.

I should mention that I repeated the same steps in Vim  8.0.1476
and it worked. I just want to make it work with Neovim.

PlugInstall is broken on macOS as well

So it sounds like an issue of Neovim rather than vim-plug. You might want to report this issue to Neovim team.


Instructions to create a java maven buildpack

Is it possible to get some guidance in order to by example create a java maven buildpack to be used on k8s/openshift ?

@cmoulliard I've started a Java/Maven buildpack in the buildpacks/sample. It'll take a few more steps before it's in the packs/v3 images though. Probably this week though.


Prepare Key Vault release

API changes have been detected in Azure.Security.KeyVault.Keys. You can review API changes here

Still waiting for the final commit, re-record, etc. But outside of that and service version changes, I expect no further code changes.


Crosswalk Webview issue WebGL -- Sprites not moving

I have come across a strange issue when making a Cordova project (Android). When using the Crosswalk Webview plugin with WebGL rendering, Pixi sprites do not visually update when their position or scale is changed. The exact same code works fine when using Canvas rendering (or when not using Crosswalk).  (Pixijs 3)

Have you tried pixi 4rc?

No, I just switched to Canvas rendering, which is fine for this project.


Optionally allow duplicated mutations when using load_vcf or load_maf

Let's give user an option to allow duplicated variants when loading variants from a VCF or MAF by adding distinct parameter of VariantCollection to load_vcf and load_maf.

That seems like a good idea, are you working on a PR for that?

Great! There is now a pull request. This PR will not change the default behavior of  load_vcf and load_maf because the same default value (True) is assigned to distinct parameter in load_vcf and load_maf declaration as in the declaration of VariantCollection.


Update scala3-library to 3.3.0-RC6 in develop

About this PR
📦 Updates org.scala-lang:scala3-library from 3.3.0-RC5 to 3.3.0-RC6
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

🔍 Files still referring to the old version number
The following files still refer to the old version number (3.3.0-RC5).
You might want to review and update them manually.
.github/workflows/publish.yml

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scala-lang", artifactId = "scala3-library" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.scala-lang", artifactId = "scala3-library" }
}]

labels: library-update, early-semver-pre-release, semver-spec-pre-release, version-scheme:semver-spec, old-version-remains, commit-count:1

Superseded by #17.


musl target needs std::mem now

Closes nix-rust/nix#325.

This build and the build for PR #379 only failed because of timeouts on mac builds. This is probably due to Travis-CI's recent problems with MacOS builds. Does anyone of us have the privileges to trigger a rebuild without us having to reopen the PR or push a change?

Since this change should not have any impact on our CI builds, could you, @posborne, recheck that it builds properly for x86_64-unknown-linux-musl now?

I have triggered a rebuild for this PR: https://travis-ci.org/nix-rust/nix/builds/141162721
I think you should be able to do it too from https://travis-ci.org/nix-rust/nix/pull_requests.

Thanks. I do not see any UI element on that page, that would allow me to rebuild a previous build.

Are you logged in on Travis? Click on a PR title on that page and you should see a "Restart Build" icon on the right like this:

@homu r+

:pushpin: Commit 19811a5 has been approved by utkarshkukreti

:zap: Test exempted - status


[VL] Can not download special arrow gluten version: 15.0.0-gluten

Problem description
https://github.com/apache/incubator-gluten/pull/5850 introduce special arrow gluten version: 15.0.0-gluten, we don't know where we can dowaload it from.
When we change API at gluten core, we can't easily to compile velox.
System information
N/A
CMake log
No response

Will get arrow:15.0.0-gluten by https://github.com/apache/incubator-gluten/blob/main/dev/builddeps-veloxbe.sh#L189-L199

Is the issue affecting CH backend's build?
I am opening a PR to remove the dependency from CH build https://github.com/apache/incubator-gluten/pull/6494

I am refactoring VL codes, see https://github.com/apache/incubator-gluten/pull/6403,  almost all codes are changed in velox side.

Is the issue affecting CH backend's build?
I am opening a PR to remove the dependency from CH build #6494

Fixed by https://github.com/apache/incubator-gluten/pull/6494


Prepare for new release of Confluence

Workflow links: https://github.com/atlassian-labs/atlassian-slack-integration-server/actions/runs/7565271370, https://github.com/atlassian-labs/atlassian-slack-integration-server/actions/runs/7565273498, https://github.com/atlassian-labs/atlassian-slack-integration-server/actions/runs/7565275950.

Integration tests pass, so current version of Confluence DC for Slack is marked compatible with Confluence 8.7.2.


How to connect Autoware to the vehicle's CAN network?

To date, I have finished ndt_mapping and ndt_matching already.
Now my next plan is to apply the localization and mission result to the vehicle. My vehicle could be driven via the can network already.
However ,I get the following questions:
1.Could Autoware output the motion planning result via can network to control the vehicle?
2.Could Autoware output the localization result via socket or serial port?
3.which type of can interface card that Autoware support? Does it support Vector VN1630A?
Thanks a lot, and if there is anything that I can do for your team ,Please contact me, I will try my best to  do it well and contribute my own strength.

Thanks for your reply.
Under your help and the operation video, now I have finished mapping, matching and wf_simulator. I am deeply grateful to you both for your help.
Now I meet one question: what should I do to connect Autoware's computing result with the real vehicle. Of course ,the vehicle could be controlled by commands via CAN network now.
In your introduction video, Autoware could communicate with the real vehicle via CAN network, could you have an introduction of the CAN protocol and the type of the CAN interface card that you used in your vehicle? Is it "Kvaser Leaf Light V2"?
Should I write a node in ROS to subscribe the result topic in Autoware and publish the message via serial port or CAN interface card?
In Autoware I find one folder named "vehicle", Is this folder working in the real vehicle?
Thanks in advance.

could you help me about my question? @syohex
Thanks in advance.

Hi, Japan has long holidays now. Pls wait for a few days.
2016/05/05 15:01 "sgzzgit"<EMAIL_ADDRESS>
could you help me about my question? @syohex https://github.com/syohex
Thanks in advance.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/CPFL/Autoware/issues/292#issuecomment-217082150

oh, I do not know that before, I am really sorry to disturb you when you are on holiday.
I will wait for your reply a few days later.

Good morning everyone, Happy Monday.

could you help me about my question? @syohex

No. Sorry, I don't understand this topic well.

I am sorry that I didn't describe my question well.
I want to know how to utilize the Autoware's computing result to the control the real vehicle?
Or could you tell me which one is responsible for this part in your team? @syohex
Thanks very much.

Can anyone answer about this issue ?

Autoware communicates with the real vehicle using vehicle_socket.
twist_filter publishes twist_cmd, which is subscribed by vehicle_sender.
vehicle_sender and vehicle_receiver communicate with ZMP RoboCar (Autoware/vehicle/zmp/) via socket.

Thanks for your reply!
You have solved my problem perfectly.

Can you tell me the units of measure of the twist cmd rostopic published by pure pursuit algorithm.
Is linear acceleration is meters.sev , kilonmeteres per second [ or minute, hour]?
What is the unit of measure of angular orientation velocity [ radians per sec or degree per sec]  ?
I am attempting to integrate the Autoware stack with a ros driver for another car that accepts linear x is kilometers per hor and angular velocity in radians per sec.
Regards
Nandini
From: USUDA Hisashi<EMAIL_ADDRESS>Sent: Sunday, May 08, 2016 10:29 PM
To: CPFL/Autoware<EMAIL_ADDRESS>Subject: Re: [CPFL/Autoware] How to connect Autoware to the vehicle's CAN network? (#292)
Autoware communicates with the real vehicle using vehicle_socket.
twist_filter publishes twist_cmd, which is subscribed by vehicle_sender.
vehicle_sender and vehicle_receiver communicate with ZMP RoboCar (Autoware/vehicle/zmp/) via socket.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHubhttps://github.com/CPFL/Autoware/issues/292#issuecomment-217778824

@nsakar
Thank you for your question.

Is linear acceleration is meters.sev , kilonmeteres per second [ or minute, hour]?

meter per sec .

What is the unit of measure of angular orientation velocity [ radians per sec or degree per sec]  ?

radians per sec.
So in order to apply Autoware in your environment , please convert units of linear and angular velocity.

I am looking into the vehicle/ZMP file to understand the connection of the Autoware to the vehicle and it seems that the code HevCnt.h includes a library named: "HevControl.h". But I cannot find the code for this library in any Autoware directory. Can you help me in this regard? Is it deliberately not included in the files?

@arashroomi there are different ways to have Autoware to talk to different vehicles' CAN interfaces.
It depends on the drive-by-wire interface. I am aware of 2:

pacmod from AutonmouStuff: https://github.com/astuff/ros_pacmod
dataspeed from DataSpeed: http://wiki.ros.org/dbw_mkz_can


Any plans to add mixed precision training ?

Pytorch 1.6 now natively supports mixed precision training. This can lead to much faster training without loss in model accuracy.
I was wondering if you have any plans to add support for mixed precision training.
Right now, the model doesn't seem to be working with mixed precision. Thanks.

I do not have any plans to do so.


Mapping doesn't work when using  "Include()" in Lambda expression on Adapt

When i use Include() in the Lambda expression and try to use Adapt to mapping, the App crashes, and mapping doesn't work.

Include() in the Lambda without Adapt works great.
Adapt without Include() in Lambda also works great.

var product = _context.Products.Include(p => p.Category).FirstOrDefault(p => p.Id == ID).Adapt<ProductViewModel>();

I'm sorry to hear that. Do you have some more clues for this mystery, like an error message? Or maybe even.. a stack trace? :)

Sorry for the lack of details. But there isn't any error. stack trace shows nothing when this line runs. Output just displays details before calling Mapster Adapt. and after a while, debugging will be stop without any exceptions or errors.
Actually, I found the reason today.
The problem will appear when both the source and destination object has a relationship property.
`
Product Model :
public virtual Category Category { get; set; }
Category Model :
public virtual ICollection Products { get; set; }
`
But .ProjectToType works great in this situation.


ci: update homebrew formulae before running tests

Fixes #1980. I must admit, I'm no Homebrew expert (I actually don't have a mac handy), but from my testing (and reading of the man page this forces Homebrew to update its caches every time the CI runs. The only downside (aside from time) is it also upgrade Homebrew itself, which may not be fully desirable, but unfortunately I don't think there's a way to tell homebrew to only upgrade formulae (i.e. there is no equivalent to apt-cache update or some such)

Nice. I have a branch just like you to do it, and I went to bed because it was too late.


CR Status handling

Currently, we use the phase field on each CR. In case of error, there is no message on why it happened.
We should take advantage from using conditions
Also status on the securesign resource is not implemented yet.

@osmman you mentioned that you played with conditionsdo you have any progress? May I assign this issue to you?

@osmman you mentioned that you played with conditionsdo you have any progress? May I assign this issue to you?

Yes I can take it. Currently I am playing with TUF controller and auto discovering of public keys and certs for it. Currently I am putting status of is and one condition per service (Fulcio, Rekor, CTlog, TSA)


Anchor points with Reanimated 2

Hello,
I'd like to know if your library works with Reanimated 2 and if you could provide me an example if it does.
I tried different things but didn't get it to work.
Thanks

Can you provide an example of what you tried that didn't work?


Behaviour for zero config --foo=a ?

I suggest the intent of the user is clear, and the value should be stored?

The initial README did not clarify what happens with --foo=a with no configuration, as the result was overwritten by repeated option --foo b.
I assumed the value would be stored in update to README in #23, which has landed.
The current implementation ignores the value unless withValue is set for foo.

@shadowspawn are you thinking that --foo-a should implicitly behave as if foo was configured withValue? This seems like a good assumption to me.

I don't think this is a good idea. We should be keeping as few assumptions out of this implementation as possible & force the user to define when/if values are to be captured & returned or not (which opts them into a better overall experience).
What I think is happening here, & is concerning, is that we've changed the meaning of args (aka. flags) which is causing us to loose information & muddy context along the way.
Looking back (ref. https://github.com/pkgjs/parseargs/blob/3f057c1b158a1bdbe878c64b57460c58e56e465f/README.md), args (aka. flags) was meant to track the existence of an argument no matter what its value, or the provided function options, were. withValue was meant to define whether to return any value back in values (ie. a parsed string from "key=value", a captured positional string or undefined).
Looking at the most recent version of the spec:
// unconfigured
const argv = ['-f', '--foo=a', '--bar', 'b'];
const options = {};
const { flags, values, positionals } = parseArgs(argv, options);
// flags = { f: true, bar: true }
// values = { foo: 'a' }
// positionals = ['b']

I now need to do two different lookups to find the existence of an argument, & we've created a delineation of two "types" of arguments (ie. ones with & without values). Worse yet, there's no way to determine existence, vs. value, when using withValue.
// unconfigured
const argv = ['-f', '--foo=a', '--bar', 'b'];
const options = {};
const { flags, values, positionals } = parseArgs(argv, options);
const fooExists = (flags.foo || Object.keys(values).foo)

// `withValue`
const argv = ['-f', '--foo=a', '--bar', 'b'];
const options = {
  withValue: [ 'foo' ]
};
const { flags, values, positionals } = parseArgs(argv, options);
const fooExists = (flags.foo || Object.keys(values).foo) // always true

Previously, I could write the following no matter what the options...
const { args, values, positionals } = parseArgs(argv, options);
const fooExists = !!args.foo

Either way, my knee-jerk reaction here is that if we assume parsing of --key=value then...

we need to determine what the value is we return for --key= with & without withValue (potentially making further assumptions)
we need to re-evaluate withValue as a whole (as it seems like it would only be relevant for positional value association/parsing now)

What I think is happening here, & is concerning, is that we've changed the meaning of args (aka. flags) which is causing us to loose information & muddy context along the way.

I was a driver for that, sorry. The intended usage and potential benefits were not apparent to me (#13).
I am not sure there is more information with the original implementation, but I'll work through your example carefully before commenting further. Thanks for the detail, and I look forward to discussing the issues raised!

What behaviour were you expecting for an unconfigured --key=value?

Is your primary use case a user whipping up a CLI, or using this as a base for a more robust and fuller implementation?

What behaviour were you expecting for an unconfigured --key=value?

My original thought was thatkey would get added to flags & value would be ignored (I'm not opposed to changing this though, see more below)
const { flags, values, positionals } = parseArgs(['--foo=a']);
// flags = { foo: true }
// values = { }
// positionals = []

Is your primary use case a user whipping up a CLI, or using this as a base for a more robust and fuller implementation?

Both. The ease of use & understanding parseArgs().flags.foo returning the existence of --foo captures both audiences.
Take these two examples:
// node.js --foo=
parseArgs().flags.foo // undefined
parseArgs().values.foo // undefined

// node.js --foo
parseArgs().flags.foo // true
parseArgs().values.foo // undefined

This feels like non-deterministic behavior as in both cases I've set a flag but only changed how I've declared it's value. If I were able to rely on flags always returning true when a flag existed I can right better programs or abstractions.
Example: quick & dirty
// node program.js --debug # or...
// node program.js --debug="some debug prefix"
if (parseArgs().flags.debug) {
  const prefix = parseArgs().values.debug || 'debugger'
  console.log(`debug:`, process)
}

Example: more fully-baked validation & aliasing:
const { flags, values } = parseArgs({ withValue: ['org', 'force'] })
const settings = {
  org: {
    alias: 'b',
    usage: 'run this program with `--org <name>`',
    required: true,
    validate: Object.toString
  },
  force: {
    alias: 'f',
    usage: 'run this program with `--force` to force some action',
    default: false,
    validate: (value) => {
      if (~['true','false'].indexOf(value.toLowerCase())) {
        return Boolean(value)
      }
      throw Error('Type validation error!')
    }
  }
}
Object.entries(settings).map(([flag, option]) => {
  const isDefined = flags[arg] || flags[option.alias]
  const value = values[flag] || values[option.alias]
  if (!isDefined && option.required)
    throw Error('Required arguments are missing', option.usage)
  if (defined && option.validate)
    values[flag] = option.validate(value)
})

On "zero config"...
I'm honestly not that opposed to parsing --key=value by default but it does change how I see withValue & it's usefullness.
Changes & explicit rules we might want to consider if we go this route...

drop withValue
introduce acceptsPositionalValues(or some better name, we can bikeshed here)
--key= parses to undefined
--key=value parses to a string value
--key=value1 --key value2 parse things differently with & without acceptsPositionalValues &/or multiples options associated with the key

Examples of this in practice...
Notably, these all include/respect the idea that we'd return the existence of flags again in flags (as referenced above):
// no value
parseArgs(['--foo='])
/*
{
  flags: { foo: true },
  values { foo: undefined },
  positionals: []
}
*/

// key=value
parseArgs(['--foo=a'])
/*
{
  flags: { foo: true },
  values { foo: 'a' },
  positionals: []
}
*/

// multiple flags, no options
parseArgs(['--foo=a', '--foo'])
/*
{
  flags: { foo: true },
  values { foo: undefined },
  positionals: []
}
*/

// multiple flags, with `multiples` option
parseArgs(['--foo=a', '--foo'], multiples: [ 'foo' ])
/*
{
  flags: { foo: true },
  values { foo: [ 'a', undefined ] },
  positionals: []
}
*/

// positional, no options
parseArgs(['--foo=', 'bar'])
/*
{
  flags: { foo: true },
  values { foo: 'a' },
  positionals: ['bar']
}
*/

// positional, with `acceptsPositionalValues` option
parseArgs(['--foo=', 'bar'], { acceptsPositionalValues: ['foo'] })
/*
{
  flags: { foo: true },
  values { foo: 'bar' },
  positionals: []
}
*/

That said, this doesn't solve the problem of not accepting

Examples of this in practice...

A quick note that I think --foo= should set the value to the empty string, not to undefined.
(Early morning here. Hopefully I will have time tonight for some in depth replies.)

"(Early morning here. Hopefully I will have time tonight for some in depth replies.)"

No worries. Take your time. I know I wrote a lot (apologies; I'm playing catch-up for not having time over the last ~3-6months)

"A quick note that I think --foo= should set the value to the empty string, not to undefined.

🤔 We might just have to agree to diasgree 🤷🏼♂ (I noted as much in our other thread)
For me, my expectation is that --foo & --foo= would be the same (ie. undefined). --foo="" is explicitly an empty string.
At least in JS...
let foo=;    // is an error
let foo;     // is undefined
let foo='';  // is an empty string

For normal command-line use, there is parsing going on from shell script before node or client code every see the args. I think this makes the distinction between --foo= and --foo="" moot, they look the same by the time they reach parseArgs. Simple example:
$ echo --foo=""
--foo=

With that in mind, I'd think that --foo should probably be same as well... so --foo="", --foo= & --foo all set values.foo=""; thoughts?

--key= should parse to the empty string, just like in a URL query string. --key should parse to either undefined or true.

I'll pick up this comment first because I think it highlights some key points of confusion or contention. I won't write an essay about every two sentences! And epic exposition in later comment https://github.com/pkgjs/parseargs/issues/24#issuecomment-1013961587 , thanks @darcyclarke , I'm going to read through that multiple times before commenting on it.

I now need to do two different lookups to find the existence of an argument, & we've created an arbitrary delineation of two "types" of arguments (ie. ones with & without values).

There are different user affordances provided by either approach. To be clear, I am not against your original intentions now you have explained it. From experience with Commander and reading about Yargs and Minimist, I expected a single result object rather than a pair and came up with a different pattern to try and justify the pair: an explicit delineation of two types of arguments, the ones with and without values. I actually thought this might have been part of the original intent, some sort of type safety, one holds booleans and one holds strings in the normal case. I was way wrong about the intent. :-)
Let's assume for a moment we stick with the current suggestion, misguided as it may be. I don't think there is loss of information or difficulty in use.
As the author, I know what I am expecting. If I want to check a boolean flag has been used, I simply check flags[key. If I want to check an option for which I am expecting a value, if I am ignoring empty strings I can simply check !!values[key], or to include the empty string then values[key] !== undefined.
If I am testing for the existence of an argument with or without a value, I do need to check two values. But this does not seem like a happy-path case.

Worse yet, afaict, there's no way to determine existence, vs. value, when using withValue.

I don't think I understand. If foo is included in withValue, it will have a value in values if it was specified on the command-line. It will not have a value in values if it was not specified on the command-line. The tricky case is --foo without a positional to supply the value (#25) and the suggestion was to store undefined. (I think storing undefined should be be avoided in happy-path cases because it is a pain to test for and a pain to talk about, the property is defined with the value undefined. More reasonable in unhappy path cases like this one.)

(Treating --foo=a like implicit withValue.)

I don't think this is a good idea. We should be keeping as few assumptions out of this implementation as possible & force the user to define when/if values are to be captured & returned or not (which puts them into a better overall experience).

My original thought was thatkey would get added to flags & value would be ignored (I'm not opposed to changing this though, see more below)

My concern with that approach when I came across it in the implementation was it has thrown away information. This seems inconsistent with "bring your own validation".

I should say explicitly that I am not heavily invested in the current mutually exclusive flags/``values! (I came in expecting a single options result with strings for options with values and true for boolean flags. The XOR flags/values` was influenced by that more common pattern.)
I am fine with the seen/value concept in theory. However,  I am questioning whether it preserves any additional information.  If there is no extra information, the pattern has to stand on its other merits.
Part of the point of my refactor in PR #26 was to make it easy to tweak the behaviour, and easy to reuse the behaviour when adding short options.

This may be a side-track, but caught my eye.
Example from https://github.com/pkgjs/parseargs/issues/24#issuecomment-1013961587
Example: quick & dirty...
// node program.js --debug # or...
// node program.js --debug="Some debugger prefix"
if (parseArgs().flags.debug) {
  const prefix = parseArgs().values.debug || 'Debugger'
  console.log(`${prefix}:`, process)
}

Alarm! Alarm! When I reread this, are you wanting to routinely support options which may or may not have a value supplied on the command line?  If that is the intent, I have a longer story about why I think options with optional values should be avoided as a concept in a simple parser. (In Commander they are explicitly supported, so I have some experience. They seem best of both worlds, a boolean flag or an option with a value, but lead to end-user confusion about parsing outcomes. I admit they are easy to implement with seen/value semantics though!)
You may have just used this as an example of conveniently coping with an error case, in which case disregard this alarm! You did say:

force the user to define when/if values are to be captured & returned or not (which puts them into a better overall experience).

I'm honestly not that opposed to parsing --key=value by default but it does change how I see withValue & it's usefullness.

If we do parse the value, I still see withValue as the preferred approach for a well defined user interface, to make these two the same:
do --foo=bar
do --foo bar

and to (potentially) make this a detectable error:
do --foo

It is appealing that taking a value from --foo=bar allows zero-config values if the author and the end-user agree on the convention, and the end-user intent is clear. But cunning-appealing often comes with a cost, and this is a special case we don't need to support.
My problem is I don't think silently parsing it as a boolean flag is appropriate either. (Not least because of possible exposure to programs using Minimist and Yargs, and erroneous use of --explode=false`.)
Hmm, a suggestion from most recent meeting was to pass-through unrecognised uses. Maybe this qualifies, so this could be parsed as a positional? A bit wild and would be ambiguous with uses of --. A third unsatisfying approach!

Example: more fully-baked validation & aliasing...

This is a nice example of serious intent! https://github.com/pkgjs/parseargs/issues/24#issuecomment-1013961587
I think the aliases need to be passed to parseArgs in shorts, not handled afterwards.
The two lines that change are the first two lines (from example, with aliases removed):
  const isDefined = flags[flag]
  const value = values[flag]
  if (!isDefined && option.required)
    throw Error('Required arguments are missing', option.usage)
  if (defined && option.validate)
    values[flag] = option.validate(value)

Arguably it would be better for lone --foo to be detected as missing required value, and included that as extra example.
With XOR flags/values semantics:
// to match original example behaviour faithfully
const isDefined = values[flag] !== undefined || flags[flag]
const value = values[flag]

// `--foo` detected as missing required value, and empty string allowed
const isDefined = values[flag] !== undefined
const value = values[flag]

To implement these with a combined options object with true for boolean flags, like Commander or Yargs:
// to match original example behaviour faithfully
const isDefined = combined[flag] !== undefined
const value = combined[flag]

// `--foo` detected as missing required value, and empty string allowed
const isDefined = typeof  combined[flag] === 'string'
const value = combined[flag]

I found that all worthwhile, but should I just change my refactor PR to the seen/value semantics and we run with that again as the original vision?
(And separately improve the documentation so gentle readers understand the intent.)
(And probably change the name of flags, again.)
(And I am not a fan of storing undefined for the value for a boolean flag, but since it is same in most code as storing nothing it won't get in the way much in practice. Just annoy me until I see some concrete benefit. 😄  )

Ok, back on topic for a fresh look informed by discussions.
I asked what the behaviour should be for zero config --foo=a. I consider this an edge case because not consistent with what author specified. Possible approaches with pros and cons.

Treat as if foo was configured in withConfig.

pro: what the end-user intends
pro: no data loss for bring-your-own-validation
con: not what author configured

Treat as if --foo was specified as a plain boolean flag.

con: not what the end-user intends
con: data loss so no bring-your-own-validation
pro: consistent with what author configured

Punt and return arg as positional.

con: not what the end-user intends
neutral: some data loss for bring-your-own-validation, as ambiguous with -- escaped arguments
con: not really consistent with what author configured

Independent of above, should probably be an error if we support strict

Early feedback: Darcy and Jordan and I ok with (1).
Darcy open to possibility of (1), but still catching up and considering implications (which could affect early feedback).

I think if not 1, we’d want 4.

I think the 1st option is the best default to implement

Option 1 is consistent with my new story for high level approach. Looks like a flag, stored like a flag. Looks like a value, stored like a value.

In other words, the way they're stored matches the intention of the user, not the configurer, which will ensure the configurer can most accurately respond to the user's intentions.

(Yes indeed. Nicely put @ljharb, thanks.)

Here is a run through of my proposed behaviours for an option used with zero-config. The option is implicitly a boolean flag and not expecting a value.
The naming and output I have used here is based on the "existence" pattern per: https://github.com/pkgjs/parseargs/issues/38#issuecomment-1017327974
const { parseArgs } = require('@pkgjs/parseargs');
const { options, values } = parseArgs();
console.log({ options, values });

Remember, only the first usage is consistent with a flag which does not take a value. The other two are misuse which can be detected by the client if desired.
$ node zero.js --foo
{ options: { foo: true }, values: {} }

$ node zero.js --foo=
{ options: { foo: true }, values: { foo: '' } }
$ node zero.js --foo=bar
{ options: { foo: true }, values: { foo: 'bar' } }

I’m confused; with zero-config, why would foo ever give true if there’s an equals sign present?

Because I am using the convention from Darcy's initial spec that one of the results holds whether an option was used on the command line at all, either as a flag or with a value. So in this example the options result records the existence of the option in the input args. (Unfortunately, having multiple conventions in flight is making it hard to talk about anything clearly!) See #38 for longer discussion. I'll add a line clarifying what options is.

That makes sense, thanks - so we have "options", "values", and "flags"?

Those are the terms I am using, yes. (Or are you asking if parseArgs returns all three?)

I'm asking if those are the three potential properties of that object.

The returned object will have just two of those properties, depending on which we implement:

"options" and "values" (aka "existence"), or
"flags" and "values" (xor, option appears in one or the other)

(I'm being very careful as I am not sure I understand your question and not sure if yes or no is the answer! Ask again if my answer is still not useful, we might be at cross-purposes.)

If I configure one flag, one value, and three arguments are passed, I would expect "options" to contain all three, "flags" to contain one or two, and "values" to contain one or two. No?

Short version: no.
(If you give me an example call, I'll lay out the two result flavours I have in mind.)

node index.js --foo --bar --baz, where foo is defined as a flag and bar as withValue?

First clarification, there is currently no ability to define flags. (Which is a blocker for strict!)
Second, I'll reply with a worked example, but have run out of time to make sure I get it right. Will answer later.

If there were such an ability, then would my expectations match? ie, { options: { foo: true, bar: true, baz: true }, flags: { foo: true }, values: { foo: undefined, baz: undefined } }?

 node index.js --foo --bar --baz, where foo is defined as a flag and bar as withValue?

Long answer.
In this comment:

returned options records whether an option appears in the args
returnedflags records whether an option has been used as a flag in the args

// hypothetical `flags` and `strict` configuration
console.log(parseArgs(['--foo', '--bar', '--baz'], { flags: 'foo', withValue: ['bar'], strict: false }));

foo: configured as a flag and used as a flag
bar: configured as withValue but used as a flag
baz: zero-config flag and used as a flag
"options" and "values" (aka "existence")
{
  options: { foo: true, bar: true, baz: true },
  values: {},
  positionals: []
}

"flags" and "values" (xor, option appears in one or the other)
{
  flags: { foo: true, bar: true, baz: true },
  values: {},
  positionals: []
}

Side note: I am suggesting we do not store undefined in values for flags, and just leave it undefined. Author still writes code like values[key] !== undefined without needing to wonder about hasOwnProperty.

That also means Object.keys(values) lacks useful information.
"needing to wonder about hasOwnProperty" is also "is able to differentiate between absent and undefined", which is a pretty important ability.

That also means Object.keys(values) lacks useful information.

Yes indeed, values is not the sole source of truth. But the questions I considered can easily be answered with the information available.
(I started out working through examples testing for explicit undefined and was not happy with the experience. Then I had the realisation that "looks like a flag, store like a flag" reduces and simplifies the possible results. Still championing that concept!)
Leaving aside multiples for now, an option is either used as a flag or with a value. The author know which they intended. The results show what the end-user did.
Have a look at the uses cases I run through in #38 to see if I missed something important.


Added -Wconversion -Wpointer-arith #175 - tests build (without source file changes)

Enabled warnings for all tests that don't require source changes. #973

bors r+

bors r+


Starting template != completed template Quick Start Template

projectName variable doesn't exist in previous Quick start template as noted
Review template
The template used in this tutorial is similar to the template used in the tutorial about Quickstart templates. If you are interested in creating the template, you can go through that tutorial. However it's not required for completing this tutorial.
The template deploys a storage account, app service plan, and web app."

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 479023c0-ce6b-aabf-1176-14f26ebb723b
Version Independent ID: f9933734-1c39-63d7-27c2-32e069d1582e
Content: Tutorial - Deploy a local Azure Resource Manager template - Azure Resource Manager
Content Source: articles/azure-resource-manager/templates/deployment-tutorial-local-template.md
Service: azure-resource-manager
Sub-service: templates
GitHub Login: @mumian
Microsoft Alias: jgao

@eric-camplin Thanks for your comment. We will review the issue and get back to you shortly.

@eric-camplin I am bit confused by the question you have asked as it is too vague. I have gone through the document projectName is just another way to name a resource group and it can be used either ways. If possible, can you please elaborate on your request?

Sorry, to clarify, this document states "The template used in this tutorial is similar to the template used in the tutorial about Quickstart. If you are interested in creating the template, you can go through that tutorial."  but the previous template does not include projectName.  I am suggesting that the bolded is incorrect.  The previous project resulting template will not work for this tutorial as it will error due to not finding projectName.

Thanks for your valuable feedback. We have updated the document and the changes should reflect soon. We will close the issue for now. If you have further questions, kindly revert.