Enable cluster selection in local environments

Is your feature request related to a problem? Please describe.
Imagine that you have a vespa application where one container is dedicated to doc processing and another to search, that means having two ... tags at your services.xml. This means having a docker container for each one or more (see the multinode-HA example in the sample-apps of vespa-engine organization).
If we want to run system tests in a local environment, the vespa cli does not recognize the containers (cluster flag) that the application and will put as base url the value http://<IP_ADDRESS>:8080 in every case. However, if we run the same tests in a hosted environment like Vespa Cloud, it will get the appropriate base url.
Describe the solution you'd like
Vespa cli should support the selection of the cluster when the target flag is set to local.
Describe alternatives you've considered
The local target could use the environment variable called "VESPA_CLI_ENDPOINTS" to enable this feature request
Additional context
Nothing.

Hi @mpolden ! It seems that now cluster selection is enabled for system tests in local environments. We have run a system test and we have seen the following error:
Error: error in Step 8: finds results by category (non matching): no such service: "query": known services: feed

Did you release this feature?

oh ok! What I am checking is that if we want to maintain the same system tests for local and for vespa cloud, we will need to change somehow the cluster selected request. Let me explain:
We now have this services.xml:
<?xml version='1.0' encoding='UTF-8'?>

<services version="1.0" xmlns:deploy="vespa" xmlns:preprocess="properties">
  <preprocess:properties>
    <feeder.container.name>feed</feeder.container.name>
    <searcher.container.name>query</searcher.container.name>
    <content.name>vlex</content.name>
  </preprocess:properties>

  <container id="${feeder.container.name}" version="1.0">
    <preprocess:include file="xml/handlers/feeder-handlers.xml" />
    <preprocess:include file="xml/handlers/searcher-handlers.xml" />

    <preprocess:include file="xml/docproc/chain.xml" />
    <preprocess:include file="xml/searchers/chain.xml" />
    <document-api />

    <preprocess:include file="xml/document-bindings.xml" />

    <preprocess:include file="xml/injections/common-injections-components.xml" />
    <preprocess:include file="xml/injections/feeder-injections-components.xml" required="false"/>
    <preprocess:include file="xml/injections/searcher-injections-components.xml" required="false"/>

    <preprocess:include file="xml/deployment/local/container.xml"/>
  </container>

  <content id="${content.name}" version="1.0">
    <redundancy>1</redundancy>
    <preprocess:include file="xml/configs/content-cluster-configs.xml"/>
    <preprocess:include file="xml/content/content-documents.xml"/>
    <preprocess:include file="xml/deployment/local/content.xml"/>
  </content>
</services>

As you can see here, we only define a cluster, but our system tests we have the following:
{
    ...
    {
      "name": "feed stack",
      "request": {
        "method": "POST",
        "cluster": "feed",
        "body": "../data/administrativeDecision/stack.json",
        "uri": "/document/v1/test/administrativeDecision/docid/stack"
      }
    },
    {
      "name": "finds results by category (non matching)",
      "request": {
        "uri": "/rest/search/administrative_decision",
        "cluster": "query",
        "parameters": {
          "category": "threehundred"
        }
      },
      "response": {
        "body": {
          "root": {
            "fields": {
              "totalCount": 0
            }
          }
        }
      }
    },
    ...
}

So the behaviour we are observing is that we don't have the "query" in local environment, but this will drive us to have different system tests for local and vespa cloud.

Do you use a different services.xml on local vs. Vespa Cloud? If you want to run the exact same tests in both environments, they need to have the same clusters. You could simply add a "query" cluster to the local environment.


Added Inconsolata-dz For Powerline

Added the powerline version of the Inconsolata-dz font. I got the font from https://github.com/powerline/fonts but had to load it into a gist because of the spaces in the original file name.

Just as question/suggestion: Wouldn't it be more beneficial to include the entire suite of powerline fonts instead of one specific font?

Sure, I can do that. Won't that make it more difficult to find a particular font though? If you don't know what the (theoretical) powerline-fonts package contains, how would you discover that your favorite font had a powerline variant?
If that's an acceptable tradeoff, I'll go ahead and install the entire suite of powerline fonts instead of just the one.

@arjuncomar Sorry for the late reply. I'd personally say that if someone is aware that powerline fonts exist they'll know what to look for. Maybe mentioning their existence in the wiki would also be a good idea once we have them in NixOS. ;-)

@arjuncomar ping? ;-)

Sorry @devhell, hadn't logged into github in some time. I'll make this change this weekend so we can close out this PR.

@arjuncomar No problem, thanks for doing this!

Ping again?

Closing as the powerline fonts have been added since April 2015. 76dcf48b13c27b7a2fc2373e2bf2e2e1e95ab120


MultipleInstancesResponseType should recognize handler with single result

MultipleInstancesResponseType should consider single result also as viable response type. Hence handlers which return a single result should be consider as candidates for multiple responses. However, if there is another handler returning multiple results, that one should be ranked higher.

Although the previous commit suggests it, this issue is no resolved yet at all...

Although the previous commit suggests it, this issue is no resolved yet at all...


Publish to radio button group always selects the last input

http://jsfiddle.net/d7f0rm2t/
In the example above publish always selects the last radio button. Am I doing something wrong?

Having the same issue. Another jsfiddle demonstrating this radio group issue using Backbone: http://jsfiddle.net/pgib/m9pgs5s7/

+1 for this issue.
It's definitely not a bug. The problem is that Rivets binders are designed to work with a single element, and radio group is a unique usecase, when multiple elements represent a single one.
Though, since a #406 is included in core, possible solution could be following:
rivets.binders.ragiogroup =
    # ... copy everything from "checked" binder
    getValue: (el) ->
       group = document.querySelectorAll("[name=#{el.name}]")

       for radio in group when radio.checked
           return radio.value

       return "" # default

Or, taking into account that radio group is, probably, placed inside a form (when do you need inputs outside of form, yeah?), we can get rid of using querySelector overhead by allowing browser to aggregate radio group for us:
rivets.binders.ragiogroup =
    # ...
    getValue: (el) -> el.form.elements[el.name].value

In my project it solved this issue completely.
Would be nice to have smth like this included in core binders.


Expanding the scope of Karate Framework from only "src/test" to "src/main" ?

Hi team @Karate,
I have a Spring boot application wherein I have used Karate as a Rules Engine to perform some set of validations on my incoming json payload and return the required response. Since Karate feature files don't explicitly need any background step definitions to be written, it becomes easy to configure multiple complex rules as need and demand arises.
I had asked the same question over StackOverflow, to which I got an acceptable response from Peter. Considering the feedback, I have created a sample project using this idea for reference. Karate is a powerful tool capable of handling payloads in a very flexible manner as experienced, and I would like to have it to be used in production.
My question, or rather, a feedback, is that can there be a scope of expansion of Karate as a framework from not only being just a test automation framework, but also it's usage into the main code? Even if it is in combination with a microservice framework (Spring for instance) to overcome the vulnerabilities of JS Engine responsible to execute the Rules (Feature files in our case), that should suffice expectations.
Karate acting as a rules engine is just one idea / use case which I have come across and am keen to use, there can also be some additional use cases on how karate can be used in the main execution.
Let me know if any more clarifications are needed on this front, would be happy to help.

@yashpatil1998 I appreciate this exploration. I do think stack overflow is a better place to discuss this, and so far this is what I have: that Karate is not designed for anything beyond test-automation - but you and others are welcome to explore and if needed contribute code to the framework to make it better. and use it at your own risk. if you are expecting the developers of this project to focus on this, I'm sorry - that's not a priority.
feedback: your example is very very simple, maybe you should create a more detailed example and write a blog post about it.
there are others who may comment here, and any other opinions are welcome and this discussion can continue. I will, however - close this ticket.

@ptrthomas Thank you for your feedback. I'll take your inputs and put some more enhancements to the project, alongside my thoughts in the form of a blog.


Verify.Specification

I would love to have an package to verify usage of https://github.com/ardalis/Specification.
I would contribute that feature.
How can this be tackled? It is hard to throw up an PR because there is no Repo for this (Every package lives in its own Repo...)

you can create your own Repo for Specification support

@stefannikolei bump

Yeah I am looking into it. But it also seems after looking closer into the standard behavior that it probably is sufficient.


release: 0.6.0-rc.1

Updated version to 0.6.0-rc.1 to include the newest fixes to make 0.6.0 release ready 🥳

@IsraelOrtuno Version 0.6.0-rc.1 has been release with your requested fix. Feel free to test it out and let me know if the issues have all been resolved. Thanks for letting me know that we can fix it 💪
https://github.com/sidebase/nuxt-auth/releases/tag/0.6.0-rc.1

Awesome @zoey-kaiser I have just upgraded and everything seems to be working perfectly 👍


Rough to do list/workflow

[ ] Make rough ERD
[x] BOLD data dump -> SQLite (with marker code/kingdom filter as commandline input), do not index yet
[x] Filter and rearrange data into ERD tables (barcode records -> atleast family taxonomy available, …)
[x]  Index data (unique ID for every barcode and taxon)
[ ] Map opentol ID to taxonomy table (with family name as constraint!)
[ ] Get barcode data into chunks (group by family name) and make per family a fasta file with barcodes (header with own DB id from barcode table) | OUTPUT FASTA?
[ ] Make alignment per family (MUSCLE? HMER? For HMER nt -> aa) | OUTPUT PYLIP?
[ ] Make tree per family/alignment, use opentol tree as constraint (get tree with opentol id) | INPUT PHYLIP & OUTPUT NEWICK?

Check out MACSE for protein coding alignment: https://hal.science/hal-03099847/file/Ranwez-MethMolBiol-HAL.pdf


Wrong behavior when defining new with another class initializer

The following code should return String but does return MethodHolder
class MethodHolder
  class << self
    define_method(:new, &String.method(:new))
  end
end

p MethodHolder.new.class

I recently made some tries to make define_method spec compliant. However, all of them failed. The main problem is that we cannot differentiate between a block like &String.method(:new) and a block like { "" }. The first one should evaluate with self being the String class while the second should be evaled in the scope of the Module where define_method is called.
I think we might need to store some type on the Block to differentiate between the different evaluation contexts. Right now we have a ProcType (which can be either block or lambda). We could use this, but we would need to move it to Block and extend it with something like BlockType::Method.
What do you think? @seven1m

