Enum names are ignored when generating JSON scheme

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
The scenario is generating json scheme from dataclass.
I see that it doesn't includes the names in enum classes to enforce them in the scheme. Rather just integers.
    MyStocks: !MyStocksConf
      File: buydicnk.cache
      PortofolioName: My Portfolio
      Use: !UseCache DONT

instead of Use: 0
I have added specifically code to handle the conversion (def to_yaml) , but I wonder if there is a way by default to suggest the name in yaml.
If there is a way , then it is probably a bug, otherwise, a feature requests. I think both the yaml and yaml scheme generated should support names in "my convention" or similar.
If not , then at least it is worthwhile to include it in the description somehow.
Example Code
from pydantic.dataclasses import dataclass as pyddataclass
from pydantic import ConfigDict
from functools import partial
confdict=ConfigDict(arbitrary_types_allowed=True)
dataclass=partial(pyddataclass,config=confdict)
from enum import Enum
from typing import Union

def to_yaml(enum_class):
    def to_yaml_inner(cls,enum_value):
        return cls.represent_scalar(f'{enum_class.__name__}',u'{.name}'.format(enum_value),style=' ' )

    def from_yaml(loader, node):
        #x=loader.construct_scalar(node)
        return enum_class[node.value]
    def add_stuff(yaml):
    # add the representer to the yaml serializer
        #yaml.add_representer(enum_class, to_yaml_inner)
        yaml.add_constructor(f'{enum_class.__name__}',from_yaml,Loader=yaml.CLoader)
    # add the to_yaml method to the enum class
    enum_class.to_yaml = to_yaml_inner #lambda self: yaml.dump({self.name: self}, default_flow_style=False)
    enum_class.from_yaml = from_yaml
    enum_class.add_stuff = add_stuff

    return enum_class

@to_yaml
class UseCache(int,Enum):
    DONT=0
    USEIFAVALIABLE=1
    FORCEUSE=2

@dataclass
class MyStocksConf:
    File: str = r'buydicnk.cache'
    SrcFile: str = "example_mystock.csv"
    PortofolioName: str = "My Portfolio"
    Use: Union[UseCache, int] = UseCache.USEIFAVALIABLE

from pydantic import TypeAdapter

t=TypeAdapter(MyStocksConf)
print(t.json_schema())

Result:
{'$defs': {'UseCache': {'enum': [0, 1, 2], 'title': 'UseCache', 'type': 'integer'}}, 'proper
ties': {'File': {'default': 'buydicnk.cache', 'title': 'File', 'type': 'string'}, 'SrcFile':
 {'default': 'example_mystock.csv', 'title': 'Srcfile', 'type': 'string'}, 'PortofolioName':
 {'default': 'My Portfolio', 'title': 'Portofolioname', 'type': 'string'}, 'Use': {'anyOf':
[{'$ref': '#/$defs/UseCache'}, {'type': 'integer'}], 'default': 1, 'title': 'Use'}}, 'title'
: 'MyStocksConf', 'type': 'object'}

### Python, Pydantic & OS Version

