AndroidViewModel doesnot update the resources with locale changes

I have an application that supports locale changes but when i try to change, the local resources with context changes but when i do the same in AndriodViewModel it doesnot work with application
*context.getResources().getString(R.string.sample) , this work if it is activity context *application.getResources().getString(R.string.sample), this fails to support locale support
Here is my viewmodel sample where i try to application.getResources().getString(R.string.sample) but fails to get locale change text
public class SampleViewModel extends AndroidViewModel {
private Application application;
public SampleViewModel(Application application) {
    super(application);
    this.application =  application;
}

public List<Species> getSampleList() {
   List<Sample> sampleList = new ArrayList<>();
  sampleList.add(new Sample(application.getResources().getString(R.string.sample));
   sampleList.add(new Sample(application.getResources().getString(R.string.sample));
   return sampleList;

}
and i updated in activity as well as application
(in activity i override this)
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(LocaleManager.setLocale(base));
}
(in application i override this)
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(LocaleManager.setLocale(base));
}
public class LocaleManager {
public static Context setLocale(Context c) {
    return updateResources(c, getLanguage(c));
}

private static Context updateResources(Context context, String language) {
    Locale locale = new Locale(language);
    Locale.setDefault(locale);

    Resources res = context.getResources();
    Configuration config = new Configuration(res.getConfiguration());
    if (Build.VERSION.SDK_INT >= 17) {
        config.setLocale(locale);
        context = context.createConfigurationContext(config);
    } else {
        config.locale = locale;
        res.updateConfiguration(config, res.getDisplayMetrics());
    }

    return context;
}

}

This is not an issue with the samples.
if this is an issue with the components, please use the official issue tracker to report it.

I believe you may need to reload your activity/fragment after changing locale.

try to update your config of application context, instead of activity/fragment context,
it works for me.
val config = context.applicationContext.resources.configuration
Locale.setDefault(locale)
config.locale = locale
context.applicationContext.getResources().updateConfiguration(config, context.applicationContext.getResources().getDisplayMetrics());

Affected by same problem. I wished to create method in viewmodel with the args of string(localized) which will be passed from fragment or activity.


CODE?

CODE?

Please open source all the code

Please open source all the code

Please open source all the code


Chore/font update

looks good!
for bonus points, you can add a section to the readme (or a new docs/ui.md) describing how to add fonts to the website. this could be the start of practicing documentation to ensure everyone uses the same methods.

Good point! Will work on this soon!


invalid memory address or nil pointer difference

hi team,
I got bellow snap shot issue when I run the instructions. I have added "PBF_FILE=muve.osm.pbf"  in ".env"  file and added that file to the "data/import" folder

please give help me to solve this
here is my fille link https://drive.google.com/file/d/1X4UlOPCezo4xzdZM8iYX52htOIMieSJS/view?usp=sharing
related issue with https://github.com/OSMNames/OSMNames/issues/190

please give help me to solve this

according to osmium check-refs   - your input osm file (muve.osm.pbf)  is not valid ...
osm@10e96446737b:/osm/data$ osmium sort muve.osm.pbf -o muve_sorted.osm.pbf
[======================================================================] 100%
osm@10e96446737b:/osm/data$ osmium check-refs muve_sorted.osm.pbf
[======================================================================] 100%
Node ID twice in input. Maybe you are using a history or change file?
This command expects the input file to be ordered: First nodes in order of ID,
then ways in order of ID, then relations in order of ID.

it is not a valid osm file ...    lot of nodes duplicated ..
osm@10e96446737b:/osm/data$ osmium cat  muve.osm.pbf -t node  -f opl | grep n844674876 | head
n844674876 v1 dV c0 t2010-08-03T11:31:55Z i0 u Tname=Kiribathgoda%20%Base%20%Hospital,amenity=hospital x79.9292155 y6.9838357
n844674876 v1 dV c0 t i0 u Tamenity=hospital,name=Kiribathgoda%20%Base%20%Hospital,operator=Asanka,addr:city=Kiribathgoda x79.9292155 y6.9838357
n844674876 v1 dV c0 t i0 u Tamenity=hospital,name=Kiribathgoda%20%Base%20%Hospital,operator=Asanka,addr:city=Kiribathgoda x79.9292155 y6.9838357
n844674876 v1 dV c0 t i0 u Tamenity=hospital,name=Kiribathgoda%20%Base%20%Hospital,operator=Asanka,addr:city=Kiribathgoda x79.9292155 y6.9838357
n844674876 v1 dV c0 t i0 u Tamenity=hospital,name=Kiribathgoda%20%Base%20%Hospital,operator=Asanka,addr:city=Kiribathgoda x79.9292155 y6.9838357
n844674876 v1 dV c0 t i0 u Tamenity=hospital,name=Kiribathgoda%20%Base%20%Hospital,operator=Asanka,addr:city=Kiribathgoda x79.9292155 y6.9838357
n844674876 v1 dV c0 t i0 u Tamenity=hospital,name=Kiribathgoda%20%Base%20%Hospital,operator=Asanka,addr:city=Kiribathgoda x79.9292155 y6.9838357
n844674876 v1 dV c0 t i0 u Tamenity=hospital,name=Kiribathgoda%20%Base%20%Hospital,operator=Asanka,addr:city=Kiribathgoda x79.9292155 y6.9838357
n844674876 v1 dV c0 t i0 u Tamenity=hospital,name=Kiribathgoda%20%Base%20%Hospital,operator=Asanka,addr:city=Kiribathgoda x79.9292155 y6.9838357
n844674876 v1 dV c0 t i0 u Tamenity=hospital,name=Kiribathgoda%20%Base%20%Hospital,operator=Asanka,addr:city=Kiribathgoda x79.9292155 y6.9838357

@ImreSamu , Is there any way to fix the file issues like you mentioned here ?

Is there any way to fix the file issues like you mentioned here ?

imho:

this is just the first detected problems ...  maybe other problem can be exists;
so it is easier to fix your workflow  ; and try re-create the input files - on the good way ...
You have to ask help - on the general osm developer forum ..  describing your workflow; problem; input files ; expected results ...

https://forum.openstreetmap.org/viewforum.php?id=13
....


[Misc] update benchmark backend for scalellm

FILL IN THE PR DESCRIPTION HERE
support scalellm
# install from https://github.com/vectorch-ai/ScaleLLM/releases

# server
python3 -m scalellm.serve.api_server --model /workdir/Llama-2-13b-chat-hf

# client
python3 benchmark_serving.py --backend scalellm --host <IP_ADDRESS> --port 8080 --dataset /workdir/ShareGPT_V3_unfiltered_cleaned_split.json  --model Llama-2-13b-chat-hf --tokenizer /workdir/Llama-2-13b-chat-hf --num-prompts 1000 --request-rate 128

Hi @ywang96 @mgoin May you help review this PR? Thanks.
I know this can be achieved by specifying the backend openai to make benchmark work. And I would like to say that this is a very promising project and worth listing separately.  Cheers. cc @guocuimi
BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE

 PR Checklist (Click to Expand)
Thank you for your contribution to vLLM! Before submitting the pull request, please ensure the PR meets the following criteria. This helps vLLM maintain the code quality and improve the efficiency of the review process.
PR Title and Classification
Only specific types of PRs will be reviewed. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:

[Bugfix] for bug fixes.
[CI/Build] for build or continuous integration improvements.
[Doc] for documentation fixes and improvements.
[Model] for adding a new model or improving an existing model. Model name should appear in the title.
[Frontend] For changes on the vLLM frontend (e.g., OpenAI API server, LLM class, etc.)
[Kernel] for changes affecting CUDA kernels or other compute kernels.
[Core] for changes in the core vLLM logic (e.g., LLMEngine, AsyncLLMEngine, Scheduler, etc.)
[Hardware][Vendor] for hardware-specific changes. Vendor name should appear in the prefix (e.g., [Hardware][AMD]).
[Misc] for PRs that do not fit the above categories. Please use this sparingly.

Note: If the PR spans more than one category, please include all relevant prefixes.
Code Quality
The PR need to meet the following code quality standards:

We adhere to Google Python style guide and Google C++ style guide.
Pass all linter checks. Please use format.sh to format your code.
The code need to be well-documented to ensure future contributors can easily understand the code.
Include sufficient tests to ensure the project to stay correct and robust. This includes both unit tests and integration tests.
Please add documentation to docs/source/ if the PR modifies the user-facing behaviors of vLLM. It helps vLLM user understand and utilize the new features or changes.

Notes for Large Changes
Please keep the changes as concise as possible. For major architectural changes (>500 LOC excluding kernel/data/config/test), we would expect a GitHub issue (RFC) discussing the technical design and justification. Otherwise, we will tag it with rfc-required and might not go through the PR.
What to Expect for the Reviews
The goal of the vLLM team is to be a transparent reviewing machine. We would like to make the review process transparent and efficient and make sure no contributor feel confused or frustrated. However, the vLLM team is small, so we need to prioritize some PRs over others. Here is what you can expect from the review process:

