text:
Perform dns resolve via custom dns only for specified urls

SpoofDPI resolves all hosts via specified dns (8.8.8.8 as default) even if you want to use it only for specified urls.
It is not convenient when you use work vpn (which rewrites dns for internal hosts).

I agree with you that we need something like this, would you just let me do this for later? because i think there need to be some refactoring to do this.

This has been implemented on release v0.10.6. Thank you for your suggestion.

source: gharchive/pull-request

authors: dedefer xvzc

repo: xvzc/SpoofDPI

license_type: permissive

license_source: github-api


text:
List IPs currently in the jail?

Hi,
Thanks a lot for publishing this software as an open source package! We use it on transport.data.gouv.fr.
In https://github.com/etalab/transport-site/pull/3659 we wanted to list IP addresses currently jailed. There isn't a method available to do this at the moment so we called internal APIs.
def ips_in_jail do
  # See https://github.com/xward/phoenix_ddos/blob/master/lib/phoenix_ddos/core/jail.ex
  {:ok, keys} = Cachex.keys(:phoenix_ddos_jail)
  keys |> Enum.map(&to_string/1) |> Enum.reject(&String.starts_with?(&1, "suspicious_"))
end

What do you think about adding this method? And how I did it? I can submit a PR.
Thanks!

Yes that's a great idea ! will add it in next release very soon.

Thanks a lot for publishing this software as an open source package! We use it on transport.data.gouv.fr.
Thank for this very nice feedback.

I took the liberty do to it myself, you can have a look on the code here, I took the opportunity to add a few more things.

@xward Thank you Xavier for the additions! Going to use them straight away on our side.

source: gharchive/issue

authors: AntoineAugusti xward


text:
How to provide scroll for generated layout?

Describe the Bug
In my use case, the generated layout is complex and that doesn't fit in the window, it overflows.
I should be able to give a scroll to scroll up and down and see the layout.
How can we achieve that?
Your Example Website or App
https://codesandbox.io/s/sandpack-project-forked-me9c5t?file=/App.js
Steps to Reproduce the Bug or Issue

Open Codesandbox link.
You'll not be able to scroll the layout.

Expected behavior
As a user, I expected the scroll option and I should be able to scroll and see the overflown content, similar to scrolling any page which has hidden content.
Screenshots or Videos
No response
Platform

OS:  Windows
Browser: Chrome

Additional context
No response

Please do not use Github Issues for questions about the usage of React Flow, instead please refer to the Discord channel or Stackoverflow to get help from the community.
You are setting panOnScroll to false. That's why you can't scroll inside the viewport.

Hi @chrtze ,
I tried giving panOnScroll to true,
But I see so much empty space being added on the top and bottom of the layout.
Could you please check and let me know.

By default, the canvas is infinite. This is the expected behaviour. To limit the canvas, please use translateExtent.

How to do it? I encountered the same problem

authors: YumiJson chrtze jayanthbondi

repo: xyflow/xyflow

license: MIT


text:
Setting translateExtent makes diagram jump

Describe the Bug
If translateExtent is set, scrolling the diagram the first time makes it jump. (I may be using the prop incorrectly though)
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue

Open https://codesandbox.io/s/sandpack-project-forked-ctyt0h?file=/Flow.js (borrowed it from https://github.com/xyflow/xyflow/discussions/2428?sort=top?sort=top)
Try scrolling the diagram

Expected behavior
No jump
Screenshots or Videos
No response
Platform

OS: macOS
Browser: Chrome
Version: 11

Additional context
No response