```Text
C:\Users\ekarni\compare-my-stocks\venv\lib\site-packages\pydantic\_migration.py:276: UserWarning: `pydantic.utils:version_info` has been moved to `pydantic.version:version_info`.
  warnings.warn(f'`{import_path}` has been moved to `{new_location}`.')
             pydantic version: 2.3.0
        pydantic-core version: 2.6.3
          pydantic-core build: profile=release pgo=false
                 install path: C:\Users\ekarni\compare-my-stocks\venv\Lib\site-packages\pydantic
               python version: 3.10.0rc2 (tags/v3.10.0rc2:839d789, Sep  7 2021, 18:51:45) [MSC v.1929 64 bit (AMD64)]
                     platform: Windows-10-10.0.19044-SP0
     optional deps. installed: ['typing-extensions']

Hi @eyalk11,
Thanks for your question! If I understand what you're proposing, I don't think these changes would be compliant with the OpenAPI specifications that the json_schema generation adheres to. See our notes on this here in the docs.
I think this discussion might be relevant to what you're asking about: https://github.com/pydantic/pydantic/discussions/2980
It makes sense to me that the enum name values are ignored when generating the JSON schema, as they don't pass validation if you use them as input to a field with the type of said enum.
Let me know if you have any more questions, happy to help! 😄


Install fails on composer step: Install configured globally-required packages.

On OS X 10.11.6 (El Capitan), I'm using VirtualBox 5.1.8, the latest DrupalVM with the default configuration.  When I run vagrant up, it goes through everything fine until this line:
TASK [geerlingguy.composer : Install configured globally-required packages.] ***
failed: [drupalvm] (item={u'release': u'^0.3', u'name': u'hirak/prestissimo'}) => {"changed": true, "cmd": "COMPOSER_HOME=/home/vagrant/.composer /usr/bin/composer global require hirak/prestissimo:^0.3 --no-progress", "delta": "0:00:05.527304", "end": "2016-11-02 16:37:17.592121", "failed": true, "item": {"name": "hirak/prestissimo", "release": "^0.3"}, "rc": 1, "start": "2016-11-02 16:37:12.064817", "stderr": "Changed current directory to /home/vagrant/.composer\n./composer.json has been created\nLoading composer repositories with package information\nUpdating dependencies (including require-dev)\n\nInstallation failed, deleting ./composer.json.\n\n                                            \n  [Composer\Downloader\TransportException]  \n  Content-Length mismatch                   \n                                            \n\nrequire [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] []...", "stdout": "", "stdout_lines": [], "warnings": []}
This could be related to: https://github.com/geerlingguy/drupal-vm/issues/930
I tried this with the 'php_install_recommended: no' and still got the issue.

This is a duplicate of https://github.com/geerlingguy/drupal-vm/issues/941 — note the error message:
[Composer\Downloader\TransportException]
Content-Length mismatch

See, specifically, this issue on drupal.org: https://www.drupal.org/node/2823695

Sorry.

I do like DrupalVM.  It's a very nice system for using VMs.
I want to give you an update.  I've done three things in order to get Drupal VM up and running with the latest master:

To get past the prestissimo issue, I add a /home/vagrant/.composer/config.json file with the following contents:
{
"repositories": {
"packagist": {
"type": "composer",
"url": "https://packagist.org"
}
}
}

Comment out adminer so it doesn't provision.

Comment out the drupalconsole so it doesn't provision.

Don't let the machine provision via composer.


need region support in code-search formate file

need region support in code-search formate file, like this

would be helpful for call graph analyse or some stack analyse

Makes sense

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


TypeScript fn with fn level auth uses "@azure/functions": "^1.0.2-beta2"

I'm running into problems where the boilerplate packaging and code created by the extension produces an incorrect environment. I see then when my TypeScript types causes errors when running.

When I investigated why the TypeScript boilerplate doesn't understand TypeScript types, I realized the version of the functions package is still on a beta when npm shows that as 2 years old.

Why is the extension installing a package that is 2 years out of date?

We use a caret (^) in package.json when specifying the version for that package, which means you'll get any 1.*.* version above 1.0.2-beta2. For example, when I do npm install from a fresh project, I see the latest version (1.2.3) referenced in my package-lock.json. By default, npm uses the latest allowed version unless you already have a package-lock.json file in your workspace.
I can update the default version we put down because I agree it's confusing that it's referencing a "beta", but all that does is affect the minimum version you can use, not the exact version.

The current minimum version is old old - can the minimum version keep pace with the extension itself? Why would we update the vscode extension functionality and not give the customer the option of using the latest functionality for functions themselves?

There would be no functional difference if we kept the minimum version up-to-date because npm already installs the latest version by default. Can you try creating a new project, do npm install and check the version of @azure/functions in package-lock.json? It should reference "1.2.3"

I just checked, while the package.json does say beta, the actual version node_modules is that latest. While this is superconfusing, it isn't broken.

Cool - yeah we'll get rid of "beta" to reduce some of the confusion.


not working in web

Uncaught TypeError: Cannot convert undefined or null to object
at Function.keys ()
at eval (react-native.web.js:1)
at Object../node_modules/react-native-vector-icons/dist/lib/react-native.web.js
"react-native": "0.61.4",
"react-native-web": "^0.11.7",
"react-native-vector-icons": "^6.6.0",
test: /.(js|jsx|mjs)$/,
include: [
/src/*/,
/node_modules/react-native-/,
],
test: /.(ttf)$/,
loader: "url-loader", // or directly file-loader
include: path.resolve(appDirectory, "node_modules/react-native-vector-icons"),

anyone help?

@oblador can you help?

@keung7251 the same in my case

Did any one solved their own or any solution ?

same here

We no longer ship this file so should be fixed


[FixCode] Accept the fixit for the warning that @warn_unused_result is the default now.

What's in this pull request?
Accept the fixit for the warning that @warn_unused_result is the default now. Useful for migration.
Very safe change, only affects fixit mode used when migrating.
Resolved bug number: (SR-)
rdar://27516354

Before merging this pull request to apple/swift repository:

[ ] Test pull request on Swift continuous integration.

Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
    Platform     | Comment
    ------------ | -------------
    All supported platforms     | @swift-ci Please smoke test
    All supported platforms     | @swift-ci Please smoke test and merge
    OS X platform               | @swift-ci Please smoke test OS X platform
    Linux platform              | @swift-ci Please smoke test Linux platform

A smoke test on macOS does the following:

Builds the compiler incrementally.
Builds the standard library only for macOS. Simulator standard libraries and
device standard libraries are not built.
lldb is not built.
The test and validation-test targets are run only for macOS. The optimized
version of these tests are not run.

A smoke test on Linux does the following:

Builds the compiler incrementally.
Builds the standard library incrementally.
lldb is built incrementally.
The swift test and validation-test targets are run. The optimized version of these
tests are not run.
lldb is tested.

Validation Testing
    Platform     | Comment
    ------------ | -------------
    All supported platforms     | @swift-ci Please test
    All supported platforms     | @swift-ci Please test and merge
    OS X platform               | @swift-ci Please test OS X platform
    OS X platform               | @swift-ci Please benchmark
    Linux platform              | @swift-ci Please test Linux platform

Lint Testing
    Language     | Comment
    ------------ | -------------
    Python       | @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

@swift-ci smoke test OS X platform

@swift-ci test OS X platform

LGTM

We don't need both the smoke test and regular test.  Smoke testing is enough for this change.  Killing the ordinary test.


Add listaddressgroupings RPC method

The listaddressgroupings RPC method from Bitcoin Core would be useful to have in Electrum.  From Namecoin's point of view, it would be a helpful building block for making sure that different names don't get accidentally clustered on the blockchain.
This should presumably be implemented for upstream Electrum.  However, an extra Namecoin-specific feature would be to treat name outputs as change outputs when computing the groupings.

Upstream issue: https://github.com/spesmilo/electrum/issues/5556

@rllola This might be a useful component for the "anonymous name wallet" use case of Electrum-NMC, since we could use listaddressgroupings to determine which addresses are safe to mix together (both as transaction inputs and as address subscriptions).  Would you be interested in implementing this?

@JeremyRand Yeah I would be happy to.

@rllola Okay cool.  Feel free to join the discussion in the upstream issue.  :)

@rllola Given that you're now occupied with the GNU/Linux packaging and ZeroNet work, is it okay if I assign this to another developer?

@JeremyRand Yes of course.

We'd be okay with taking a PR for this to a stable release branch; I can then forward it upstream after we merge it.


How do I use ajv in Dojo?

I would like to use ajv in my Dojo web application, but cannot figure out how to include the ajv module and use it - when i tried to include it from the source code, it complains it could not find compile module
first I tried including this in my index.html

but then I don't know what to do after? How to create Ajv object?  I tried the same as the getting started example but it does not work.
I also tried downloading the source code and in my dojo config I included the path to ajv in my packages like this
                packages: [
                    ...
                    { name: 'ajv', location: 'third_party/ajv-4.1.0' },
not
                ],

and then in my script I require it like this

But it just error out.
Any ideas how to do this?

Have you tried using the bundle from cdnjs? https://github.com/epoberezkin/ajv#using-in-browser
Then the code from Getting started should work I think, although require in Dojo has some different syntax I suspect.

You can use the bundle in dist folder it's the same.
What happens with the code above?

By the way, given that dojo doesn't recognise the bundle format (although it's universal) you may have global Ajv.

What do you mean by the last comment?  'global ajv'
Do you have a working example on JSFiddle?
Here is my attempt, https://jsfiddle.net/pbq2yjxy/14/

the problem with the fiddle is that it uses dojo which redefines require. And as I said, Ajv is global (that is until you override it in the second fiddle)
So just remove the first line in the second fiddle - it works then.

Please reopen if it didn't work.

The second fiddle works as you said, but when using in conjunction with Dojo, it is not possible.  It just does not work.  I do not know if it is even possible to make it work in a project that also uses Dojo.

Please create a non-working sample. I think fiddle uses Dojo, no?

http://stackoverflow.com/q/38402021/1462656

It seems like dojo has its own module system that isn't compatible with both commonjs and AMD, but because it redefines global require it breaks the bundle? Not sure how to fix it, maybe bundle has to be built separately...

In which order do you load bundles (ajv and dojo)? jsfiddle loads dojo before ajv. Did you try changing the order?

I think you are right, I got it to work by loading the ajv bundle before I load dojo.js. My index.html looks like this.
<!DOCTYPE html>

    <meta charset="utf-8">
    <title></title>

    <link rel="stylesheet" href="./third_party/dojo-release-1.10.4/dijit/themes/claro/claro.css" />

Thank you! I guess it's worth adding some notes in README.


Proposal: WinUI 3 - File New Project Template should create a MainPage and not just a MainWindow

Originally posted by @michael-hawker in https://github.com/microsoft/microsoft-ui-xaml/issues/4966#issuecomment-882958799

Yeah, I too keep getting tripped up that Window isn't a DependencyObject... it's a bit weird.
If the expectation that Window is supposed to just be the host like the implicit Frame created in App.xaml.cs for UWP apps, maybe the File -> New template for WinUI 3 should separate out the MainWindow as also having a MainPage class hosted by it already setup?
This would help lead developers to the proper constructs when building their app and set them up for success vs. having everyone start dumping UI in MainWindow and then getting frustrated.
I mean I really like how the MainWindow is more exposed compared to all the extra logic on Startup that was done in the UWP space, but it's super confusing and bare-bones template when trying to start building an app from afterwards without creating a new Page first.

I keep seeing a few issues filed because of this (and have been tripped up myself) by the fact that the default project template for WinUI 3 creates a bare Window class.
This doesn't jive as well with many UI APIs as it's not a DependencyObject/FrameworkElement. It's really just the application 'shell', like the implicit Frame that UWP apps used to create back in App.xaml.cs.
I love that this Window is now exposed and more easily customizable via XAML, but feel like it should still host a Frame which then points to a MainPage object based on Page where a developer is then led to start creating their application's UI.
Otherwise, developers just start building UI within the Window itself and get tripped up when something needs to navigate the visual tree or try to create a DependencyProperty off of it (see #4966 for instance).

Hello @michael-hawker,
I agree. Do you have a sample application where I can copy from. Since I share code between UWP WinUI 2 & Win32 WinUI 3, it would help me a lot if I can share the MainPage as well. I saw that the WinUI 3 Controls Gallery uses this approach, but this code is quite complex.
Thanks,
Carlos

@crramirez I unfortunately do not have anything setup. Most of my WinUI 3 tests have just been dropping in our Toolkit controls to check that they're working.
At a minimum though you can basically replicate what the App.xaml.cs file in UWP does for you like this:
<!-- MainWindow.xaml -->
<Window ...>
  <Frame x:Name="ApplicationFrame"/>
</Window>

// MainWindow.xaml.cs
public MainWindow()
{
    this.InitializeComponent();
    ApplicationFrame.Navigate(typeof(MainPage));
}

I think that should work, just copy over your MainPage class and tweak its namespaces and then you should see it as your starting page, just like in an UWP app.
(Btw, love your github stat blog on your readme, is there a site to help generate that? Is it 'live' or static that you have to re-generate?)

Ok, I will begin with that. I agree with you that this could help everyone to migrate a UWP app to WinUI 3 easier.
I copied the stats from another user 😏 . This is the code:
![Carlos Ramirez's GitHub Stats](https://github-readme-stats.vercel.app/api?username=crramirez&show_icons=true&count_private=true)

@alwu-msft FYI

Frame isn't needed by default. If the user wants back and forward navigation, they can add it manually. Today the UWP templates add a root frame but I don't like that and usually I just make MainPage an user control and set it as the content.

Yeah, I think in the default case developers may want to know how to handle page navigation. It's easier for a dev to rip the frame out than realize that it's missing.
That's also why #5513 is important to point devs to the right docs for getting started or be able to find tools like Windows Template Studio to be able to make it easier to configure their app design/setup.

FYI @bpulliam since #4966 got pinged again, this would be a fairly straight-forward mitigation to just update the starting template. Lead folks down a happier path by default.

FYI similar to binding this also prevents a VisualStateManager (VSM) from working properly, see a discussion we had here: https://github.com/CommunityToolkit/WindowsCommunityToolkit/discussions/4848

If anything, the template could just create a MainPage and reference it in the Window XAML:
<Window x:Class="ProjectTemplate.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:local="using:ProjectTemplate"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d">

    <!--  Window isn't a FrameworkElement for dependency property or resources...  -->
    <local:MainPage />
</Window>

This is what I did in my template (though I'm also sharing the MainPage with the UWP head in the case anyway): https://github.com/michael-hawker/WinUI2Plus3Template/blob/main/ProjectTemplate.WinAppSDK/MainWindow.xaml
Though in the onboarding/getting started docs there should still be information here about how to setup and use a Frame model (if needed) like what is setup by default in a UWP app.


Add the missing truncation=True in llm/predictor.py

PR types

Bug fixes
PR changes

Others
Description

In llm/predictor.py, two calls to tokenizer are missing the truncation=True parameter, causing the results not to be truncated to max_length. This leads to errors in subsequent processing when using --benchmark for testing. This PR fixes this issue.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


I just want to like!

https://github.com/zeno-ml/zeno-hub/assets/65095341/8a7630e2-f6f7-4c8b-be64-1a14a6e6b8fa
The tool tip makes me think I can press like on the number too, but liking is tied to the heart button only.
Maybe consider only putting the tooltip on the heart svg, or making the button larger so clicking on the number too counts as pressing like.

Epic win. Thanks!


Fix GH API rate limits in pipelines

We have a few failing pipeline runs in the last weeks that failed due to rate limits on the github API. Since we have the @keptn-bot user, we should make use of it and use the KEPTN_BOT_TOKEN whenever we interact with the github API to prevent rate limiting.
Tasks:

use ${{ secrets.KEPTN_BOT_TOKEN }} in all places that interact with the GitHub API in the pipelines
(the token secret is already set up)

Example of a failing pipeline run: https://github.com/keptn/lifecycle-toolkit/actions/runs/3845161694/jobs/6548985051

what would be the impact for fork runs?

hey uploading images job in ci.yaml is failing for me is it expected behaviour? it was set to run for main branch only ig....

@thisthat hmm good point 🤔

I would like to work on this issue as first-time contributor to keptn. Could you assign it to me?

hey uploading images job in ci.yaml is failing for me is it expected behaviour? it was set to run for main branch only ig....

this happened after i changed to access token instead of password

Ok I did some testing myself and I think the token is not the right approach since that won't work from forked repos.
But since the rate limit is hit while downloading some content from github (specifically the build tools for operator and scheduler that are used in the respective makefiles) we could just cache those files with actions/cache. This should also reduce the times we hit the rate limit.
Something like this:
  - name: Cache build tools
    id: cache-build-tools
    uses: actions/cache@v3
    with:
      path: ./${{ matrix.config.folder }}/bin
      key: build-tools-${{ github.ref_name }}

@haanhvu @Pavan-Nambi any updates on this? do you need help? did you stop working on it?

hey @mowies  ya i stopped working on this i was not sure on how to proceed after that error soo...


Explicitly return null for empty pagination data

(Related to https://github.com/5afe/safe-client-gateway-nest/pull/206#discussion_r1056314317)
This PR adds explicit null values when pagination data is empty.

Coverage: 85.862% (-0.1%) from 85.958% when pulling 6fd7801e7bd519f259514e7b7a50a86a33c97ae0 on explicit-pagination-info into 6b0559137c7e2061e02d67dd9d4d63db353af56c on main.


Update request: jellyfin{,-web} 10.10.1 → 10.10.2

Package Information

Package name: jellyfin/jellyfin-web
Latest released version: 10.10.2
Current version on the unstable channel: 10.10.1
Current version on the stable/release channel: 10.9.11

Checklist

[x] Checked the nixpkgs pull requests

Notify maintainers

@nyanloutre @minijackson @purcell @jojosch

Note for maintainers: Please tag this issue in your PR.

Add a :+1: reaction to issues you find important.

Hey @ryantm, I've seen a few update requests recently for packages like and Sonarr recently — in the past, we'd normally receive update PRs automatically from the @r-ryantm bot: are we doing something wrong such that this has stopped?


Request to limit reconciliations for PipelineRun reconciler

As you can see, there have 672298 reconciliations in 23 days due to PipelineRun not found in Jenkins. PipelineRun reconciler suffered a terribly ineffective loop, because it never wakes up.
It's necessary to limit the reconciliations for the reconciler to prevent too many meaningless loops:

Time limit: set timeout for every PipelineRun CR
Reconciliations limit: set reconciliation limit for every PipelineRun CR

/kind feature

How about add LastUpdateTime to record last time reconciliation resulted in an error and Count to record how many times resulted.
Are there some simple ways to solve?


core: sort results of Storage.Find interop and NEO.getRegisterValidators

Closes #909
We need to match elements order with C# implementation.
Perhaps, we don't even need to change return value of dao.GetStorageItems(WithKey) as Storage.Find and NEO.getRegisteredVelidators are the only places where we have to keep elements sorted.

While we're at it it'd be nice to also make storageFind use GetStorageItemsWithPrefix (like it's done in master-2.x now).


Show test results as bar chart

Show the test result for each build run as bar chart combining passed / failed tests as stacked bars to see how the number of tests are increasing over time and how many of those tests where failing.

Resolved with Release 0.1804.191


Allow teacher to edit assistants

Description of changes

Allow teacher to edit assistants

Related issues
Closes #684

Currently a student cannot also be an assistant of a course they have grades in because of the course role unique requirement. I'm pretty sure that is something we need.

Currently a student cannot also be an assistant of a course they have grades in because of the course role unique requirement. I'm pretty sure that is something we need. It also causes an internal server error, so it should at least be handled better.

This also brings up the question of the access rights of assistants. If assistants have access to all grades of a course, they could go view (or change) their own grades or the grades of their peers back when they were taking the course. This may or may not be desirable.
Last year, we considered the solution that assistants can only view the grades that they themselves have uploaded. Another option is that assistants can only view grades which have been uploaded after they were given the assistant role.

Currently a student cannot also be an assistant of a course they have grades in because of the course role unique requirement. I'm pretty sure that is something we need. It also causes an internal server error, so it should at least be handled better.

This also brings up the question of the access rights of assistants. If assistants have access to all grades of a course, they could go view (or change) their own grades or the grades of their peers back when they were taking the course. This may or may not be desirable.
Last year, we considered the solution that assistants can only view the grades that they themselves have uploaded. Another option is that assistants can only view grades which have been uploaded after they were given the assistant role.

There is a code of conduct that employee should respect. I would consider the history system to be the best solution, while giving freedom to the users.


Create with-firebase-hosting-and-docker example

Adds an example based off of @jthegedus work on firebase hosting, compatible with next v7 and using docker for deploy, dev and serve.

@jthegedus What do you think about the new README?

Thank you @sarovin!
@jthegedus thanks for reviewing 💯


FormsModule Error - Can't bind to 'ngModel' since it isn't a known property of 'input'.

Using the latest template from Steve (Angular 4.0), #930
I've added the following lines to app.module.client.ts file :
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
and added them both to the Imports[]
I then ran the following command : webpack --config webpack.config.vendor.js
I've added a form into my app and keep getting the following error : Can't bind to 'ngModel' since it isn't a known property of 'input'.
If i comment out the form from the HTML it works ok...... but if i then un-comment the form it then works ok (i.e. the form works and no errors are displayed)
It seems that something is happening in the HMR to make this work but I'm not sure what!?

Make sure that the binded property in the form exists or not.

It's not enough to add them to app.module.client.ts, because that's only for client-side execution. You need them to be enabled for server-side execution too. Try adding them to app.module.ts.

You need to import the FormsModule
Open app.module.ts
and add line
import { FormsModule } from '@angular/forms';
and
@NgModule({
imports: [
FormsModule
],
})


Impossible to start server with Floodgate-Fabric - config errors

When I try to start a 1.17 server with Floodgate and Geyser (using the fabric versions), I crash after a minute or two. The server reports errors with the configurations which is concerning because this happened on the first launch. To simulate the first launch (and to do what the log said), I deleted the configs and tried again. I tried redownloading the .jars, this did not work either. I also tried deleting the config folder itself, to no avail
https://paste.alloffabric.com/egapucoxay.sql
https://paste.alloffabric.com/irucaluzem.sql
If anyone can help me diagnose these issues, it'd be much appreciated.

From what I can tell, Floodgate is somehow creating Geyser's config and using it.

https://github.com/GeyserMC/Floodgate-Fabric/issues/7#issuecomment-817022484
Sorry for the inconvenience!


Feature: BPF fragmentation handling

[ ] Capability to do IP fragment reassembly in front of a BPF program
[ ] Ability for a BPF program to queue skbs for reassembly
[ ] Metadata for a BPF to know whether reassembly was performed
[ ] Prevent an skb from being queued into reassmebly multiple times
[ ] Don't require MTU of net_device to cover maximum reassembled packet size

We've had users hitting some fragmentation issues lately, I think we should consider how to solve some of these fragmentation issues in an upcoming release.

We have not seen fragmentation related issues in the past couple of months. The new MTU model seems to work great. Closing for now.


Update Code of Conduct

PyBaMM's code of conduct is adapted from contributor covenant 1.4. It would be good to update to the newest version (v2.1) as done in https://github.com/pybamm-team/pybamm-cookiecutter/pull/10.
This probably needs formal approval from the Steering Council at some point, but given than it is an update on our current CoC it should be fine to do it retrospectively (tagging SC members @valentinsulzer @martinjrobins @Scottmar93 @Saransh-cpp @gjo97).

Fine by me

Fine by me too
From: Valentin Sulzer @.>
Sent: Monday, June 10, 2024 4:05 PM
To: pybamm-team/PyBaMM @.>
Cc: Offer, Gregory J @.>; Mention @.>
Subject: Re: [pybamm-team/PyBaMM] Update Code of Conduct (Issue #4160)
This email from<EMAIL_ADDRESS>originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders listhttps://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address.
Fine by me
—
Reply to this email directly, view it on GitHubhttps://github.com/pybamm-team/PyBaMM/issues/4160#issuecomment-2158610730, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEL7YZM3HENLMHITM5EMKFLZGW6DLAVCNFSM6AAAAABJCBRHMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJYGYYTANZTGA.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>


iframe/embed: Generate isolated version of provider listing, linkable/filter by state

Include:

Prominent but non invasive info on how to add/change/remove healthcare providers.
How to donate heading (expandible?)
Filters (state/accepted items)
Actual provider listing
Attribution at bottom: "By findthemasks.com" (or similar)

NOTE: I will make changes as requirements change, or simply comment below.

Prototype URL now live at: https://findthemasks.com/give.html

Graeme, this is same thing I chatted about just now as give.html
instead of our who we are link, can it say "by findthemasks.com" at the bottom

This is done.

Woo! And I presume @Shuhanhe1 will add this on his end? At https://getusppe.org/give/

How to donate heading (expandible?)

Linking relevant PR #111

yes that is correct!
can you clarify how to donate heading?
Shuhan He
On Sun, Mar 22, 2020 at 10:07 PM Patrick Nelson<EMAIL_ADDRESS>wrote:

Woo! And I presume @Shuhanhe1 https://github.com/Shuhanhe1 will add
this on his end? At https://getusppe.org/give/

How to donate heading (expandible?)

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/r-pop/findthemasks/issues/113#issuecomment-602324249,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMIATQ7Y5XLTDEBV6F7J6ADRI276RANCNFSM4LRP33MA
.

This section on the findthemask.com site. Ideally if we’re showing large amounts of folks WHERE to donate we need to insure they’re properly informed on HOW 😁

On the call, shuhan had his own content for that I thought, that also
explained what each type of ppe was.
If you want us to include how to donate in the iframe we can do that.
On Sun, Mar 22, 2020, 7:14 PM Patrick Nelson<EMAIL_ADDRESS>wrote:

This section on the findthemask.com site. Ideally if we’re showing large
amounts of folks WHERE to donate we need to insure they’re properly
informed on HOW 😁
[image: 5EFC6858-3B05-4093-A7C4-9D1533026104]
https://user-images.githubusercontent.com/4269377/77273613-456b8500-6c71-11ea-800b-f36f73af8a45.jpeg
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/r-pop/findthemasks/issues/113#issuecomment-602325693,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACV3JSTDRYV6UYD3Q2CKDUDRI3AZTANCNFSM4LRP33MA
.

yes we currently use the CMS to give that info instead of the iframe. I
would keep the iframe to just the information
[image: image.png]
Shuhan He
On Sun, Mar 22, 2020 at 10:19 PM Rachel Popkin<EMAIL_ADDRESS>wrote:

On the call, shuhan had his own content for that I thought, that also
explained what each type of ppe was.
If you want us to include how to donate in the iframe we can do that.
On Sun, Mar 22, 2020, 7:14 PM Patrick Nelson<EMAIL_ADDRESS>wrote:

This section on the findthemask.com site. Ideally if we’re showing large
amounts of folks WHERE to donate we need to insure they’re properly
informed on HOW 😁
[image: 5EFC6858-3B05-4093-A7C4-9D1533026104]
<
https://user-images.githubusercontent.com/4269377/77273613-456b8500-6c71-11ea-800b-f36f73af8a45.jpeg
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<https://github.com/r-pop/findthemasks/issues/113#issuecomment-602325693
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/ACV3JSTDRYV6UYD3Q2CKDUDRI3AZTANCNFSM4LRP33MA
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/r-pop/findthemasks/issues/113#issuecomment-602326758,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMIATQ6GO2E3FVAW4TIQNT3RI3BMNANCNFSM4LRP33MA
.


feature load

Codecov Report

Merging #203 (d9cdef2) into main (4787917) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head d9cdef2 differs from pull request most recent head ca88b83. Consider uploading reports for the commit ca88b83 to get more accurate results

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@           Coverage Diff           @@
##             main     #203   +/-   ##
=======================================
  Coverage   35.97%   35.97%
=======================================
  Files          14       14
  Lines        1162     1162
=======================================
  Hits          418      418
  Misses        690      690
  Partials       54       54


RRF-87: Search Autocomplete

Added temp API config
Hooked up autocomplete and search to live data
Added "brand" to RCHSearchProduct in SDK

I'm getting Error getting current user when going to that screen. There's a chance that there's some UserDefaults configuration that you have set up that is having it work for you. Can you try a fresh install and see if it works? The Client configuration workaround isn't getting triggered because it's missing.

You have a merge conflict @arianaantonio ! Also, The status bar should be updated to white inside the search app.

Looks good @arianaantonio !
One thing we should probably do is put a 0.5 second delay on triggering both requests so we don't bog the system down. These can be triggered via timer in didSet on searchTerm.
A few polish suggestions to take the pattern we talked about further: (#pp)

Order the methods / vars -- State Management, API Calls, IBActions, UI Delegates.

I like to have my IBActions and UI Delegates just modify VC state or trigger API calls, and not have any conditionals or direct view modification. This isn't an absolute, a few small things is fine, but if things get bigger, it's best to model.

Have the searchTerm property manage the text in the UISearchBar
Have the attributed string returned in a method like attributedText(for row: Int) -> NSAttributedString


With froala editor it's showing error (Important)

Hi,
I'm using froala editor to insert some wisywig functionality to my post. i'm also using ng-embed on it. like this.

then it's showing this error :disappointed:
Error: [$sce:itype] Attempted to trust a non-string value in a content requiring a string: Context: html
error link
froala editor angular version im using
What i should do now ?

can be an angular version issue. not sure.

Sound like post.body contains html nodes, it's not a string/text. angular-sanitize used by ng-embed is expecting a string. If you convert post.body to a string it will probably work. Take a look here. You should also turn of the htmlSanitize option in ng-embed as well so html tags don't get stripped away.


merge from arlac77/template-esm-only,arlac77/template-github

package.json

chore(package): add ^3.8.0 remove ^3.7.1 (devDependencies.ava)

Codecov Report

Merging #168 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #168   +/-   ##
=======================================
  Coverage   85.58%   85.58%
=======================================
  Files           4        4
  Lines         430      430
  Branches       33       33
=======================================
  Hits          368      368
  Misses         62       62

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 c2bc115...1328265. Read the comment docs.


Should result.exitCode be undefined?

Right now, the returned promise either:

Resolves with a result plain object, where result.exitCode is 0
Rejects with an error, where error.exitCode is either undefined (e.g. during a SIGTERM) or non-0

Since result.exitCode is always 0, is it useful? Should it be undefined instead then?
For example, signalName is only defined on error. Similarly, exitCode is possibly an information that is meant for errors.
With Execa, we define error as an extension of the result object. However, nano-spawn does not have the reject option, so it might make less sense.
In other words, should we:

Keep things as is?
Or define only error.exitCode (like we only define error.signalName), meaning result.exitCode would be always undefined?

What are your thoughts on this?

Definitely 2


Improve Druid ldap auth documentation

Description
Improved the ldap auth docs by clarifying that the object classes and
attributes noted are specific to Microsoft Active Directory, and could
be different depending on the specific ldap server being used. Also
emphasized the importance of the memberOf field and noted that the
step about adding users to roles is only needed in certain circumstances.

Thanks for updating this section! I've added some suggested rewording, although based on assumptions, so please double-check before applying.

Thanks, your suggestions sounded much better. I'm not sure on all the cases that the user would still want to configure roles for users explicitly, but I figured that was a good list to start with. Let me check with some others on what other cases would be good to add here if any.


Provision entire ScaleIO cluster

Add in support that will provision the entire ScaleIO cluster (MDM nodes) into a Mesos environment.

Planned experimental support only.

This PR https://github.com/codedellemc/scaleio-framework/pull/111 adds experimental support for this feature.


from_networkx() gets wrong output on undirected subgraphs

🐛 Bug

To Reproduce
from_networkx() may have unintended consequence for an undirected subgraph. subgraph() seems to be working just fine. Edges going both ways are required to represent an undirected graph when passing through a graph conv layer.
I believe this error may stem from coalesce()
G = nx.complete_graph(5)

g = pyg.utils.from_networkx(G)
o_sub = pyg.utils.subgraph([0,1,3,4], g.edge_index)[0]
print(o_sub)
# tensor([[0, 0, 0, 1, 1, 1, 3, 3, 3, 4, 4, 4],
          [1, 3, 4, 0, 3, 4, 0, 1, 4, 0, 1, 3]])
# good!

O = G.subgraph([0,1,3,4])
o = pyg.utils.from_networkx(O) # gives bad output
print(o.edge_index)
# tensor([[0, 0, 0, 1, 1, 3, 3, 3, 4, 4],
          [1, 3, 4, 3, 4, 0, 1, 4, 1, 3]])
# bad! Missing edges: (1,0), (4,0)

Fixed in master, see here.

Perfect. Thank you!


Users cannot modify template files

The readme says to edit the settings.typ file to configure some package settings, such as language. Users cannot do this without first cloning the package, defeating the purpose of its use as a package imported with
#import "@preview/touying-unistra-pristine:1.1.0": *

You should reorganise the settings so that they are configurable by the user.
(Some things, such as the default language, should probably not be set by the package at all.)

Thanks — I had indeed noticed it soon after publishing on Typst Universe but I never took the time to refactor the whole thing. Hopefully https://github.com/spidersouris/touying-unistra-pristine/commit/fb07f70b482cc03952abda6fa900e722797ea99d should help with this. I need to test it a bit more, and when fully ready, I'll update the README.

Fixed and released with v1.2.0.


iOS 9

Looks to not be available in iOS9 - any ideas? Thanks.

+1 Has anyone been able to get this working in iOS9? It works perfectly in 8.4. Any help would be much appreciated. Thanks.

It should work. iOS 9 changed how custom URL are handled: you need to explicitly white list custom URLs e.g. instagram:// for this plugin to work
You can modify your *-Info.plist file in /platforms/ios, but that's a generated file. Alternatively, I think you can make a custom plugin which generates the correct values in the .plist file
See link

We can handle this from within this plugin by adding a config-file element in the iOS section of the plugin.xml.
<config-file target="*-Info.plist" parent="CFBundleURLTypes">
    <array>
        <dict>
            <key>key</key>
            <string>value</string>
        </dict>
    </array>
</config-file>

We just need the relevant key and value.

Oh right :P
This works for me:
<platform name="ios">
  <config-file target="*-Info.plist" parent="LSApplicationQueriesSchemes">
    <array>
      <string>instagram</string>
    </array>
  </config-file>
</platform>

However, previous values in LSApplicationQueriesSchemes should not be overwritten. Not sure how to do that.

Looking at plugman source code, and it seems that when the plist is updated all values are merged instead of overwritten. So, I would say that just adding the snippet to the plugin.xml is the right thing to do to fix the functionality for iOS9.
@sfrdmn, would you make a pull request?


Adding easing parameters (obviously requires easing library).

Great plugin, just thought easing might be a nice plus.

My bad, I need to edit this fork...I broke the location hash with that parameter (just put it in with the wrong syntax).


rfe: sort results by package name

Description
Sort results by package name
Closes: https://github.com/operator-framework/audit/issues/19

Pull Request Test Coverage Report for Build 842044168

0 of 9 (0.0%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.009%) to 1.324%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/reports/bundles/data.go
0
3
0.0%

pkg/reports/channels/data.go
0
3
0.0%

pkg/reports/packages/data.go
0
3
0.0%

Totals

Change from base Build 841776864:
-0.009%

Covered Lines:
18

Relevant Lines:
1360

💛  - Coveralls

I am pushing this one because it is very small/nit and I would like to have that in place to re-gen the reports with a fix.
c/c @bentito @jmccormick2001 I hope that is fine.


extract luis ml entity if it is not a number

hi
i am trying to define an entity that is of type ML to extract a phrase from the user utterance "show me the balance of {@customer}" but it is also extracting numbers
is there a way to define the (@ ml customer ) so that it only extract phrases and not numbers
thanks

the solution is to provide several utterances to train the ml engine, after sometime luis stopped extracting numbers as a customer


Problem with goloang-test-api

Looks great, installed, server running, but  when I try the first Curl API I get
{"error":"ERROR: relation "product" does not exist (SQLSTATE 42P01)"}%
Any thoughts?

did you install via docker or manual?
if it was manual you need to run this SQL in your Postgres :)


User Settings Specs

Going to move forward with the latest version made by tonytamps. Wasn't sure how to get info from his fork, so I made my own branch on my fork but he is still an author on the metadata of my version. I will be adding myself as an author as well.

Let me get home and I'll contact you on IRC.
On Thu, 6 Aug 2015 17:22 killasnake0-wcd<EMAIL_ADDRESS>wrote:

Going to move forward with the latest version made by tonytamps. Wasn't
sure how to get info from his fork, so I made my own branch on my fork but
he is still an author on the metadata of my version. I will be adding
myself as an author as well.
—
Reply to this email directly or view it on GitHub
https://github.com/meteor-gazelle/meteor-gazelle/issues/63#issuecomment-128275846
.

Sounds good. Talk to you soon. :)


[Device support] ASUS GT-BE98 Intergration Failure at HA Reboot

Anything you want to mention?
Everytime the HA reboots, ASUS Router intergration will fails and it directs me to the log file.
Below are the log file extracted after the error message appear.
2024-08-18 17:51:26.366 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry GT-BE98 for asusrouter
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/asusrouter/init.py", line 27, in async_setup_entry
await router.setup()
File "/config/custom_components/asusrouter/router.py", line 329, in setup
await self.bridge.async_connect()
File "/config/custom_components/asusrouter/bridge.py", line 149, in async_connect
await self.api.async_connect()
File "/usr/local/lib/python3.12/site-packages/asusrouter/asusrouter.py", line 135, in async_connect
return await self.async_get_identity() is not None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/asusrouter/asusrouter.py", line 221, in async_get_identity
self._identity = await collect_identity(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/asusrouter/modules/identity.py", line 115, in collect_identity
endpoints, onboarding = await _check_endpoints(api_query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/asusrouter/modules/identity.py", line 210, in _check_endpoints
onboarding = process_onboarding(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/asusrouter/modules/endpoint/onboarding.py", line 84, in process
convert = process_connection(connection)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/asusrouter/modules/endpoint/onboarding.py", line 158, in process_connection
"guest": int(temp[1]) if len(temp) > 1 else 0,
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'info'
Your device model
GT-BE98
Firmware type
Stock
Firmware version
<IP_ADDRESS>.102_34372
Does everything work well?
No

Hello, @JYChong92, sorry for the delay. PR in the backend library is fixing the issue. An update to the integration will be available later this week together with other changes

Hi @Vaskivskyi,
Thanks for going through the fixes!
I will give it a try again once the fixes are available.
Thanks again for all the hard work and love your creation here that really really really helps me a lot with the integration of ASUS router to HA environment!

The issue should be fixed with the new version 0.33.2 of the integration


Implement gthread worker

I'm going to take a crack at this, so here's an issue for me to reference later:
TODO:

[ ] Implement a worker for gthread
[ ] Make some tests
[ ] Throw some crap at it

It'd be much appreciated!


usecookie can not use in defineI18nConfig

Environment
Nuxi 3.5.0

Operating System: Windows_NT
Node Version:     v18.14.2
Nuxt Version:     3.5.0
Nitro Version:    2.4.1
Package Manager<EMAIL_ADDRESS>Builder:          vite
User Config:      imports, modules, i18n, app, css, vite, typescript
Runtime Modules<EMAIL_ADDRESS>Build Modules:    -

Reproduction
export default defineI18nConfig(() => ({
legacy: false,
globalInjection: true,
locale: useCookie('lang').value || 'en',
warnHtmlMessage: false,
messages: message
}))
Describe the bug
useCookie call can not read ('indexOf')
Additional context
No response
Logs
No response

Thank you for your reproting!
We need  minimal reproduction repo or stackbliz.
Could you give us your it please?

close in-activity.
If you have still issue, please you will open as new issue.
thsnks!


router - add to the struct the "next_tile_fifo_arb_id"

make it an enum"
typedef enum logic [1:0] {
 north = 2'b00;
south = 2'b01;
east = 2'b10;
west = 2'b11
} t_direction

already added to router_pkg.


Correct getEnv split.

In theory, = are valid characted in environment values. In practice, this function is only used to get the HOSTNAME, which cannot include any = values, but we might end up using this function for something else in the future. And it won't parse the environment properly.
Signed-off-by: David Calavera<EMAIL_ADDRESS>

Old code was safe since we never looked at the values part, but ok. LGTM

LGTM


Powershell path conflict

Problem
When running cargo run or deploy and having multiple dependencies, linking command can't link cause path conflict.
Steps
1-Running cargo build/run
2-Having paths with spaces or strange chars (allowed in windows)
3-Command genereted by cargo won't execute correctly cause path conflict
Output may look like this:
 error: linking with `x86_64-w64- mingw32-gcc` failed: exit code: 1 -the list of paths tha failed-

= note: c://mingw.../../../../../ld.exe could not open ../../project.exe
Possible Solution(s)
Make the correct paths when needed
C://Users/Example/Cargo_Build/My project -> ❌
"C://Users/Example/Cargo_Build/My project" -> ✅
Notes
If path follow conventions you get normal execution
Version
cargo 1.68.2 (6feb7c9cf 2023-03-26)
release: 1.68.2
commit-hash: 6feb7c9cfc0c5604732dba75e4c3b2dbea38e8d8
commit-date: 2023-03-26
host: x86_64-pc-windows-gnu
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:Schannel)
os:Windows 10.0.22621 (Windows 10 Home Single Language) [64-bit]

Hm, that's strange, I can't seem to reproduce this.
Can you provide some more information:

Does this happen with a hello-world project?  If not, what is the required project setup?
Which mingw do you have installed (which distribution, which version, etc.)?
What is the output of x86_64-w64-mingw32-gcc --version

This happened while I was following the first project in the book of rust introduction, adding the rand dependency, this is my mingw version:
GNU Make 4.4
Built for x86_64-w64-mingw32
Copyright (C) 1988-2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

x86_64-w64-mingw32-gcc.exe (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

All I did was using $ cargo run and it keep showing the error that couldn´t link
I suspected the path was making some kind of conflict due to the output it was giving and yes, it was. As a spanish user I had this path 'C:/Users/Example/Programación/Rust/guessing_game/' the conflict comes from the 'ó' or any strange char or space(powershell allows this) so as I realize and removed it, it worked perfect and make the compile


Usernames with period breaks tasks view due to being enclosed in double quotes

Affected module
This impacts the UI, specifically the settings/members/users view when clicking on a user and then viewing their Tasks.
Describe the bug
Viewing users with a period in their username will translate to a URL in the form of /users/"my.username".  When viewing the user and clicking on the Tasks menu, the url will be change to /users/%2522my.username%2522/activity_feed/tasks.
This will break the UI with an alert user instance for "%22my.username%22 not found.
To Reproduce

Create a user with a period in its username.  For my case, we are integrated with Azure SSO and all our users have a period in their username.  Normally in the format of {first-name}.{last-name}.
Login and access the menu Settings -> Users.
Click on a username with a period in it to view their profile (e.g. my.username).
Under the Activity tab, click on Tasks.  You will encounter the error.  Sometimes it doesn't happen when clicking on Tasks, so you will have to click on @ Mentions or other activity menu to trigger the error.

Expected behavior
Viewing usernames with period should work and not translate double quotes to %2522 encoding.
Version:

OS: MacOS Sonoma 14.1.2
Python version:
OpenMetadata version: 1.2.0
OpenMetadata Ingestion package version:  openmetadata-ingestion==1.2.0

Additional context

@xangxiong thanks for reporting. Its fixed in Release 1.2.3


Add endpoint details to vtgate status

@guoliang100
This patch add cached endpoint details to vtgate status page. Endpoints' ip:port addresses are added to status page and we have different colors to indicate healthiness:
Red: the endpoint is not healthy at all
Orange: the endpoint is not fully healthy, but can be used somehow
Green: the endpoint is fully healthy

LGTM


Host 0.1v card-match on Heroku

Some things to work on? When is this release schedule! Is it even Siban, no.


Hard to find top 10 2021 standard

I'm trying to get a page that shows the top 10 2021 entries and nothing else.
When I search on 'top' in standards I get nothing. The same goes for '2021'.
This seems to be a bug in standards search?
Is there another way to get the top 10 page for laymen?

fixed in #274


Infinite loop error with TTigress Segments

In recent versions of Tigress there was a silly mistake in sumhit causing infinite loop when you have segments.
Sorry about the mess, changing permissions/working from multiple accounts seems to have upset git.

Why did you change all files to be executable? The source files and such should not be executable.

I already said, permissions mess.

Yes, I get that, but why don't you change the permissions back before submitting this?  That should undo all the permission changes in this pull request.
It seems that there are only two lines changes, but I can't even see what has been changed because of all the changed permissions.

Busy. Experiment.

Ok we can just merge it in after the experiment? I don’t think there is a rush.

I've tidied the permissions as much as I'm going to.
There are some important fixes for tigress and S3 in there so please either merge it or copy them.

Ok, some of the last files that need permissions changes are to revert 100644 → 100755.
We may also be able to just pull the actual changed files.

Okay, I've started pulling the actual changes. One question about the new kSiLiS3 mnemonic, is that just a renaming? Because we now have kSiLiS3 (which is used in TSili* classes), and kS3 (which isn't used anywhere). If the intention was just to rename it, we can remove the kS3.

Oh, I've also changed the new TTigress::fTargetOffest to TTigress::fTargetOffset, which I'm assuming you won't mind ;-)

Never mind, just saw that kS3 is set for the BA system. Not used anywhere else, but I guess it makes sense to have both for the future.
I've committed the changes and will open a new pull request for them.

Merged in #844.


Add Erlang ?

I know it's a bit far fetched, but would you consider adding
apt-get install erlang
to your image
and support for
erlc -S square.erl
with square.erl being:
-module(test).
-compile(export_all).

square(N) -> N * N.

produces (for instance) - cutting useless parts:
{function, square, 1, 2}.
  {label,1}.
    {line,[{location,"square.erl",4}]}.
    {func_info,{atom,test},{atom,square},1}.
  {label,2}.
    {line,[{location,"square.erl",4}]}.
    {gc_bif,'*',{f,0},1,[{x,0},{x,0}],{x,0}}.
    return.

it'd be super neat ! (to tie it back to the source based on the line decoration)
Thanks!

I have a similar request: #12 - I'm really not sure this is Compiler Explorer's sweet spot. Generating assembly and displaying the results is what CE is good at: adding every language under the sun and its own backend representation is rather out of scope. At least: I'm not likely to add support myself.
That said; if someone had a sensible patch I'd be happy to consider it.

I understand, trying to get gcc-explorer up and running I get weird errors, from npm logs:
npm ERR! Linux 4.0.9-68_fbk12_4058_gd84fdb3
npm ERR! argv "/usr/local/fbcode/gcc-4.9-glibc-2.20-fb/bin/node-4.3.2" "/usr/local/bin/npm" "install"
npm ERR! node v4.3.2
npm ERR! npm  v3.5.3
npm ERR! code ENETUNREACH
npm ERR! errno ENETUNREACH
npm ERR! syscall connect
npm ERR! connect ENETUNREACH ::ffff:<IP_ADDRESS>:443 - Local (:::0)
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     https://github.com/npm/npm/issues
and in the log file:
153 info attempt registry request try #1 at 20:24:06
154 http request GET https://registry.npmjs.org/underscore-node
155 info retry will retry, error on last attempt: Error: connect ENETUNREACH ::ffff:<IP_ADDRESS>:443 - Local (:::0)
156 info retry will retry, error on last attempt: Error: connect ENETUNREACH ::ffff:<IP_ADDRESS>:443 - Local (:::0)
157 info retry will retry, error on last attempt: Error: connect ENETUNREACH ::ffff:<IP_ADDRESS>:443 - Local (:::0)
158 info retry will retry, error on last attempt: Error: connect ENETUNREACH ::ffff:<IP_ADDRESS>:443 - Local (:::0)
159 info retry will retry, error on last attempt: Error: connect ENETUNREACH ::ffff:<IP_ADDRESS>:443 - Local (:::0)
160 info retry will retry, error on last attempt: Error: connect ENETUNREACH ::ffff:<IP_ADDRESS>:443 - Local (:::0)
that address is a bit fishy (seems to be the ipv4 for www.fashionista.com !?)

That's super weird: seems like npm can't reach the internet...I'm no npm expert at all, it's a common way of installing node libraries...and yes, I agree it looks like the bug you linked. :( Sorry!

I've been thinking hard on this. I'd be happy to consider a patch, but I'd like Compiler Explorer to concentrate on languages that compile to assembler, so I'm going to close this issue to keep the bug list somewhat manageable. Feel free to continue discussing here, and/or over email.

makes sense. I'm personally done with erlang for now so I won't push this :)


ask about installation

when i config sequelize db:migrate "ERROR : connect ECONNREFUSED <IP_ADDRESS>:3306
which file can i change?

Hello @shafwanaw
The problem is the connection with the database, please make sure the setup of the database is done correctly.
The configuration file is on the following path: config/env/db.connection.js
Regards
Iris


Fix Labelbee-Client's issue

Feature
feat: Optimize edgeAbsorption of PolygonTool which can absorpts points(open-mmlab/labelbee-client#15)
feat: Add a annotationPath display
Fix
fix: Fix the problem that the edge of rectTool cannot be dragged(open-mmlab/labelbee-client#22)

:tada: This PR is included in version 1.0.0 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:


Return locked out message from sessions controller when resource is locked

Why?
Currently, when a user account is locked, devise token auth returns an error stating:
A confirmation email was sent to your account at<EMAIL_ADDRESS>You must follow the instructions in the email before your account can be activated

This message can be misleading, especially when the :confirmable module is not in use.
What Changed?
When an account is locked devise token auth now returns this message:
Your account has been locked due to an excessive number of unsuccessful sign in attempts.

Makes sense to me! If another contributor approves, I'll merge.

Excellent. Thanks for the quick response and merge @zachfeldman and @MaicolBen .

Thanks for your contribution!


This is incompatible with rails 4.2

enum_column3-0.1.4/lib/enum/enum_adapter.rb:30:in block in <top (required)>': undefined method type_cast' for class `ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter::Column' (NameError)