 After the PR is submitted, the PR will be assigned to a reviewer. Every reviewer will pick up the PRs based on their expertise and availability.
 After the PR is assigned, the reviewer will provide status update every 2-3 days. If the PR is not reviewed within 7 days, please feel free to ping the reviewer or the vLLM team.
 After the review, the reviewer will put an  action-required label on the PR if there are changes required. The contributor should address the comments and ping the reviewer to re-review the PR.
 Please respond to all comments within a reasonable time frame. If a comment isn't clear or you disagree with a suggestion, feel free to ask for clarification or discuss the suggestion.

Thank You
 Finally, thank you for taking the time to read these guidelines and for your interest in contributing to vLLM. Your contributions make vLLM a great tool for everyone!

LGTM! I assume you have run the benchmark against scalellm and verified it indeed works without an issue?

Exactly. It’s blazing fast!

ref https://github.com/vectorch-ai/ScaleLLM/issues/144#issuecomment-2199530934

Hi @ywang96 May you help trigger the failed checks? Thanks.

I'll have this PR force merged since it doesn't touch anything related to the CI.

This seems like we could just use --backend openai, or am I missing something? If it's a small cosmetic change, I don't see the value in explicitly calling it out as a backend string. This pattern could lead to a lot of "integrations" that seem overly complex when it is just using openai.
Also in that performance link you mentioned, it seems slower than TurboMind? I'm not going to block, just a bit confused on the value of this change to be explicit with the backend if not necessary.
# TurboMind
============ Serving Benchmark Result ============
Successful requests:                     1000
Benchmark duration (s):                  108.19
Total input tokens:                      245995
Total generated tokens:                  196273
Request throughput (req/s):              9.24
Input token throughput (tok/s):          2273.65
Output token throughput (tok/s):         1814.09

# ScaleLLM
============ Serving Benchmark Result ============
Successful requests:                     1000
Benchmark duration (s):                  115.64
Total input tokens:                      245995
Total generated tokens:                  195334
Request throughput (req/s):              8.65
Input token throughput (tok/s):          2127.27
Output token throughput (tok/s):         1689.17

This seems like we could just use --backend openai, or am I missing something? If it's a small cosmetic change, I don't see the value in explicitly calling it out as a backend string. This pattern could lead to a lot of "integrations" that seem overly complex when it is just using openai.
Also in that performance link you mentioned, it seems slower than TurboMind? I'm not going to block, just a bit confused on the value of this change to be explicit with the backend if not necessary.
# TurboMind
============ Serving Benchmark Result ============
Successful requests:                     1000
Benchmark duration (s):                  108.19
Total input tokens:                      245995
Total generated tokens:                  196273
Request throughput (req/s):              9.24
Input token throughput (tok/s):          2273.65
Output token throughput (tok/s):         1814.09

# ScaleLLM
============ Serving Benchmark Result ============
Successful requests:                     1000
Benchmark duration (s):                  115.64
Total input tokens:                      245995
Total generated tokens:                  195334
Request throughput (req/s):              8.65
Input token throughput (tok/s):          2127.27
Output token throughput (tok/s):         1689.17

I think the point is that by explicitly listing as a "backend" option, it's easier to compare benchmark results after they're saved in the json format (Otherwise it'll be listed as "openai" and that is rather inconvenient).

Thanks to the previous design and development work by @ywang96, the benchmark script of vLLM is professional and user-friendly, especially for comparing various inference frameworks. Currently, most inference frameworks support OpenAI's interface, such as LMDeploy, vLLM, and also including the ScaleLLM mentioned here. I believe this is a project with great potential, even though it currently lags slightly behind TurboMind in performance. ScaleLLM is still under development with many performance optimization features in progress, which is very exciting. This also demonstrates that integrating the FlashInfer library for an inference framework on NVIDIA GPUs plays a significant role. Additionally, the differentiation in names mentioned by @ywang96 is also an important point.


Some put commands may leave '] in wrong position

Describe the bug
Using a put command to put the text of a register might leave '] mark in a wrong position when these conditions are met:

The put command is p, P, ]p, [p, zp, or zP.
The text contains line break(s).
The register type is characterwise.
A count (> 1) is given to the put command.

To Reproduce

Run vim -Nu NONE.

:source this script:
new
call setreg('@', "foo\nbar", 'c')
normal! 3p`]i#

The new window consists of these lines:
foo
ba#rfoo
barfoo
bar

Expected behavior
The new window consists of these lines:
foo
barfoo
barfoo
ba#r

Environment

Vim 8.2.3469
macOS 10.15.7
iTerm2

Additional context
Same issue with gp and gP has been fixed by https://github.com/vim/vim/commit/56858e4ed4e338e15821767b8303b06099e40384.

Thanks! 🎉


Apply coin selection for spend

These are some initial changes towards #51.
I've added a selectcoinsforspend command that applies BnB coin selection using a waste metric.
This coin selection is then used in createspend if no coins are specified.
@darosior The changes are still in their early stages so I'm creating this draft PR to facilitate discussion about the approach in general and specific details.

Thanks for trying out my bdk coin selection work. It was really helpful to see what was unclear for improving and documenting the API. Cheers! I left some comments.

Hi @LLFourn, thanks very much for looking through the changes and adding comments. I really appreciate it. I'll go through those and reply as required.

Hi @darosior, regarding GUI integration, I think there are two options:

We could add an "auto-select" button to the coin selection area of the Send page, which would then show the auto-selected coins (as if the user had ticked them manually) in the list of coins and allow further editing by the user. This would provide a safeguard against over-consolidation, for example, and give the user transparency about which coins are being used in the transaction before creating it. For this option, we might need to add a standalone command for selecting coins.
Alternatively, when using auto-select, a new transaction would be created without the user first seeing which coins have been selected, so we would skip the part of the Send page that lists (selected) coins.

Did you have in mind one of these options?

Hey, yes. Thanks for bringing that up.
I think we should always auto-select coins and the user can manually opt to select different ones. I don't think this needs another command, we might as well reuse createspend since we need all the same arguments (destinations, feerate). I'm not too familiar with the GUI logic but i had in mind something like: "once they've filled in the destination(s) and the feerate, run a createspend and tick the coins in the list that were chosen". If they update the feerate or the destination, we need to update the selected coins too. If they start ticking coins before they fill-in the destinations and feerate i don't know, probably opt-out of automated coin selection. Does that make sense?
Also, you probably want to work on the GUI integration in another PR. So you can update the liana dependency to this branch and later point it back to master.

Yep that makes sense thanks. I agree that it's better to give the user the option to edit the selection. And it's true that a separate command shouldn't be required as we can determine the selected coins from the return value of createspend, so I'll start with this approach and see how it goes.

Also, you probably want to work on the GUI integration in another PR. So you can update the liana dependency to this branch and later point it back to master.

Oh yes good point, I'll add GUI changes in a separate branch and PR.

I've added a basic proof of concept for the GUI in https://github.com/jp1ac4/liana/tree/add-auto-coin-selection-to-gui.
As the approach discussed above seems like it should work, I'll leave the GUI changes for now and will focus on adding tests to this current PR.

Regarding the failure in the Rust v1.48 CI i've just merged https://github.com/wizardsardine/liana/pull/561 which bumps our MSRV from 1.48 to 1.54. I guess it could help.

Thanks for that. I've rebased on master (and took the chance to squash my commits as I was getting a conflict otherwise from an intermediate change) and all checks are now passing :100:

I created a couple conflicts by upgrading rust-miniscript and rust-jsonrpc, but they should be trivial.

I've now rebased on master and resolved the conflicts.

Thanks.
For anyone following along: i discussed it with @jp1ac4 elsewhere and we decided to put this on hold until upstream is merged. Efforts will be moved elsewhere for now but we'll get back to this eventually.

Thanks the effort here was really useful for me to learn some strengths/weaknesses of the API.

I've updated my previous changes based on the changes in https://github.com/bitcoindevkit/bdk/pull/1072.
Now, the select_coins_for_spend function uses the LowestFee metric and min_value_and_waste change policy. If no BnB solution is found, it will attempt to select coins by descending value. It also returns the change amount for use when creating the spend transaction in create_spend.
As well as any general refactoring and improvements, I still need to add tests.

Rebased on master.

Regarding considering unconfirmed coins.
Considering unconfirmed coins in the selection makes things more difficult. Now we need to pay fees for the unconfirmed parent as well, which also affects the cost of including an input. And we need to be careful not to create a too large unconfirmed chain of transactions. Also unconfirmed coins shouldn't be introduced in a replacement transaction once we do RBF.
I don't think we should introduce the complexity of correctly dealing with unconfirmed transactions just yet. This leaves us with two imperfect possibilities:

Include unconfirmed coins, but treat it as though they were confirmed. This may result in undershooting the fees, potentially creating a too long transaction chain as the wallet gets used but nothing confirms.
Don't include unconfirmed coins and fallback to manual coin selection if we can't find a solution. In this case we should disclaim it to the user somehow.

I'm in favour of the latter, but i'm happy to reconsider.

Ah I see, I'm also happy with the latter approach in that case. We can consider any extra information to give the user as part of #563.

This may not be a problem, but I've found that when a transaction will give a change amount close to the dust threshold of 5000 sats, there can be a difference between the transaction created with auto vs manual selection, even if the same coins are used as inputs.
I created two PSBTs with a target feerate of 10 sats/vb.
This one used auto selection and gave change amount of 5000 sats:

Here, I selected the same coins manually and there was no change output, leading to a higher estimated feerate:

I signed and broadcast the first PSBT to make sure its feerate was not lower than the 10 sats/vb:

The feerate was 10.7 sats/vb according to https://mempool.space/signet/tx/6f3df02ced55effd873df27ed7a266bda729d41d905bbfbf49d313672b162b4f.

Based on further discussion, I'll change create_spend() so that we determine the change amount using bdk_coin_select::change_policy for both manual and auto selection, which should ensure consistency when transaction inputs are the same.

Rebased it for you here during my review, if that helps: https://github.com/darosior/liana/tree/rebased_pr_560.

I've just pushed my latest changes, which include some failing tests that I'm still investigating.
The main difference is that now the select_coins_for_spend() function is used in both manual and auto cases to ensure consistency in change amount. For manual coin selection, the specified coins are pre-selected and not chosen by BnB so that only the change amount is left to determine.
I've removed some code from create_spend() that was used to determine change amount.

I've mostly addressed your comments now in https://github.com/wizardsardine/liana/pull/560/commits/2a1fcd9b7bd2fd8547cb8ee3b712c7910a4e3eb6, including with changes from your branch (https://github.com/darosior/liana/tree/pr_560_modified - thanks :pray:).
I still need to fix the failing functional test. Will squash commits again once no more changes are planned.

It can happen that attempting a self-send of a coin near the dust limit will result in a transaction with no outputs, which then returns a SanityCheckFailure with a message saying it's a bug that should be reported. Previously, this would return an InsufficientFunds error. Should we check for a self-send with no outputs before calling the sanity check and return InsufficientFunds?

I still need to fix the failing functional test.

This has now been fixed. It was related to the order of transaction inputs no longer being guaranteed to be the same as the order in the coins_outpoints parameter.

Should we check for a self-send with no outputs before calling the sanity check and return InsufficientFunds?

Yes. Good catch.

I've now added a check for a self-send with no change and updated the test. This check was there before and I had accidentally removed it as part of the other updates to create_spend.
I also updated a comment and removed an unused variable.

The first force-push to https://github.com/wizardsardine/liana/commit/4bca5c850af4479dfd2a5ee388417cff7d17b622 included the following changes:

update bdk_coin_select dependency commit hash
remove unused out_value variable and edit comment
move conversion of feerate_vb to f32 to create_spend and return error if it fails

The second force-push to https://github.com/wizardsardine/liana/commit/cfa0f91dd36bc81d5820baf975930e94063ef691 was to rebase on master as there was a conflict.

I'm going to merge this. I think it's in good shape, and we are going to continue testing it anyways (with the GUI integration and the RBF work). We can also update to the new upstream API in a followup.
Congrats on getting this almost-5-months old PR to the finish line @jp1ac4!


Errors when compiling it using Visual Studio 2019

I am getting the following errors when compiling it using Visual Studio 2019 via the build.bat:
imgview.cpp
c1xx: fatal error C1083: Cannot open source file: '..\imgview.cpp': No such file
or directory
After fixing the buiild.bat:
imgview.cpp
imgview.cpp(810): error C2664: 'HANDLE CreateThread(LPSECURITY_ATTRIBUTES,SIZE_T
,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD)': cannot convert argument 3 from '
DWORD (__cdecl *)(void *)' to 'LPTHREAD_START_ROUTINE'
imgview.cpp(810): note: None of the functions with this name in scope match the
target type
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\processthreadsapi.h(170
): note: see declaration of 'CreateThread'

Are you trying to compile for 32 bit mode? I think that's what might cause this issue.

Yes. I am trying to compile a 32-bit build of it.

I have created #8 to fix this bug. As of the second second part, if compiling under 32-bit mode, adding WINAPI on line 673 fixes the compiler error:
673 DWORD WINAPI GetFolderContents(void *_filePath) {
However, doing so exposes a linker error unresolved external symbol __ftol2_sse. As by the guide here, you can use the following snippet to define _ftol2_sse:
#ifdef __cplusplus
extern "C"
#endif
__declspec(naked) void _ftol2_sse()
{
__asm
{
fistp dword ptr [esp-4]
mov   eax,[esp-4]
ret
}
}


not working?

i am able to change it and it even shows when i type ifconfig, i'm using this to bypass a wifi pause but when its "changed" its still knows its the same device? I don't know why this suddenly stopped working it was working really well just a few days ago

You probably should also change the name your computer uses https://support.apple.com/guide/mac-help/change-computers-local-hostname-mac-mchlp2322/mac

Hey there, thanks for replying, it somehow started working again :)


Fix class names

Fixed class names (closes: #99 ): message popover, overlay widgets, boost progress, microphone test meter and game overlay settings.
Removed mod view theming that is no longer needed: now it is all the color of the user's profile, therefore not dark.

Sorry for the late review, everything LGTM 👍🏼


uncache valid property

Consider a form input whose valid state is dependent upon the values of other inputs in its parent form element.  Currently, there is no way for the derived valid property to be set differently based on anything other than an actual change to the inputValue itself.
With this small change one can at least rely on the re-running of the tests on form submission to catch these cases.  I'm not sure this is the perfect solution and am open to discussion about other ways to better handle this use case, it is one I have encountered in production already.

Looks reasonable + valid tests. +1

Yep, reasonable use case and the current behavior would be unexpected. +1

v4.0.1


Fixing a few bugs in Network mgmt and improving test coverage

Signed-off-by: Madhu Venugopal<EMAIL_ADDRESS>

Refer to this link for build results (access rights to CI server needed):
http://jenkins.socketplane.io/job/socketplane-verify/35/
Success!

Refer to this link for build results (access rights to CI server needed):
http://jenkins.socketplane.io/job/socketplane-verify/36/
Build Failed!

Refer to this link for build results (access rights to CI server needed):
http://jenkins.socketplane.io/job/socketplane-verify/37/
Success!


Update deployment.md

just got it working on Heroku a moment ago

Hi, thank you for this work !
However, I think the express part will not work with vue-router.
Also, I'm working on a vue-cli plugin that will permit to do that in a click: mathieutu/vue-cli-plugin-express.
I'll let you know when it'll be usable, and we can integrate it to the doc.

For record, duplicate of https://github.com/vuejs/vue-cli/pull/2533

I like the other person's docs look better (and they already implemented vue router so closing this)


[Table] Fixed #5964

This is my first PR ever on any open-source project, please go easy on me :-)
I have changed the code and tested the behavior of checkboxes on my personal application for which I needed the feature that was missing, so I added mine.

[x] PR is linted.
[x] Description explains the issue/use-case resolved, and auto-closes the related issue(s)
[ ] PRhas tests / docs demo
[x] PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".

@lagneshthakur Yeah 🎉 , always great to see new open source contributors :). Some of our tests are no longer green with that change. Could you have a look at eventually add new tests for your changes so we don't introduce regression later on?

I'm closing for now, feel free to reopen it when the build it green 👍

@oliviertassinari I knew I had it coming when I created the PR. 😄
I will do the necessary changes needed to make those tests pass, then get back to you. :-)


Debugger not working ARM64 M1 Mac Azure Functions 4 .NET 6 Unknown Error: 0x80131c3c

Environment information
VSCode version: 1.62.2
C# Extension: 1.23.16
Mono Information
        OmniSharp using built-in mono
Dotnet Information
.NET SDK (reflecting any global.json):
 Version:   6.0.100
 Commit:    9e8b04bbff
Runtime Environment:
OS Name:     Mac OS X
OS Version:  12.0
OS Platform: Darwin
RID:         osx-arm64
Base Path:   /usr/local/share/dotnet/sdk/6.0.100/
Host (useful for support):
Version: 6.0.0
Commit:  4822e3c3aa
.NET SDKs installed:
6.0.100 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions

Extension
Author
Version

angular-console
nrwl
17.12.3

Angular2
johnpapa
12.0.0

azure-account
ms-vscode
0.9.11

cmake
twxs
0.0.17

codespaces
GitHub
1.3.6

cpptools
ms-vscode
1.7.1

csharp
ms-dotnettools
1.23.16

debugger-for-chrome
msjsdiag
4.13.0

dotnet
formulahendry
0.0.4

EditorConfig
EditorConfig
0.16.4

gitlens
eamodio
11.6.1

java
redhat
1.0.0

jupyter
ms-toolsai
2021.10.1101450599

jupyter-keymap
ms-toolsai
1.0.0

jupyter-renderers
ms-toolsai
1.0.3

markdown-preview-enhanced
shd101wyy
0.6.1

matlab
Gimly81
2.2.1

ng-template
Angular
13.0.0

playfab-explorer
Playfab
0.1.15

prettier-vscode
esbenp
9.0.0

python
ms-python
2021.11.1422169775

rainbow-csv
mechatroner
1.10.1

remote-ssh
ms-vscode-remote
0.66.1

remote-ssh-edit
ms-vscode-remote
0.66.1

restore-terminals
EthanSK
1.1.6

swdc-vscode
softwaredotcom
2.6.14

tcl
bitwisecook
0.4.0

terraform
4ops
0.2.2

todo-tree
Gruntfuggly
0.0.214

unity-code-snippets
kleber-swf
1.3.0

unity-debug
Unity
3.0.2

unity-tools
Tobiah
1.2.12

vscode-apollo
apollographql
1.19.9

vscode-azurefunctions
ms-azuretools
1.6.0

vscode-azureresourcegroups
ms-azuretools
0.4.0

vscode-eslint
dbaeumer
2.2.2

vscode-graphql
GraphQL
0.3.18

vscode-icons
vscode-icons-team
11.7.0

vscode-java-debug
vscjava
0.36.0

vscode-java-dependency
vscjava
0.18.8

vscode-java-pack
vscjava
0.18.6

vscode-java-test
vscjava
0.32.0

vscode-jest-runner
firsttris
0.4.47

vscode-maven
vscjava
0.34.1

vscode-nuget-package-manager
jmrog
1.1.6

vscode-pylance
ms-python
2021.11.1

vscode-typescript-tslint-plugin
ms-vscode
1.3.3

vscodeintellicode
VisualStudioExptTeam
1.2.14

vsfire
toba
1.4.1

VS Code version: 1.62.2 commit 3a6960b964327f0e3882ce18fcebd07ed191b316
C# Extension version: v1.23.16
OmniSharp log
-> (C) {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"coreclr","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-gb","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request","seq":1}
<- (R) {"seq":1,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"exceptionBreakpointFilters":[{"filter":"all","label":"All Exceptions","description":"Break when an exception is thrown. For more information about exception settings, see: https://aka.ms/VSCode-CS-ExceptionSettings","default":false,"supportsCondition":true,"conditionDescription":"Comma-separated list of exception types to break on, or if the list starts with '!', a list of exception types to ignore. \nExample 1: System.NullReferenceException -- this will break on just null reference exceptions. \nExample 2: !System.Threading.Tasks.TaskCanceledException -- this will break on all exceptions except for task canceled.\n\nFor more information about exception settings, see: https://aka.ms/VSCode-CS-ExceptionSettings"},{"filter":"user-unhandled","label":"User-Unhandled Exceptions","description":"Break when an exception is caught in non-user code (system code) after having passed through user code. For more information about exception settings, see: https://aka.ms/VSCode-CS-ExceptionSettings","default":true,"supportsCondition":true,"conditionDescription":"Comma-separated list of exception types to break on, or if the list starts with '!', a list of exception types to ignore. \nExample 1: System.NullReferenceException -- this will break on just null reference exceptions. \nExample 2: !System.Threading.Tasks.TaskCanceledException -- this will break on all exceptions except for task canceled.\n\nFor more information about exception settings, see: https://aka.ms/VSCode-CS-ExceptionSettings"}],"supportsSetVariable":true,"supportsGotoTargetsRequest":true,"supportsModulesRequest":true,"supportedChecksumAlgorithms":["MD5","SHA1","SHA256"],"supportsExceptionOptions":true,"supportsValueFormattingOptions":true,"supportsExceptionInfoRequest":true,"supportTerminateDebuggee":true,"supportsSetExpression":true,"supportsReadMemoryRequest":true,"supportsCancelRequest":true,"supportsExceptionFilterOptions":true,"supportsExceptionConditions":true,"supportsLoadSymbolsRequest":true,"supportsModuleSymbolSearchLog":true,"supportsDebuggerProperties":true,"supportsSetSymbolOptions":true,"supportsHitBreakpointIds":true,"supportsVsIndividualBreakpointOperations":true,"supportsVsBreakpointLanguage":true,"supportsSetHitCount":true,"supportsVsCustomMessages":true,"supportsEvaluationOptions":true,"supportsExceptionStackTrace":true,"memoryReferencesAreAddresses":true,"supportsObjectFavorites":true,"supportsObjectId":true,"supportsVariableEnumerators":false}}
-> (C) {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"coreclr","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-gb","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request","seq":1}
-> (C) {"command":"attach","arguments":{"name":"Attach to .NET Functions","type":"coreclr","request":"attach","processId":"32880","debugServer":4711,"__configurationTarget":5,"__sessionId":"99b268cc-d048-4ec5-b382-3b54f38cfe9f"},"type":"request","seq":2}
<- (E) {"seq":4,"type":"event","event":"output","body":{"category":"console","output":"-------------------------------------------------------------------\nYou may only use the Microsoft .NET Core Debugger (vsdbg) with\nVisual Studio Code, Visual Studio or Visual Studio for Mac software\nto help you develop and test your applications.\n-------------------------------------------------------------------\n","severity":"ok"}}
<- (R) {"seq":5,"type":"response","request_seq":2,"success":true,"command":"attach"}
<- (E) {"seq":6,"type":"event","event":"initialized","body":{}}
-> (C) {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":3}
<- (R) {"seq":7,"type":"response","request_seq":3,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]}}
-> (C) {"command":"setExceptionBreakpoints","arguments":{"filters":[],"filterOptions":[{"filterId":"user-unhandled"}]},"type":"request","seq":4}
<- (R) {"seq":8,"type":"response","request_seq":4,"success":true,"command":"setExceptionBreakpoints","body":{"breakpoints":[{"verified":true}]}}
-> (C) {"command":"configurationDone","type":"request","seq":5}
<- (E) {"seq":9,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/AttachFailed","data":{"VS.Diagnostics.Debugger.vsdbg.Distribution.Version":"21.1.0","VS.Diagnostics.Debugger.vsdbg.Distribution.Name":"Darwin","VS.Diagnostics.Debugger.vsdbg.Version":"17.0.10712.2 commit:70a83505117741ba30f92c713a4bb0d0395c3197","VS.Diagnostics.Debugger.vsdbg.OSFamily":"Darwin","VS.Diagnostics.Debugger.vsdbg.ErrorCode":-2146231236}}}
<- (E) {"seq":10,"type":"event","event":"output","body":{"category":"stderr","output":"Unable to start debugging. Failed to attach to process: Unknown Error: 0x80131c3c\n"}}
<- (R) {"seq":11,"type":"response","request_seq":5,"success":false,"command":"configurationDone","message":"Failed to attach to process: Unknown Error: 0x80131c3c"}
-> (C) {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":6}
<- (E) {"seq":12,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/DebugCompleted","data":{"VS.Diagnostics.Debugger.vsdbg.AdapterId":"coreclr","VS.Diagnostics.Debugger.vsdbg.Distribution.Version":"21.1.0","VS.Diagnostics.Debugger.vsdbg.Distribution.Name":"Darwin","VS.Diagnostics.Debugger.vsdbg.DebugCompleted.BreakCounter":0,"VS.Diagnostics.Debugger.vsdbg.Version":"17.0.10712.2 commit:70a83505117741ba30f92c713a4bb0d0395c3197","VS.Diagnostics.Debugger.vsdbg.OSFamily":"Darwin"}}}
<- (R) {"seq":13,"type":"response","request_seq":6,"success":true,"command":"disconnect"}

Steps to reproduce
Start VSCode debugger with Azure Functions v4 core tools on .net6 with the following launch.json config:
"configurations": [
    {
      "name": "Attach to .NET Functions",
      "type": "coreclr",
      "request": "attach",
      "processId": "${command:azureFunctions.pickProcess}",
     }
  ]

Expected  behavior
Debugger should work
Actual behavior
Failed to attach to process: Unknown Error: 0x80131c3c
dotnet --info output
.NET SDK (reflecting any global.json):
Version:   6.0.100
Commit:    9e8b04bbff
Runtime Environment:
OS Name:     Mac OS X
OS Version:  12.0
OS Platform: Darwin
RID:         osx-arm64
Base Path:   /usr/local/share/dotnet/sdk/6.0.100/
Host (useful for support):
Version: 6.0.0
Commit:  4822e3c3aa
.NET SDKs installed:
6.0.100 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
Azure functions info
Azure Functions Core Tools
Core Tools Version:       4.0.3971 Commit hash: d0775d487c93ebd49e9c1166d5c3c01f3c76eaaf  (64-bit)
Function Runtime Version: <IP_ADDRESS>15

I believe the problem here is that the way process picker commands work they can only specify one property: processId, but there is another property that also needs to be specified - targetArchitecture (see documentation).
This extension at least has a bug that we don't seem to specify targetArchitecture in the schema for attach configurations, and we don't list it in debugger-launchjson.md. @WardenGnaw I am assuming this wasn't done just because in most cases we will automatically figure it out?
Assuming that is it, this issue should probably move to the https://github.com/Microsoft/vscode-azurefunctions to provide a "${command:azureFunctions.targetArchitecture}" command.

I am assuming this wasn't done just because in most cases we will automatically figure it out?
Yep. The extension attempts to use the dotnet information to determine which architecture to use. However, if we fail to get this dotnet information, it uses the architecture of VS Code.

Which version of VS Code are you using?

I can update the OptionsSchema and md file to add targetArchitecture.

@WardenGnaw I have  VS Code version: 1.62.2 commit 3a6960b964327f0e3882ce18fcebd07ed191b316
Thanks for looking into it!

@EthanSK Did it work for you after changing your launch.json to:
"configurations": [
    {
      "name": "Attach to .NET Functions",
      "type": "coreclr",
      "request": "attach",
      "processId": "${command:azureFunctions.pickProcess}",
      "targetArchitecture": "x86_64"
     }
  ]

@gregg-miskelly Oh. nice. that worked :D interesting...

Thanks. I edited the original comment to add the work around, and I opened https://github.com/microsoft/vscode-azurefunctions/issues/3005 to track fixing the issue.


fix: use npm v8 and package lock v2

PR summary
This PR migrates the project to use npm v8 along with v2 of the lock file.
PR Checklist
Please make sure that your PR fulfills the following requirements:

[ ] The commit message follows the Angular Commit Message Guidelines.
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

Current vs new behavior

Does this PR introduce a breaking change?

[ ] Yes
[ ] No

Other information

:tada: This PR is included in version 0.22.6 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


誤変換: 太刀洗

大刀洗があって太刀洗が無い

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 29 Mar 2012 at 2:59

Original comment by<EMAIL_ADDRESS>on 1 Apr 2012 at 2:25

Added labels: Type-Conversion
Removed labels: Type-Defect

Original comment by<EMAIL_ADDRESS>on 1 Apr 2012 at 2:29

Added labels: OpSys-All


target_precompiled_header(Foo bar.h) creates both CMakeFiles/Foo.pch.dir/Bar.h.gch and CMakeFiles/Foo.dir/Bar.h.gch targets

I am trying to use this package under Ubuntu with gcc, and somehow I get the following:

The make rules for creating and using CMakeFiles/Foo.pch.dir/Bar.h.gch are done correctly - everything works
But there is also a make rule for creating CMakeFiles/Foo.dir/Bar.h.gch by compiling CMakeFiles/Foo.pch.dir/Bar.h (which fails as there is no such .h)... I could not figure out where it is coming from...

Can you please provide me exact GCC and CMake version you are using. This issue may be specific to some recent CMake versions.

I have seen this issue with cmake <IP_ADDRESS> and gcc 4.9.4 on Ubuntu 14.04.1, possibly in other configurations as well (this was obviuously a while ago).

Please provide minimal CMakeLists.txt example with exact configuration, so I can try to replicate this in Docker for example.

I no longer have access to that example, sorry.


Static HTML inside @ref element?

There is some mentioning of the requirement of @ref elements to be empty:
"Only use an element reference to mutate the contents of an empty element that doesn't interact with Blazor."
"The recommended technique is to have the component's code (.razor file) produce an empty element. As far as Blazor's diffing system is concerned, the element is always empty, so the renderer does not recurse into the element and instead leaves its contents alone."
"The
 with @ref="mapElement" is left empty as far as Blazor is concerned. The mapbox-gl.js script can safely populate the element and modify its contents."
"It is not safe for external JS code to modify elements that Blazor does not regard as empty."
The warning section says though:
"it's dangerous to mutate the contents of the unordered list (ul) because Blazor interacts with the DOM to populate this element's list items (
) from the Todos object"
Also some dangerous sample code is given:

    @foreach (var item in Todos)
    {
<EMAIL_ADDRESS>    }

The other parts of the page say that @ref elements always should be empty, but the dangerous sample code and the text above it indicate, at least to me, that the danger actually comes from having Blazor manipulating something inside the @ref element (in this case because of the @foreach directive).
Now the obvious question arises: What if there is only static HTML inside the @ref element, e.g.:

Some text.

And then have some JS that does something with
 or adds siblings to
 or whatever.
According to the parts of the page that say that @ref elements always should be empty, it's wrong to do that. But according to what the warning section indicates, it shouldn't be a problem because Blazor shouldn't manipulate anything inside this @ref div element.
Which one holds true? The current docs make it look like there is some uncertainty regarding what can actually cause problems. If @ref elements simply always have to empty then the docs would seem clearer to me without the warning section. Or keep the warning section but then please also explain why having only static HTML inside the @ref also isn't possible. Or if it is possible then please edit the other parts that say that it has to be empty.

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

ID: 2b7ea38a-649b-303d-bebf-c701e216ba25
Version Independent ID: 9e197a8b-2616-8363-0a15-38cac802e82e
Content: Call JavaScript functions from .NET methods in ASP.NET Core Blazor
Content Source: aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md
Product: aspnet-core
Technology: aspnetcore-blazor
GitHub Login: @guardrex
Microsoft Alias: riande

Hello @NightProgramming ... I'm back.
For ...

the dangerous sample code and the text above it indicate, at least to me, that the danger actually comes from having Blazor manipulating something inside the @ref element (in this case because of the @foreach directive).

The danger would be if YOU used JS interop with the element reference to modify the content of that list. It's covered by the next remark (under the example code) ...

If JS interop mutates the contents of element MyList and Blazor attempts to apply diffs to the element, the diffs won't match the DOM.

However, we probably can trigger events and read content, where content isn't modified in the process. We probably need to add a remark on that.
@SteveSandersonMS ... Is it correct that all of these remarks about JS interop with element references focus on modifying content, not triggering events and reading HTML content?
@SteveSandersonMS ... WRT the "empty" element remarks: I assume that the product unit literally means "empty" if you intend to modify the content, but I need to ask to confirm it. The guidance is ...

Only use an element reference to mutate the contents of an empty element that doesn't interact with Blazor.

Does it literally mean empty (as I assume it means from a plain reading), or can the element have static HTML that Blazor doesn't interact with and the developer uses JS interop with the element reference (or via a JS lib) to modify the contents? As @NightProgramming points out, we probably need to flesh out the answer to this question one way or the other.

Is it correct that all of these remarks about JS interop with element references focus on modifying content, not triggering events and reading HTML content?

Yes, it's perfectly fine to read information from any DOM element, whether or not Blazor will render and change it later.

Does it literally mean empty (as I assume it means from a plain reading), or can the element have static HTML that Blazor doesn't interact with and the developer uses JS interop with the element reference (or via a JS lib) to modify the contents?

You would have to differentiate "what works today in practice" from "what scenarios we officially support".
The only custom-JS-mutates-the-DOM scenario we're explicitly saying is definitely safe is if the element is literally empty as far as Blazor is concerned.
In practice, if the element is nonempty but the content never changes, then nothing bad would actually happen if you mutated it given the current renderer implementation, since after the first render the diffing system will normally not need to update that content again. However we reserve the right to change how the renderer works at any time and maybe in the future it might for some reason care about the statically-rendered content remaining unchanged. The one scenario we are promising to keep working forever is the element is empty as far as Blazor is concerned.
As far as docs are concerned I'm not sure I'd try to cover this explicitly since the docs become unwieldy if they contain all these caveats. They are already correct to describe the supported scenario.

Thanks @SteveSandersonMS ... I'll merely add a quick, passing remark that triggering events and reading DOM content is fine where it speaks to not mutating content. I'll leave the rest of the text alone.

@guardrex Thanks for your reply. Yes, I understand what the danger is. I think the empty requirement in the docs might just be too restrictive. In my dev experience so far it works when there is some static HTML inside the ref element even when then, via JS, elements get added or removed inside the ref element and even when after all the JS manipulation is done a rerender, of the component that holds the ref element, is forced via StateHasChanged().
Only when having rizor directives e.g. @body in the ref element combinded with JS manipulation Blazor gives me errors e.g. "Cannot read properties of null (reading 'removeChild')".
With .NET 8 it seems support for static HTML will be further improved: https://github.com/dotnet/aspnetcore/issues/47258


[dist] Update debug to 2.6.9

<EMAIL_ADDRESS>has a vulnerability: https://nodesecurity.io/advisories/534

What? No CI?


Subroutines

This is a WIP, do not merge yet!
I needed subroutines for a personal project, so I started implementing them in glium.
If this feature is not desired, it's perfectly fine if you reject this.
So far, I have implemented reflection for subroutine data. This includes all subroutine uniforms and their corresponding candidate subroutines. This is turn means that the "data part" is done, which enables error checking etc. to avoid opengl errors.
The next step is the hard part where I need some pointers though, because I'm not so familiar with gliums internals: Actually drawing.

The user can potentially specify the subroutines in a format similar to this: (ShaderType, "uniform_name") => "subroutine_name". How would these subroutine values be handled in the API? As an extra parameter to draw? Or maybe as draw_parameters? (I figured handling subroutine_uniforms the same as uniforms would be dumb, because they are definitely not the same thing)
Where do the current values get cached (context?) to avoid unnecessary opengl calls? (This could also be implemented lateron)
These caches need to be invalidated when i.e. after calling glUseProgram(), how is this handled in glium?

Of course I'm happy about feedback regarding my current implementation too.
Oh, I also added an example program which prints the queried SubroutineData. It gives a nice overview of the data structures.
Thanks in advance

Nice!

Where do the current values get cached (context?) to avoid unnecessary opengl calls? (This could also be implemented lateron)

These caches need to be invalidated when i.e. after calling glUseProgram(), how is this handled in glium?

As far as I know the current subroutines is per program. So the state would simply be stored in the Program struct.

The user can potentially specify the subroutines in a format similar to this: (ShaderType, "uniform_name") => "subroutine_name". How would these subroutine values be handled in the API? As an extra parameter to draw? Or maybe as draw_parameters? (I figured handling subroutine_uniforms the same as uniforms would be dumb, because they are definitely not the same thing)

That's the tricky point. I don't have an answer to that for now.

There's another feature that will need a serious change in the API: program pipelines. This feature allows you to create "incomplete programs" (for example a program with just a vertex shader and another program with just a fragment shader) and use them when drawing. But each program has its own uniforms.
A good change in the API needs to be found for both subroutines and program pipelines.

I quickly read the specs and I think subroutines can use the same interface as uniforms.
After all the thing whose value is set by the programmer is called a subroutine uniforms. Other features like uniform buffers or SSBOs also use the same uniform! struct in glium, even though they aren't strictly uniforms either.

Thanks for the detailed answers. I will try to get a prototype running.

This last commit contains the subroutine implementation.
Subroutines can be used just like regular uniforms with the uniform! macro. To set a subroutine, the user has to give the macro a subroutine name and a corresponding ShaderStage as a parameter:
let uniforms = uniform! {
        Color: ("ColorRed", ShaderStage::Fragment)
};

A full example can be seen in examples/subroutines.
TODOs:

Tests
Documentation

Added tests.

I just addressed the nitpicks in this latest commit.
Regarding the binary file custom header, I wrote this earlier but it's now gone because I pushed:
I guess that's the best idea.
I can implement this in the same run. My suggestion would be to add a single byte at the beginning of the binary like this:
byte & 0b00000001 => has_tess_evaluation
byte & 0b00000010 => has_tess_control
byte & 0b00000100 => has_geometry

Failing if any of the first 5 bits aren't 0 (can later be used for additional flags)
Thoughts?

Yeah that's a good format.

That's done too. This PR is getting kind of big ^.^

Nice!
The new code looks good.
Is the PR ready to be merged?

Go ahead and merge it. Documentation is not done yet but I can submit that in another PR during the next week.
BTW I reenabled the program_binary tests because I think I fixed the bug that caused Mesa to fail.


Upgrading az MSI installation in non-interactive way

Related command

az upgrade
Is your feature request related to a problem? Please describe.

When azure CLI is installed via MSI in windows, there is no method of automated upgrade using script. az upgrade will invoke msiexec.exe which opens up a separate window, and the user has to follow the steps (by clicking Next, etc.).
Describe the solution you'd like

az upgrade might take in a parameter --yes for automated MSI installation of the latest version. Else, we can make automated installation the default / only behaviour.
Basically, I propose that we need to have an automated upgrade mechanism without user intervention.
Describe alternatives you've considered

From our installation / onboarding script, I manually check the latest version available by parsing setup.py, similar to how az upgrade code snippet does. If the installed version is not equal to the latest version, I download and install the MSI in non-interactive way.
This roundabout method can be replaced by az upgrade if there is a non-interactive way for az upgrade.
Additional context

Thank you for opening this issue, we will look into it.

As far as I know, there are some technical difficulties preventing us from doing this.
As shown in https://github.com/Azure/azure-cli/pull/26464, the MSI installation GUI shows a warning if python.exe is occupied but needs to be updated, so we want to make az upgrade non-blocking in that PR. With the MSI installation GUI, the user can still know if the MSI installation has finished. But if we make the MSI installation non-interactive and az upgrade non-blocking by exiting the current python.exe process, there will be no way to know if the MSI installation has finished (succeeded/failed).
A workaround I can currently think of is to develop a separate script independent from Azure CLI, so that it can upgrade Azure CLI without launching Azure CLI.


Allow multiple rewrite suggestions

Good example of where it is needed:
https://rules.sonarsource.com/java/type/Bug/RSPEC-1317

After trying a few options, this is probably the way to go


add a 'Random Exploration' mode

Parameters are changed randomly every ~seconds.
Produces some interesting patterns!

I really like this, this is great


feat(search): display Cmd for Mac users

Can you help, please? @innocenzi

The issue was that window is only accessible on the client side, and not at generation-time. Can you check the preview and ensure that my changes work fine?

The issue was that window is only accessible on the client side, and not at generation-time. Can you check the preview and ensure that my changes work fine?

All fine. Perfect! Thanks.

Thank you for your contributions!


Add support for private key provider to truffle config.

First pull request? Read our guide to contributing
Checklist:

[ ] Code contains relevant tests for the problem you are solving
[ ] Ensure all new and existing tests pass
[ ] Update any relevant READMEs and docs

Description:
Added support for private key provider to the truffle config.
This will allow us to use a throwaway hot wallet for doing contracts deployment, by setting the PRIVATE_KEY env variable before running the truffle migrate command.

Ah interesting. Yes, this npm package does not implement a lot:
https://github.com/nosuchip/truffle-privatekey-provider/blob/master/index.js#L9
Though still it seems convenient to not rewrite that code ?

Agreed, .good not to rewrite that code, and it gives us similar interface as truffle-hdwallet-provider.
There's of course always a risk in having another dependency, but I feel good on this one.


Money Documentation

I'd like to add some information to the docs about modeling money. This has come up many times on the MLs of the various Smalltalk flavors, and Aconcagua has been mentioned many times. However, even after reading and re-reading, I'm still not clear how Aconcagua addresses the float problem. Namely, by way of example:
result := 0.
interval := 10.21.
10000 timesRepeat: [ result := result + interval ].
result =<PHONE_NUMBER>0001806 "(not 102100.0)"

At first, I thought that using ScaledDecimal might help, but there were various comments saying that Pharo's ScaledDecimal is ill-conceived and maybe FixedDecimal would be better.
Another solution I thought of would be to convert any decimal money to dollars and cents and only convert back for display. For example:
Float>>dollars
	^ (AmDollar uniqueInstance * self // 1) +
(self \\ 1 * 100) asInteger cents.

Any feedback or input would be appreciated...
@gcotelli @mtaborda @hernanwilkinson

Hi @seandenigris , Aconcagua uses the numeric infrastructure the language provided.
For modelling monetary units is usually not a good idea to use floats due to its inexact behavior, unless you're doing some approximation that has no analytical counterpart in which case there's already an error margin considered.
So, in the common case you can use fractions if you need absolute precision or a fixed point kind number for the internal representation. Of course you will need some "formatters" to get a user friendly representation of the number especially when using fractions as the underlying representation. And you will need probably some way to round the monetary measurements to his minimal representation when representing things like payments that are not allowed to have an arbitrary number of decimal places.


Exception - java.lang.NumberFormatException: For input string: "8999999999999999999"

Hi ,
We have a check that we need to do for Journal Sequence Numbers to which can go to a large value. (e.g.<PHONE_NUMBER>999999999),
if we add the check here to that value :

This error shows during check:

It looks like its the plugin that cannot handle the large value but we are not able to find where this large value resides, any help will be appreciated to see where we need to increase this value to accomplish the check.
Thanks

Hi,
thats a custom sql so do you have the statement you are running? Also my understanding is the journal seq number is limited to 9,999,999,999. So all those 9's seem to many?
Cheers

Hi William,
Yes it is a custom SQL we are running (cant unfortunately share the code), but it does return an 15 Long integer that shows the current Journal Sequence.
It seems our system's journal sequence can go longer than the one you have as we are on MAXOPT2.

Hi William, could you give us an idea how is the query? wooow been a excellet help if we have idea how to configure that!!!!

Hi ITMentalist

It seems our system's journal sequence can go longer than the one you have as we are on MAXOPT2.

Maxopt2 is still 999,999,999,999 its Opt3 that has some silly figure and that starts with 18,xxx,xxx,xxx,xxx,xxx,xxx isnt it ?
Cheers Will

Hi William, could you give us an idea how is the query? wooow been a excellet help if we have idea how to configure that!!!!

Hi fcuerno001,
I would look at qsys2.display_journal table, might be able to get what info you need from that?
Cheers Will.

Hi Williamlea1,
Thank you so much, i will check table qsys2.display_journal thank for information.

found a workaround to rather cast the values of a percentage to 2 digits than the big numbers.


Topic : Interpolation Search

I can code it in C++.

Please assign this to me under Devincept!

Sure @Shreya-art, you can go ahead !


Use BasicAuth for API access

It could harden a bit the project using BasicAuth for api.php access, thus denying automatically attempts to hack the server without proper authentication.
I don't know if it's a portable idea or not, since I'm not sure nginx allows BasicAuth configuration in a file like .htaccess.

That is actually something we could use because it would be better for the rest api. This could also implement the read-only idea of #59.


feat(rule_generator): automatically generate rules and tests

This PR introduces a tool in the repo to automatically generate rule files, through the cargo rule <rule-name> alias. It also fetches the corresponding tests for the rule from the ESLint repo and injects them into the template.

Mum look, 10x engineer right here ☝

Thank you! 10x engineer!


MOS OpenSet

In the README, why is MOS under Open Set since it has OOD in the title?

Thank you Dan for your question.
Yes, MOS should be better fit in OOD section as its title says.
I put it under openset mainly according to our survey section 4.1.4, where MOS first appears in the paper.
The mentioned section means that MOS arranges the large semantic space into a hierarchical taxonomy of known classes and is able to address OSR problem (even though it only follows OOD setting).
But you are right, we should make the categorization more straightforward and return MOS to the OOD team.


Added black formatter to pre-commit

Changes:

Added black formatter to pre-commit
Removed some unnececary comments

If no issues gonna pop up with pre-commit hooks it's finally ready to merge


Update workflow to enable merge queue

The merge queue requires branch protection status checks to pass after a PR is added. This should mean that we don't have to rerun the tests on push, so this PR moves the main tests from push to merge_group.

Yeah, I can see tests on push being useful in edge cases where an admin pushes to main without a PR but it does seem to be wasteful most of the time. After this merge queue test we can decide what the CI workflow should be.


Line 69 of PriorityBooster.cpp doesn't have a name for one of its parameters

The code for this line is as follows:
NTSTATUS PriorityBoosterDeviceControl(PDEVICE_OBJECT, PIRP Irp) {
Shouldn't there be a name for PDEVICE_OBJECT parameter as well as an associated UNREFERENCED_PARAMETER() line? Or am I missing something here?

C++ allows omitting parameter names, so using a name and then UNREFERENCE_PARAMETER (which really does reference the parameter) is equivalent. In C you must provide a name for all parameters.

Thanks I am used to the C programming language standards so I didn't realize that this was the case. Appreciate the explanation! Will close the issue now as this has been resolved.


[<IP_ADDRESS>] SELECT returns both int and float for the same field

Hello,
When doing a query like SELECT value FROM test GROUP BY authority, path ORDER BY time DESC I get this kind of results (both with curl and influxdb-python):
{
    "results": [
        {
            "series": [
                {
                    "name": "test",
                    "tags": {
                        "authority": "isac_cmd",
                        "path": "/test/test1"
                    },
                    "columns": [
                        "time",
                        "value"
                    ],
                    "values": [
                        [
                            "2015-12-06T01:02:12.142Z",
                            36.5
                        ],
                        [
                            "2015-12-06T00:57:30.342Z",
                            36
                        ]
                    ]
                }
            ]
        }
    ]
}

What tickles me is that on one side, when writing, InfluxDB restricts me to send two points that do not have the same type for the same measurement. Fair enough, I avoid sending a mix of types (I pick float in this case, but another measurement could have another type).
But when I read data back, I get both floats and ints when the original float value happen to be an integer (in the "value" field in the example above).
It causes type error in case I load data, do something (or nothing) with it and write it again with a new timestamp.
For me measurements can have any type. So, I can't forcibly recast everything to one data type :S.
Cheers,
Axel

FWIW, this is the default behavior of Go's JSON decoder: https://play.golang.org/p/kP9sa9yGwJ
b, _ := json.Marshal(map[string]interface{}{
	"f10": 1.0,
	"f15": 1.5,
})
println(string(b)) // {"f10":1,"f15":1.5}

I'm having trouble finding a definitive source on it, but there's a lot of people online who say that JSON officially does not differentiate between ints and floats.  This discussion on the IETF mailing list describes this issue as an "interpretation problem" rather than an "implementation problem."

Thanks @mark-rushakoff

Confirming this is because JSON does not differentiate between a float or an integer. Closing this since there's nothing we can do about this.


W1031 00:10:50.689240      10 warnings.go:67] extensions/v1beta1 Ingress is deprecated in v1.14+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress
2020/10/31 00:10:50 [INFO] Updating role project-owner in p-q6zgk because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:50 [INFO] Updating role project-member in p-76wbs because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:50 [INFO] Updating role project-owner in p-q6zgk because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:50 [INFO] Updating role project-member in p-76wbs because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:50 [INFO] Updating role project-member in p-76wbs because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:50 [INFO] Updating role project-owner in p-q6zgk because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:50 [INFO] Updating role project-member in p-76wbs because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:50 [INFO] Updating role project-owner in p-q6zgk because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:50 [INFO] Updating role project-owner in p-76wbs because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:50 [INFO] Updating role project-owner in p-76wbs because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:50 [INFO] [mgmt-auth-prtb-controller] Updating role project-member in namespace p-76wbs
2020/10/31 00:10:50 [INFO] Updating role project-member in p-76wbs because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:50 [INFO] Updating role project-member in p-76wbs because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:50 [INFO] Updating role project-member in p-76wbs because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:51 [INFO] Updating role project-member in p-76wbs because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:51 [INFO] Updating role project-member in p-76wbs because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:51 [INFO] Updating role project-member in p-76wbs because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:51 [INFO] [mgmt-auth-prtb-controller] Updating role project-owner in namespace p-q6zgk
2020/10/31 00:10:51 [INFO] [mgmt-auth-prtb-controller] Updating role project-member in namespace p-q6zgk
2020/10/31 00:10:51 [INFO] [mgmt-auth-prtb-controller] Updating role project-member in namespace p-q6zgk
2020/10/31 00:10:51 [INFO] Updating role project-owner in p-q6zgk because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:51 [INFO] Updating role project-owner in p-q6zgk because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:51 [INFO] Updating role project-owner in p-q6zgk because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:51 [ERROR] error parsing azure-group-cache-size, skipping update strconv.Atoi: parsing "": invalid syntax
2020/10/31 00:10:51 [INFO] Updating role project-owner in p-q6zgk because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:51 [INFO] Updating role project-owner in p-q6zgk because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:51 [INFO] Updating role project-member in p-q6zgk because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:51 [INFO] Updating role project-member in p-q6zgk because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:51 [INFO] Updating role project-member in p-q6zgk because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:51 [INFO] Updating role project-member in p-q6zgk because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:51 [INFO] Updating role project-member in p-q6zgk because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:51 [INFO] [mgmt-auth-prtb-controller] Updating role project-member in namespace p-q6zgk
2020/10/31 00:10:52 [INFO] Starting /v1, Kind=ConfigMap controller
2020/10/31 00:10:52 [INFO] Starting /v1, Kind=Secret controller
2020/10/31 00:10:52 [INFO] Starting /v1, Kind=Endpoints controller
2020/10/31 00:10:52 [INFO] Starting rbac.authorization.k8s.io/v1, Kind=RoleBinding controller
2020/10/31 00:10:52 [INFO] Starting /v1, Kind=Namespace controller
2020/10/31 00:10:52 [INFO] Starting cluster agent for c-l2j86 [owner=true]
2020/10/31 00:10:52 [INFO] Updating role project-owner in p-d8f5d because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:52 [INFO] Starting /v1, Kind=LimitRange controller
2020/10/31 00:10:52 [INFO] Starting apps/v1, Kind=ReplicaSet controller
2020/10/31 00:10:52 [INFO] Starting /v1, Kind=Event controller
2020/10/31 00:10:52 [INFO] Starting apiregistration.k8s.io/v1, Kind=APIService controller
2020/10/31 00:10:52 [INFO] Starting /v1, Kind=ResourceQuota controller
2020/10/31 00:10:52 [INFO] Starting networking.k8s.io/v1, Kind=NetworkPolicy controller
2020/10/31 00:10:52 [INFO] Starting batch/v1beta1, Kind=CronJob controller
2020/10/31 00:10:52 [INFO] Starting /v1, Kind=Pod controller
2020/10/31 00:10:52 [INFO] Starting cluster.cattle.io/v3, Kind=ClusterUserAttribute controller
2020/10/31 00:10:52 [INFO] Starting rbac.authorization.k8s.io/v1, Kind=ClusterRole controller
2020/10/31 00:10:52 [INFO] Starting apps/v1, Kind=DaemonSet controller
2020/10/31 00:10:52 [INFO] Starting extensions/v1beta1, Kind=Ingress controller
2020/10/31 00:10:52 [INFO] Starting apps/v1, Kind=StatefulSet controller
2020/10/31 00:10:52 [INFO] Starting /v1, Kind=Node controller
2020/10/31 00:10:52 [INFO] Starting apps/v1, Kind=Deployment controller
2020/10/31 00:10:52 [INFO] Starting policy/v1beta1, Kind=PodSecurityPolicy controller
2020/10/31 00:10:52 [INFO] Starting /v1, Kind=ServiceAccount controller
2020/10/31 00:10:52 [INFO] Starting cluster.cattle.io/v3, Kind=ClusterAuthToken controller
2020/10/31 00:10:52 [INFO] Starting rbac.authorization.k8s.io/v1, Kind=Role controller
2020/10/31 00:10:52 [INFO] Updating role project-member in p-q6zgk because of rules difference with roleTemplate Project Member (project-member).
2020/10/31 00:10:52 [INFO] Starting rbac.authorization.k8s.io/v1, Kind=ClusterRoleBinding controller
2020/10/31 00:10:52 [INFO] Starting /v1, Kind=ReplicationController controller
2020/10/31 00:10:52 [INFO] Starting batch/v1, Kind=Job controller
2020/10/31 00:10:52 [INFO] Starting /v1, Kind=Service controller
2020/10/31 00:10:52 [INFO] [mgmt-auth-prtb-controller] Updating role project-member in namespace p-76wbs
2020/10/31 00:10:52 [INFO] Updating role project-owner in p-d8f5d because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:52 [INFO] Updating role project-owner in p-d8f5d because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:52 [INFO] Updating role project-owner in p-d8f5d because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:52 [INFO] Updating role project-owner in p-snbv5 because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:52 [INFO] Updating role project-owner in p-fr25k because of rules difference with roleTemplate Project Owner (project-owner).
2020/10/31 00:10:52 [INFO] Updating role project-member in p-snbv5 because of rules difference with roleTemplate Project Member (project-member).
E1031 00:10:52.168903      10 runtime.go:78] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
goroutine 5468 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x3c1f0a0, 0x7385940)
	/go/pkg/mod/github.com/rancher/apimachinery@v0.19.0-rancher1/pkg/util/runtime/runtime.go:74 +0xa3
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
	/go/pkg/mod/github.com/rancher/apimachinery@v0.19.0-rancher1/pkg/util/runtime/runtime.go:48 +0x82
panic(0x3c1f0a0, 0x7385940)
	/usr/local/go/src/runtime/panic.go:969 +0x166
github.com/rancher/rancher/pkg/monitoring.GetMonitoringCatalogID(0x0, 0x0, 0x4e36b20, 0xc007af1320, 0x0, 0x0, 0xc0027ecc60, 0x7, 0xc005153ad0, 0xc, ...)
	/go/src/github.com/rancher/rancher/pkg/monitoring/monitoring.go:247 +0x156
github.com/rancher/rancher/pkg/controllers/managementagent/monitoring.deploySystemMonitor(0xc005c0e300, 0xc000c2fa00, 0x0, 0x0, 0xc0027ecc60, 0x7, 0xc00302ca00, 0x199)
	/go/src/github.com/rancher/rancher/pkg/controllers/managementagent/monitoring/operatorHandler.go:207 +0x86a
github.com/rancher/rancher/pkg/controllers/managementagent/monitoring.(*operatorHandler).syncProject.func1(0x4439c40, 0xc002748000, 0x4526044, 0x1a)
	/go/src/github.com/rancher/rancher/pkg/controllers/managementagent/monitoring/operatorHandler.go:91 +0x6b
github.com/rancher/norman/condition.Cond.doInternal(0x4526044, 0x1a, 0x4e33501, 0x4e335a0, 0xc002748000, 0xc00cdef990, 0x3589653, 0xd, 0x10, 0xc00c96f770)
	/go/pkg/mod/github.com/rancher/norman@v0.0.0-20200930000340-693d65aaffe3/condition/condition.go:212 +0x97
github.com/rancher/norman/condition.Cond.do2(0x4526044, 0x1a, 0x101, 0x4e335a0, 0xc002748000, 0xc00cdef990, 0x3911de0, 0xc00302c890, 0x198, 0x44d30db, ...)
	/go/pkg/mod/github.com/rancher/norman@v0.0.0-20200930000340-693d65aaffe3/condition/condition.go:181 +0x1d8
github.com/rancher/norman/condition.Cond.do(...)
	/go/pkg/mod/github.com/rancher/norman@v0.0.0-20200930000340-693d65aaffe3/condition/condition.go:170
github.com/rancher/norman/condition.Cond.Do(0x4526044, 0x1a, 0x4e335a0, 0xc002748000, 0xc00cdef990, 0x4, 0x0, 0x0, 0x7fe20e102601)
	/go/pkg/mod/github.com/rancher/norman@v0.0.0-20200930000340-693d65aaffe3/condition/condition.go:140 +0x62
github.com/rancher/rancher/pkg/controllers/managementagent/monitoring.(*operatorHandler).syncProject(0xc004a57270, 0xc007c5eb10, 0xf, 0xc004d7b380, 0xc0c0f4, 0x434c360, 0xc001070380, 0x7fe2358bd108)
	/go/src/github.com/rancher/rancher/pkg/controllers/managementagent/monitoring/operatorHandler.go:89 +0x18d
github.com/rancher/rancher/pkg/generated/norman/management.cattle.io/v3.(*projectController).AddClusterScopedHandler.func1(0xc007c5eb10, 0xf, 0x4453fa0, 0xc004d7b380, 0xc00cdefb20, 0x3, 0x3, 0x0)
	/go/src/github.com/rancher/rancher/pkg/generated/norman/management.cattle.io/v3/zz_generated_project_controller.go:182 +0x79
github.com/rancher/norman/controller.(*genericController).AddHandler.func1(0xc007c5eb10, 0xf, 0x4e34b60, 0xc004d7b380, 0x4e34b60, 0xc004d7b380, 0x0, 0x0)
	/go/pkg/mod/github.com/rancher/norman@v0.0.0-20200930000340-693d65aaffe3/controller/generic_controller.go:62 +0x221
github.com/rancher/lasso/pkg/controller.SharedControllerHandlerFunc.OnChange(0xc000d97b30, 0xc007c5eb10, 0xf, 0x4e34b60, 0xc004d7b380, 0x4e34b60, 0xc004d7b380, 0x0, 0x0)
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/sharedcontroller.go:29 +0x4e
github.com/rancher/lasso/pkg/controller.(*sharedHandler).OnChange(0xc000d96a50, 0xc007c5eb10, 0xf, 0x4e34b60, 0xc004d7b380, 0xc007288a01, 0x0)
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/sharedhandler.go:65 +0x14a
github.com/rancher/lasso/pkg/controller.(*controller).syncHandler(0xc000666160, 0xc007c5eb10, 0xf, 0xc0052a99e0, 0xc00cdefd50)
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/controller.go:210 +0xd1
github.com/rancher/lasso/pkg/controller.(*controller).processSingleItem(0xc000666160, 0x3915ae0, 0xc00a77f9d0, 0x0, 0x0)
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/controller.go:192 +0xd7
github.com/rancher/lasso/pkg/controller.(*controller).processNextWorkItem(0xc000666160, 0x203001)
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/controller.go:169 +0x51
github.com/rancher/lasso/pkg/controller.(*controller).runWorker(0xc000666160)
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/controller.go:158 +0x2b
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc005328770)
	/go/pkg/mod/github.com/rancher/apimachinery@v0.19.0-rancher1/pkg/util/wait/wait.go:155 +0x5f
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc005328770, 0x4e09100, 0xc0051226c0, 0xc001070301, 0xc000d2e600)
	/go/pkg/mod/github.com/rancher/apimachinery@v0.19.0-rancher1/pkg/util/wait/wait.go:156 +0xa3
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc005328770, 0x3b9aca00, 0x0, 0xc001527001, 0xc000d2e600)
	/go/pkg/mod/github.com/rancher/apimachinery@v0.19.0-rancher1/pkg/util/wait/wait.go:133 +0x98
k8s.io/apimachinery/pkg/util/wait.Until(0xc005328770, 0x3b9aca00, 0xc000d2e600)
	/go/pkg/mod/github.com/rancher/apimachinery@v0.19.0-rancher1/pkg/util/wait/wait.go:90 +0x4d
created by github.com/rancher/lasso/pkg/controller.(*controller).run
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/controller.go:129 +0x31f
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x285fe56]

goroutine 5468 [running]:
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
	/go/pkg/mod/github.com/rancher/apimachinery@v0.19.0-rancher1/pkg/util/runtime/runtime.go:55 +0x105
panic(0x3c1f0a0, 0x7385940)
	/usr/local/go/src/runtime/panic.go:969 +0x166
github.com/rancher/rancher/pkg/monitoring.GetMonitoringCatalogID(0x0, 0x0, 0x4e36b20, 0xc007af1320, 0x0, 0x0, 0xc0027ecc60, 0x7, 0xc005153ad0, 0xc, ...)
	/go/src/github.com/rancher/rancher/pkg/monitoring/monitoring.go:247 +0x156
github.com/rancher/rancher/pkg/controllers/managementagent/monitoring.deploySystemMonitor(0xc005c0e300, 0xc000c2fa00, 0x0, 0x0, 0xc0027ecc60, 0x7, 0xc00302ca00, 0x199)
	/go/src/github.com/rancher/rancher/pkg/controllers/managementagent/monitoring/operatorHandler.go:207 +0x86a
github.com/rancher/rancher/pkg/controllers/managementagent/monitoring.(*operatorHandler).syncProject.func1(0x4439c40, 0xc002748000, 0x4526044, 0x1a)
	/go/src/github.com/rancher/rancher/pkg/controllers/managementagent/monitoring/operatorHandler.go:91 +0x6b
github.com/rancher/norman/condition.Cond.doInternal(0x4526044, 0x1a, 0x4e33501, 0x4e335a0, 0xc002748000, 0xc00cdef990, 0x3589653, 0xd, 0x10, 0xc00c96f770)
	/go/pkg/mod/github.com/rancher/norman@v0.0.0-20200930000340-693d65aaffe3/condition/condition.go:212 +0x97
github.com/rancher/norman/condition.Cond.do2(0x4526044, 0x1a, 0x101, 0x4e335a0, 0xc002748000, 0xc00cdef990, 0x3911de0, 0xc00302c890, 0x198, 0x44d30db, ...)
	/go/pkg/mod/github.com/rancher/norman@v0.0.0-20200930000340-693d65aaffe3/condition/condition.go:181 +0x1d8
github.com/rancher/norman/condition.Cond.do(...)
	/go/pkg/mod/github.com/rancher/norman@v0.0.0-20200930000340-693d65aaffe3/condition/condition.go:170
github.com/rancher/norman/condition.Cond.Do(0x4526044, 0x1a, 0x4e335a0, 0xc002748000, 0xc00cdef990, 0x4, 0x0, 0x0, 0x7fe20e102601)
	/go/pkg/mod/github.com/rancher/norman@v0.0.0-20200930000340-693d65aaffe3/condition/condition.go:140 +0x62
github.com/rancher/rancher/pkg/controllers/managementagent/monitoring.(*operatorHandler).syncProject(0xc004a57270, 0xc007c5eb10, 0xf, 0xc004d7b380, 0xc0c0f4, 0x434c360, 0xc001070380, 0x7fe2358bd108)
	/go/src/github.com/rancher/rancher/pkg/controllers/managementagent/monitoring/operatorHandler.go:89 +0x18d
github.com/rancher/rancher/pkg/generated/norman/management.cattle.io/v3.(*projectController).AddClusterScopedHandler.func1(0xc007c5eb10, 0xf, 0x4453fa0, 0xc004d7b380, 0xc00cdefb20, 0x3, 0x3, 0x0)
	/go/src/github.com/rancher/rancher/pkg/generated/norman/management.cattle.io/v3/zz_generated_project_controller.go:182 +0x79
github.com/rancher/norman/controller.(*genericController).AddHandler.func1(0xc007c5eb10, 0xf, 0x4e34b60, 0xc004d7b380, 0x4e34b60, 0xc004d7b380, 0x0, 0x0)
	/go/pkg/mod/github.com/rancher/norman@v0.0.0-20200930000340-693d65aaffe3/controller/generic_controller.go:62 +0x221
github.com/rancher/lasso/pkg/controller.SharedControllerHandlerFunc.OnChange(0xc000d97b30, 0xc007c5eb10, 0xf, 0x4e34b60, 0xc004d7b380, 0x4e34b60, 0xc004d7b380, 0x0, 0x0)
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/sharedcontroller.go:29 +0x4e
github.com/rancher/lasso/pkg/controller.(*sharedHandler).OnChange(0xc000d96a50, 0xc007c5eb10, 0xf, 0x4e34b60, 0xc004d7b380, 0xc007288a01, 0x0)
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/sharedhandler.go:65 +0x14a
github.com/rancher/lasso/pkg/controller.(*controller).syncHandler(0xc000666160, 0xc007c5eb10, 0xf, 0xc0052a99e0, 0xc00cdefd50)
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/controller.go:210 +0xd1
github.com/rancher/lasso/pkg/controller.(*controller).processSingleItem(0xc000666160, 0x3915ae0, 0xc00a77f9d0, 0x0, 0x0)
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/controller.go:192 +0xd7
github.com/rancher/lasso/pkg/controller.(*controller).processNextWorkItem(0xc000666160, 0x203001)
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/controller.go:169 +0x51
github.com/rancher/lasso/pkg/controller.(*controller).runWorker(0xc000666160)
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/controller.go:158 +0x2b
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc005328770)
	/go/pkg/mod/github.com/rancher/apimachinery@v0.19.0-rancher1/pkg/util/wait/wait.go:155 +0x5f
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc005328770, 0x4e09100, 0xc0051226c0, 0xc001070301, 0xc000d2e600)
	/go/pkg/mod/github.com/rancher/apimachinery@v0.19.0-rancher1/pkg/util/wait/wait.go:156 +0xa3
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc005328770, 0x3b9aca00, 0x0, 0xc001527001, 0xc000d2e600)
	/go/pkg/mod/github.com/rancher/apimachinery@v0.19.0-rancher1/pkg/util/wait/wait.go:133 +0x98
k8s.io/apimachinery/pkg/util/wait.Until(0xc005328770, 0x3b9aca00, 0xc000d2e600)
	/go/pkg/mod/github.com/rancher/apimachinery@v0.19.0-rancher1/pkg/util/wait/wait.go:90 +0x4d
created by github.com/rancher/lasso/pkg/controller.(*controller).run
	/go/pkg/mod/github.com/rancher/lasso@v0.0.0-20200905045615-7fcb07d6a20b/pkg/controller/controller.go:129 +0x31f

Environment information

Rancher version: v2.5.1 upgrade to v2.5.2-rc4
Installation option: HA

Cluster information

Cluster type: Infrastructure Provider Linode Driver RKE
Machine type: VM Worker nodes 8 GB RAM and 4vcpu
Kubernetes version:

Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T18:49:28Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:32:58Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}

Issue seen on a fresh install of 2.5.2-rc4 also
./helm3 install rancher rancher-latest/rancher --version 2.5.2-rc4 --namespace cattle-system --set hostname=<hostname>
Error: Ingress.extensions "rancher" is invalid: spec.rules[0].http.paths[0].pathType: Required value: pathType must be specified

Rancher chart's ingress.yaml needs to add pathType which seems to be the required/missing field

This is really just a side-effect of https://github.com/rancher/rancher/issues/29144
We can close this and move that to re-opened.

Closing in favor of https://github.com/rancher/rancher/issues/29144


log: Avoid multiple fatal @go.log_command messages

This addresses a bug I noticed during the course of implementing @go.critical_section_begin QUIT per #95, after #101. I wrote the "nested critical sections, @go.log FATAL still looks FATAL" test case to discover that the nested @go.log_command invocations produced more than one FATAL message, causing the test to fail.
However, my first fix that compared __GO_LOG_COMMAND_DEPTH -ne 0caused the "fatal status for subcommand of command in another language" test case to fail, because the second FATAL message from the parent process wasn't getting emitted.
The solution was to record the value of __GO_LOG_COMMAND_DEPTH at the time the process was started, in __GO_LOG_COMMAND_DEPTH_0, and compare __GO_LOG_COMMAND_DEPTH to it before emitting the fatal exit marker. This way only one fatal log message is emitted per process, but fatal errors cascading up through each parent process can still be recorded.

Coverage increased (+0.007%) to 94.356% when pulling b88ad94768c109c4606a087da562c47ee1b1667b on log-command-bug into c3f92b24bff4f486a602e401ebdd94d53c6ca2ac on master.


[AutoPR healthcareapis/resource-manager] Adding swagger spec for healthcareapis resource manager and examples.

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/5096

(message created by the CI based on PR content)

Codecov Report

Merging #4495 into restapi_auto_healthcareapis/resource-manager will not change coverage.
The diff coverage is n/a.

@@                              Coverage Diff                              @@
##           restapi_auto_healthcareapis/resource-manager    #4495   +/-   ##
=============================================================================
  Coverage                                         49.47%   49.47%
=============================================================================
  Files                                              6293     6293
  Lines                                            176329   176329
=============================================================================
  Hits                                              87246    87246
  Misses                                            89083    89083

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f1eb5ad...517adaa. Read the comment docs.


Add doc for compresslevel of the GZipMiddleware and use compresslevel=5 in the example

compresslevel is defined there in starlette's GZipMiddleware:
https://github.com/encode/starlette/blob/4e453ce91940cc7c995e6c728e3fdf341c039056/starlette/middleware/gzip.py#L30
compresslevel=5 is typically a better CPU / compression level tradeoff than 9, e.g. see:
https://tukaani.org/lzma/benchmarks.html

📝 Docs preview for commit 1ba728844a4ef09619a629453feb753d79032b8a at: https://12056547.fastapitiangolo.pages.dev

Seems like it's duplicated PR #11350

Thanks @RaphaelMarinier! :rocket:
I just merged https://github.com/fastapi/fastapi/pull/11350, but I added compresslevel=5 following your idea. Thanks! :coffee:
I'll close this one now.


Switch to using pydantic to handle settings?

Currently our settings file is just ... well, it's just a settings file. To change settings, users need to do it directly in their code by importing the file and doing settings.thing_to_change = new_value. That's a little weird.
If we use pydantic's Settings Management, we could at least easily grab things from the environment, which would allow users to set things in a much more typical way. Users could set the variables as part of the call on the commandline, or use tools like python-dotenv to seed their environment with settings.

Long story short, #69 shows it's not only possible but also super cool and awesome!

Merged, and it's amazing!


Command line tool: Help message should include version number

Describe the bug
When calling tflite2onnx -h it'd be useful to see the version number.
Expected behavior
tflite2onnx, Version 0.3.1 by jackwish, https://jackwish.net/tflite2onnx/
Convert TensorFlow Lite models to ONNX models

usage: tflite2onnx [-h] tflite_path onnx_path

positional arguments:
  tflite_path  Path to the input TFLite mode
  onnx_path    Path to save the converted ONNX mode

optional arguments:
  -h, --help   show this help message and exit

Actual behavior
usage: tflite2onnx [-h] tflite_path onnx_path

Convert TensorFlow Lite models to ONNX models

positional arguments:
  tflite_path  Path to the input TFLite mode
  onnx_path    Path to save the converted ONNX mode

optional arguments:
  -h, --help   show this help message and exit

To Reproduce

Invoke tflite2onnx -h

Version
v0.3.1

Hi @deiruch thanks for raising this issue. Tip more information in the command line looks to be a great idea. Maybe some arg like -v or --version also. Are you interested in bringing such insight to the code base if you don't mind?

I totally would if I knew Python. I don't even have a Python IDE installed... :(

I don't even have a Python IDE installed...
Aha neither do I :)

I don't even have a Python IDE installed...
Aha neither do I :)


Plugin idea: datasette-redirects

I just had to write a one-off custom plugin to redirect niche-musems.com to www.niche-museums.com (https://github.com/simonw/museums/issues/21) - it would be great if this kind of thing could be handled by a configurable plugin.
https://github.com/simonw/museums/blob/6b1faf00c463b2228860d4d62d104b11935e01b1/plugins/redirect_www.py

This method provides this ability:

https://docs.datasette.io/en/stable/internals.html#await-ensure-permissions-actor-permissions


2.12.* compilation issue

Hi,
I was trying to compile this using  Scala 2.12.10 and I get a weird error on the usage of partial functions.
Specifically
Server.scala:103:51: method apply in object PartialFunction is deprecated (since 2.12.5): For converting an ordinary function f to a partial function pf, use `val pf: PartialFunction[A, B] = { case x => f(x) }`. For creating a new PartialFunction, use an explicit type annotation instead, like in `val pf: PartialFunction[Int, String] = { case 1 => "one" }`.
[error]       copy(requestHandler = requestHandler orElse PartialFunction(handler))

I tried to fix it myself to no avail.
Have you guys seen this?
Thanks

Oh! Looks like this was solved in https://github.com/polynote/uzhttp/commit/5434a7e3b9e64d4c2b72fedf073ea9da6f7c8167


add tf-config paramter

Proposed changes:

add tf-config parameter
fixes #1472

Status (please check what you already did):

[x] made PR ready for code review
[ ] added some tests for the functionality
[ ] updated the documentation
[ ] updated the changelog

@Ghostvv I'm so sorry. Last submit the gaoquan account is used in my company computer, and I forgot the  password. So I resubmit this pr.

no worries, let me know, when it is ready for a review

no worries, let me know, when it is ready for a review

And can you review the code?

I see that you updated the embedding policy, but what about the keras policy?

I see that you updated the embedding policy, but what about the keras policy?

Last time you asked me to add tf config in embedding policy. It doesn't affect keras policy. And keras policy should add this parameter again. If it need, I could create another pr.

sorry, there is a misunderstanding, I meant could you please add it to both policies. I'm sorry, I didn't make myself clear. I think it is better to do in one PR, if you don't mind

sorry, there is a misunderstanding, I meant could you please add it to both policies. I'm sorry, I didn't make myself clear. I think it is better to do in one PR, if you don't mind

Ok, tomorrow I add it. Now it's too later in China.

@Ghostvv Is it ok?

@GaoQ1 thank you for the changes, I was on holiday, I'll review it this week

@GaoQ1 It looks like tf.CofigProto has more options than the 4 you chose to configure. Is there a reason for only these 4?