Yep, agreed! I tried to fix this recently and came to the same conclusion.


Create a new page to explain schema groups

Issue
There is some confusion about how individual fields in the schema groups relate to each other.
For example, we agreed in #30 that we want a new page that discusses the differences between these "Spatial" fields:
Spatial Coverage (S)
Geometry (S)
Bounding Box (S)
Centroid
And we agreed in #21 to link "Relations" to the overview at New elements for item relations and see if that section needs enhancements.
Suggested fix

Create a new page (under Resources for now) that explains our rationale for each of the groups and how the fields relate to each other.
Link each section to the schema group headings on the schema page

Here's the pages we definitely want to have a group page for:

[ ] Categories (Marc)
[ ] Temporal
[ ] Spatial (Keith)
[ ] Relations
[ ] Rights

Marc and Keith propose having separate pages for each, in the ogm-aardvark, named like group-categories.md

I created a schema-groups branch, which has a new file group-spatial.md -- feel free to edit that branch directly if you like.

I added a new file group-temporal.md directly to the schema-groups branch.
I deliberately structured it differently (per Keith's recommendation) to give us some style flavor to choose from!


Add files via upload

Added a new file for benchmarking Law's link retrieval for each model

Looks good. Did you get all the laws in the 150 page pdf?

No only got for the first 21 pages will need to get more after the current testing is complete.

Awesome


remove foreign id fields

fixes #133
To be merged after the release.

Looks like travis is failing because the specs need to be propagated into the lang/python and lang/R locations.


yb/add the installation

Motivation and Context

Description

Use cases (Optional)

BC-breaking (Optional)

Checklist
Before PR:

[ ] I have read and followed the workflow indicated in the Contributors.md to create this PR.
[ ] Pre-commit or linting tools indicated in Contributors.md are used to fix the potential lint issues.
[ ] Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
[ ] New functionalities are covered by complete unit tests. If not, please add more unit test to ensure the correctness.
[ ] The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

[ ] CLA has been signed and all committers have signed the CLA in this PR.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: yangbofun:x: yangbo1yangbo1 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Error when mounting existing volume to new container from App Template

Bug description
When trying to mount an existing volume (redcloud_files) to a new container, the deployments stops at the end, and the following error is shown:
create [object Object]: "[object Object]" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path

Screenshot of deploy configuration

Shown error

Expected behavior
A successfully deployed container with access to the redcloud_files volume from /files
Portainer Logs
2020/02/28 11:25:21 Portainer started with the --templates flag. Using external templates, template management will be disabled.,
2020/02/28 11:25:22 server: Reverse tunnelling enabled,
2020/02/28 11:25:22 server: Fingerprint cc:27:e0:c1:2b:3a:b3:d5:f1:15:06:41:82:74:c0:be,
2020/02/28 11:25:22 server: Listening on <IP_ADDRESS>:8000...,
2020/02/28 11:25:22 Starting Portainer 1.23.0 on :9000,
2020/02/28 11:25:22 [DEBUG] [chisel, monitoring] [check_interval_seconds: 10.000000] [message: starting tunnel management process],
2020/02/28 11:25:39 http error: Invalid JWT token (err=Invalid JWT token) (code=401),
2020/02/28 11:25:42 http error: No administrator account found inside the database (err=Object not found inside the database) (code=404),
2020/02/28 11:25:42 http error: No administrator account found inside the database (err=Object not found inside the database) (code=404),
2020/02/28 11:33:10 http error: An error occured during websocket exec operation (err=websocket: close 1000 (normal): websocket: close 1005 (no status)) (code=500),
2020/02/28 11:33:10 http: response.WriteHeader on hijacked connection from github.com/portainer/libhttp/error.writeErrorResponse (error.go:37),
2020/02/28 11:33:10 http: response.Write on hijacked connection from encoding/json.(*Encoder).Encode (stream.go:227),

Steps to reproduce the issue:

Try using my portainer project here if you're adventurous
Or mount an existing volume to a new container

Technical details:

Portainer version: 1.23.0
Docker version (managed by Portainer): Docker version 19.03.5, build 633a0ea838
Platform (windows/linux): Ubuntu server
Command used to start Portainer (docker run -p 9000:9000 portainer/portainer): docker-compose file here
Browser: FF 72

Cheers!
Edit: The following runs as expected on the host's CLI:
$ docker run -it -v redcloud_files:/files alpine sh
/ ls /files/
test test2

Thanks for the report. I will close this though as this was reported previously against 1.23.0 and fixed in 1.23.1


python310Packages.mypy-boto3-builder: 7.12.3 -> 7.12.4

Diff: https://github.com/youtype/mypy_boto3_builder/compare/refs/tags/7.12.3...7.12.4
Changelog: https://github.com/youtype/mypy_boto3_builder/releases/tag/7.12.4
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 217210 run on x86_64-linux 1

2 packages built:

python310Packages.mypy-boto3-builder
python311Packages.mypy-boto3-builder

Thank you!


Correctly detect docker-compose binary

When installed via package manager, the docker-compose may lay in /usr/bin/docker-compose, otherwise in /usr/local/bin/docker-compose.

Many Thanks for the improvement.


Add support getting state at a specific block

We need support specific blocks queries for some queries. User should be able make query with specifying block hash and get info exactly for this block.
For example, fetching assets list at specific bloc (in specific point of time, e.g. https://polkadot.js.org/docs/api/start/api.query.other/#state-at-a-specific-block).
For now, we need add/update such queries as:

[ ] getAssetList
[ ] getPoolAssetsAmounts
[ ] getTokenAmount
[ ] getAccountBalances
[ ] getMarketcap

I think, we can just add additional optional parameter to each of these function, for specifying block hash. If it's empty - return data from latest block, if existing - return data for mentioned block. Any other proposals?

Grooming. Is this something we'll ever do?


Fix eureka may stop schedule the fetching registry

As talked in slack chat
If an exception happens in the fetchRegistry method. The endpoint group would not schedule the fetching registry.
Add some exception-catching to schedule the fetching.
Result:

schedule the fetch even if an exception happened.

@eisig Would it be possible to write a test case for this fix?

@trustin

It's been a while, @eisig. Thanks for the fix! How's Armeria doing there? Is its usage expanding? We're very curious to know! 🙇

Yes, most of our services use Armeria now:
Almost all HTTP,gRPC, Hessian clients use Armeria. A few gRPC services.
Some of our services writing with play framework, we replaced them with  Armeria too.

@eisig Would it be possible to write a test case for this fix?

We can test the fix by manually shutting down a Eureka server which makes an HttpResponse completed with an UnprocessedRequestException. Later, we will restart the Eureka server with different endpoints.

@eisig We are going to release a new version soon. So I addressed the comment myself.

@ikhoon Thanks， and sorry for not  addressed the comment in time.


Streaming content for Core v1.5

Contributions

[ ] I am a PM or subject matter expert at dbt who is responsible for this feature.

Where does this content belong?
@Fleid Can you help fill this out?
Link to source material
Not yet available

Bumping to 1.6 per @Fleid.

Closed per discussion with engineering


ocgrpc: Do not use Distribution aggregation for Count stats

I think this is fix for intentional behavior.

Sorry I didn't understand the meaning of this metrics.
I forgot about streaming rpcs...


Cannot find name 'Response'

I am using SDK v4 in a TypeScript project. When I compile  the project I got the following error:
node_modules/@ringcentral/sdk/lib/SDK.d.ts:26:45 - error TS2304: Cannot find name 'Response'.

26     send: (options: SendOptions) => Promise<Response>;

I checked the source code of https://github.com/ringcentral/ringcentral-js/blob/master/sdk/src/SDK.ts
I find that Response is not defined anywhere. Or it is defined somewhere but not imported into that file.

Never had such an issue. This is standard class, part of browser fetch API.

Browser has it whie Node doesn't.
node
Welcome to Node.js v13.12.0.
Type ".help" for more information.
> Response
Uncaught ReferenceError: Response is not defined
>

Use isomorphic unfetch or similar library. Still make sure TS libs are properly defined.

The current issue is the SDK doesn't compile in a Node.js TypeScript project.
So if a node.js project use RC SDK V4, it needs to use "isomorphic unfetch" to make HTTP calls directly?

OK, here is the workaround: add "lib": ["DOM"] to tsconfig.json compilerOptions.
In theory my app doesn't need DOM because it is a Node.js app. This workaround is just to fool the TypeScript compiler.


support different authentication defined in cadl

The supported authentication types are defined in https://microsoft.github.io/cadl/standard-library/rest/authentication
Today, we only support ApiKeyAuth and OAuth2Auth.
We need to figure out how to support other authentication types.
Note:
We don't need to generate everything, some kind of the custom code is acceptable and we need to make our framework ready.
We should not let codegen to crash for the cadl defined authentication types.

We have four kinds of auth supported in Cadl
BasicAuth, not supported, may not happen as a real cae
BearerAuth, not supported, may happen
ApiKeyAuth, supported
OAuth2Auth, supported
I think we could support BearerAuth with necessary change in our codegen or core.
see discussion here: https://teams.microsoft.com/l/message/19:4844af8fce9742a98d06e1debf60bab2@thread.skype/1675303249190?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&groupId=3e17dcb0-4257-4a30-b843-77f47f1d4121&parentMessageId=1675303249190&teamName=Azure SDK&channelName=DPG Support&createdTime=1675303249190&allowXTenantAccess=false

@chunyu3, could you reuse this one?  https://github.com/Azure/autorest.csharp/issues/3074

duplicate with https://github.com/Azure/autorest.csharp/issues/3074


unsafe lazy_static that's not Sync ?

would it be possible to create an unsafe version of the macro that allows the type to be non-Sync?  I would like to use it in an FFI context.  The calling C code requires me to provide a global mutable structure containing raw pointers.

Hi @asomers :wave:
An unsafe variant of lazy_static is probably out-of-scope for this library, but you can use Rust's own unsafe mutable static feature to provide a global mutable structure:
struct Pointers {
    a: *mut u8,
    b: *mut u8,
}

impl Pointers {
    const UNINIT: Self = Pointers {
        a: std::ptr::null_mut(),
        b: std::ptr::null_mut(),
    };
}

static mut POINTERS: Pointers = Pointers::UNINIT;

fn main() {
    // Working with 'static mut is unsafe
    // You're responsible for ensuring the mutable state is
    //  only aliased and accessed correctly
    unsafe {
        let pointers = &mut POINTERS;

         // Pass through FFI
    }
}

That helps!  It makes it possible, but not easy, to do what I want.  Using that technique, I can't initialize the variable with non-const functions like mem::zeroed() or mem::uninitialized().  That's why I was hoping there would be a way to do it with lazy_static.  Do you know of any way to initialize non-Sync static variables with mem::zeroed()?

Ok, I found a great hack.  I can run code in a constructor function as soon as my library gets loaded, before the application can access it with dlsym.
#[export_name = "mysymbol"]
pub static mut MYSYMBOL: Option<Foo> = None;

#[link_section = ".init_array"]
pub static INITIALIZE: extern "C" fn() = rust_ctor;

#[no_mangle]
pub extern "C" fn rust_ctor() {
    unsafe {
        MYSYMBOL = Some(Foo::new())
    }
}

Thanks for the help.  I'm going to close the issue now.

Ok, I found a great hack. I can run code in a constructor function as soon as my library gets loaded, before the application can access it with dlsym.
#[export_name = "mysymbol"]
pub static mut MYSYMBOL: Option<Foo> = None;

#[link_section = ".init_array"]
pub static INITIALIZE: extern "C" fn() = rust_ctor;

#[no_mangle]
pub extern "C" fn rust_ctor() {
    unsafe {
        MYSYMBOL = Some(Foo::new())
    }
}

Thanks for the help. I'm going to close the issue now.

Thank you for this; this really saved me from a multi-day bind. Still, why not just use a mutex around your global mutable var and ditch the unsafe keyword when accessing it?


Missing critical content - shut down the cluster

This is great info, but what if I have to shut my whole cluster down.  Planned power outage or building maintenance?  How do I gracefully shut things down?

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

ID: 393d4e4d-1975-93bf-f405-e81ae50dcb40
Version Independent ID: a38288af-3054-eebe-2d81-8c2f3be3eb60
Content: Taking a Storage Spaces Direct server offline for maintenance
Content Source: WindowsServerDocs/storage/storage-spaces/maintain-servers.md
Product: windows-server-threshold
GitHub Login: @EldenChristensen
Microsoft Alias: eldenc

Thanks for your dedication to our documentation. If we have been unable to review your issue in a timely manner, we sincerely apologize for the delayed response. We have captured the informtion you have provided for review. We are closing this issue for now, but if you feel that it's still a concern, please respond and let us know. If you determine another possible update to our documentation, please don't hesitate to reach out again. #please-close


Unable to delete org in multitenancy context

Hello,
We need to do some cleanup in our organizations in our multitenancy setup. I don't see anything in the code that deletes organizations. Do you think it would be a good idea to add a route for this?

@samifruit514 thanks for opening
Could you elaborate by what you mean by "delete" an organization? You would like for chartmuseum to limit which routes are allowed/accepted repos?
Please see #86. This issue does not fully cover this, but we need to add the ability to specify configuration on a per-tenant basis. Then, you can startup the server with a configuration file specifying which repos are valid etc.


TNO-2534 sort by string

I've modified many other parts, as shown in the screenshot, which works. However, I'd like you to test this natural sort first before I push the other changes
I found some issues.
https://github.com/bcgov/tno/blob/dev/app/editor/src/features/content/list-view/hooks/useColumns.tsx
from the code block.

      accessor: 'section',
      sort: (row) => {
        return `${row.original.page ? row.original.page : ''}:${
          row.original.section ? row.original.section : ''
        }`;
      },

we pass a function into sort, but we never run it.
Because if the accessor is a function, the return is accessor, each time we just sort the"section" which came from the col accessor value.
https://github.com/bcgov/tno/dev/libs/npm/core/src/components/table/FlexboxTable.tsx
      col.sort ?? typeof col.accessor === 'function'
        ? undefined
        : col.accessor,

but as the code below from https://github.com/bcgov/tno/blob/dev/libs/npm/core/src/components/table/utils/sortRows.ts
"I think we expect to sort by accessor function, however, if we change the accessor to any function, it causes a 500 error in Elastic Search.
I modified a couple of places to use sortBy.sort === 'function', but I'm not sure if this is necessary.

      if (sortBy) {
        if (typeof sortBy.sort === 'function') {
          const aVal = sortBy.sort(a) ?? '';
          const bVal = sortBy.sort(b) ?? '';
          return (aVal < bVal ? -1 : 1) * (sortBy.isSortedDesc ? -1 : 1);
        }

        if (typeof sortBy.sort === 'string') {
          const aVal = a.original[sortBy.sort as keyof T] ?? '';
          const bVal = b.original[sortBy.sort as keyof T] ?? '';
          return (aVal < bVal ? -1 : 1) * (sortBy.isSortedDesc ? -1 : 1);
        }

        // Use the accessor for the search column.
        const accessor = a.columns[sortBy.index].accessor;
        if (typeof accessor === 'function') {
          const aVal = accessor(a.original) ?? '';
          const bVal = accessor(b.original) ?? '';
          return (aVal < bVal ? -1 : 1) * (sortBy.isSortedDesc ? -1 : 1);
        }
      }

I tested your changes locally, but they don't appear to work.

I think I made it like this You will see the page sorted within the same source. Perhaps I'm overthinking it, but if we only want to sort the page, I can quickly make the change.

The default sort (before clicking on any of the sort columns) should be Source.SortOrder, Source.Code, Page, Section.  When a user clicks the sorting columns the sort is applied in the order they manually select them.
Looking at the results you can see for some reason CP News was first even though the page was A18.  This would indicate that it was also sorting on the source code.  When clicking the sorting columns you can see I don't have the source column sorted.  Therefore the sort should only be Page, Section.

I've published tno-core:0.1.57 for you.  Make sure you rebase and add the package to both the Editor and Subscriber.  Don't forget to yarn install on both of them.

test it with the package, sorting works as we want

You'll need to update the package.json files for the Editor and Subscriber apps and update your PR.


Make cyclic dependencies impossible to represent in the data format

Right now it is possible to represent cyclic dependencies in the data format. For example:
{"packages":[
{"name":"foo","version":"0.3.1","source":"local","dependencies":[1]},
{"name":"bar","version":"0.2.1","source":"crates.io","dependencies":[0]}
]}

But Cargo does not actually allow cyclic dependencies.
This quirk of the format requires any consumer of this data to check for cyclic dependencies first, or risk an infinite loop during traversal.
It would be nice to make cyclic dependencies impossible to represent, for example:
{"packages":[{"name":"foo","version":"0.3.1","source":"local"},{"name":"bar","version":"0.2.1","source":"crates.io"}]}
{"dependencies":{"0": [{"1":{[]}]}}

Or something along those lines. The idea is to encode the relationships in a JSON tree that is guaranteed to be acyclic.

Cargo does allow cyclic dependencies between packages through for example [dev-dependencies]. What is not possible is cyclic dependencies between crates.

We do not record [dev-dependencies], so AFAIK we should be fine.

Okay, so I have a prototype in the acyclic-dependencies branch. It encodes the relationships in the structure of the JSON itself, so it's impossible to express cycles.
Before:
{"packages":[{"name":"adler","version":"1.0.2","source":"crates.io"},{"name":"auditable-extract","version":"0.3.1","source":"crates.io","dependencies":[2]},{"name":"binfarce","version":"0.2.1","source":"crates.io"},{"name":"miniz_oxide","version":"0.5.3","source":"crates.io","dependencies":[0],"features":["default"]},{"name":"rust-audit-info","version":"0.4.0","source":"local","dependencies":[1,3]}]}
After:
{"packages":[{"name":"adler","version":"1.0.2","source":"crates.io"},{"name":"auditable-extract","version":"0.3.1","source":"local"},{"name":"binfarce","version":"0.2.1","source":"crates.io"},{"name":"miniz_oxide","version":"0.5.3","source":"crates.io"},{"name":"rust-audit-info","version":"0.4.0","source":"local","root":true}],"dependency_tree":{"4":[{"1":[{"2":[]}]},{"3":[{"0":[]}]}]}}
Note the "dependency_tree" bit at the end.
@knqyf263 any thoughts about this?

Sadly this change increased the audit data size for cargo-geiger from 1.2Kb to 3.2Kb, although I'm not exactly sure why. Perhaps the lack of subtree deduplication is to blame.
Also, this change may not be a win for Trivy. Quoting Tom Fay:

It looks like the existing approach better maps to the data structure trivy uses, as trivy ultimately puts package information into this struct, https://github.com/aquasecurity/trivy/blob/e848e6d009af45cda073133c7c8d3220a082335c/pkg/fanal/types/artifact.go#L43, which stores dependencies as an array field

I think the consumer has the responsibility of checking for cyclic dependencies.
For example, CycloneDX represents the dependency graph as below.
  "dependencies": [
    {
      "ref": "acme-app",
      "dependsOn": [
<EMAIL_ADDRESS><EMAIL_ADDRESS>      ]
    },
    {
      "ref"<EMAIL_ADDRESS>      "dependsOn": [
<EMAIL_ADDRESS>      ]
    },
    {
      "ref"<EMAIL_ADDRESS>      "dependsOn": [
<EMAIL_ADDRESS>      ]
    },
    {
      "ref"<EMAIL_ADDRESS>      "dependsOn": []
    }
  ]

https://cyclonedx.org/use-cases/#dependency-graph
This format is possible to have cyclic dependencies.

Also, this change may not be a win for Trivy. Quoting Tom Fay:

We can convert the new map format into an array, so it doesn't matter

In that case I'll keep the old format that allows cyclic dependencies, since it's a lot more compact, and appear to be easier to map to existing structures.
Thank you for your input!


Support for Multiple Shots: Art from Data

The API should support an array of shots as input and return visualizations for all of them.
The UI needs currently just to adjust its queries. UI rework needs to be discussed.

UI supports multiple shots for one selected movie by clicking on the wished thumbnails and adding it to an array. At the moment just the first element of an array will be send by query, will be changed as soon as the back-end supports the array.

Implemented different cases for "shots" and "multiple-shots". I named the type for multiple shots "VISUALIZATION_MULTIPLESEGMENTS", the one for single shots remained at "VISUALIZATION_SEGMENT"

works


No parameter hints for keras/Tensorflow

Environment data

Language Server version: 2020.7.1
OS and version: MacOS 10.15.5
Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.7 (Anaconda)

Version: 1.47.0
Commit: d5e9aa0227e057a60c82568bf31c04730dc15dcd
Date: 2020-07-09T08:01:54.115Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.5.0
Expected behaviour
Parameter hints for the function signature are shown like so:

(This is using the standard MS Python Language Server)
Actual behaviour

only parameters shown are *args and **kwargs

Code Snippet / Additional information
import keras
model = keras.Sequential(
    keras.layers.Dense()
)

Similiar issue in pytorch module!!!  Type hints does not work for some third-party module.

Thank you for entering an issue.
What version of tensorflow are you using?
with tensorflow 1.13.1
and following this guide (https://keras.io/guides/sequential_model/), changing the imports to
import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers
i'm getting more info for Dense()

Hey,
i'm using TF 2.0.0 and also a separate installation of Keras 2.3.1.
Changing the imports like you suggested didn't work. I remember that I had autocomplete Issues when TF 2.0 was first released (back then with the MS Python Language Server), but using the direct installation of Keras had fixed it. Now with pylance it stopped working again.

I too am seeing the issue with just TF 2.0.0 but the issue goes away for me after installing Keras 2.4.3.
I'm going to try again with just a single python file.

Yes just a single file with a virtual environment in a peer folder is working for me on windows using pip install instead of anaconda.  Maybe there is difference in the mac version of keras
import keras
model = keras.Sequential(
    keras.layers.Dense()
)

requirements.txt

if you use tf2.x you can specify tensorflow_core dir as extraPaths like:
ln -s ~/miniconda3/envs/tf2/lib/python3.7/site-packages/tensorflow_core ~/.local/virtual-site-packages/tensorflow

in setting.json:
    "python.autoComplete.extraPaths": [
        "~/.local/virtual-site-packages"
    ]
or
    "python.analysis.extraPaths": [
        "~/.local/virtual-site-packages"
    ],

I didn't install Pylance extension but use the Pylance language server:
    // "python.languageServer": "Microsoft",
    "python.languageServer": "Pylance",

It get better performence than Microsoft.

but when install Pylance, it can't autocomplete  somethings:

When I (1) disable the pylance extension and (2) keep the pylance language server in settings.json I get the following error:
Sorry, something went wrong activating IntelliCode support for Python. Please check the "Python" and "VS IntelliCode" output windows for details.
the output console says:
Language server is set to Pylance. Acquiring model Acquiring model 'intellisense-members-lstm' for python Querying IntelliCode service for available models. vs-intellicode-python was passed a model: {}. Cached model is up to date. Activating Python extension Language server extension command failed. Exception: Error: command 'python.intellicode.loadLanguageServerExtension' not found     at u._tryExecuteCommand (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3944:836)     at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3944:717     at processTicksAndRejections (internal/process/task_queues.js:85:5) Error while activating Python: {}
I suspect VSC falls back to jedi or MS Python Language server in this case, and then I also get great parameter hints again (similar to your screen shots). Is there any way to confirm that its actually pylance generating these suggestions? And if this is the case, why do I get the afore mentioned error?

@moritzwilksch In step one you say you disabled the Pylance extension, so that is why you are getting the error. To confirm Pylance is running check the output- "Python Langauage Server" window for something like this.
[Info  - 9:26:23 AM] Pylance language server 2020.7.3 (pyright 5004efe5) starting

@moritzwilksch, I think you are right. Now I found Its actually using Jedi.
So now still need to specify tensorflow_core dir as extraPaths and install Pylance. But its automatic completion is not very good in function parameters.

Tried it with the extra path to /Users/moritz/opt/miniconda3/lib/python3.7/site-packages/tensorflow_core, but as you said, still doesn't work well.
@bschnurr just checked, when pylance is running the parameter hints are as bad as described above, when jedi is running (like @zhen8838) they are looking good again

You shouldn't need to set "extra paths".
I believe the issue is with decorators that anaconda version of keras is using.

I'll investigate further, but in the mean time I recommend using the requirements file i posted above, or create your own environment using pip install instead of conda

Ok. I also noticed that if you use the keras import recommended by TensorFlow:
from tensorflow import keras

pylance does not even recognized the contained modules:

Is that one of the needs-stub issues? Or can this be fixed?

For tensorflow 2.x, there contains no module in "env path/tensorflow". I  find the modules of tensorflow is in "env path/tensorflow_core", and  tensorflow/init.py sets modules in sys from tensorflow_core:

So Pylance can not handle import rightly.
If the above reason is right, I hope Pylance can solve it.

is there update on this issue?

Ok. I also noticed that if you use the keras import recommended by TensorFlow:
from tensorflow import keras

pylance does not even recognized the contained modules:

Is that one of the needs-stub issues? Or can this be fixed?

I see layers now showing up. Tested with pip install tf-nightly on python 3.9 windows

with pip install tf-nightly on python 3.9 windows
signatureHelp

onHover

Just wanted to chime in on this issue and say that I found a way to fix it for TF 1.x.
The problem is the non-standard structure of the tensorflow packages, such that there is never a folder structure such that the path tensorflow/keras exists. Generally the strategy here is to use POSIX symbolic links ("symlinks") to make the folder structure we want, and then let pylance know about it via the python.analysis.extraPaths setting. Specifically, I put it in the settings block of my workspace config JSON.
So on my machine, I've got my tensorflow package installed in /home/windfish/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tensorflow_core.
So first think I make a folder .virtual_site_packages in my home directory. Then I make a symlink from the tensorflow python modules directory to the new directory in my home folder, but rename the link to "tensorflow". This creates the much-needed path "tensorflow/keras" so that pylance can find tensorflow internal packages the same way that we specify them with module syntax within python itself.
First we make the symlink as described above:
ln -s ~/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tensorflow_core/python ~/.virtual_site_packages/tensorflow
Note the added /python at the end of the tensorflow core directory, in tensorflow 1.x, this is where the python modules are located - I think this may have changed in 2.x, according to comments above.
Finally just add the desired configuration to pylance in your workspace settings (in the settings block).
"python.analysis.extraPaths": [ "/home/windfish/.virtual_site_packages" ]

Finally restart VSCode to see the changes

This appears to work fine with the latest versions of tensorflow and keras.

Closing; keras is a part of tensorflow 2 now (and is no longer published individually). The latest tensorflow should work fine.

@jakebailey kerns has been separated again, please reopen

If you have a problem with a newer split out keras, I don't think the issue will be related. I'd suggest opening a new issue with the template filled out.

I installed keras on a new conda environment and activated it in vscode. But, Pylance returns an "Import "keras.models" could not be resolved and intellisense doesn't work. Numpy, which is also installed in the conda environment works.

This issue is happening with keras/tensorflow version '2.7.0' and pylance
When using
from tensorflow import keras
there are no hints.
A workaround is using
import tensorflow.keras
keras = tensorflow.keras

Any solution for the issue? I hace the same problem.

Type hints do not work.
TF '2.8.0'
Version: 1.66.2 (user setup)
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Date: 2022-04-11T07:46:01.075Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.22000

This is the workaround I found for the time being
tensorflow==2.9.1
keras==2.9.0

from importlib import import_module

import tensorflow as tf
from keras.api._v2 import keras as KerasAPI
# using the import module import the tensorflow.keras module
# and typehint that the type is KerasAPI module
keras: KerasAPI = import_module("tensorflow.keras")

tf.TensorArray

keras.models.Model
keras.layers.Dense
keras.layers. Flatten
keras.layers.Conv2D
keras.losses.binary_crossentropy
keras.losses.SparseCategoricalCrossentropy

new stable release has the partial fix https://github.com/tensorflow/tensorflow/releases/tag/v2.10.0
and using
import tensorflow as tf
tf.keras

new stable release has the partial fix https://github.com/tensorflow/tensorflow/releases/tag/v2.10.0
and using
import tensorflow as tf
tf.keras

THX! - working for me with miniforge, tensorflow 2.10.0 on Mac M1 in Dataspell Version 2022.2.3

keras = tf.keras works on 2.11.0 as well on intel Mac using Anaconda.

working fine


What's the official word on Angular 1.4 compatibility?

It seems people are having good success using this with Angular 1.4.    I'm about to start a new project soon, and am curious what the official status here is.   The roadmap does not seem to cover this.

master is currently 1.4 compatible as of 1 minute ago, and we will be releasing this weekend :)

:+1:

Excellent, thanks.  I hope this release makes into the NPM repository soon.   I only see 0.12.1 there now.


GPUParticles3D billborad emission not shown when not facing light

Tested versions
v4.2.stable.official [46dc27791]
System information
Godot v4.2.stable - Windows 10.0.19045 - Vulkan (Forward+)
Issue description
GPUParticles3D billborad emission not shown when not facing light
facing light can see the emission:

not facing light:

Steps to reproduce
I have made 2 nodes
1 is a simple quad MeshInstance3D with StandardMaterial3D emission material and billboard turn on.
It has emission no matter if is it facing directional light.
Another 1 is GPUParticles3D, I set the similar material with emission material and billboard turn on
But it doesnt have the emission effect when not facing light. (see above comparison)
One thing I found is, for the MeshInstance3D , I have set the color in emission

while in particle3D, I dont

The reason is I want the color is controlled from the particle.
Once I set the emission color, I lost the control from the particle.
Minimal reproduction project (MRP)
particle_billboard_emission_bug.zip

This is because shading is enabled on materials by default, so the amount of light received varies depending on the side the billboarded mesh is facing. This causes your emission to be too low to cause any glow to appear when the billboard is facing away from the DirectionalLight3D in the scene.
To resolve this, set your material's shading mode to Unshaded. This will also improve performance. The downside is that the emission color will no longer appear, so you need to set the albedo color instead using the RAW color mode to make it overbright (so it can generate glow). https://github.com/godotengine/godot/pull/57422 aims to resolve this issue, but it hasn't received much support.


not traverse, but sequence silly

#113 pointed out that I'd left this as the previous traverse implementation. This updates the example

I was about to open a pull request for this myself, but paused when I realized the of parameter is ignored. Can you explain why this is so? Is it necessary for fold-based implementations, but not for single-value containers such as Id?

Hi @davidchambers
I put a quick comment in there for others as well. The of must be provided for types which might fail. A good example would be Maybe:
var j = Just([2])
j.sequence(Array.of)
// [Just(2)]

var n = Nothing
n.sequence(Array.of)
// [Nothing]

In the second case, if we didn't provide Array.of, we wouldn't know what type to return.
Most instances do not need to take advantage of the of argument, but it must be provided to keep a standard api.

Thanks for the explanation. :)
:deciduous_tree:


MINOR: Add support for ZK Authorizer with KRaft

This patch adds support for running the ZooKeeper-based kafka.security.authorizer.AclAuthorizer with KRaft clusters. Set the authorizer.class.name config as well as the zookeeper.connect config while also setting the typical KRaft configs (node.id, process.roles, etc.), and the cluster will use KRaft for metadata and ZooKeeper for ACL storage. A system test that exercises the authorizer is included.
This patch also changes "Raft" to "KRaft" in several system test files. It also fixes a bug where system test admin clients were unable to connect to a cluster with broker credentials via the SSL security protocol when the broker was using that for inter-broker communication and SASL for client communication.
Co-authored-by: Ron Dagostino<EMAIL_ADDRESS>

Redundant now that https://github.com/apache/kafka/pull/10550 has been merged


kubernetes.cpu.usage.total reporting incorrect values on containerd run time

I believe this metric used to report correct numbers when runtime was docker.
All of my AKS clusters now run with containerd since that is the default run time from 1.19 onwards.
Today I noticed that the istio-proxy container is using more than it usually does and thats when I found out that kubernetes.cpu.usage.total is reporting incorrect values ( a much bigger number than actual)
So I plotted both kubernetes.cpu.usage.total & containerd.cpu.total (my query below) side by side.
I correlated this with the output from
kubectl -n client top pods --containers
I also have datadog container live health .
All the 3 sources (live health, kubectl top, containerd.cpu.total) agrees on the value.
kubernetes.cpu.usage.total reports much higher . In my case when all the other three metrics was reporting 380mc, kubernetes.cpu.usage.total was reporting 482mc
avg:kubernetes.cpu.usage.total{kube_namespace:client,kube_container_name:istio-proxy} by {kube_container_name}
max:containerd.cpu.total{kube_namespace:client,kube_container_name:istio-proxy} by {kube_container_name}
See screen shot in below post. Look specifically for "istio-proxy" container. The issue of incorrect metric value happens with any container. not just istio-proxy
Another interesting observation. The container has an artificial load applied with increasing load. So the CPU usage never goes down, it only increases. kubernete.cpu.usage.total metric shows cpu usage going down while all other data sources (kubectl top, containerd.cpu.usage.total and datadog container live health) shows cpu usage monotonically increasing

Hi @martin2176
Thanks for opening this issue!
In order to investigate this it's best to contact our support team as we'll need more information about your infra and and agent flare.
Thanks!

A ticket was opened with Support (We are a DD enterprise customer) in September. Ticket 525116
Datadog engineering identified this as an issue. This was the communication from support..below is snippets from support emails:-
The team is working on improving the collection of this metric, but this requires significant work and will not be completed in the short term.
We understand that this is not an effective workaround for monitoring CPU performance issues. Nevertheless, it does not seem that there is any other workaround to share at this time. Our Engineering team is looking into improving the collection of this metric, and we will let you know when there are any updates to share regarding this.

Amazing. I've been arguing with Datadog support about this exact problem for weeks.
https://help.datadoghq.com/hc/en-us/requests/1695659

I am surprised this has still not been resolved. been 3 yrs almost since I first reported and open a support ticket on this topic.


Add wrapping to long diff lines to fix #1827

This PR adds line wrapping to the unified diff view (for long lines) (#1827). Wrapping was already done in the split view.
An additional change has been made to align the line-numbers of wrapped diff lines to the top of the line.

EDIT: Closes #1827

Maybe have a checkbox toggle? For those that don't want wrapping :)
Also Closes #1827

The wrapping was already default behavior for the split view, are you sure you want a setting for this?
If you do want a setting, where should it be located? (we don't really have a user preferences view)
Also, should it store the preference server-side or simply keep it client-side?

If you do want a setting, where should it be located?

Maybe beside 'View File' in the header?
BTW I also noticed an error in the .wrap CSS: The current break-word value for word-break is invalid. It should be break-all. I recommend these rules for it:
white-space: pre-wrap;
word-break: break-all;
overflow-wrap: break-word;

Oh, and I also think this change should apply to regular code view, not just diffs.

I assumed the wrap class would have a proper implementation, as it turns out I was wrong. I have to keep the non-standard word-break: break-word; as well though, as it's needed for WebKit to function properly.

Looks like word-break: break-word is superceded by overflow-wrap: break-word, so these two should be equivalent. I can at least say that the former isn't recognized by Firefox any more:

Interesting, reading the W3C spec leads me to believe overflow-wrap can be used in in addition to word-break. I don't think one is superseded by the other.
word-break: break-word; should only be used (and will only be accepted) by WebKit. Other browsers correctly implemented the standard word-break: break-all; value.

Both are valid in WebKit:

The spec seems pretty clear to me. word-wrap does not list it as a valid property value and overflow-wrap contains this note:

For legacy reasons, UAs must treat ‘word-wrap’ as an alternate name for the ‘overflow-wrap’ property, as if it were a shorthand of ‘overflow-wrap’.

The spec seems pretty clear to me. word-wrap does not list it as a valid property value and overflow-wrap...
But we're talking about word-break and overflow-wrap, not word-wrap.

need @lafriks approval.

But we're talking about word-break and overflow-wrap, not word-wrap.

Yeah, my error, I meant word-break. Anyways, I think you should try my suggestion in https://github.com/go-gitea/gitea/pull/1954#issuecomment-307868910, it should be all that's needed to achieve consistent cross-browser wrapping.

This whole formatting problem is caused by the .editorconfig file stating that indentation should be done using 4 spaces, but the less files are using tabs. Which should it be?

Lack of response leads me to believe nobody really cares if indentation is done using spaces or tabs, so I'll go with 4 spaces.

Getting back to the topic of having it also apply on regular code views: Why should it only wrap in diffs? If you have a long line in a diff, it'll be a long line in the regular code view. I'd rather have both wrap for consistence.
Of course, a checkbox toggle in the header would be ideal, but that can come later, imho.

This may just be me, but I generally hate wrapping in code. The only time I do find it useful is when I need to see the difference between two pieces of code in a single glance. The wrapping is especially useful in a side-by-side diff, where the horizontal space is extra limited. I'm not against implementing wrapping in normal code-views as well, but I'd rather build the toggle setting with it so I can turn it off. Would you be willing to wait for the normal code view wrapping until that time?

@mjwwit in code view and diff view code wrapping is needed as otherwise if code block is larger than screen you have to scroll to the bottom of code block to be able to scroll to right

I'm fine if you want to do it later with the toggle. Having it in diffs is already an improvement. Side-by-side diffs already wrap without this patch for me, by the way.
Also agree with @lafriks, horizontal scroll on big files is generally a bad UX, but there are options like using the arrow keys to scroll.

I'm vote for 4 spaces for tabing just wanted more opinion from other Gitea developers. If other are also OK with that than it is LG-TM

@lafriks LG-TM on 4 space. Haven't reviewed this one though so no real LG-TM from me ;)

hi, please rebase.

Rebased and tested, LGTM

Codecov Report

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

@@           Coverage Diff           @@
##           master    #1954   +/-   ##
=======================================
  Coverage   27.08%   27.08%
=======================================
  Files          88       88
  Lines       17264    17264
=======================================
  Hits         4676     4676
  Misses      11909    11909
  Partials      679      679

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 e86a0bf...8c8c163. Read the comment docs.


Re-enable LSRA verification.

This required adopting a different approach towards identifying whether or
not a particular node was part of a move inserted by LSRA resolution.

@BruceForstall PTAL

It looks good to me but maybe you should ask Carol to look.

It looks like she's looking at the big PR now--I'll point it out over there.


feat(policy): enhance handling of policy additon and deletion in systemd mode

Purpose of PR?:
Fixes #1312
Currently in Systemd mode we only get 2 response (succes/failed) depending upon whether the policy was recieved by grpc client or not. However it doesn't check whether the policy was successfully applied by ParseAndUpdate functions. This PR adds a new check that verifies whether the update was successfully done or not.

For successfull policy addition

If we configure the policy

Successful policy deletion

If the policy to be deleted is not present

Does this PR introduce a breaking change?
NA
If the changes in this PR are manually verified, list down the scenarios covered::
:- Host/container policies are applied successfully  with appropriate response
Additional information for reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs
Checklist:

[x] Bug fix. Fixes #1312
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update NA
[x] PR Title follows the convention of  <type>(<scope>): <subject>
[x] Commit has unit tests: NA
[x] Commit has integration tests: NA

Can you attach video/screenshots of it working.

https://www.conventionalcommits.org/en/v1.0.0/


Missing package after building

Hi,
I have added     "electron-devtools-installer": "^3.2.0", to my devDependencies.
At application launch I've got an application error telling electron-devtools-installer is missing.
If I build with  electron-devtools-installer added to dependencies instead of devDependencies, it works.
Is there a way to keep the package in the devDependencies and have it working ?
Do I need to do some plugin config for that ?
I have tried :  include: ['electron', 'node_modules/electron-devtools-installer'], but it fails

Can you provide a minimal reproduction Demo? 👀

Sorry this issues non longer exist


[BUG]: Right nav button on the gallery does not work

Describe the bug
Right Navigation button of 'Company news' does not work for the first time to navigate to right to see hidden news cards. But can be navigate after click "read more" and back to company news page.
Tested with laptop.
To Reproduce
Steps to reproduce the behavior:
1.Create company news more than 4 or 5.
2. run the app and go to company news page
3. click right navigation button.
4. Older news didn't show.
5. click " read more" and 'back"
6. click right navigation button.
7. older news are shown.
Expected behavior
navigate to older news
Screenshots
Interface(please complete the following information):

Browser : chrome
Version 80.0.3987.132 (Official Build) (64-bit)

We are also having the same problem.

We are seeing the same issue.

Seeing the same issue as well:

Right arrow DOES NOT scroll right through the news cards when using a desktop browser
Left arrow DOES scroll left through the news cards when using a desktop browser
Clicking on the whitespace of a card then using left and right keyboard arrows does scroll the news cards left and right.
Left and right work fine on mobile devices

https://powerusers.microsoft.com/t5/Building-Power-Apps/ShowNavigation-does-not-work-Horizontal-gallery/td-p/420188

The latest version has changed the behavior to scrollbars instead.
In the OnVisible property of the Home Screen, you can configure the colStyles collection to change show_gallery_scrollbars and show_gallery_nav to "true" or "false" if you want to override this behavior.

Awesome! We will update our test app this morning then prod.


Calculate Nutrient Deficiency for NPK

Calculate nutrient deficiency levels for Nitrogen, Phosphorus and Potassium.
Images from Nutrient-Deficiency-Symptoms-in-Rice.
https://www.kaggle.com/datasets/guy007/nutrientdeficiencysymptomsinrice


Feature Request: Allow RS232 servers.

It would be great to allow RS232 to Ethernet devices. Like this one. There's a RS232-only version that only costs $25 (I assume it performs just as well as the RS232/RS485/RS422 version I bought).
From what I can tell, the device works great, no caveats. I started on a basic Homebridge plugin for the 482 before thinking to check if something was available for HA (python noob, so I default to JS).  I modeled it off the same python toolkit from Tekmar that it looks like you modeled yours after. I think the conversion would be pretty easy. Just open a TCP socket and start reading and writing bytes the way you do now, just to a socket instead of a serial port.
I almost think you should move most of the packetserve code into the main plugin (the tekmar specific stuff: byte stuffing, escaping, packetizing, etc), and just have packetserv essentially be a dumb serial-to-ethernet device like the one I bought above. Users could use packetserve for non-Tekmar RS232/485 devices, and purchasers of serial-to-ethernet devices could avoid needing to install that add-on entirely. (just a thought)
Back to the main request - It would be great to make this work with 3rd party ethernet-to-serial devices

I will look into it. I normally use Perle serial servers.

I almost think you should move most of the packetserve code into the main plugin (the tekmar specific stuff: byte stuffing, escaping, packetizing, etc), and just have packetserv essentially be a dumb serial-to-ethernet device like the one I bought above. Users could use packetserve for non-Tekmar RS232/485 devices, and purchasers of serial-to-ethernet devices could avoid needing to install that add-on entirely. (just a thought)

There are already other projects out there that do dumb serial to Ethernet stuff, so duplicating that work is not something I'd care to do. At the moment I prefer to follow the model that Z-Wave JS has taken: an integration for HA core with an add-on to interface with the hardware.
In its current state it also works with one-to-many applications: multiple integrations can connect to a single tekmar-packetserv simultaneously. That would not be possible if packet processing was moved into the integration.

In its current state it also works with one-to-many applications: multiple integrations can connect to a single tekmar-packetserv simultaneously. That would not be possible if packet processing was moved into the integration.

A fair point. The USR device has settings for max connected clients, and a checkbox for whether new connections should boot off old connections. No explanation for how it handles data flow for multiple connected clients. I assume it mirrors data from the serial bus to all connected, and queues writes based on TCP packet boundaries.... But that's a big assumption

Yeah but that's very device-specific, and how your device handles it isn't necessarily how mine will or any other number of random ones out there someone might want to use. And I don't really have any desire to make some elaborate system to try and arbitrate all the different possibilities when how it's currently designed has been stable and reliable.

Added in version 1.2.0


trying on real robot, with walking_simulation.py

Hello Derek,
before going any further, with a c++ difficult code,
I'd like to use your python file, to command my motors. (before doing same in c++)
Could you tell me what function i have to call, to sends to real robot motor boards,
and what fonction to call, to receive motor values?
Am I right ? :
inside  the fonction : self.__get_data_from_sim()

I need to feed here my real IMU 10 values

inside the fonction : self.__get_motor_joint_states()

need to query real motors controllers for joint_positions, joint_velocities, joint_torque and joint_names

and inside :
tau = self.cpp_gait_ctrller.torque_calculator(self.__convert_type(             imu_data), self.__convert_type(leg_data["state"]))

It should tell me what values to sent to real motors controllers, correct ?

yes, you're right

Super. Trying.

you can use 'legcommand' to send to the real robot.
'legcommand' struct is in legController file.


[BUG/IDEA] Autocomplete when using matchUtilities

What version of @tailwindcss/jit are you using?
v0.1.10
What version of Node.js are you using?
v12.0.0
What browser are you using?
N/A
What operating system are you using?
macOS
Reproduction repository

Sorry, this is not entirely related to the work of the module, but may help someone.
I had the idea to use the matchUtilities method in my plugins, but when I use it, Tailwind CSS autocomplete is disabled completely (https://plugins.jetbrains.com/plugin/15321-tailwind-css), can I fix it somehow?
The idea was to add your own classes, similar to sass mixins

Hey! I'm guessing this has something to do with how Jetbrains has implemented their Tailwind support, since the matchUtilities is new to the JIT library. Going to close as nothing we can do about this here I'm afraid 😕


Reset search/filter programmatically

Hi,
is it possible to reset search/filter by calling an internal function? In our case we can not combine both, so if a user searches something AND sets a filter afterwards, the search should be resetted and vice versa.
Thank you in advance
David

Hi @gregnb
Any update on this?
I'm looking forward to triggering search and filter programmatically from customHeadRender.
Probably there's a way and I'm missing it, but if it isn't an option and you think it's a valid feature I can implement it!

I believe these both exist now.

filterList in the column options affects which filters are currently applied to a particular column
searchText in the main table options allows you to set a search term that resets the table to that term


allow wildcard external requires for multiple bundles

Consider a vendor bundle where you provide angular 2:
  // vendor bundle build
  // expose angular 2 packages
  bundler.require('angular2/core', { expose: 'angular2/core' });
  bundler.require('angular2/http', { expose: 'angular2/http' });
  bundler.require('angular2/upgrade', { expose: 'angular2/upgrade' });

But perhaps you need to directly access something which is a subpath of angular2, and inherently included by those top level packages, but not defined as available externally:
  // app bundle build
  // we are expecting to be able to `require` the following from an external bundle
  bundler.external('angular2/core');
  bundler.external('angular2/http');
  bundler.external('angular2/upgrade');

And in our app code, we want to include something specific from the angular 2 module, which DOES exist in the vendor bundle, however we have not explicitly defined being able to require that specific path from another external bundle...
// app.ts
import { DOM } from 'angular2/src/platform/dom/dom_adapter';

In this case, we get a copy of the code included in the app bundle because we haven't explicitly defined that path in our builds.
It would be great to have an option to define... for all subpaths under the angular2 module, eg:
// app build
bundler.external('angular2/*');

Perhaps a GLOB would be better, or an option, I'm not really sure what would be best.. here's some random ideas:
// regex - vendor build
bundler.require('angular/core,http,upgrade', { expose: 'angular2/$1' });

// glob - app build
bundler.external('angular2/**/*');

// OR options argument - app build
bundler.external('angular2', {
  allSubmodules: true
});

This is what the undocumented and not-quite-working exposeAll option is supposed to do. See this comment and its followups for some info on the known bugs and workarounds.

Thank you for the quick response.  It appears that exposeAll is still not working correctly, but not only that, in addition, there still needs to be some way of telling the app bundle that it can look externally for anything under a certain path, EG: angular2/**/*
b.external('angular2', { allExposed: true })

Please, solve this issue :(

Hah, I came here exactly because of Angular 2.
So, I'm another vote for implementing this wildcard - I was expecting that the API worked the same way as the CLI, with globs, but it didn't.


Update stable version in repo from 1.6.4 to 1.8.0

Think about update stable version to 1.8.0
Version: stable=1.6.4 (68 days old) => latest=1.8.0 (15 days old)
Installs: stable=1757 (48.67%), latest=492 (13.63%), total=3610
Click to edit

Admin 5 kommt am 05.08/06.08 - nur zur Info


Not able to add more than 4 days of future forecast in lovelace card

I currently pull in 5 days into the future for my integration (_1d, _2d, ... _5d). When I try to add more than 4 days worth of sensors into the forecast section the card does not load. I prefer seeing a 5 day forecast, if it at all possible

this is a bug fixed with the new released version.

I was able to get the integration working, but I was referring to the new lovelace card. Though, I just went back and noticed I had an error in my yaml that was causing the issue. This can be closed.
Thanks for your work with this new API!


fix: Replace label-studio-converter to label-studio-sdk

Remove LS SDK dependency by copy-pasting the one function evalme was using from that repo, allowing us to remove the SDK dependency.

Verified that the decode_rle method is called in one of evalme's tests so merging


Update index.md

Added my (Brett Alberts) profile to the syllabus page.

nice job w/ this assignment @Wakunza !! :)


support SASL Auth

Need support SASL authentication. https://github.com/memcached/memcached/wiki/SASLHowto

this problem has already been created

Lets close the issue once the PR is merged, not before.

This issue also resolved


Reconstructable pkscript

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

84 of 272 (30.88%)  changed or added relevant lines in 4 files are covered.
5 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.02%) to 51.322%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

server.go
0
1
0.0%

txscript/standard.go
44
52
84.62%

wire/leaf.go
40
75
53.33%

blockchain/utreexoviewpoint.go
0
144
0.0%

Files with Coverage Reduction
New Missed Lines
%

blockchain/utreexoviewpoint.go
1
1.14%

wire/leaf.go
1
67.43%

peer/peer.go
3
74.59%

Totals

Change from base Build<PHONE_NUMBER>:
-0.02%

Covered Lines:
21965

Relevant Lines:
42798

💛  - Coveralls


Downgrade to support .Net 4.5 (instead of 4.5.1)

This change simply re-targets the projects to depend on .Net 4.5 instead of 4.5.1.

@JefWight,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

closing cause we solved this another way


Fix typo in MSStore get entitlement log

Microsoft Reviewers: Open in CodeFlow

You've forgot the dot after the "failed" word

Oops. Thanks for pointing out. Luckily it's fixed with the refactoring in this pr https://github.com/microsoft/winget-cli/pull/3172


Upgrade to DataFusion 19

Which issue does this PR close?

N/A
Rationale for this change

Keep up-to-date
What changes are included in this PR?

Are there any user-facing changes?

@simicd @jdye64 fyi


ast: add GrantRoleStmt to support GRANT ROLE

What problem does this PR solve?
add GrantRoleStmt to support SQL like GRANT Roles TO User.
What is changed and how it works?
Add ast.GrantRoleStmt
Check List
Tests

Unit test

Code changes

Has exported function/method change
Has exported variable/fields change

Side effects
Related changes

LGTM


Architectural diagram

You code café presentation had a nice architecture diagram... I can't find it in this repository.
It is a shame - it is nice.
For PAC we did add such thing, e.g. https://github.com/Praqma/Praqmatic-Automated-Changelog/blob/master/docs/designview.png

Your drawing a bit nicer though :-)

I will add it to the project


Refactor sl-menu

The menu is view based and inefficiently recursive. It should be updated to have at least one sub-component and support component-based usage within an application.

Related to:

https://github.com/softlayer/sl-ember-components/issues/347
https://github.com/softlayer/sl-ember-components/issues/249
https://github.com/softlayer/sl-ember-components/issues/248
https://github.com/softlayer/sl-ember-components/issues/28

Resolved by https://github.com/softlayer/sl-ember-components/pull/499


[API] generate_qa_docs in trial_tasks.py

          generate_qa_docs in trial_tasks.py

Originally posted by @hongsw in https://github.com/Marker-Inc-Korea/AutoRAG/issues/987#issuecomment-2497547394

close at #1005


do not show claim button if the researcher profile already has an owner

The condition to show the claim button for a researcherProfile was to check

if claiming is enabled in cris config
if the user is not an admin user
if the owner of the researcherProfile is not the user, who is currently logged in

I think, the last check is obsolete. Instead it should get checked, if the profile has an owner at at all. If it is already linked to an eperson, the claim button should not get displayed at all, in my opinion.
This PR changes this behavior.

Hello olli-gold,
thank you for this PR but the case that you want remove is usefull to request a profile already ownered by the wrong person. The system should be open a form to send an email to the administrator.
I close this PR. Thank you again.

Right, but the claiming option for a profile, which is already owned, might be confusing. But I understand your objection, that for mistakes in the ownership this function is useful.
We will think about adopting this locally.


No API for saving changes made

I went through all the files and could not find a way to dump changes to either a new file or the same one (changes as in changing contents of dictionary)

It's now possible to write .player files and a few other formats. I'll create a separate issue specifically for BTreeDB5 (the world file format).


Allow deep linking to specific entries

It's great that we're able to go to a Harvester form that has an index configured, fill out the search form and pull up the latest entries (or a blank form) for the specified index—but for ease of communication, it'd also be useful to be able to link directly to that entry as needed.
Put differently: Rather than give someone (e.g., by email) the instructions to go to https://harvester.ap.org/d/1Bhmk_cLtqd7VjOUnnfHEeFltztZ_yCuisdrYFctCLFs and search for Sir Launcelot of Camelot, can we just send a link to https://harvester.ap.org/d/1Bhmk_cLtqd7VjOUnnfHEeFltztZ_yCuisdrYFctCLFs#index=Sir+Launcelot+of+Camelot?

Seems like if that argument is specified, we could just have the page automatically fire off the request to the form's /current as we currently do, just without the need for clicking the search button.


[Web] webdev could not run for this project

i do everything in  https://flutter.dev/docs/get-started/web
but when i use:

flutter pub global run webdev serve

i get an error
webdev could not run for this project.
You have a dependency on `cupertino_icons` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `flutter` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `flutter_test` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
pub finished with exit code 78

if i use --verbose, i get info:
#0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1      _DefaultPub.interactively (package:flutter_tools/src/dart/pub.dart:376:7)
<asynchronous suspension>
#2      PackagesForwardCommand.runCommand (package:flutter_tools/src/commands/packages.dart:239:15)
#3      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:797:18)
#4      _rootRunUnary (dart:async/zone.dart:1192:38)
#5      _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#6      _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#7      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:686:45)
#8      Future._propagateToListeners (dart:async/future_impl.dart:715:32)
#9      Future._completeWithValue (dart:async/future_impl.dart:526:5)
#10     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:560:7)
#11     _rootRun (dart:async/zone.dart:1184:13)
#12     _CustomZone.run (dart:async/zone.dart:1077:19)
#13     _CustomZone.runGuarded (dart:async/zone.dart:979:7)
#14     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1019:23)
#15     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#16     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#17     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#18     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

what‘s wrong? HELP！

Hi @LiXiangYu
There is no flutter pub global run webdev serve on  https://flutter.dev/docs/get-started/web
Make sure you are on latest beta, dev or master since web is not supported on stable channel
Enable web like this
flutter channel beta
flutter upgrade
flutter config --enable-web

Please execute flutter run -d chrome after enabling web using.
Closing, as this isn't an issue with Flutter itself,
if you disagree please write in the comments and I will reopen it
Thank you


Installation link not responding correctly

The downloads page at http://www.transcrypt.org/download refers the reader to http://sterlicht.alwaysdata.net/transcrypt.org/docs/html/installation_use.html#installation for details of "more complicated" situations.
This page currently responds with a 502 (Bad Gateway), displaying the message "Connection to upstream refused."

Thank you!
That link is outdated, will be adapted a.s.a.p.

Should be fixed now.
Let me know if it works for you.
Kind regards
Jacques

Yes, all good now thanks.


Support run_id param for thread retrieve message call, extend as MessageListRequest like VectorStoreFileListRequest : PaginationRequest

Is your feature request related to a problem? Please describe.
Trying to retrieve messages specific to a run - supported run_id param is not present
https://platform.openai.com/docs/api-reference/messages/getMessage
Describe the solution you'd like
extend pagination request as done for additional params exposed in VectorStoreFileListRequest
Describe alternatives you've considered
none- run_id does not belong on base

resolved
https://github.com/betalgo/openai/releases/tag/v9.0.1


rames

[Enter feedback here]

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

ID: 4f840a66-6ae0-29c7-fc1b-789862b9d107
Version Independent ID: ea8d797e-5591-72e4-b2b6-9423ff65420a
Content: Azure VPN Gateway topologies and design
Content Source: articles/Vpn-gateway/design.md
Service: VPN-gateway
GitHub Login: @cherylmc
Microsoft Alias: cherylmc

@ronsuno
It would be great if you could add a link to the documentation you are following for these steps? and elaborate you query for better understand, This would help us redirect the issue to the appropriate team. Thanks!

@ronsuno
We are going to close this thread, but if there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.


Allow larger systick delays

Just delays multiple times
Builds not in release mode often don't fit on target hardware and so it's easy to accidentally overflow.
For example, 500 ms with 48 MHz is too much
Also adds some documentation to the delay module and adds a warning to the systick implementation of timer.

We also have the problem elsewhere. As the maximum rvr value you can get with DelayMs and 48MHz is 0xBB80_0000, i'd be inclined to remove DelayMs and add documentation to the DelayUs function.

Why do you think we should remove delay_ms?

Screwed up my formatting, I only want to remove DelayMs<u32>

Hmm? I'd be inclined to keep it and document the limits personally, also make the internal calculation saturating or similar.

You only gain very little extra range (around 25% more, from 65s to 89s) compared to DelayMs<u16> and have a much higher chance to screw it up (assuming 48MHz). If you really needed it, you can just use DelayUs directly.
Saturating would also break the api contract, as we would delay less than promised. Making rvr u64 may be a better idea, we could also move the braces to enable the timer to work properly on frequencies less than 1MHz. No idea how good llvm optimizes that (probably not too shabby).

hmm, I'd strongly favour making rvr a u64 then.

i'd be inclined to remove DelayMs

No bueno, that's a breaking change and I'd rather not have them if we can avoid it.

No idea how good llvm optimizes that (probably not too shabby).

Always a good thing to measure/check the disassembly then just assume.

Ok, i've played around a bit in godbolt. My idea doesn't seem to get properly inlined and a 64 bit implementation leads to much more code. The implementation in the stm32f4 crate does get properly inlined and also leads to much more code.
It of course has the issue that frequencies lower than 1MHz result in 0 delay.
Doing just the inital multiplication in 64 bit like this:
let mut total_rvr = ((us as u64 * CLK as u64 )/ 1_000_000) as u32;

seems to result in the same inlined code as the normal implementation, but also works properly for lower frequencies.
Maybe we could also add a loop to DelayMs<u32> and split the delay up into 16 bit segments.

Not sure what I'm missing here. Can't we simply create a basic delay function which works in a certain range and split up longer delays in a loop calling the basic delay function as often as needed? Using u64 seems excessive and divisions on u64 are even more costly to emulate on Cortex-M0 than u32. Do you have a gist with the generated instructions somewhere?

If we have a clock with < 1MHz, the division is zero and there's no delay.

Is that an actual use case? Not even sure the rest of the HAL impl will work with such slow clocks.

If the compiler recognizes that the clock is a constant, it's no different to u32.

If the compiler detects that it is a constant it will compute everything straight away but that's not really a realistic assumption.

Otherwise you get calls to __aeabi_lmul and __aeabi_uldivmod

Yeah. And the latter is quite expensive. __aeabi_lmul is okay but a lot of overhead compared to not needing it. How can I see the code for those in godbolt?

This (of course) depends on lto. I haven't found a way yet to generate readable assembly with cargo, I'm probably just missing something.

Either via llvm-objdump (simplified access via cargo-binutils is possible) or via the usual arm-none-eabi-objdump which is what I'm using when inspecting assembly. But usually cargo-bloat alone is quite sufficient to tell whether an implementation is great or not so much. ;)

If we have a clock with < 1MHz, the division is zero and there's no delay.

We could simply special case that, too.

How can I see the code for those in godbolt?

I don't know, but cargo bloat tells me both together are about 1 kb (so it's quite a lot, as expected)

but that's not really a realistic assumption.

That's an issue because the u32 division is also quite slow and large at about 400 byte (as far as i can tell by looking at cargo bloat)

Not even sure the rest of the HAL impl will work with such slow clocks.

Most things seem to work fine. The clock config in RCC doesn't work and with horror i found this line in the i2c code:
        // We're using HSI here which runs at a fixed 8MHz
        const FREQ: u32 = 8_000_000;

We could simply special case that, too.

You mean via an if or features?

cargo bloat

Seems to get inlined in all examples.
But i found something i didn't like for the multiple pin implementation:
0.0%   3.6%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_set_low
0.0%   3.6%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_low
0.0%   3.6%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_set_low
0.0%   3.6%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_low

The register blocks don't fold

Most things seem to work fine. The clock config in RCC doesn't work and with horror i found this line in the i2c code:

    // We're using HSI here which runs at a fixed 8MHz
    const FREQ: u32 = 8_000_000;

What about that? Would you rather use SysClk and go through the troubles of calculating all the little details accurately?

You mean via an if

Via if or match.

The register blocks don't fold

😅

Would you rather use SysClk?

Oh, yeah forgot about i2c using hsi directly. Yeah, that's fine

Out of some reason only the 64 bit variant gets inlined in blinky_multiple (both  without special cases:
With (us * self.clocks.sysclk().0 / 1_000_000:
~/u/p/181127-embedded_rust-69/stm32f0xx-hal [delay] λ cargo bloat --features stm32f042 --example blinky_multiple --release
File  .text Size         Crate Name
0.0%   0.0%   0B               [0 Others]
0.2%  33.7% 288B     [Unknown] main
0.1%  16.9% 144B           std __udivmodsi4
0.1%  14.8% 126B           std __clzsi2
0.0%   8.4%  72B stm32f0xx_hal <stm32f0xx_hal::delay::Delay as embedded_hal::blocking::delay::DelayMs<u16>>::delay_ms
0.0%   7.5%  64B   cortex_m_rt Reset
0.0%   2.3%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_set_low
0.0%   2.3%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_low
0.0%   2.3%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_set_low
0.0%   2.3%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_low
0.0%   2.1%  18B     [Unknown] __aeabi_uidivmod
0.0%   1.6%  14B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_low
0.0%   1.6%  14B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_low
0.0%   1.4%  12B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_high
0.0%   1.4%  12B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_high
0.0%   0.2%   2B   cortex_m_rt HardFault_
0.0%   0.2%   2B           std core::ptr::drop_in_place
0.0%   0.2%   2B           std core::ptr::drop_in_place
0.0%   0.2%   2B   cortex_m_rt DefaultPreInit
0.0%   0.2%   2B   cortex_m_rt DefaultHandler_
0.5% 100.0% 854B               .text section size, the file size is 179.6KiB

With             ((us as u64 * self.clocks.sysclk().0 as u64) / 1_000_000) as u32
~/u/p/181127-embedded_rust-69/stm32f0xx-hal [delay] λ cargo bloat --features stm32f042 --example blinky_multiple --release
Compiling ...
Analyzing target/thumbv6m-none-eabi/release/examples/blinky_multiple

File  .text Size         Crate Name
0.0%   0.0%   0B               [0 Others]
0.3%  52.0% 288B     [Unknown] main
0.1%  11.6%  64B   cortex_m_rt Reset
0.1%  10.8%  60B stm32f0xx_hal <stm32f0xx_hal::delay::Delay as embedded_hal::blocking::delay::DelayMs<u16>>::delay_ms
0.0%   3.6%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_set_low
0.0%   3.6%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_low
0.0%   3.6%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_set_low
0.0%   3.6%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_low
0.0%   2.5%  14B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_low
0.0%   2.5%  14B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_low
0.0%   2.2%  12B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_high
0.0%   2.2%  12B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_high
0.0%   0.4%   2B   cortex_m_rt HardFault_
0.0%   0.4%   2B           std core::ptr::drop_in_place
0.0%   0.4%   2B           std core::ptr::drop_in_place
0.0%   0.4%   2B   cortex_m_rt DefaultPreInit
0.0%   0.4%   2B   cortex_m_rt DefaultHandler_
0.5% 100.0% 554B               .text section size, the file size is 111.1KiB

But i found something i didn't like for the multiple pin implementation:
0.0%   3.6%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_set_low
0.0%   3.6%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_low
0.0%   3.6%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_set_low
0.0%   3.6%  20B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_low

The register blocks don't fold

That is I believe the expected behaviour for dynamic trait dispatch.

Out of some reason only the 64 bit variant gets inlined in blinky_multiple (both without special cases:

The inlining limits are weird. Using toggle() and one delay() instead of separate sets and 2 delay()s got rid of the division and now it's back again. Needs a lower level look at things... If you want to compare apples to apples you might want to get rid of those non-differences first.

That is I believe the expected behaviour for dynamic trait dispatch.

I didn't expect them to not deduplicate functions:
08000224 <_ZN92_$LT$stm32f0..stm32f0x2..gpioa..RegisterBlock$u20$as$u20$stm32f0xx_hal..gpio..GpioRegExt$GT$6is_low17hb5a7dc3eef04c80bE>:
 8000224:	221f      	movs	r2, #31
 8000226:	400a      	ands	r2, r1
 8000228:	2101      	movs	r1, #1
 800022a:	4091      	lsls	r1, r2
 800022c:	6902      	ldr	r2, [r0, #16]
 800022e:	400a      	ands	r2, r1
 8000230:	2000      	movs	r0, #0
 8000232:	1a80      	subs	r0, r0, r2
 8000234:	4150      	adcs	r0, r2
 8000236:	4770      	bx	lr

08000266 <_ZN92_$LT$stm32f0..stm32f0x2..gpiof..RegisterBlock$u20$as$u20$stm32f0xx_hal..gpio..GpioRegExt$GT$6is_low17h644da3bb053a20a8E>:
 8000266:	221f      	movs	r2, #31
 8000268:	400a      	ands	r2, r1
 800026a:	2101      	movs	r1, #1
 800026c:	4091      	lsls	r1, r2
 800026e:	6902      	ldr	r2, [r0, #16]
 8000270:	400a      	ands	r2, r1
 8000272:	2000      	movs	r0, #0
 8000274:	1a80      	subs	r0, r0, r2
 8000276:	4150      	adcs	r0, r2
 8000278:	4770      	bx	lr

I think this is probably a good idea for a bug report, since it's a really obvious optimization. But where?

@david-sawatzke
Just for comparison sake (old implementation on top, example using toggle() at the bottom):
# cargo bloat --release --example blinky_multiple --features="stm32f042,rt"
Compiling ...
Analyzing target/thumbv6m-none-eabi/release/examples/blinky_multiple

File  .text Size         Crate Name
0.0%   0.5%   4B               [2 Others]
0.1%  34.0% 292B     [Unknown] main
0.1%  16.7% 144B     [Unknown] __udivmodsi4
0.1%  14.7% 126B     [Unknown] __clzsi2
0.0%   7.9%  68B stm32f0xx_hal <stm32f0xx_hal::delay::Delay as embedded_hal::blocking::delay::DelayMs<u16>>::delay_ms
0.0%   7.4%  64B   cortex_m_rt Reset
0.0%   2.1%  18B     [Unknown] __aeabi_uidivmod
0.0%   2.1%  18B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_set_low
0.0%   2.1%  18B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_low
0.0%   2.1%  18B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_set_low
0.0%   2.1%  18B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_low
0.0%   1.6%  14B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_low
0.0%   1.6%  14B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_low
0.0%   1.4%  12B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_high
0.0%   1.4%  12B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_high
0.0%   0.7%   6B           std core::panicking::panic
0.0%   0.7%   6B           std core::panicking::panic_fmt
0.0%   0.2%   2B   cortex_m_rt HardFault_
0.0%   0.2%   2B           std core::ptr::real_drop_in_place
0.0%   0.2%   2B           std core::ptr::real_drop_in_place
0.0%   0.2%   2B    panic_halt rust_begin_unwind
0.4% 100.0% 860B               .text section size, the file size is 218.2KiB

# cargo bloat --release --example blinky_multiple --features="stm32f042,rt"
Compiling ...
Analyzing target/thumbv6m-none-eabi/release/examples/blinky_multiple

File  .text Size         Crate Name
0.0%   0.0%   0B               [0 Others]
0.3%  60.6% 304B     [Unknown] main
0.1%  12.7%  64B   cortex_m_rt Reset
0.0%   3.6%  18B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_set_low
0.0%   3.6%  18B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_low
0.0%   3.6%  18B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_set_low
0.0%   3.6%  18B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::is_low
0.0%   2.8%  14B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_low
0.0%   2.8%  14B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_low
0.0%   2.4%  12B stm32f0xx_hal <stm32f0::stm32f0x2::gpiof::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_high
0.0%   2.4%  12B stm32f0xx_hal <stm32f0::stm32f0x2::gpioa::RegisterBlock as stm32f0xx_hal::gpio::GpioRegExt>::set_high
0.0%   0.4%   2B   cortex_m_rt HardFault_
0.0%   0.4%   2B           std core::ptr::real_drop_in_place
0.0%   0.4%   2B           std core::ptr::real_drop_in_place
0.0%   0.4%   2B   cortex_m_rt DefaultPreInit
0.0%   0.4%   2B   cortex_m_rt DefaultHandler_
0.4% 100.0% 502B               .text section size, the file size is 116.1KiB

Ok, I think in the current state, this PR is a definite improvement. I may play around with optimizations in the future, but I think it's ready to merge as it currently stands.

@david-sawatzke Please add it to the CHANGELOG.md, then I'll merge it.

Done


Error what():  std::bad_alloc when trying https://github.com/faustomorales/keras-ocr#Using

It raise error when I try to run https://github.com/faustomorales/keras-ocr#Using
Looking for /home/nghiacv/.keras-ocr/craft_mlt_25k.h5
2020-08-12 16:39:00.748298: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-08-12 16:39:00.770506: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error
2020-08-12 16:39:00.770549: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (LAP60377): /proc/driver/nvidia/version does not exist
2020-08-12 16:39:00.770863: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-08-12 16:39:00.797939: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency:<PHONE_NUMBER> Hz
2020-08-12 16:39:00.798563: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f5294000b20 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-08-12 16:39:00.798592: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
WARNING:tensorflow:From /home/nghiacv/.local/lib/python3.6/site-packages/tensorflow/python/keras/backend.py:5871: sparse_to_dense (from tensorflow.python.ops.sparse_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Create a `tf.sparse.SparseTensor` and use `tf.sparse.to_dense` instead.
Provided alphabet does not match pretrained alphabet. Using backbone weights only.
Looking for /home/nghiacv/.keras-ocr/crnn_kurapan_notop.h5
2020-08-12 16:39:06.444293: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 989331456 exceeds 10% of free system memory.
2020-08-12 16:39:07.329766: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 989331456 exceeds 10% of free system memory.
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

Please provide exactly the code you used (especially if you switch the images from the ones in the README to your own) and information about your environment (RAM, CPU, OS, TensorFlow version). Those two things will help folks reproduce and diagnose. Thanks!

I realized that when I restarted my computer, It ran ok. So, maybe Ram issue raised it. Thanks so much