It looks like this issue has been fixed on master but the update has not been released to rubygems.org yet. You can just point to the source in your Gemfile and install it to get the fix.

I am having trouble on rails 4.2 still. The fix I found was to move the alias lines below the methods they are aliasing in enum_adapter.rb

@Lambenttelos This doesn't work. By moving the aliasing after the override definitions, you're just aliasing the newly declared methods. Your columns will have a type of :string and you'll get a string instead of symbols. This is a silent failure.
The break in Rails 4.2 is because of this refactoring and other subsequent updates by @sgrif - instead of defining the type using simplified_type, it's now set up in ActiveRecord::ConnectionAdapters::Mysql2Adapter using initialize_type_map. You also have to declare a new ActiveRecord::Type::Enum class to convert the values to and from the database, and return a proper :enum type for ActiveRecord to handle.
I've made all of these changes in https://github.com/jewlr/enum_column for those who are interested. The code should also be backwards compatible down to Rails 3.

@schuylr Thanks for the update! I just took a novice guess at it and yeah that one change I suggested would have just changed where I would have run into errors then.  With the project I was updating at the time we just decided to rip out the gem and use the built in enum functionality that is in active record now which was easy for us as our use case was simple.  We have some other projects that are not so simple and this fix should save some headaches.


Can't disarm with correct user code