I think the problem may related with code here: packages/system/src/xypanzoom/XYPanZoom.ts. I guess this can be fixed by setting translateExtent to the maximum of the user's setting and the viewport size, and a warning should be printed to the console if the viewport size is used.
And if anyone faces the same problem, you can see my code (https://github.com/loggerhead/json4u/pull/40/files) for refrence.

i met the same problem too

authors: loggerhead mikalai-sauchanka scarqin


text:
Dynamic Grouping demo bugs. getIntersectingNodes return wrong result

What platform were you using when you found the bug?

React Flow / Svelte Flow version:  @xyflow/react@12.3.6 vite@4.5.5
Browser and version:  Edge 131.0.
OS and version: windows11

Live code example
https://pro.reactflow.dev/examples/react/dynamic-grouping
Describe the Bug
Detach node from group. Its ok
dragging node far away from group. Its ok
But after dragging stop, the node related to the group again
https://github.com/user-attachments/assets/783e31b5-a93a-402f-9c09-38d3a842308e
Steps to reproduce the bug or issue
Just download the code.
run npm i && npm run dev
change nothing!
then reproduce the bug
Expected behavior
expected node has no relation with group
Screenshots or Videos
I fount in onNodeDragStop, the getIntersectingNodes return group node after dragging node far away from group

Additional context
No response

@xyflow/react 12.3.5 version is ok. Maybe some changes in 12.3.6 caused this error


text:
Update mockito-core to 5.1.1

Updates org.mockito:mockito-core from 4.11.0 to 5.1.1.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

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

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

labels: test-library-update, early-semver-major, semver-spec-major, commit-count:1

Superseded by #231.

repo: y-yu/kindle-clock


text:
🛑 RT Home is down

In 9805a13, RT Home (https://rt.neody.land/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: RT Home is back up in 60effd9 after 33 minutes.

repo: yaakiyu/upptime


text:
Increase open_cursors value to 1200

To support Rails 5.1 default connection pooling configuration.

Closed by rsim/oracle-enhanced#1431

repo: yahonda/rails-dev-box

license: mit

license_source: bigquery


text:
navigateAction doesn't update address bar

I ran into the same question as #57, and likewise I decided that navigateAction was the right solution. While it works in the DOM redirecting to the home page after login, the address bar remains unchanged.

Is it possible to share the sample code of how you execute navigateAction?

It is run from another action, login:
'use strict';
var request = require('superagent');

var navigateAction = require('flux-router-component').navigateAction;

module.exports = function(context, payload, done){
	request.post('/auth/login')
	   .send(payload)
	   .end(function(res){
	     if (res.ok) {
	       context.executeAction(navigateAction, { url: '/' }, function(){});
	     } else {
	       alert('Error ' + res.text);
	     }
	   });
}

Adding type: 'click' to the payload fixes it. Why? Looking over navigate.js, I don't see where type is used.

Its used by RouterMixin: https://github.com/yahoo/flux-router-component/blob/master/lib/RouterMixin.js#L107
We should add a default type to allow programmatic navigation.

@kilometers  Please upgrade to 0.5.4.  You can leave out the navigate type now.  It will use default as the type, and handled by RouterMixin the same way as click.

@kilometers I am closing this issue.  Feel free to re-open if you need to.

authors: kilometers lingyan

repo: yahoo/flux-router-component


text:
Intermittent test failure PulsarClientToolTest.testInitialzation

testInitialzation(com.yahoo.pulsar.client.cli.PulsarClientToolTest)  Time elapsed: 10.01 sec  <<< FAILURE!
org.testng.internal.thread.ThreadTimeoutException: Method org.testng.internal.TestNGMethod.testInitialzation() didn't finish within the time-out 10000
Results :
Failed tests:
  PulsarClientToolTest.testInitialzation » ThreadTimeout Method org.testng.inter...

This does not seem to be an issue anymore.

Seen it again on your PR :)
Whenever  I get time, I'll try to reproduce in a local Docker container.

Closing as it didn't reproduce in a long time

authors: merlimat radekg

repo: yahoo/pulsar


text:
Add the @Constants annotation for constant holding static inner classes in

Most constants can safely be copied directly to the generated model. However, constants that are defined using table schema fields (e.g. from Properties, Table, View, like public static final Order DEFAULT_ORDER = Model.COLUMN.asc()) may run into class loading order issues where the fields needed to initialize the constant have not yet themselves been initialized at class loading time. (This is discussed in more detail in #110.
This commit allows constants to be declared in a static inner class of the model spec, effectively deferring initialization of copied constants until after the full schema has been initialized. The old behavior of directly copying constants has been left intact so those who don't need this control over class loading order can use things as they always have.

LGTM

authors: jdkoren sbosley

repo: yahoo/squidb


text:
[QUESTION] Datatable localization

Hello,
could somebody explain me how I can translate my Datatable? For example
localhost/en/page
| id | fistname | lastname |
localhost/de/page
| id | vorname | nachname |
I am using this package for localization: https://github.com/mcamara/laravel-localization

I am not really using any localization yet on any of my projects so I may not be able to answer this. Lets wait for other users feedback I guess.
Anyways, have you tried using trans() or __() helper when rendering the table markup?

Use trans or __ helper to localize server-side strings: column title, contents...
Use language datatables option to localize datatables.js: "Loading..." "No matching records found", etc, see https://datatables.net/plug-ins/i18n/

The problem is where to add the code?

I added the language parameter into the parameter function in html function according to this link.
I put the lang file under public\vendor\datatables\lang\{lang}.json.
public function html()
{
        return $this->builder()
            ->columns($this->getColumns())
            ->addAction(['width' => '150px', 'title' => trans('labels.general.actions')])
            ->ajax('')
            ->parameters([
                'language' => [
                    'url' => url('/vendor/datatables/lang/'.config('app.locale').'.json'),//<--here
                ],
                // other configs
            ]);
}

Thanks!!!

authors: ElfSundae PortStone heitor-esales skys215 yajra

repo: yajra/laravel-datatables


text:
Can I train yolov1 by using single GPU?

Hi. Thanks for your great works.
I have one GPU, so I can use single GPU training strategy.
But in https://github.com/yakhyo/yolov1-pytorch/blob/main/main.py#L63, I think your codes use multi GPU strategy.
How can I train using single GPU?
Thanks.

Hi @PeterKim1, it should work for single GPU also


text:
feat: add accessibility documentation for Select component

Closes https://github.com/yamada-ui/yamada-ui/issues/1550
Description

In English

In Japanese

Current behavior (updates)

New behavior

Is this a breaking change (Yes/No):

Additional Information

thank PR!!
LGTM

I will report back as soon as other accessibility fixes are completed!

repo: yamada-ui/yamada-ui


text:
Do we have to create custom resolvers for arrays of ObjectID's in order to get subfield access in graphql?

It's an awesome project, I'm just trying it out now, and wondering whether this can't be automated or if it is what I'm missing?
As an example if you have a CAR model, that has many PARTS and you store them as an array of objectids, it looks like you have to resort to custom resolvers to get it working in a way that allows you to access those subfields?

This is already implemented, see: https://github.com/yamalight/graffiti/tree/master/examples/relations

This is already implemented, see: https://github.com/yamalight/graffiti/tree/master/examples/relations

Hey thanks for responding,
So using that example I can get this kind of data structure
{
  "data": {
    "noteMany": [
      {
        "_id": "5ffb4fad5af85cbae8a50c0f",
        "name": "First Ever Note",
        "group": {
          "_id": "5ffb4f6d5af85cbae8a50c0d",
          "name": "Main Group"
        }
      },
      {
        "_id": "5ffb4fc15af85cbae8a50c10",
        "name": "Second Note we've created",
        "group": {
          "_id": "5ffb4f6d5af85cbae8a50c0d",
          "name": "Main Group"
        }
      },
      {
        "_id": "5ffb4fd65af85cbae8a50c11",
        "name": "Third Note with no group",
        "group": null
      },
      {
        "_id": "5ffb502a5af85cbae8a50c12",
        "name": "Fourth Note",
        "group": {
          "_id": "5ffb4f745af85cbae8a50c0e",
          "name": "Secondary Group"
        }
      }
    ]
  }
}

and:
{
  "data": {
    "collectionMany": [
      {
        "_id": "5ffb4f6d5af85cbae8a50c0d",
        "name": "Main Group"
      },
      {
        "_id": "5ffb4f745af85cbae8a50c0e",
        "name": "Secondary Group"
      }
    ]
  }
}

My knowledge is pretty thinly spread so apologies if this is totally obvious but I'm struggling to understand.
If I was to create a Post, and a single Post could have many Comments, in GraphQL I would expect to be able to query those Comments from within the Post query wouldn't I? So in the example above each collection has a number of notes assigned, but there's no way of accessing them directly that I can see.
Hopefully I'm making sense.

Hey thanks for responding,
So using that example I can get this kind of data structure
{
  "data": {
    "noteMany": [
      {
        "_id": "5ffb4fad5af85cbae8a50c0f",
        "name": "First Ever Note",
        "group": {
          "_id": "5ffb4f6d5af85cbae8a50c0d",
          "name": "Main Group"
        }
      },
      {
        "_id": "5ffb4fc15af85cbae8a50c10",
        "name": "Second Note we've created",
        "group": {
          "_id": "5ffb4f6d5af85cbae8a50c0d",
          "name": "Main Group"
        }
      },
      {
        "_id": "5ffb4fd65af85cbae8a50c11",
        "name": "Third Note with no group",
        "group": null
      },
      {
        "_id": "5ffb502a5af85cbae8a50c12",
        "name": "Fourth Note",
        "group": {
          "_id": "5ffb4f745af85cbae8a50c0e",
          "name": "Secondary Group"
        }
      }
    ]
  }
}

and:
{
  "data": {
    "collectionMany": [
      {
        "_id": "5ffb4f6d5af85cbae8a50c0d",
        "name": "Main Group"
      },
      {
        "_id": "5ffb4f745af85cbae8a50c0e",
        "name": "Secondary Group"
      }
    ]
  }
}

My knowledge is pretty thinly spread so apologies if this is totally obvious but I'm struggling to understand.
If I was to create a Post, and a single Post could have many Comments, in GraphQL I would expect to be able to query those Comments from within the Post query wouldn't I? So in the example above each collection has a number of notes assigned, but there's no way of accessing them directly that I can see.
Hopefully I'm making sense.

@Cigoler yep, in that case you'll need to define custom resolver (see this example).
This is required because in your schema you only have one relation ("comment belongs to post"), whereas you want to run custom query ("give me all comments for current post").
If you design your relations in a way where "post has many comments" - query would work without need for any additional resolvers (but querying the other way around would likely require additional custom resolvers).

@Cigoler yep, in that case you'll need to define custom resolver (see this example).
This is required because in your schema you only have one relation ("comment belongs to post"), whereas you want to run custom query ("give me all comments for current post").
If you design your relations in a way where "post has many comments" - query would work without need for any additional resolvers (but querying the other way around would likely require additional custom resolvers).

Cheers, that's the one, I figured I'd had to write some extra code but that's not too bad.

Cheers, that's the one, I figured I'd had to write some extra code but that's not too bad.

authors: Cigoler yamalight

repo: yamalight/graffiti


text:
YAML Test Suite integration is too complicated

The code for testing libyaml with the YAML Test Suite Data, as well as the list of tests to skip (because libyaml doesn't pass them) is not in master. It's in a branch. To be more specific, it's in 3 different branches.
Maintaining it is no fun, it's additional work that would normally not be necessary.
Here is an example where it would have saved work if the skiplist was kept in master:
https://github.com/yaml/libyaml/pull/162
The original reason was to have less commits in master:
https://github.com/yaml/libyaml/pull/82

This allows us to have lots of developmental activity to the tests without
disrupting master. Since a lot of things repackage libyaml, the master activity
will only be for actual bugfixes and enhancements.

I never understood that reason.
I am working for a linux vendor, and I have never heard a complaint "Oh, there was a commit in $projextX, but it was only a commit regarding tests. So annoying."
Still, in reality, I seem to be the one who has to deal with it.
I'm contributing to pyyaml, yaml-test-suite, yaml-text-matrix, yaml-runtimes and several other projects, and maintaining things can include a lot of unpleasant tasks, but this one is unnecessary IMHO, and I have a limited amount of time.
I vote for getting the testsuite stuff back into master.

My stance on this is that libyaml and the the yaml-test-suite are 2 different projects. I asserted that while it's fine to use the suite as a test, the libyaml project should not be tightly coupled to it. Referencing yaml-test-suite commits in libyaml's master branch, tightly couples it.
There are ways to loosely couple. One would be to make an entirely different repo called libyaml-test, whose purpose is to test libyaml against the suite. Effectively that's what I tried on a branch of libyaml instead of a separate repo.
I have an idea I'd like to try that goes something like this:

Make a new testing branch
It contains a Makefile and a skip list
The Makefile points to the commits of master and yaml-test-suite to use
make test runs against the commits in the Makefile
make test-head runs against HEAD of both libyaml and yaml-test-suite
make update updates the Makefile with the current HEAD commits

This is a compromise. I know you want the yaml-test-suite to be directly referenced in master. I do not. This is simpler than the pin branch thing. I'll make prototype this week. Please give it a try.

See https://github.com/yaml/libyaml/pull/184
We can't use GitHub Actions because it relies on finding the right commit in master.

I will give up on libyaml if organizing testing takes more time than actual code fixes :(

I got your GitHub actions branch working with this one line fix: https://github.com/yaml/libyaml/commit/4f1dccffcb4b8b1c4232713e5521aa620ad6dfd4
There was no problem with the test suite itself.
I did add a couple environment variables to allow you to override the pins. Hopefully that makes things easier for you.

@perlpunk I made the testing branch that I described above on March 30.
git clone --branch=testing git@github.com:yaml/libyaml
cd libyaml
make test

There is no pinning file to deal with.
The pinning happens in https://github.com/yaml/libyaml/blob/testing/Makefile#L1-L7
ie when you need to add new pinning just update the COMMIT vars in the Makefile and commit it to the testing branch.
You can also run with overrides like this:
make test LIBYAML_HEAD_COMMIT=... TEST_SUITE_DATA_COMMIT=...

Give it a try, and see if it works out better for you. I'm sure it can still be improved.

Like discussed in chat, the testing branch suggestion didn't work out.
For reference, the new suggestion: #188

Just for the record, here is my suggestion: #192

authors: ingydotnet perlpunk

repo: yaml/libyaml


text:
Split dbms/src/Server to dbms/programs/*

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Squashed manually:
https://github.com/yandex/ClickHouse/commit/51044279e5921dba4bc7cb70ab203589cc7fb126

authors: alexey-milovidov proller

repo: yandex/ClickHouse


text:
Проблема с LowCardinality

При попытке запросить данные атрибута в таблице с типом LowCardinality получаю ошибку.
An error occurred while loading the data.
invalid map<K, T> key
Подскажите, это баг драйвера, или нужно какие-то настройки подкрутить?

Неправильный быстрофикс: https://github.com/yandex/clickhouse-odbc/pull/158
Правильный, но со следующим релизом ClickHouse: https://github.com/yandex/ClickHouse/pull/4381

Извиняюсь за глупый вопрос, чтобы пощупать изменения нужно ждать новый релиз драйвера?

authors: DNEGREEV proller

repo: yandex/clickhouse-odbc


text:
🛑 Umami is down

In 8eebc2e, Umami (https://umami.icloudnative.io) was down:

HTTP code: 503
Response time: 1717 ms

Resolved: Umami is back up in c2e497f.

repo: yangchuansheng/upptime


text:
🛑 Umami is down

In 0d32227, Umami (https://umami.icloudnative.io) was down:

HTTP code: 503
Response time: 1576 ms

Resolved: Umami is back up in b08de7a.


text:
The eslint-config-airbnb rule value has less length than allowed.

/Users/gov/docroot/themes/usda/node_modules/gulp-eslint/node_modules/eslint/lib/config/config-file.js:402
throw e;
^
Error: /Users/gov/docroot/themes/usda/node_modules/eslint-config-airbnb/rules/react.js:
Configuration for rule "react/boolean-prop-naming" is invalid:
Value "" has less length than allowed.
Referenced from: eslint-config-airbnb

What does npm ls print out? If it exits nonzero, your dep graph is invalid.

AOCDCWA22000005:usda$ npm ls
usda-theme@1.0.0 /Users/gov/docroot/themes/usda
├─┬ autoprefixer@9.1.2
....
── UNMET PEER DEPENDENCY eslint@^4.19.1 || ^5.3.0
├─┬ eslint-config-airbnb@17.1.0
│ ├── UNMET PEER DEPENDENCY eslint@^4.19.1 || ^5.3.0
....
npm ERR! peer dep missing: eslint@^4.19.1 || ^5.3.0, required by eslint-config-airbnb@17.1.0
npm ERR! peer dep missing: eslint@^4.19.1 || ^5.3.0, required by eslint-config-airbnb-base@13.1.0
npm ERR! peer dep missing: eslint@2.x - 5.x, required by eslint-plugin-import@2.14.0
npm ERR! peer dep missing: eslint@^3 || ^4 || ^5, required by eslint-plugin-jsx-a11y@6.1.1
npm ERR! peer dep missing: eslint@^3.0.0 || ^4.0.0 || ^5.0.0, required by eslint-plugin-react@7.11.1
npm ERR! peer dep missing: eslint@^4.19.1 || ^5.3.0, required by eslint-config-airbnb-base@13.1.0
Seems I need to install all of missing parts.

The Airbnb config has an empty string as the message, but disables the rule:  https://github.com/airbnb/javascript/blob/685f37be39fd01bcfdd349de9acdcd5a50414520/packages/eslint-config-airbnb/rules/react.js#L405
If you are enabling it, you’ll have to configure the message yourself.

repo: yannickcr/eslint-plugin-react


text:
self-closing-comp warns on elements with whitespace children.

 is NOT supposed to be self-closing - the whitespace is reduced to a single space, but it's definitely not zero spaces. Currently the rule recommends that this JSX be self-closed, but that would result in the removal of a space.

Seems difficult for this rule to know when the space is intentional vs a result of some refactoring. The rule currently supports
{' '}
 as valid. Which helps the rule know that the space is intentional. Seems like if we make the rule support

 it could miss the more likely case where it was a left over from refactoring.
Seems like it might be better to update the documentation for the rule to show that
{' '}
 is valid.

The point of the rule is that I should be able to autofix the violations and not change the meaning of the JSX.
If I have

 the rule should be telling me to change it to
{' '}
, but NOT to change it to
 - and since it's "self-closing-comp", it should only be warning on things that changing to self-closing is 100% identical.

This, and #1717, were fixed by #2210.

authors: ljharb petersendidit


text:
[BUILD] Correct test-jar scope

Why are the changes needed?

Following #471
How was this patch tested?

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

[ ] Add screenshots for manual tests if appropriate

[ ] Run test locally before make a pull request

thanks, merged to master for v1.2.0

repo: yaooqinn/kyuubi


text:
Camping

I've tested bots on hostage maps, for example like cs_italy2, cs_militia etc. I've noticed that, most of the time, Terrorist bots don't go outside their base range, they'll most of the time protect the hostages, instead of going outside and confronting the CT's. Can it be balanced a little bit towards aggression/confrontation. I've tried setting "yb_camping_allowed" to "0", but it still didn't solve it.

jeefo, and also try cs_assault_delta for the test camping of t-team

I think i've tried cs_assault yesterday, they rarely go out of their way to attack CT's. Mostly they're circling around inside the base.

EDIT: tried cs_delta_assault, most T's stay inside the base, only 1 or 2 go out.

It's because of the buggy graph.
It got into the database because someone updated YaPB where graph auto-collection is enabled by default, which doesn't check graphs for errors.

Agree with @Vladislav4KZ it's totally bugged graph. If some can, it's would be good to create new one for this famous map.

check the latest build, should be a little better

Unrelated to this issue. And...
https://github.com/yapb/yapb/assets/1781346/9b1f674f-9e8c-4b1b-9b7b-651a19ff8872

Попробовал с семиклипом, тоже никак, нужно видео, желательно с yb_debug 2

closed as inactive

authors: SuperCHAOSXXX Vladislav4KZ jeefo

repo: yapb/yapb


text:
Streaming endpoints

I'm getting a 502 (bad gateway) when calling my serverless function (API endpoint) that has a streaming response:
src/routes/api/soap/format.ts
...
export const POST: RequestHandler = async ({ request }) => {
  response = await openai.createChatCompletion({
      model: model,
      messages: [{ role: 'user', content: prompt }],
      stream: true,
    }, { responseType: 'stream' }
  );

  const customReadable = new ReadableStream({
    start(controller) {
      response.data.on('data', (data: Buffer) => {
        // ...etc
      });
    }
  });

  return new Response(customReadable, {
    headers: { 'Content-Type': 'text/html; charset=utf-8' },
  });
  ...

This works locally. Any idea what needs to be adjusted on CloudFront or Lambda to allow for streaming output?

Unfortunately, my adapter does not yet support request streaming, Amazon actually added support for request streaming for lambda a few months ago https://aws.amazon.com/blogs/compute/introducing-aws-lambda-response-streaming/. It’s not something that’s on my horizon to implement, but would appreciate a pull request if you would like to implement

authors: yarbsemaj zamoshchin

repo: yarbsemaj/sveltekit-adapter-lambda


text:
[FEATURE]: Dark Mode

Which tool
Tidal-Media-Downloader
Describe the feature
Please Include dark mode in future releases.
Add screenshots
No response

Please go to 'SETTINGS', scroll down to 'Theme' and in drop-down menu select 'Dark'
Hope this will solve your problem for now.

repo: yaronzz/Tidal-Media-Downloader-PRO


text:
interpolatedString seems undefined

Describe the bug
When running pnpm dev, I get the following:
D:/somefolder/node_modules/.pnpm/astro-i18next@1.0.0-beta.21_astro@2.6.3/node_modules/astro-i18next/src/utils.ts:59
    interpolatedString = interpolatedString.replaceAll(
                                            ^

TypeError: Cannot read properties of undefined (reading 'replaceAll')

To Reproduce
Steps to reproduce the behavior:

Create an astro project with pnpm
Add astro-18next and setup
Run pnpm dev
See error

Expected behavior
Shouldn't crash
Context (please complete the following information):

astro-i18next version: ^1.0.0-beta.21
astro version: ^2.3.0
OS: Windows 11
Browser: Brave

Same problem here using <Trans /> component.

No I was trying to migrate an existing project and gave up

I'm not using the Trans component anymore so I could migrate to pnpm but still, no solution here

Seems like its incompatible with i18next@23.x.x. Downgrading to v22 resolved the issue for me.

If it helps anyone:
If you install react-i18next, it uses version 23 by default and breaks this library, with this same error, the solution is to set the i18next version to the latest compatible version, in my case it was:
     "i18next": "22.5.1",

authors: estebanprimost florian-lefebvre fruchtzwerg santi020k


text:
picture.nil? NoMethodError: undefined method `value' for nil:NilClass

some profiles have a problem with picture.
puts profile.picture
NoMethodError: undefined method `value' for nil:NilClass

I experience the same problem.
Apparently
(@page.at(".profile-picture img").attributes["src"].value.strip if @page.at(".profile-picture img"))

in profile.rb fails. It looks like on some profiles the profile IMG tag is present, but it is missing the SRC attribute...

I did some more digging. On one of the problematic profiles I found this (this is the content of @.page.at(".profile-picture img"):
 #<Nokogiri::XML::Element:0x2ad9dcaf0088 name="img" attributes=[
#<Nokogiri::XML::Attr:0x2ad9dceb8648 name="lazyload" value="true">,
#<Nokogiri::XML::Attr:0x2ad9dceb8634 name="class" value="image photo lazy-load">,
#<Nokogiri::XML::Attr:0x2ad9dceb8620 name="alt" value="Piotr Rykaczewski">,
#<Nokogiri::XML::Attr:0x2ad9dceb860c name="data-delayed-url"
value="https://media.licdn.com/mpr/mpr/shrinknp_200_200/p/2/005/00b/2eb/16f4a3e.jpg">,
#<Nokogiri::XML::Attr:0x2ad9dceb85f8 name="width" value="200">,
#<Nokogiri::XML::Attr:0x2ad9dceb85e4 name="height" value="200">]>

They lazy-load pictures, so we will have to search for src or data-delayed-url attribute.

Can someone send a PR?

I am trying to create it. Unfortunately current HEAD does not work with my app, so I will have to first find out what's the problem. Probably renaming linkedin-scraper to linkedin_scraper broke something...

Ya, I recently renamed the files to follow Ruby conventions

OK - just a side note: after your rename, I had to add explicit :require => 'linkedin_scraper' to my Gemfile. Apparently the name change killed bundler auto-loading..
The PR for this issue is ready.

authors: barthevandoorn cernyjakub yatish27


text:
Report user component

Resolves #

Description
Created New component called AssetOwner.  This component is used to display the OwnerName and LastModified under ReportName on dashboard.
.
Proposed Changes
Requested for new component to display the asset owner information.
Screenshots
License
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@utsabpoud can you please add descriptions to your PRs according to the PR template we have?
Also screenshots when available

probably should have a test for it as well

yes I agree, quick integration test and this is good to go.

The spacing on dashboards seems a little off. Maybe we can bring the user info closer to the title and add some margin between the user info and the filter controls.

The spacing on dashboards seems a little off. Maybe we can bring the user info closer to the title and add some margin between the user info and the filter controls.

My suggestion is to maybe render it to the right of the title and edit/fav icons to save some vertical space (and collapse only for narrow screens)

The spacing on dashboards seems a little off. Maybe we can bring the user info closer to the title and add some margin between the user info and the filter controls.

The spacing on dashboards seems a little off. Maybe we can bring the user info closer to the title and add some margin between the user info and the filter controls.

just the indentation 👍 and make sure the col- classes look good when you play with the screen size

authors: cythrawll daniellevinson jkusa utsabpoud

repo: yavin-dev/framework


text:
Contact you

Hi,
I was looking at your snippet and I was wondering if you have experimented with other kind of data.
As far as I can see this DALI library (I've been trying to find examples) is intented to be used for specific kind of data, right?
Pytorch dataset is flexible as you can code almost everything. Is it possible such flexibility here? is it restricted to premade image/audio/video loader?
As far as I can see it's only possible to use the system as dataloader. Is it possible to make use only of GPU accelerated video/image decoding tools in a normal pytorch dataset class?

This example is purely for image loading. DALI itself has added support for many other datatypes, such as audio. I suggest you check out the official docs, there's some examples in there now for other datatypes

authors: JuanFMontesinos yaysummeriscoming


text:
Passing props to React.Fragments

Use Version
@headlessui-float/react: "^0.11.0",
Describe the bug
When using the following popover setup, the package is rendering React.Fragment elements, and attempting to pass styles to them leading to console warnings:
Warning: Invalid prop stylesupplied toReact.Fragment. React.Fragment can only have keyandchildren props.
<Popover>
  {({ open }) => (
    <Float
	 placement="bottom-end"
	 offset={15}
	 arrow={5}
	 transform={false}
	 floatingAs={Fragment}
	 enter="transition ease-out duration-100"
	 enterFrom="transform opacity-0 scale-95"
	 enterTo="transform opacity-100 scale-100"
	 leave="transition ease-in duration-75"
	 leaveFrom="transform opacity-100 scale-100"
	 leaveTo="transform opacity-0 scale-95"
	 tailwindcssOriginClass
     >
	  <Popover.Button as={PrimaryButton} className="uppercase font-bold" size={ButtonSize.M} icon={ArrowUpRightIcon}>
		 {open ? 'Open' : 'Close'} create menu
			 Get Started
		 </Popover.Button>

		 <Popover.Panel className="bg-blue rounded-3xl shadow-lg p-8 text-white">
			 <Float.Arrow as="div" className="absolute bg-blue w-5 h-5 rotate-45" />

			 	{...}

		 </Popover.Panel>
	 </Float>
	 )}
 </Popover>

Hi @TheRealFlyingCoder, I can't reproduce this bug, please provide a minimally reproducible repo using GitHub or stackblitz, Online demo provided the <Float> stackblitz examples.

Hi @TheRealFlyingCoder, I can't reproduce this bug, please provide a minimally reproducible repo using GitHub or stackblitz, Online demo provided the <Float> stackblitz examples.

Weird, let me debug it a bit more and i'll get back to you with an example!

@ycs77 I should have picked this up straight away before raising the ticket:
floatingAs={Fragment}
That was the problem ^ switching to a div solved it


text:
markdownをパースしてレンダリングする仕組みをつける

要件

バックエンドから来たmarkdownをパースしてレンダリングする
カスタムのものをつけれると嬉しい。
ex)

:::message
ここはメッセージだよ
:::

feat/2-config-markdown

repo: ycu-engine/DSC-Blog


text:
不自动替换失效的接口地址

docker安装后，不重启的情况下，不会不自动替换失效的接口地址。只有docker重启后才自动筛选到可用的接口。
而有的接口不一定在什么时候会失效。

已支持此功能，现在在请求失败的情况下，会自动标记不可用的url了，会在goroutine中每分钟定时重试不可用的url，达到最大次数仍然不可用就永久不会再使用此url了

authors: axdlee ycvk

repo: ycvk/deeplx-local


text:
Correlations stopped working

Current Behaviour
Trying to create a profile with default settings, correlations do not work for some relatively simple data sets with the below error:
I think this issue started with 4.6.3 and is still the case for 4.6.4.
EDIT: I can confirm that downgrading to 4.6.2 solves the issue.
/home/ubuntu/.local/lib/python3.10/site-packages/ydata_profiling/model/correlations.py:66: UserWarning: There was an attempt to calculate the auto correlation, but this failed.
To hide this warning, disable the calculation
(using `df.profile_report(correlations={"auto": {"calculate": False}})`
If this is problematic for your use case, please report this as an issue:
https://github.com/ydataai/ydata-profiling/issues
(include the error message: 'Function <code object pandas_auto_compute at 0x7f34bdca3260, file "/home/ubuntu/.local/lib/python3.10/site-packages/ydata_profiling/model/pandas/correlations_pandas.py", line 164>')

Expected Behaviour
Correlations work
Data Description
Standard boston data set
Code that reproduces the bug
import pandas as pd
df = pd.read_csv("boston.csv")

from ydata_profiling import ProfileReport

profile_report = ProfileReport(df, title="profile")
profile_report.to_file("test.html")

pandas-profiling version
v4.6.4
Dependencies
pandas==2.1.4

OS
Ubuntu 22
Checklist

[X] There is not yet another bug report for this issue in the issue tracker
[X] The problem is reproducible from this bug report. This guide can help to craft a minimal bug report.
[X] The issue has not been resolved by the entries listed under Common Issues.

I was looking into this a bit as I was running into the issue. It's something with pandas going from 2.0.3 to 2.1.x. For ydata-profiling v.4.6.4 it works fine with pandas v2.0.3 but once you upgrade to pandas v2.1.x the autocorrelation stops working. Won't claim to know what in pandas is causing the break, but if you downgrade to pandas 2.0.3 it'll work again.

@driscoll42 good catch. I can confirm that the reason 4.6.2 works is that it pins pandas < 2.1. The below pr relaxed pandas pin and thus broke correlations.
https://github.com/ydataai/ydata-profiling/pull/1512

@aquemy @ricardodcpereira is there anything I can help?

Could it be to the newer pandas datatypes.  There are now nullable datatypes for string, float etc. with pandas.NA as missing values.

include the error message: 'could not convert string to float: `'positive''

Maybe after pandas 2.0, we need to add numeric_only = True in pandas.Dataframe.corr()
Changed in version 2.0.0: The default value of numeric_only is now False.

I believe this line will also have to be updated to this or its equivalent:
        method = (
            _pairwise_spearman
           if col_1_name not in categorical_columns and col_2_name not in categorical_columns
            else _pairwise_cramers
        )

Setting numeric_only = True and making the above change ensures the report renders with both categorical an numerical features; otherwise it throws a TypeError on categorical columns if they show up as col_1_name.

repo: ydataai/ydata-profiling


text:
关于TAB选项卡设置初始激活项的问题

问题描述
  当我使用选项卡时，我选择了可以滑动的horizontal-scroll（有11个选项页面），然后我加入了初始激活项。初始设定激活项为第一个页面。

但是在我设定了一个情况，在第十个页面操作，

点击跳转到另一个页面，

以后选择返回，能够跳转到选项卡的第十个页面。但是上面的选项卡却没有聚焦在第十个选项卡而是开头的第一个，

请问我怎么解决
代码区域

yd-tab v-model="tab2" 设定一下model  然后created的时候  设置tab2的值就能变了

repo: ydcss/vue-ydui


text:
[freemoji] more like fixedmoji

:3

Fixes #1 and thx for the fix

wooooooooooo fixedmoji pog

authors: aaronliu0130 xirreal yellowsink

repo: yellowsink/shelter-plugins

license: Unlicense


text:
Access Site Metadata

Any way to access site metadata in jsx?

So I found it in props.metadata.
This may be outside of your scope, but what are you thoughts about displaying the metadata in the site's header? So, for instance, displaying the title of the site in the title tag.

Okay, just rendering the head as a react component, wasn't sure if that was possible.
Thanks for your work on this plugin!

Another way is to use something like react-helmet.

Oh yeah, I forgot about that one. Love the name, too, coming from the devs at NFL

authors: benpolinsky yeojz

repo: yeojz/metalsmith-react-templates


text:
Script crashes when query is not provided

I tried to run script with passing table name only, which resulted in crash with error
File "/home/ameen/.virtualenvs/data-warehousing-exploration/lib/python3.8/site-packages/pysql_beam/sql_io/sql.py", line 242, in process     source.query = source.query.strip(";") AttributeError: 'NoneType' object has no attribute 'strip' [while running 'Read from postgres/ReadFromSQL/SplitQuery']

Can you provide the steps to reproduce ?
I'll prioritize to fix this.

authors: ameenudheenirshad yesdeepakverma

repo: yesdeepakverma/pysql-beam


text:
Trim deep indentation

When working with deeply nested code, the sidebar view is not easy to read. I think it would be better if the code was left-trimmed so that there are no columns of pure whitespace.

this is actually intended, otherwise the LLM won't generate correct code.
We need to preserve indentation somehow. Maybe for rendering on sidebar we can skip indentation on view 🤔
Feel free to propose something here.

Yeah that's what I mean. Keep the original response but render a trimmed one.

feel free to contribute. Check sidebar.lua for this.

This is harder than I initially thought because of the token streaming.
And the fact that the code snippets are extracted directly from the content that is rendered in the sidebar: https://github.com/yetone/avante.nvim/blob/713cb403d0e3c3b9b8b9cacb1ca0ff5d6fc35a7d/lua/avante/sidebar.lua#L316
I guess a really hacky way to do this is:

At each sidebar update, try to find complete code blocks, then strip their whitespace.
Record the number of characters stripped (by writing the number next to the code block in the actual text? - really hacky)
Reconstruct the whitespace when parsing out the code blocks for applying them.

But as a more general solution, what about this:

Parse the LLM response into some intermediate data structure that has more structure for code blocks.
Render the sidebar using this internal representation.
Generate the code diffs using the internal representation.

This way, we are free to change the formatting of the code in the sidebar without it affecting the actual diff.
I'm not sure how to handle partially complete code blocks. I can think of either:

Render the direct LLM response, then parse it into a proper formatted code block once it is complete. But this will mean the sidebar will be changing content that has already been displayed which could be a bit distracting.
Buffer code blocks until they are complete and can be rendered properly. Could be annoying for large code blocks.

What are your thoughts?

authors: aarnphm will-lynas


text:
focusin and focusout seem to be missing

Problem
The events focusin and focusout seem to be missing.
Steps To Reproduce
Steps to reproduce the behavior:

Try set focusout to a callback

Expected behavior
The events should be supported.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:

Yew version: 0.17
Rust version: 1.51

Questionnaire

[ ] I'm interested in fixing this myself but don't know where to start
[X] I would like to fix and I have a solution
[ ] I don't have time to fix this right now, but maybe later

It looks like there already is a discussion about this: https://github.com/yewstack/yew/discussions/1675

The reason these aren't included is because they're not part of the living HTML spec, however they're supported by all relevant browsers, so I think Yew should support them too. The discussion you mentioned describes where the relevant code can be found so feel free to open a PR.

repo: yewstack/yew


text:
Global state

Description
I'm submitting a ...

question

Yew apps I write typically need global state.  Some details of the pattern are:

Components persist properties they're passed, in create or change, to their component struct.
Properties have a global state struct field.
A shared properties struct exists for passing properties with only a global state field to a subcomponent.
Custom component properties structs are made for passing properties with a global state field, as well as others specific to the component, to a subcomponent.

Can that be improved somehow?  If Yew could be changed to improve how global state is facilitated, what would that look like?

While I don't think it is necessarily better in all situations, its possible to use the agents system to store global state instead of passing a global state prop to each component.

Component connects to the agent in create().
Agent adds component to a list of subscribers.
Component requests global state from agent still in create().
Component gets message from agent, handles it in the update() method.
Component wants to update global state. Sends message off with change to the agent.
Agent propagates change to all subscribers, syncing global state with all other components. (Note: I don't immediately recall if you can prevent the sender from also being updated. Ideally you would like to be able to choose if you update all components or just the ones that didn't send the mutation message to the agent).

You could get clever with this pattern and create a network of agents, consisting of senders and receivers, where components with receivers are subscribed to changes, while senders are able send messages without their dependent components being responsible for handling updates to changes in the global state.

@hgzimmerman That's exactly how I've rigged my applications with global state. One note however, make sure to bridge the state in the root component (even if the state is not being used there), otherwise its direct child components will fail to recognize changes by their sibling components (essentially, it'll spin up individual states for each child component of the root, if not bridged in root).

@hgzimmerman Should components ever unsubscribe from the global state agent?
@MirrorBytes I intend on trying @hgzimmerman's suggestion.  Would you expand on what must be done to avoid the issue you warn of?

@kellytk You see how in the routing example that the Router agent is bridged in the root component? Make sure to bridge the State agent is bridged the same way, even if it's not being using in the root component. It needs to be instantiated as far up the component hierarchy as possible.

@MirrorBytes Do you know if the issue is affected by the specified Reach value?  Do you think it should be considered a bug or is it intentional by design?  Perhaps @DenisKolodin could provide insight?

I personally haven't ran into the requirement for the agent bridge to be constructed in the root component, although I don't think I've tried doing otherwise. If a minimal example project could be provided that exhibits this behavior, we could work towards implementing a fix. I'd look into creating that example myself, but I'm frantically trying to get a router component finished so I can take advantage of jstarrys nesting component changes and get feedback to him, as well as life priorities. Its on my list of things to do, but I'm not getting to it soon.
About components unsubscribing from agents: Yes, you should try to disconnect from agents when your component is destroyed. This is best handled in the disconnected() method in Agent, which will get a HandlerId which you can use to remove from your set of subscribers.

@kellytk Potentially, I haven't played with Reach to change its outcome. I believe this should remain in place considering it makes sense to be forced to instantiate in root (relatively speaking).
@hgzimmerman I don't believe it's a huge issue considering. Are you talking about a global routing schema?

Agent propagates change to all subscribers

@hgzimmerman, @MirrorBytes Do you propagate global state change via a single notification message and global state struct, multiple distinct notification messages and state values, or another design?

In my use cases, I haven't had enough global state to warrant updating only fractions of the state at once.
So, without prior experience, I would say that you should have as many global state agents as you have "global features".
Say you have a key that you use when looking up localization for user-presented text, as well as a light/dark theme and font-size configuration. I would keep localization related things in one agent and UI (theme and font size) in another, and update all the related state for an agent in one message. Some components will care about localization, some will care about theming, some both. I think allowing components to pick and choose which agents to subscribe to, while not having super-granular control of each individual setting, strikes a nice balance between maintainability and performance.

@hgzimmerman When components receive updated state is it persisted to fields of the component's struct?

Yes.
I've taken to storing the struct passed in the message directly in the component instead of dealing with individual fields.
So in update():
match msg {
    Msg::GlobalUIChanged(global_ui_state) => {
        self.global_ui_state = global_ui_state;
        true
    }
    ...

@kellytk Whenever you're sharing application state, it's generally a good idea to send the entire state as opposed to splitting it up UNLESS your app state is massive in terms of fields. So long as the state is stored within a components struct when passed to it (or an individual field of the app state), it will persist. Think of the fetch_task example for instance; if it isn't stored in the component struct, it won't process/persist.

app state

@MirrorBytes What is that?

Regarding designs of different update granularity I have the following options:

With coarse updates, subscribed components receive a single monolithic state value.  That's simple, however the downside is components receiving update messages for elements of state that are irrelevant to them.

With fine updates, components subscribe to specific elements of state that are relevant to them and only receive update messages when they change.  The downside is not only is there greater complexity, increased efficiency is debatable because what's saved by only receiving messages pertaining to relevant elements of state may be offset by receiving more messages.

I believe a hybrid solution where components can either subscribe to a single monolithic state or distinct state elements would be the most complex but also the most efficient.

@hgzimmerman, @MirrorBytes, I know you prefer coarse over fine, but what's your opinion of the hybrid design?

In general, while the mechanism agents use to move data around is slow (serialize data, copy string, deserialize data), the total volume of data being moved around is usually tiny (at most 100 components on screen at a time, and rarely more than 1kib per transaction if your state doesn't use strings heavily).  Unless you are handling high numbers of components (eg. a dynamically themeable css framework component library), the most likely situation is 10ish components synchronizing 100 bytes worth of state (strings notwithstanding).
In situations like this, I would hazard a guess that this amount of data being synchronized wouldn't cause you to "drop a frame" (16ms) or cause perceivable delay (50-200ms) to the user. So, in all, unless you notice these things, then performance shouldn't be a concern. And even if these problems to present themselves, a lot of yew's slowness comes from interoperation between WASM<->JS<->Browser, and reduced payload size for global state synchronization will still likely be dwarfed by this.
So I would always prefer the simpler and less complex solution over one that is error prone. For me that means a coarse updating model, and the first optimization step would be to partition the Agent into many Agents along functional boundries, instead of adding more fine-graned message variants to a single Agent and keeping different subscriber lists within it.
ALL that said, I think that it may be preferable to have agents accept messages that only update part of the state, but always broadcast their entire state to their subscribers when anything changes.

It would still be interesting to test the limits of this. As a project idea:
Have a component with a text box. Every character you type, it sends the text-box's value to an agent.
The agent holds state of color: String and data: Vec<u8>. When it updates the color, broadcast its new state to all subscribers.
Another component type can also be subscribed to the agent. Its just a fixed-size div that sets its color based on state received from the agent.
Create 100 of these components, and initialize data to 100 elements long. See if there is any delay for updating these divs when setting the color. Find the breaking point - how many components / how much excess data does it require for a noticeable slowdown. Does shrinking the data size do more to improve performance than shrinking the number of components?

Maybe a bit offtopic, but I can't help but think it might be worthwhile to look at the process React and Redux use together to handle these type of things...  My first thought is to use a store similar to how Redux works, and building a subscriber model with maps to the portions of state a given component needs and subscribes to.  As well as tiering from a primary reducer for handling actions (dispatched via event subscribers).

@hgzimmerman The design you describe is similar to a pattern I've used for abstracting agents which manage a WebSocket connection and implement a network protocol.  I've nearly completed reimplemention of global state with the pattern and the initial results are promising.
A disadvantage I've observed with agent-based global state management is that there appears to be an easy and convenient path toward inefficiency.  When several components in a hierarchy subscribe to state and receive change notifications, a component will be rerendered for each ancestor component subscribing to the state and rerendering + 1.
- ComponentA1 (subscribes to state, rerendered once upon change)
  |- ComponentA2 (subscribes to state, rerendered twice upon change)
     |- ComponentA3 (subscribes to state, rerendered thrice upon change)
- ComponentB1

I suspect a solution exists and I'd appreciate insights from anyone toward that end.

If each component compares its persisted props against its new props passed down from above, then it should ignore the requests to rerender due to prop changes, because nothing should be changing after a global state change.
You will encounter a worst case of O:n^2 number of prop comparisons, but if your change methods are implemented well, you should only encounter a O:n rerenders.
Unless I'm misunderstanding something.

As discussed on Gitter, the solution recommended by @hgzimmerman is to return false from change when Self::Properties is ().

I've successfully concluded the experiment of managing global state via an agent.
A couple of my preferred designs' implementation details that may be of use to others:

Agent Request::RegisterNotifications(Vec<Notification>) allows a component to conveniently subscribe to multiple Notifications.
One agent Response for each element of state that may be subscribed to changes of.
Agent struct fields ala notification_observers: Vec<HandlerId> allow multiple components to subscribe to a specific Notification.

Thank you all.

Even though this is closed, an alternative to using agents would be to stick your global state in a Rc pointer, and pass that down through props. This way, its super cheap to propagate (only a ptr clone and a ref-count increment). You can pass a callback to the root for updating this global state to components that are responsible for updating it.
While the Agent-based approach is acceptable, I think this will be my approach going forward (at least for settings-like global state), as the performance and simplicity gains outweigh the annoyance of including a Rc<GlobalState> field in most of my Props.

@hgzimmerman The agent-based design does indeed incur additional overhead.  While I'm content with my implementation for the time being, I'm also not convinced that it's the optimal solution.
I had briefly implemented the design you describe in my transition from a flat properties-based solution to the agent-based solution.  Having used the three designs I think it's a promising avenue for experimentation.

I'm working on a novel smart pointer, trying to come up with a solution better than Rc for Yew. Its not ready to be used, and doesn't offer anything over Rc except in rare situations, but it has gotten me to think about how smart pointers work in Yew over the past few days, and some of that thought crosses into concerns about global state.
I think that there are four approaches to global state at the moment:

Coordinate state via agents.
Use lazy_static/once_cell + RefCell to get a global mutable reference.
Pass a clonable global state struct in Props.
Pass smart pointers to global state in props.

They are all bad in their own unique ways:

Agents are "slow", require dispatchers/bridges (or links) to be attached to component models.
Real globals can be used anywhere, making it hard to audit their use.
Copying state through multiple components can be expensive, and they take up space in Props.
Smart pointers need to be passed in Props.

And all four lack a way of dictating where the data can be mutated. I want to be able to have global state and be able to dictate that "only these components can mutate global state, the others can only read". Similar to & and &mut, but without the restriction that there can only be one "mutable reference", and with ownership over the data so it can work within Yew's constraints for Prop lifetimes.
I think something similar to Rc could fit the bill, but without a Weak variant and its associated additional reference counter, and with the ability to create Immutable Rcs, so that you can pass these around to components and be confident that nothing has modified them along the way when it comes time to make display decisions regarding them. There isn't a reason to have Weak ptrs because Yew's tree structure should prevent you from creating Rc cycles, making that concern irrelevant.
You should be able to get this behavior by newtyping Rc and disallowing mutation in one of the wrappers, but reimplementing from scratch would allow you to eliminate the now useless weak_count field in Rc for extremely minor space/performance savings.
You would still have the annoyance of these being present in your properties, but it should be obvious if its a handle that can be mutated, or if its just a "view" into the "global" state.

I have a working demo (yew master only though) here for an ergonomic Rc-alike pointer: https://github.com/hgzimmerman/yewtil/blob/master/src/ptr/mrc.rs
and an example here: https://github.com/hgzimmerman/yewtil/blob/master/examples/mrc_irc/src/main.rs
I'll "dogfood" this myself over the coming months and report back how it works, but I think its a nice little ergonomic upgrade over normal Rcs for application use.

@hgzimmerman New to Rust so sorry if this is a dumb question, but is there any way to gain the best of both worlds with agent-based state and Rc based references to it? I ran into the .clone() pattern of returning refs to the global state across agents, but the alternative of passing state down everywhere is not one that's sustainable. It gets very confusing very quickly haha
I've got a demo project that I'm cleaning up with agents that pass enum variant "mutation" and "getter" actions, so maybe once I can link that it'll make more sense if an Rc<Store/State> can be put in there somehow.
Don't think it would solve the .clone pattern quite yet, but it at least makes it where components selectively "subscribe" or don't and can still receive props passed down (a lot like how Redux and Vuex handle things in JavaScript). One bad thing is the component-level reducers adds some overhead to declaration, but that might be solved when I can iterate on that design with some extraction into a trait or something.

Another option is maybe extract to a separate lib, like yewx as a play on Vuex from vue

Something I would personally prefer would be a Redux model, with subscriptions to individual properties and a global state that components can lens into depending on their individual needs. Actors could be a crude approximation, but they are very manual and crucially do not allow for passing JsValues between components and actors because of the serialization step.
https://github.com/yewstack/yew/issues/1026 is a great effort, but it's still missing the global state part, I think I will take a stab at creating such a creature.

Awesome! Can't wait to see it!
Btw I think we should definitely make the non-worker agents skip serialization

@mkawalec idk if you are aware but druid (GUI Framework) has a feature that goes in that direction, maybe its worth a look
https://xi-editor.io/druid/lens.html
https://docs.rs/druid/0.5.0/druid/trait.Lens.html
https://docs.rs/druid/0.5.0/druid/struct.LensWrap.html

Btw I think we should definitely make the non-worker agents skip serialization

@jstarry is there an issue for that yet?

Not yet!

I agree with other folks sentiments about creating something react-redux ish to connect components to state, but wanted to say we shouldn't be trying to copy the APIs (#1026) that are used in JS land if we have language features that enable us to do better.
Clojurescript is a great example of achieving what's enabled by React+Redux but with a way simpler API. You store data in these wrappers, and inside a component's render function, when you dereference the wrapper, it gets added to the list of inputs which cause the component to update when the value changes.
More info on that here: https://github.com/reagent-project/reagent/blob/master/doc/ManagingState.md
But it's that mechanism that allows for a robust subscription / event dispatching system to manage a global (single source of truth) through the re-frame library.
https://github.com/day8/re-frame/blob/master/docs/ApplicationState.md
https://github.com/day8/re-frame/blob/master/docs/CodeWalkthrough.md

Btw I think we should definitely make the non-worker agents skip serialization

@jstarry is there an issue for that yet?

@mkawalec has fixed this in #1195 (I believe)

I'm very new to rust, just starting to learn and investigate yew but I have plenty of react/TS experience and (IMO) the best thing to ever happen in the JS/TS world for state management is mobx-state-tree. It's worth a look at how mobx and mobx-state-tree work. https://mobx-state-tree.js.org/intro/philosophy
IMO mobx-state-tree is light years ahead of the redux pattern. Like not even close. There are so many difficult problems in redux (and loads of boilerplate) that just don't exist with the transparent reactivity of mobx combined with the structured data and actions of mobx-state-tree. Fine grained reactivity means perfect render performance (never renders when not necessary) with zero boilerplate. Transparent reactivity means zero boilerplate. Batched mutations via actions means clean one way data flow, no transient bad states, and easy async actions. Tree model with actions and patches gives immutable-like time travel, replay, serialization, and validation with no overhead or boilerplate. It seems like magic when you first use it but it works flawlessly.
It looks like somebody is already working on a mobx pattern implementation in Rust https://github.com/s-panferov/observe
Again I'm really too new to Rust to know fully how well different state management patterns might work, but seeing the talk of redux here I figured it would be useful to bring mobx into the discussion as a pattern to investigate.

Would it be possible to do something like https://github.com/torhovland/blazor-redux but for yew.rs in rust?

Generally it is possible to implement any data sharing pattern in Rust. In some cases it can be done even more effectively than in JS, as we can truly share data immutably with no runtime cost. It would be awesome to see more data management innovation in web Rust, so feel free to implement it :)

yew-state provides simple CoW shared state management. Has other neat features like persistent storage, custom scoping, and a functional interface.

2. Use lazy_static/once_cell + RefCell to get a global mutable reference.

This can't work because RefCell isn't Send + Sync.

Recoil and Jotai might also be worth considering for inspiration:
https://github.com/facebookexperimental/Recoil
https://github.com/pmndrs/jotai

Recoil and Jotai might also be worth considering for inspiration:
https://github.com/facebookexperimental/Recoil
https://github.com/pmndrs/jotai

Hi there. Not sure why you closed this. As far as I am aware, there still isn't an (official) ergonomic pattern to achieve this in Yew.

normally would expect closing an issue as ambiguous as this with a reason for the closure no?

authors: AndrewMorsillo DukeFerdinand MirrorBytes Oyelowo haywoood hgzimmerman intendednull jstarry kellpossible kellytk lukechu10 mkawalec pythoneer teymour-aldridge tracker1


text:
How to use Messages with wrapper components?

Description
I'm submitting a question.
I'm trying to create some wrapper components that exist mostly for presentation and organization and have run into the issue that I can't make use of any events/messages in the child components since they are expecting the parent component's Message type. As a simple example:
A Foo wrapper component that does nothing but wrap children in a div with a class.
// The rest of the Component impl omitted for brevity.
fn view(&self) -> Html<Foo> {
    html! {
        <div class="foo-class">
            {self.props.children.iter().collect::<Html<Foo>>()}
        </div>
    }
}

A Bar parent component with Message = BarMsg that wants to make use of Foo.
fn view(&self) -> Html<Bar> {
    html! {
        <Foo>
            <button class="child-1" onclick=|_| BarMsg::Click(1)>{"Button 1"}</button>
            <button class="child-2" onclick=|_| BarMsg::Click(2)>{"Button 2"}</button>
        </Foo>
    }
}

This won't work unfortunately because the compiler demands the onclick for the button's to be of the type specified for the Foo component. The desired behaviour is to "bubble" the events/messages up to the parent Bar component that is making use of the Foo component.
I've tried out a few different things with type parameters on the Foo component in order to try and get the correct Message type, but can't seem to make it work.
I'm thinking there may be some Type-Fu that I'm missing out on that will solve this, but it's no doubt an ergonomics issue for a fairly common pattern, so any help will be great and I'll be happy to make an example case for the repo if I can get things working.

@mdtusz thanks for the report! Soon I'll write up better documentation for this but as of right now:
(From https://github.com/yewstack/yew/pull/589)
Unsupported

Passing required properties from (P) -> (C)
Allow sending messages from (C) -> (B)

Terminology
(B) Base component that renders components nested inside each other
(P) Parent component that has a children property and can render those children
(C) Child component that is nested inside parent and included inside the Parent's children

I'll have to think more about a better way to handle this 😬 open to ideas!

@mdtusz I've created a PR to fix this issue. Could you please try out the branch and let me know if it fixes your problem?

Fixed by https://github.com/yewstack/yew/pull/783

authors: jstarry mdtusz


text:
whisper large v3 Fine-Tune 後變得不太能辨識語音

Fine-Tune 前
[0.00s > 18.94s] 大家報告一下上週的進度
[19.20s > 21.50s] 上週主要在PPC
[21.76s > 26.12s] AVAP這邊是用那個AML模型建立生存的
[26.12s > 29.20s] 預測模型來看它的效果
[29.44s > 31.24s] 那一開始就是如上週報告
[31.50s > 34.56s] 有測試的就是不同初始值會對模型的影響
[34.82s > 36.10s] 這邊是使用同一個
[36.36s > 37.90s] 深度的模型來測試
[38.40s > 41.22s] 那測試的結果是明顯的
[41.48s > 45.06s] 初始的權重會對模型的表現性影響很大
[45.58s > 46.86s] 那這邊
[47.12s > 49.68s] 分別就是使用了三種不同的初始權重
[50.18s > 54.54s] 那他們雖然在同一個架構一層的hidden layer下面
[54.80s > 55.30s] 他們的
[55.56s > 56.08s] 表現性
[56.38s > 57.66s] 還是有明顯的不同
[58.94s > 60.48s] 等於說這是什麼專案
[60.72s > 61.76s] 這個是
[62.00s > 64.06s] 這邊是用
[64.56s > 65.84s] PVTC的
[66.10s > 66.62s] 數據
[67.12s > 69.44s] 你現在在研究的這個專案是哪一個
[69.68s > 70.46s] 現在
[70.96s > 72.24s] 這個的專案就是
[72.76s > 77.12s] 因為PVTC跟VAEP都要想要用CVAE的生成方式
[77.62s > 83.26s] 但是因為CVAE那邊生成的數據還是需要一個模型去驗證
[83.52s > 85.04s] 出來它的數據預測準不準
[85.56s > 86.08s] 那目前就是
[86.32s > 87.92s] 生成這邊就先放置然後來
......

Fine-Tune 後
[21.76s > 25.86s] ,
[25.86s > 55.86s] 的預測模型來看它的效果 那測試的結果是 明顯的初始的權重會對模型的表現性影響很大 那這邊分別就是使用的三種不同的初始權重 那他們雖戾一層的械類的下面 他們的表現

Fine-Tune 輸入資料格式
# decode 前
[ 50258, 50260, 50359, 50363, 25583, 5000, 13331, 252, 4511, 5884, 44, 25729, 27735, 50257 ]
# decode 後
'<|startoftranscript|><|zh|><|transcribe|><|notimestamps|>還是他塞到我們MongoDB<|endoftext|>'

相關套件版本
numba
numpy>=1.23.1
soundfile>=0.12.1
librosa>=0.10.0
dataclasses>=0.6
transformers>=4.35.0
bitsandbytes>=0.41.0
datasets>=2.11.0
evaluate>=0.4.0
ctranslate2>=3.21.0
faster-whisper>=0.10.0
jiwer>=2.5.1
peft>=0.6.2
accelerate>=0.21.0
zhconv>=1.4.2
tqdm>=4.62.1
soundcard>=0.4.2
uvicorn>=0.21.1
fastapi>=0.95.1
starlette>=0.26.1
tensorboardX>=2.2
tiktoken==0.3.3
openai-whisper>=20231117
notebook==6.5.4
jupyterlab==4.0.2
pydub>=0.25.1
openpyxl>=3.1.2
setuptools-rust
more-itertools

這個流程在 fine-tune whisper-large-v2 都沒什麼問題，但是換成 large-v3 的時候就會出現上述的問題，請問我到底是哪個環節出了問題？

如果在whisper-large-v2 没有问题，那数据应该是没有问题的，出现你这个种情况，我也不太清楚是什么原因。
你的数据带有时间戳吗？

如果在whisper-large-v2 没有问题，那数据应该是没有问题的，出现你这个种情况，我也不太清楚是什么原因。 你的数据带有时间戳吗？

我的數據沒有帶時間戳記，但就算沒帶時間戳記應該也不會爛成這個樣子 @@

你是不是源码安装的Transformers？不知道是不是这个的原因。

Transformers

我是直接用 pip3 install transformers==4.35.0

Transformers

我是直接用 pip3 install transformers==4.35.0

试试源码安装，训练一次看看。

Transformers

我是直接用 pip3 install transformers==4.35.0

试试源码安装，训练一次看看。

好的 我試完了結果再公布到這兒

我的large-v3辨識出來都是 "........,,,,,,!!!?????"之類的,但是tiny的版本是可以辨識出中文的

你可以试试我微调后的模型

你可以试试我微调后的模型

那樣確實沒問題,但我想知道不能跑的原因在哪～

估计是模型的问题，很多人都反映这个问题

我这里也是，前几周的微调结果都正常，现在微调后的结果变得几乎不可用，目前回忆到的变量是Transformers没有从源码安装

现在没法用是用了源代安装吗？

我这边两台服务器，之前的环境：transformers==4.36.0.dev0，都是源码安装
上周我将其中一台通过pip install git+https://github.com/huggingface/transformers升级到了4.37.0，微调后的识别结果就不可用了，会出现空白和连续重复的字符：
Reg: [' don don of� in two two two two two aut зв зв grad звaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryary rel звrage rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel relrageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerage']
Ref: ['单是看两队实力不相伯仲的组合']

另一台还在进行训练，checkpoint的识别结果都是正常的。
模型一直是本地加载的Whisper-large-v3，数据处理格式也没有变（我不清楚ensure_ascii=False是否有影响），以下是其中一条数据：
{'audio': {'path': '/data/xxx/wavs/cantonese/wavs/train/datatang500h00000232-1123412-1132395-C1.wav'}, 'sentence': '佢系通過一種抽象同埋一種呢啲怪異即一種啊即只可理喻不可解釋嘅', 'language': 'yue', 'sentences': [{'start': 0, 8.98, 'text': '佢系通過一種抽象同埋一種呢啲怪異即一種啊即只可理喻不可解釋嘅'}], 'duration': 8.98}

我目前能回忆到的唯一改变就是transformers库的改动了

我这边两台服务器，之前的环境：transformers==4.36.0.dev0，都是源码安装
上周我将其中一台通过pip install git+https://github.com/huggingface/transformers 升级到了4.37.0，微调后的识别结果就不可用了，会出现空白和连续重复的字符：
Reg: [' don don of� in two two two two two aut зв зв grad звaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryary rel звrage rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel relrageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerage']
Ref: ['单是看两队实力不相伯仲的组合']

另一台还在进行训练，checkpoint的识别结果都是正常的。
模型一直是本地加载的Whisper-large-v3，数据处理格式也没有变（我不清楚ensure_ascii=False是否有影响），以下是其中一条数据：
{'audio': {'path': '/data/xxx/wavs/cantonese/wavs/train/datatang500h00000232-1123412-1132395-C1.wav'}, 'sentence': '佢系通過一種抽象同埋一種呢啲怪異即一種啊即只可理喻不可解釋嘅', 'language': 'yue', 'sentences': [{'start': 0, 8.98, 'text': '佢系通過一種抽象同埋一種呢啲怪異即一種啊即只可理喻不可解釋嘅'}], 'duration': 8.98}

我目前能回忆到的唯一改变就是transformers库的改动了

我看你数据集格式是没有问题的，我一直是使用 transformers==4.36.0.dev0 这个版本来微调V3版本

应该是这个版本，有空的时候我查一下我电脑的版本是多少

我这边两台服务器，之前的环境：transformers==4.36.0.dev0，都是源码安装 上周我将其中一台通过pip install git+https://github.com/huggingface/transformers 升级到了4.37.0，微调后的识别结果就不可用了，会出现空白和连续重复的字符：
Reg: [' don don of� in two two two two two aut зв зв grad звaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryaryary rel звrage rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel rel relrageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerageragerage']
Ref: ['单是看两队实力不相伯仲的组合']

另一台还在进行训练，checkpoint的识别结果都是正常的。 模型一直是本地加载的Whisper-large-v3，数据处理格式也没有变（我不清楚ensure_ascii=False是否有影响），以下是其中一条数据：
{'audio': {'path': '/data/xxx/wavs/cantonese/wavs/train/datatang500h00000232-1123412-1132395-C1.wav'}, 'sentence': '佢系通過一種抽象同埋一種呢啲怪異即一種啊即只可理喻不可解釋嘅', 'language': 'yue', 'sentences': [{'start': 0, 8.98, 'text': '佢系通過一種抽象同埋一種呢啲怪異即一種啊即只可理喻不可解釋嘅'}], 'duration': 8.98}

我目前能回忆到的唯一改变就是transformers库的改动了

我目前是使用 transformers==4.36.0 用 pip 安裝的，但是我的 ctranslate2 是源碼安裝，（因為要在 cuda12 的環境下執行）執行出來的結果是 large-v2 lora finetune後沒什麼問題，但 large-v3 在 lora finetune 後辨識音檔的開頭一定會出現亂碼，要辨識到音檔的 20幾秒之後才會正常輸出，即便我已經把 language 設定成 'zh' 了還是這樣

另外 我發現 只要使用 timestamp 下去 finetune，出來的結果都會出現亂碼或跳針現象
A-FIN這個地方七十五 We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-P-P-P-P-P-P-P-P-P-P-P-P-P-P-PP-PP-P-PP-CP-C-C-R說說說成理

另外 我發現 只要使用 timestamp 下去 finetune，出來的結果都會出現亂碼或跳針現象
範例1
A-FIN這個地方七十五 We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-P-P-P-P-P-P-P-P-P-P-P-P-P-P-PP-PP-P-PP-CP-C-C-R說說說成理

範例2
那就直接加到 他就直接加住 APS就直接加住 APS就直接加住 APS就直接加住 APS就直接講了 APS就直接講她的APS 她的APS 她的APS 她的APS 她的APS 她的APS 她的APS 她的APS 她的APS 她

使用timestamp指的是是训练参数中指定timestamps=True吗

另外 我發現 只要使用 timestamp 下去 finetune，出來的結果都會出現亂碼或跳針現象
範例1
A-FIN這個地方七十五 We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-We-P-P-P-P-P-P-P-P-P-P-P-P-P-P-PP-PP-P-PP-CP-C-C-R說說說成理

範例2
那就直接加到 他就直接加住 APS就直接加住 APS就直接加住 APS就直接加住 APS就直接講了 APS就直接講她的APS 她的APS 她的APS 她的APS 她的APS 她的APS 她的APS 她的APS 她的APS 她

使用timestamp指的是训练参数中指定timestamps=True吗

對喔

@bardenthenry 你试试下载最新的 v 2 模式。再训练看看，会不会跟 v3 同样的问题

@bardenthenry 你试试下载最新的 v 2 模式。再训练看看，会不会跟 v3 同样的问题

您是說 更新一下 huggingface 的 larfe-v2 模型嗎？

嗯嗯

@bardenthenry
請問你中英混的句子
有特別 assign 什麼 "language" 嗎
感謝!

@bardenthenry 請問你中英混的句子 有特別 assign 什麼 "language" 嗎 感謝!

我還是強制請他用 zh 來做

我的实验结果暂时正常了，目前来看很可能是peft库的问题，bitsandbytes也有可能。我将大部分库都回退到了2023年11月15日之前的commit，现在基本不会出现乱码现象。
peft==0.6.3.dev0
transformers==4.36.0.dev0
bitsandbytes==0.41.3

我的实验结果（large-v3）暂时正常了，目前来看很可能是peft库的问题，bitsandbytes也有可能。我将大部分库都回退到了2023年11月15日之前的commit，现在基本不会出现乱码现象。 peft==0.6.3.dev0 transformers==4.36.0.dev0 bitsandbytes==0.41.3

看起來更悲慘了 @@

@bardenthenry 建議可以用 large-v2
我目前用下來比v3穩定很多

应该是V3幻觉问题

authors: bardenthenry boxpkaka dengchengxifrank ken19980727 wengchic yeyupiaoling

repo: yeyupiaoling/Whisper-Finetune


text:
vertically aligned text labels for facet_grid

Does anyone know how to do this? I can't figure it out.

fixed in 0.9.3

repo: yhat/ggplot


text:
Support for environment groups in vendor package?

What steps will reproduce the problem?
Define config file for given environment, like "dev", "prod" etc.
https://github.com/yiisoft/config#environments
but in composer.json located in vendor directory.
What is the expected result?
For vendor composer like:
"extra": {
    "config-plugin-options": {
      "source-directory": "config"
    },
    "config-plugin": {
      "yii2-api": "yii2-api.php"
    },
    "config-plugin-environments": {
      "dev": {
        "yii2-api": [
          "$yii2-api",
          "dev/yii2-api.php"
        ]
      },
      "prod": {
        "yii2-api": [
          "$yii2-api",
          "prod/yii2-api.php"
        ]
      }
    }
  },

Config called in root project return dev configs also from "vendors".
$yiiConfig = new Config(
    paths: new ConfigPaths(__DIR__),
    environment: 'dev',
);
$yiiConfig->get('yii2-api');

What do you get instead?
Environment config from "vendor" projects (repositories/packages) is not present in .merge-plan.
Additional info
I develop a project-template based on Yii2 who's using several packages via composer and want to have all configs of this packages in package repository - thanks to that composer install/update will fully configure my application.
Some of my packeges sohuld use different params/configs based on environemtns, like:
disable "https / secure" in dev and test environments. Set "sandbox" or "production" to payment-provide package etc.
It's possible to achieve that? Or how to do it better/different?

Q
A

Version
1.3.0

PHP version
8.0

Operating system
KDE Neon

@tomaszkane I created PR with note.
You can try use so approach to resolve your task:

for environments create specific configs in vendor package:

"extra": {
    "config-plugin-options": {
      "source-directory": "config"
    },
    "config-plugin": {
      "yii2-api": "yii2-api.php",
      "yii2-api-prod": "prod/yii2-api.php",
      "yii2-api-dev": "dev/yii2-api.php",
    },
  },

use specifc configs in environments of application:

"extra": {
    "config-plugin-environments": {
      "dev": {
        "yii2-api": [
          "$yii2-api-dev",
          "dev/yii2-api.php"
        ],
      },
      "prod": {
        "yii2-api": [
          "$yii2-api-prod",
          "prod/yii2-api.php"
        ]
      }
    }
  },

Seems, this case is valid. Packages may be related to application layer. Add ability set environments in such packages looks as good idea. I think, we can add environments support to packages from vendor-override-layer, but not to all packages.

Could you try with:
"config-plugin": {
      "di": "yii2-api.php"
    },
    "config-plugin-environments": {
      "dev": {
        "di": [
          "$di",
          "dev/yii2-api.php"
        ]
      },
      "prod": {
        "di": [
          "$di",
          "prod/yii2-api.php"
        ]
      }
    }

?

I think it works for me. Thanks.

authors: rustamwin tomaszkane vjik

repo: yiisoft/config


text:
Changed letter case to lower

Q
A

Is bugfix?
✔

New feature?
❌

Breaks BC?
✔

Tests pass?
✔/❌

Merged. Thanks!

authors: samdark xepozz

repo: yiisoft/data


text:
Undefinded index when JOIN and indexBy

When i try use this code
Printer::find()->select(["concat(printer.name,' в ', o.name) name"])
            ->joinWith('cartPrinters c')->joinWith('auditories o')
            ->where(['c.id_cart'=>$this->id])
            ->indexBy('printer.id')->column();

rised exception

PHP Notice – yii\base\ErrorException
Undefined index: printer.id

but in SQL all work normaly
SELECT concat(printer.name,' в ', o.name) name, printer.id FROM `printer` LEFT JOIN `cart_printer` `c` ON `printer`.`id` = `c`.`id_printer` LEFT JOIN `printer_auditory` ON `printer`.`id` = `printer_auditory`.`id_printer` LEFT JOIN `auditory` `o` ON `printer_auditory`.`id_auditory` = `o`.`id` WHERE `c`.`id_cart`=45

When i try indexBy('id')
Printer::find()->select(["concat(printer.name,' in', o.name) name"])
            ->joinWith('cartPrinters c')->joinWith('auditories o')
            ->where(['c.id_cart'=>$this->id])
            ->indexBy('id')->column();

SQL rised exception

Column 'id' in field list is ambiguous

I solve this problem by use indexBy with callable
Printer::find()->select(["concat(printer.name,' в ', o.name) name, printer.id"])             ->joinWith('cartPrinters c')->joinWith('auditories o')             ->where(['c.id_cart'=>$this->id])             ->indexBy(function ($row) {                 return $row['id'];             })->column();
But whay indexBy('printer.id')->column(); not working?

According to docs it should work...

Yes, but when i try it, i have

I think my PR will fix this as well: https://github.com/yiisoft/yii2/pull/13891

fixed, thanks for reporting!

authors: SamMousa cebe gaginsgagins samdark


text:
Apply child table alias/name for joinWith case to condition columns (with test)

One step to resolve the problem with ambigous column name and apply alias.
As part of #7263:
For case joinWith functional: only one child table inside joinWithRelation for each time
i.e. not allowed
SELECT * FROM
a JOIN b,c
WHERE a.id = b.a_id and b.id = c.b_id

i.e. ActiveQuery for the child table is have single from and can be use single prefix.
Note:
for #14161
This method can be private or
framework/validators/ExistValidator.php
framework/validators/UniqueValidator.php
can use this method too
Example: after path
class Duration extends \yii\db\ActiveRecord {
...
    public function getUnit()
    {
        return $this->hasOne(DurationUnit::className(), ['id' => 'unitId'])->inverseOf('durations');
    }
...
}

        echo Duration::find()
            ->joinWith([
                'unit as unitAlias' => function (DurationUnitQuery $query) {
                    $query->andWhere(['id' => [5, 3, 2, 1]]);
                }
            ])
            ->andWhere(['id' => [4, 5, 9]])
            ->alias('durationAlias')
            ->createCommand()->getRawSql();

produce
SELECT `durationAlias`.* FROM `duration` `durationAlias` LEFT JOIN `duration_unit` `unitAlias` ON `durationAlias`.`unitId` = `unitAlias`.`id` WHERE (`id` IN (4, 5, 9)) AND (`unitAlias`.`id` IN (5, 3, 2, 1))

current
SELECT `durationAlias`.* FROM `duration` `durationAlias` LEFT JOIN `duration_unit` `unitAlias` ON `durationAlias`.`unitId` = `unitAlias`.`id` WHERE (`id` IN (4, 5, 9)) AND (`id` IN (5, 3, 2, 1))

and "as target" result must be
SELECT `durationAlias`.* FROM `duration` `durationAlias` LEFT JOIN `duration_unit` `unitAlias` ON `durationAlias`.`unitId` = `unitAlias`.`id` WHERE (`durationAlias`.`id` IN (4, 5, 9)) AND (`unitAlias`.`id` IN (5, 3, 2, 1))

include some tests

Q
A

Is bugfix?
yes

New feature?
yes

Breaks BC?
yes/no

Tests pass?
yes/no

Fixed issues
#7263, #14166, #14161, #14150

@bscheshirwork seems tests aren't passing in this one.

@samdark this PR is use another concept (my first proposition) of applyTableAlias and must be changed

@bscheshirwork please close/fix ones that aren't actual. Hard to review all these...

I will close it. I don't have a time for fix this now.

authors: bscheshirwork samdark


text:
Improve docs

Fixes #18618

AFAIK these annotations are generated from phpdoc of getter/setter, so I don't think this is a right place to change it (these changes will be overwritten on next release).
Also, IMO "usually" is confusing. If we want to make it clear, it should explain when leading slash is necessary and when it is not.

Feel free to improve it.


text:
Can't click on some icons on the right

Hello!
For some reason after a recent update I can't open up Extensions and Settings menus by clicking on their icons in the toolbar. Looks like maybe some overlay (?) is blocking them from being clickable.

I can click on the recent browsing windows icon as well as on the new tab icon though.

Solved by installing the new theme release

Solved by installing new theme release.

repo: yiiyahui/Neptune-Firefox


text:
sunrgbd_pc_bbox_votes_50k_v1_train

Hi, /sunrgbd/sunrgbd_pc_bbox_votes_50k_v1_train How can I get this file

Thanks, but 'all_obbs2d_modified_nearest_has_empty.pkl' this file is not in it. I still can't run it.

The file 'all_obbs2d_modified_nearest_has_empty.pkl' is generated with the same method as 'all_obbs_modified_nearest_has_empty.pkl', but stores 2D bboxes instead of 3D bboxes.

repo: yikaiw/TokenFusion


text:
中途停顿的时候，我想只滑动listview该怎么改呢？

中途停顿的时候，我想只滑动listview该怎么改呢？
当listview滑动到底的时候，在滑动scroll，可以给点思路么？

scrolllayout并不是能看见的部分那样大小，只是竖向移动了，底部看不见的区域还是有内容的，如果要修改可能不止一点改动，方向的话就是尝试从scrolllayout的touch事件上和配套的ContentListView滚动下功夫

好的 谢谢 我尝试下吧

authors: houpe yingLanNull

repo: yingLanNull/ScrollLayout


text:
Inconsistent Key Count after BGSAVE and IMPORT

I am trying to keep 2 RocksDB databases consistent (they are rarely updated). To do this, I was hoping to simply run BGSAVE on the first machine via ardb and then IMPORT that snapshot into the second machine using ardb.
Unfortunately, I get inconsistent key counts each time I run this.
Is there a better way to copy one to the other?

is the key count reported by 'info' command?

I was using dbsize, but the info command yields:
Keyspace
db0:keys=939859164
Keyspace
db0:keys=877488365

RocksDB provides only an estimated number of keys stored in the column family and it is affected by the number of pending compactions. See https://github.com/yinqiwen/ardb/issues/351

Is there any way to confirm the two sets are identical or is it best to just check a random set of the key=>value results as a test?

the only way is to save again to generate a new snapshot file and then compare the md5 checksum value.

authors: ipapapa rjonesxmoz yinqiwen

repo: yinqiwen/ardb


text:
没有必要的一行代码

DatMaker.java这个文件中的129行：（maker.entries.get(maker.entries.get(matched).base).base = i;）这个是不是没有必要？

你好，这一行是有必要的，可以标记词排序后在词典中的index值

authors: yizhiru zmrush


text:
Error: A Yjs Doc connected to room "#room-name" already exists

Describe the bug
I'm getting an error when reconnecting and calling new WebrtcProvider() on a page refresh or after a disconnect.
To Reproduce
Steps to reproduce the behavior:
  const provider = new WebrtcProvider(name, doc, {
    password,
    signaling: servers,
    awareness,
  });

Then call provider.disconnect() or provider.destroy(), or just try connecting again with the same code and params as above.

Get error: Error: A Yjs Doc connected to room "#room-name" already exists

Expected behavior
A new provider can be created and sync to the existing room without error. Should return the provider.
Environment Information

Happens both in Browser [Chrome] and Node [Vitest]
"y-webrtc": "^10.2.5"
"yjs": "^13.5.16"

Sorry not sure why sourcemaps aren't working, but I've found where it originates:
// src/y-webrtc.js
const openRoom = (doc, provider, name, key) => {
  // there must only be one room
  if (rooms.has(name)) {
    throw error.create(`A Yjs Doc connected to room "${name}" already exists!`)
  }
  const room = new Room(doc, provider, name, key)
  rooms.set(name, /** @type {Room} */ (room))
  return room
}

Sorry. I realized I new WebRtcrRovider was getting called twice elsewhere in the code!

repo: yjs/y-webrtc


text:
Uncropped data

hi,I am very grateful for you sharing your data. However, when using the data, I found that it has already been cropped. May I ask if you can provide me with uncropped data?  Thank you very much.

Sure, we will upload the uncropped RGB data to the drive link in a few days.

Hi, we have updated the Readme.md and add the full-size RGB link in it. Or you can directly check the following link: https://pan.baidu.com/s/1ak1pWL8vnym6txisxksgdg?pwd=mr3m.

Thank you! It's really kind of you!

authors: pepequ yjsunnn

repo: yjsunnn/FBANet


text:
Api backend not working

Hi,
I cloned this project, installed it in Spring STS (Eclipse) and tried to run it. The web app works, I get the angular page but when I try to register I get this error:
POST http://localhost:8080/api/user/register 404 (Not Found)
Is there a way I could test if the backend is up and running?

did you setup the database? you can see the logs if the backend was booted correctly or not. the fact that you got 404 not found for that end point shows something might have gone wrong while setting/mapping that path in the tomcat container. see logs. you might find something.


text:
feat: CT-2 Split Lab Controller

wip
add lab data provider
use data provider in controller and export

Should the data provider have a Contentful counterpart?

authors: lennym peterstarling

repo: yldio/asap-hub


text:
fix: Avatar iv null bug

https://trello.com/c/FBMD06GE/1104-team-lee-is-breaking-network

Maybe this could use a test?

It does @kmaid. I'm on it! 😉

Are responses from Squidex typed? That probably needs fixed too

i thought we were monkey patching to get that fix out of the way. Proper fix requires not just a test but also changes to our typings which will cascade a series of type errors that need to be addressed

et voila, here is the test

authors: johnytiago kmaid peterstarling


text:
Maya: Context plugin shouldn't be tied to family

Changelog Description
Maya Current File collector was tied to workfile unnecessary. It should run even if workile instance is not being published.
Testing notes:

Disable workfile instance and publish
Collect Scene Version shouldnt fail

Code looks good to me, and i tested it by myself. The instance published successfully without workfile instance.

authors: kalisp moonyuet

repo: ynput/OpenPype


text:
Standalone/Tray Publisher: Remove simple Unreal texture publishing

Changelog Description
We are removing simple Unreal Texture publishing that was just renaming texture files to fit to Unreal naming conventions but without any additional functionality. We might return this functionality back with better texture publishing system.
Related to #5983

Missing changes of AYON settings.

Missing changes of AYON settings.

They should be included in here https://github.com/ynput/OpenPype/pull/5983

authors: antirotor iLLiCiTiT mkolar


text:
Bug: Character creator generates rations that are already used

Assumption
When an item has multiple uses, a filled dot means the item was used, and "adding" a use occurs when using it once. This is corroborated by the fact that an item is crossed out when all dots are filled.
Side note: I bring this assumption up as I'm new to the extension, and the phrasing is a bit confusing to me. I think "# of uses" could be rephrased to "times used" to better emphasize its intent. But this is not the reason for the ticket...
Bug Reproduction
Steps Taken

Open "Actors" tab
Click the "Create character" button:

Expected Behavior
The created character will have rations in their inventory with 3 charges that are not yet used.
Actual Behavior
The character is created, but with their rations already used up!

Build Info

OS: Pop!_OS Linux 22.04 LTS
Foundry: Version 12 Stable, Build 331
Cairn: Version 0.15 (but also observed on 0.14)

As I haven't changed generator code, I think the basic intent for "uses" was "available uses" or "uses left". This is why created actor has number of uses equal maximum.
I have been changing the item visualization, so probably I have mistaken it at this point.
Thus, I will adjust visualization to the primary intent.

authors: oswida segeeslice

repo: yochaigal/Cairn-FoundryVTT


text:
Fix issue with indentation

--indent option passed in one string with n resulted in vim quotin it, which led to a confusing
jq: Unknown option --indent n
Use jq --help for help with command-line options,
or see the jq manpage, or online docs  at https://jqlang.github.io/jq

error. Using tables prevents this from happening, as each arg is passed independently

Thanks for contributing! Didn't have that issue myself. What version of Neovim and jq are you running if I may ask? Your solution looks cleaner, so I'll merge it anyway.

Thanks for contributing! Didn't have that issue myself. What version of Neovim and jq are you running if I may ask? Your solution looks cleaner, so I'll merge it anyway :)
Thank you again! If there's anything you miss or want to see in this plugin, lmk!

I use jq 1.7, neovim -v gives me
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1727621189

I was thinking about adding config to be able to add additional mappings for executing the query / disabling the default mapping, as I like to iterate on mine and going in and out of Insert mode feels rough. Will file a PR sometime soon, probably


text:
Add continuous dialogue.

Checklist

[ ] npm test passes
[ ] tests and/or benchmarks are included
[ ] documentation is changed or added

I don't think it's necessary to abstract, so continuous conversation is to pickup.

So far, we haven't found a particularly reasonable logic for the function of continuous dialog. At this stage, its priority is not high, and it is enough for cloud app only to take effect.
We will define this function in detail when we have more complete planning and usage scenarios.

So far, we haven't found a particularly reasonable logic for the function of continuous dialog. At this stage, its priority is not high, and it is enough for cloud app only to take effect.

This looks weird a bit, it just like the system function would be implemented by cloudappclient, that is only a application:

if the priority is still low, then we should not land in this way.
it could be done at cloud absolutely, and it is simpler.
implement this at framework.

Technically, I don't see any read the config to make this feature enabled, so this patch would make the dialog always open.
@LanFly @legendecas May I ask you to chime in this discussion?

authors: DevGsip stan24 yorkie

repo: yodaos-project/yodart


text:
The binder class not shown in service list

shell@shamu:/ $ ps | grep ssp
root      3822  1     708308 24360 ffffffff 00000000 S ssproxy_10151

shell@shamu:/ $ service list | grep ssp
0	ssproxy_me.ycdev.android.lib.ssproxy.demo: []

Fixed in the commit: https://github.com/yongce/SysServiceProxyLib/commit/6e4b6a7285d09dc9755a45861844c098876f7d76

repo: yongce/SysServiceProxyLib


text:
🛑 Api bnovus-qa is down

In 76a7f18, Api bnovus-qa (https://manager-api.qa.rexmas.com/admin) was down:

HTTP code: 504
Response time: 10114 ms

Resolved: Api bnovus-qa is back up in b3c4dea after 8 hours, 31 minutes.

repo: yorkijr/rexmas-uptime


text:
json error: expected value at line 1 column 1

MAC os m3 ,
I  used auth application-default login, and Im using the same json ,
but this is failling with  json error: expected value at line 1 column 1
no clear of which expected value failed
let config = ClientConfig::default().with_auth().await;
match config {
Ok(con) => {
let client = Client::new(con);
info!("successfully connected ")
}
Err(error) => {
error!("something failed {}",error)
}
}

This doesn't work for me either. I have vanilla JSON, downloaded from GCP, and configured the path with GOOGLE_APPLICATION_CREDENTIALS_JSON env. This error hit me in the face...

Let me add that this works just fine:
    let credentials: CredentialsFile = serde_json::from_slice(&fs::read(std::env::var(
        "GOOGLE_APPLICATION_CREDENTIALS_JSON",
    )?)?)?;

    let config = ClientConfig::default()
        .with_credentials(credentials)
        .await?;

repo: yoshidan/google-cloud-rust


text:
[Safari] err.stack is empty

I´m cross-browser testing my current choo app,
with choo-devtools enabled, which is using this plugin.
Works every, except in Safari (running Version 11.0 (13604.1.38.1.6) within an VM),
there i get the following Error:

TypeError: undefined is not an object (evaluating 'arr[0].replace')

which is triggerd here: https://github.com/yoshuawuyts/object-change-callsite/blob/master/index.js#L33
after some googling around i found that some hints that safari, has some problems with:

err.stack

which is used in following lines:
https://github.com/yoshuawuyts/object-change-callsite/blob/master/index.js#L12
https://github.com/yoshuawuyts/object-change-callsite/blob/master/index.js#L19
i don't know exactly how to fix, maybe switch if undefined to "err.message" ...

Ran into this with choo-devtools and iOS this morning trying to debug another issue.  I'm going to make a PR to ix the strip function so it just works on safari but will be ugly

Fixed in v1.0.5 :tada:

authors: moszeed toddself yoshuawuyts

repo: yoshuawuyts/object-change-callsite


text:
Add index.html

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Résumé</title>
  </head>
  <body>
    ― Hello World! 😉
  </body>
</html>

додав index.html


text:
Added support for the "ON UPDATE CURRENT_TIMESTAMP" syntax.

For example:
CREATE TABLE t1 (
  ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

Documented here: https://dev.mysql.com/doc/refman/5.7/en/timestamp-initialization.html

LGTM
Can you resolve the merge conflicts?

Fixed the merge conflicts.

Coincidentally, @sjmudd was just asking for this feature :)

authors: bramp sougou

repo: youtube/vitess