Before submitting this form

[X] I have checked that there hasn't been a similar issue submitted in the past

[X] I have updated the issue title to something relevant and clear to understand the bug I'm facing

Description of the bug
I finally got around to migrating to your Qolsys integration and got everything working after a few issues with MQTT (ended up removing and resinstalling it and all my devices showed up). Disarming worked fine with the old integration.
UPDATE:
It gets even weirder.. I set code_disarm required: true and it works if I input the code in HASS
Everything works, except for disarming. Appdaemon log shows
2022-12-29 21:18:21.207410 ERROR qolsys_panel: Code received in the control command invalid for control event <QolsysControlDisarm partition_id=0 code=None session_token=0f7ffb47-cce5-4872-8b52-35dfedc7f527>
apps.yaml looks like this
qolsys_panel:
  module: gateway
  class: QolsysGateway
  panel_host: 192.168.XX.XX
  panel_mac: XX:XX:XX:XX:XX:XX
  panel_token: XXXXXX
  panel_user_code: XXXX
  arm_away_exit_delay: 0
  code_disarm_required: false
  ha_check_user_code: false

I looked through some old issues and I saw one related to partitions, but it seems that I don't have those enabled.
Expected behavior
Disarm my security system
DEBUG logs
2022-12-29 21:18:21.207410 ERROR qolsys_panel: Code received in the control command invalid for control event
Additional context
No response

fixed by removing ha_check_user_code: false from apps.yaml, guess I misinterpreted your instructions

Out of curiosity seeing this:

2022-12-29 21:18:21.207410 ERROR qolsys_panel: Code received in the control command invalid for control event <QolsysControlDisarm partition_id=0 code=None session_token=0f7ffb47-cce5-4872-8b52-35dfedc7f527>

How did you try and trigger the disarming? Was it done through calling the service with an automation, or the UI of Home Assistant was not showing you the pad to type-in the code?


Discord RPC

This would be cool. I couldn't find an issue already tracking it.

Previously, my main excuse to not implement it was to avoid the use of the API, but since I saw Discord can actually handle some request via specific URLs it might be possible to use that with my current WebSocket and future IPC socket implementation.
I'll probably not work on it for now through, but I just wanted to share it might be possible to do this only by wrapping the Discord web pages (like in case of invite requests).

You can try RPC with Webcord unofficially using arRPC with this guide (confirmed working for a few people) :)

Is there a way to implement it without having to do things manually?

Maybe bump the milestone, since v4 is out @SpacingBat3
Additionally, arRPC integration seems to work nicely, maybe I could try implementing it myself? Not sure what changes WebCord will need to support it OOTB though.

Is this feature planned or are there any news on its current status?

Some work was done on it in Disconnection, and I've also implemented some way of process separation of IPC/WebSocket server implementation, giving some benefits like crashes or DoS of it not affecting the main app. As of Disconnection, I really need to test these changes and polish them for a proper error handling support that is compatible with what's Discord's doing…


Update defining_steps.md.erb

Fix a typo. There are 4->5 steps shown in the text block right after.

Haha, excellent catch. Thank you.


Some methods of ElementRef should be implemented for Html

I think we need a trait, its name maybe ElemRef, like this:
trait ElemRef {
    fn value(&self) -> &'a Element;
    fn select<'b>(&self, selector: &'b Selector) -> Select<'a, 'b>;
    fn html(&self) -> String;
    fn inner_html(&self) -> String;
    fn text(&self) -> Text<'a>;
}

And we can impl it for Html.
There are some reasons:

we should regard a html document or fragment as an element or a potential element
both of Html and ElementRef have method fn select<'b>(&self, selector: &'b Selector) -> Select<'a, 'b> but neither of them comes from a trait. Sometimes I only want to select but cannot write code Like fn get_elem_ref<T: ElemRef>(select: T, selector: &str).
I cannot get attr/innerText/html straightly from a Html document or fragment.

We can also impl as_ref<ElemRef> for Html

The pull request #14 fits my request, looking forward to your review, merge and new version publishing. I need a new version for my development, thx!


Determine URL of DCP2 Data Preview

I can use:
https://dcp2.data.humancellatlas.org/explore/projects?filter=[{"facetName":"genusSpecies","terms":["Homo sapiens"]}]&catalog=dcp2
But was hoping to get it down to
https://dcp2.data.humancellatlas.org/explore/projects?catalog=dcp2
But this does not seem to be keeping the catalog when it adds back the the default  query.

URL for DCP 2.0 Data Preview will be:
https://data.humancellatlas.org/explore/projects?catalog=dcp2
You can see this work now on:
https://dcp2.data.humancellatlas.org/explore/projects?catalog=dcp2


spec: adaptive MSGDELAY parameter included in PBTS spec

Part of #2184.
The changes are relatively small and should not affect the formal validation of this spec.
Essentially, when it was read MSGDELAY, the consensus parameter, now it should be read MSGDELAY(r), where r is the round number. We assume that the original MSGDELAY = MSGDELAY(0) and that the value for the parameter increases over rounds (it does not matter here how), i.e., MSGDELAY(r+1) > MSGDELAY(r)
Entry point of the spec rendered.

PR checklist

[ ] Tests written/updated
[ ] Changelog entry added in .changelog (we use unclog to manage our changelog)
[ ] Updated relevant documentation (docs/ or spec/) and code comments
[ ] Title follows the Conventional Commits spec

Minor comments. As an alternative to change the spec, for you to consider:
* The spec is written assuming that there exists a MsgDelay value, possibly unknown and that MSGDELAY >= MsgDelay; all properties are satisfied.

A single observation states that if MSGDELAY < MsgDelay, satisfaction is not guaranteed. Adds that adapting MSGDELAY to increase in every round ensures that eventually MSGDELAY >= MsgDelay and therefore the properties are eventually satisfied. States that such adaptation was implemented.

I liked this suggestion. In fact, I added a new paragraph to the beginning of the section with this reasoning: https://github.com/cometbft/cometbft/pull/2318/commits/4f548019f50bfe312f1bcd9eaddc8f0a3201f399


Experiment: Compare ingestion times with canonical chain discovery vs directly ingestion blocks.

Our canonical chain discovery algorithm takes a non-trivial amount of time to calculate and verify. 25mins with 811K blocks. The hypothesis is the second deserialization costs more then the work savings by ingesting the canonical chain first then the orphaned and recent paths.
Modify the indexer to bypass the canonical chain discovery and start adding the blocks directly. Compare with the current indexer ingestion times on the same blocks.

Any progress on this?

No, I made a small attempt but my build had issues so I parked it. It's currently in the wishful category.


[BUG] im stuck in configuring roblox pls help a have 5 hours to fix it but it stuck im in 2.7.0

Acknowledgement of preliminary instructions

[X] I have read the preliminary instructions, and I am certain that my problem has not already been addressed.
[X] I have thoroughly looked through the available Wiki articles and could not find a solution to my problem.
[ ] I am using the latest version of Bloxstrap.
[X] I did not answer truthfully to all the above checkboxes.

Bloxstrap Version
v2.7.0
What problem did you encounter?

Bloxstrap Log
12/11/2024 for 5 hours i try to find what is the problem plssss help me im tired
pls

update
https://bloxstraplabs.com

but i need 2.7.0

no you dont update bloxstrap


Various fixes and cleanups

Fixed SDK not compiling and tests failing
Run CI tests on both Go 1.18 and 1.19
Increased minimum Go version to 1.18
Fixed "validate-examples" Action that was failing due to changes with Helm
Removed github.com/pkg/errors and go.uber.org/atomic - replaced with the standard library instead (the old packages have been added to the "depguard" linter)
Upgraded all dependencies
Upgraded golangci-lint to support Go 1.18+
Upgraded (most, but not all :( ) deprecated Actions to stop warnings from GH Actions

Great PR, thanks


Yahoo mail

How to setup a working Yahoo Account on k-9?
I've setup It automatically and manual too, I can receive mail but I can't send them. During the wizard, the checking outgoing server pass without problems.

Please use the mailing list for support requests.


Could this loss function be used for mutil classification？

Could this loss function be used for mutil classification？

yes

I can't use it for multiclass networks. Error reported in loss.backward().

I know the reason because of label smoothing.


in Python

Checklist

[ ] I'm reporting a broken site support issue
[x] I've verified that I'm running youtube-dl version 2021.12.17
[ ] I've checked that all provided URLs are alive and playable in a browser
[ ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[ ] I've searched the bugtracker for similar bug reports including closed ones
[ ] I've read bugs section in FAQ

Verbose log

PASTE VERBOSE LOG HERE

Description

WRITE DESCRIPTION HERE

[youtube] BbOnCvJTOhU: Downloading webpage
ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.


code[patch]: Add in code documentation to core Runnable with_retry method (docs only)

Description: Add in code documentation to core Runnable with_retry method (docs only)
Issue: #18804
@baskaryan @eyurtsev PTAL

Looks good, thanks!


What is your preferred way for contributions?
I've cloned your BizUnit repo, and added the BizTalk TestSteps to the solution (rough, but compiles).
Can I please contribute these changes? How?
Thanks!

I'll fork and create a pull request...

Forked master. Cloned the fork in order to work on it. Created a branch 'AddBtsSteps' in order to keep changes organized. Made the changes. Synced branch 'AddBtsStep' to master.
However, the local commit of my (private) clone is in the changes. That is very messy. It is as if I touched the entire tree, which i didnt. So i did not create pull-request.
How should i isolate my changes (from the creation of my local clone)? What am i doing wrong?
I'd appreciate some help!


Should pins auto export?

For

You pretty much always want to do it if you want a pin instance
Reduces boiler plate code
Less chance of bugs from forgetting to do it
Pin object is unusable unless exported

Against

Possibly hidden side affect
Could be messy to disable $pin = $factory->getInputPin($num, $autoExport);
Might want to export and unexport multiple times during lifetime of app so need the methods anyway

Interested to hear any other thoughts

I really like this idea.  You could essentially run that export as part of the constructor.

Possibly hidden side affect

None come to mind.

Could be messy to disable
Might want to export and unexport multiple times during lifetime of app so need the methods anyway

I'm having trouble coming up with a use case for disabling a GPIO pin at any time other than garbage collection (nothing references the pin any more so why not) or program termination (resetting it back to an unused state).
If I wanted to change the pin mode from input to output (probably rare, but still possible) couldn't I just grab a new pin from the factory?  That'll result in a second export() but I don't think that's harmful (should be easy enough to test whether that's a problem via bash).
If that's the case, then disabling a pin probably isn't necessary.  If I no longer want my LED to glow, I can just write a 0 to it and forget about the pin.


Update _help.py

I am adding a description to explain the new IoT extension for Azure IoT CLI 2.0. Can someone please help me format the page? I can only view the python file.

This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines

[ ] The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

Command Guidelines

[ ] Each command and parameter has a meaningful description.
[ ] Each new command has a test.

(see Authoring Command Modules)

Please fix the errors in style check:
Run flake8.

./src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py:11:1: W293 blank line contains whitespace

./src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py:12:63: W291 trailing whitespace

./src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py:14:148: W291 trailing whitespace

./src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py:16:67: W291 trailing whitespace

./src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py:17:29: W291 trailing whitespace

./src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py:18:32: W291 trailing whitespace

./src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py:24:75: W291 trailing whitespace

./src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py:25:42: W291 trailing whitespace

./src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py:26:41: W291 trailing whitespace

./src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py:27:39: W291 trailing whitespace

./src/command_modules/azure-cli-iot/build/lib/azure/cli/command_modules/iot/_help.py:11:1: W293 blank line contains whitespace

./src/command_modules/azure-cli-iot/build/lib/azure/cli/command_modules/iot/_help.py:12:63: W291 trailing whitespace

./src/command_modules/azure-cli-iot/build/lib/azure/cli/command_modules/iot/_help.py:14:148: W291 trailing whitespace

./src/command_modules/azure-cli-iot/build/lib/azure/cli/command_modules/iot/_help.py:16:67: W291 trailing whitespace

./src/command_modules/azure-cli-iot/build/lib/azure/cli/command_modules/iot/_help.py:17:29: W291 trailing whitespace

./src/command_modules/azure-cli-iot/build/lib/azure/cli/command_modules/iot/_help.py:18:32: W291 trailing whitespace

./src/command_modules/azure-cli-iot/build/lib/azure/cli/command_modules/iot/_help.py:24:75: W291 trailing whitespace

./src/command_modules/azure-cli-iot/build/lib/azure/cli/command_modules/iot/_help.py:25:42: W291 trailing whitespace

./src/command_modules/azure-cli-iot/build/lib/azure/cli/command_modules/iot/_help.py:26:41: W291 trailing whitespace

./src/command_modules/azure-cli-iot/build/lib/azure/cli/command_modules/iot/_help.py:27:39: W291 trailing whitespace

18 W291 trailing whitespace

2 W293 blank line contains whitespace

@chrissie926 please run check_style --module iot and clear all the style errors before push changes.

@troydai Thank you Troy. I am using the github interface. I am wondering that which tool are you using to run check_style --module iot? Thanks!

@chrissie926 once you set up the dev environment, the check_style command will be available to you.

Closing due to inactivity and I believe this PR is now redundant.
@chrissie926 to confirm.


feat(samples): auth samples

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

[ ] Make sure to open an issue as a bug/issue before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
[ ] Ensure the tests and linter pass
[ ] Code coverage does not decrease (if any source code was changed)
[ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

Hi @piaxc @Sita04, thanks for the review, just sent the updates
Regarding moving comments for variables - unfortunately everywhere in js (and in Go) samples we have this structure, so user can jump directly to the github code if it is really needed. I moved important comments to the region tags, but for variables I prefer to keep the structure consistent with other languages.

Please use the /external/ links as currently written; they are used to
allow for future updates of that documentation.
On Tue, Sep 13, 2022 at 7:58 PM Daniel Bankhead @.***>
wrote:

@.**** requested changes on this pull request.
In samples/authenticateExplicit.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970249662
:

+//      http://www.apache.org/licenses/LICENSE-2.0

+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.

+/**

Lists storage buckets by authenticating with ADC.

*/

+function main() {

// [START auth_cloud_explicit_adc]

/**

TODO(developer):

Set up ADC as described in https://cloud.google.com/docs/authentication/external/set-up-adc

Should this link be
https://cloud.google.com/docs/authentication/provide-credentials-adc?
⬇ Suggested change

Set up ADC as described in https://cloud.google.com/docs/authentication/external/set-up-adc

Set up ADC as described in https://cloud.google.com/docs/authentication/provide-credentials-adc

In samples/authenticateExplicit.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970250765
:

+//

+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.

+/**

Lists storage buckets by authenticating with ADC.

*/

+function main() {

// [START auth_cloud_explicit_adc]

/**

TODO(developer):

Set up ADC as described in https://cloud.google.com/docs/authentication/external/set-up-adc

Make sure you have the necessary permission to list storage buckets "storage.buckets.list"

A link would help here. E.g.
https://cloud.google.com/storage/docs/access-control/iam-permissions#bucket_permissions
In samples/authenticateExplicit.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970251970
:

const storageOptions = {

 projectId,

 authClient: credential,

};

// Construct the Storage client.

const storage = new Storage(storageOptions);

const [buckets] = await storage.getBuckets();

console.log('Buckets:');

for (const bucket of buckets) {

 console.log(bucket.name);

}

console.log('Listed all storage buckets.');

I don't think this line is helpful outside of the test
In samples/authenticateExplicit.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970252481
:

// const googleAuth = new GoogleAuth({ scopes: scope });

// For more information on scopes to use,

// see: https://developers.google.com/identity/protocols/oauth2/scopes

const storageOptions = {

 projectId,

 authClient: credential,

};

// Construct the Storage client.

const storage = new Storage(storageOptions);

const [buckets] = await storage.getBuckets();

console.log('Buckets:');

for (const bucket of buckets) {

 console.log(bucket.name);

We can make the output easier to read.
⬇ Suggested change

 console.log(bucket.name);

 console.log(`- ${bucket.name}`);

In samples/authenticateImplicitWithAdc.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970252944
:

+// distributed under the License is distributed on an "AS IS" BASIS,

+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.

+/**

Shows credentials auto-detections in the intercation with GCP libraries

@param {string} projectId - Project ID or project number of the Cloud project you want to use.

*/

+function main(projectId) {

// [START auth_cloud_implicit_adc]

/**

TODO(developer):

Uncomment and replace these variables before running the sample.

Set up ADC as described in https://cloud.google.com/docs/authentication/external/set-up-adc

⬇ Suggested change

Set up ADC as described in https://cloud.google.com/docs/authentication/external/set-up-adc

Set up ADC as described in https://cloud.google.com/docs/authentication/provide-credentials-adc?

In samples/authenticateImplicitWithAdc.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970253106
:

+/**

Shows credentials auto-detections in the intercation with GCP libraries

@param {string} projectId - Project ID or project number of the Cloud project you want to use.

*/

+function main(projectId) {

// [START auth_cloud_implicit_adc]

/**

TODO(developer):

Uncomment and replace these variables before running the sample.

Set up ADC as described in https://cloud.google.com/docs/authentication/external/set-up-adc

Make sure that the user account or service account that you are using

has the required permissions. For this sample, you must have "compute.instances.list".

*/

// const projectId = 'YOUR_PROJECT_ID';

// const zone = 'us-central1-a';

Unused
⬇ Suggested change

// const zone = 'us-central1-a';

In samples/authenticateImplicitWithAdc.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970253268
:

const {Storage} = @.***/storage');

async function authenticateImplicitWithAdc() {

// This snippet demonstrates how to list buckets.

// NOTE: Replace the client created below with the client required for your application.

// Note that the credentials are not specified when constructing the client.

// The client library finds your credentials using ADC.

const storage = new Storage({

 projectId,

});

const [buckets] = await storage.getBuckets();

console.log('Buckets:');

for (const bucket of buckets) {

 console.log(bucket.name);

⬇ Suggested change

 console.log(bucket.name);

 console.log(`- ${bucket.name}`);

In samples/authenticateImplicitWithAdc.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970253341
:

async function authenticateImplicitWithAdc() {

// This snippet demonstrates how to list buckets.

// NOTE: Replace the client created below with the client required for your application.

// Note that the credentials are not specified when constructing the client.

// The client library finds your credentials using ADC.

const storage = new Storage({

 projectId,

});

const [buckets] = await storage.getBuckets();

console.log('Buckets:');

for (const bucket of buckets) {

 console.log(bucket.name);

}

console.log('Listed all storage buckets.');

⬇ Suggested change

console.log('Listed all storage buckets.');

In samples/authenticateImplicitWithAdc.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970253433
:

// NOTE: Replace the client created below with the client required for your application.

// Note that the credentials are not specified when constructing the client.

// The client library finds your credentials using ADC.

⬇ Suggested change

// NOTE: Replace the client created below with the client required for your application.

// Note that the credentials are not specified when constructing the client.

// The client library finds your credentials using ADC.

In samples/authenticateImplicitWithAdc.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970253953
:

Make sure that the user account or service account that you are using

has the required permissions. For this sample, you must have "compute.instances.list".

Inaccurate line, should be something like Make sure you have the
necessary permission to list storage buckets "storage.buckets.list" along
with a helpful link
https://cloud.google.com/storage/docs/access-control/iam-permissions#bucket_permissions
In samples/idTokenFromImpersonatedCredentials.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970254570
:

// Create the impersonated credential.

const impersonatedCredentials = new Impersonated({

 sourceClient: credential,

 delegates,

 targetPrincipal: impersonatedServiceAccount,

 targetScopes: [scope],

 lifetime: 300,

});

// Get the ID token.

// Once you've obtained the ID token, you can use it to make an authenticated call

// to the target audience.

await impersonatedCredentials.fetchIdToken(targetAudience, {

 includeEmail: true,

});

console.log('Generated ID token.');

⬇ Suggested change

console.log('Generated ID token.');

In samples/idTokenFromImpersonatedCredentials.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970254923
:

await impersonatedCredentials.fetchIdToken(targetAudience, {

 includeEmail: true,

});

It would be helpful to do something with this result
In samples/idTokenFromImpersonatedCredentials.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970255715
:

// delegates: The chained list of delegates required to grant the final accessToken.

// For more information, see:

// https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-permissions

// Delegate is NOT USED here.

const delegates = [];

Maybe leave this out since it's not used?
In samples/idTokenFromMetadataServer.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970256563
:

await client.fetchIdToken(url);

console.log('Generated ID token.');

It would be more helpful to do something with this token rather than to
log this message
In samples/idTokenFromServiceAccount.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970257107
:

// Get the ID token.

// Once you've obtained the ID token, use it to make an authenticated call

// to the target audience.

await client.fetchIdToken(targetAudience);

console.log('Generated ID token.');

It would be more helpful to do something with this token rather than to
log this message
In samples/test/auth.test.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970258420
:

+const execSync = (cmd, opts) => {

return cp.execSync(cmd, Object.assign({encoding: 'utf-8'}, opts));

+};
execFile or execFileSync would be cleaner rather than dealing with
spacing, escaping, etc. (I'm assuming this was copied from tests from a few
years back). See:

https://nodejs.org/api/child_process.html#child_processexecfilesyncfile-args-options

In samples/verifyGoogleIdToken.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970259190
:

so verifying ID tokens before making Google API calls is usually unnecessary.

@param {string} idToken - The Google ID token to verify.

and use IAM to narrow the permissions: https://cloud.google.com/docs/authentication#authorization_for_services

@param {string} expectedAudience - The service name for which the id token is requested. Service name refers to the

logical identifier of an API service, such as "iap.googleapis.com".

*/

+function main(idToken, expectedAudience) {

// [START auth_cloud_verify_google_idtoken]

/**

TODO(developer):

Uncomment and replace these variables before running the sample.

*/

// const idToken = 'id-token';

// const targetAudience = 'pubsub.googleapis.com';

// const jwkUrk = 'https://www.googleapis.com/oauth2/v3/certs';

⬇ Suggested change

// const jwkUrk = 'https://www.googleapis.com/oauth2/v3/certs';

In samples/verifyGoogleIdToken.js
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#discussion_r970259826
:

// Verify that the token contains subject and email claims.

// Get the User id.

if (result.payload['sub']) {

 console.log(`User id: ${result.payload['sub']}`);

}

// Optionally, if "includeEmail" was set in the token options, check if the

// email was verified

if (result.payload['email_verified']) {

 console.log(`Email verified: ${result.payload['email_verified']}`);

}

console.log('ID token verified.');

We could print this out:
⬇ Suggested change

// Verify that the token contains subject and email claims.

// Get the User id.

if (result.payload['sub']) {

 console.log(`User id: ${result.payload['sub']}`);

}

// Optionally, if "includeEmail" was set in the token options, check if the

// email was verified

if (result.payload['email_verified']) {

 console.log(`Email verified: ${result.payload['email_verified']}`);

}

console.log('ID token verified.');

// The verified payload

console.dir(result.payload)

—
Reply to this email directly, view it on GitHub
https://github.com/googleapis/google-auth-library-nodejs/pull/1444#pullrequestreview-1106674901,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEGJFRTRMOYCIH6EBAYOXJDV6E5LPANCNFSM57I32QIQ
.
You are receiving this because you were mentioned.Message ID:
@.***
com>

--
Pia Chamberlain |  Senior Technical Writer |  she/her |  Cloud Security Docs

@danielbankhead thanks a lot for the review! updated the PR
also we have already published canonical samples for Java (and Python): https://github.com/googleapis/google-auth-library-java/tree/main/samples/snippets/src/main/java, so most of the ideas and comments moved here (I commented)

I just moved the same code: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/pull/2759
@danielbankhead could you please also approve? really appreciate

I just moved the same code: GoogleCloudPlatform/nodejs-docs-samples#2759
@danielbankhead could you please also approve? really appreciate

I like these here for integration purposes, say an unexpected breaking change was made in the codebase, having them here would make it easy to catch in a PR rather than in another repo. In either case, approved.

defer to @danielbankhead's review.


Update .drone.sec.

This change is

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Current coverage is 100% (diff: 100%)

Merging #82 into master will not change coverage

@@           master   #82   diff @@
===================================
  Files           7     7
  Lines         187   187
  Methods         0     0
  Messages        0     0
  Branches       14    14
===================================
  Hits          187   187
  Misses          0     0
  Partials        0     0

Powered by Codecov. Last update ef54c05...90c9b3b


Optional arguments in JSDoc types may be moved to TypeScript types quickfix

TypeScript Version:  3.4.3

80004
jsdoc quickfix optional

Code
With Closure Compiler, you mark a function parameter optional by adding an = after its type (reference):
/**
 * @param a {string} Base string.
 * @param b {string=} Optional string to add
 * @return {string}
 */
function foo(a, b) {
  if (b) return a + b;
  return a;
}

TypeScript offers a quickfix to convert these jsdoc annotations to TypeScript types:

Expected behavior:
The b parameter should be optional:
/**
 * @param a {string} Base string.
 * @param b {string=} Optional string to add
 * @return {string}
 */
function foo(a: string, b?: string): string {
  if (b) return a + b;
  return a;
}

Actual behavior:
The b parameter is required but has type string | optional:
/**
 * @param a {string} Base string.
 * @param b {string=} Optional string to add
 * @return {string}
 */
function foo(a: string, b: string | undefined): string {
  if (b) return a + b;
  return a;
}

This means that all calls of the function which don't specify b will be flagged as errors.
Playground Link:  link, though quickfixes are not available there
Related Issues:

By setting : string | undefined you make it required, as it should be either called with a string or the actual value undefined
This would expect you to call the function like so:
foo('bar', 'foo');
foo('bar', undefined);

The correct notation for the behaviour that you want would look like this:
/**
 * @param a Base string.
 * @param [b] Optional string to add
 * @return
 */
function foo(a: string, b: [string]): string {
  if (b)
    return a + b;
  return a;
}

By using the bracers, you actually make it optional, and not required with either type string or type undefined.

@christiansany I think you're missing the point. The quickfix is adding the : string | undefined, not me. And [string] is a one-tuple in TypeScript, not an optional parameter.
The closure docs redirect to a less comprehensive page now, but here's the reference for Type= being the correct way to annotate an optional function param: