[ISSUE #3197]Optimize TopicResponse toString method

Fixes #3197
Motivation
Explain the content here.
Explain why you want to make the changes and what problem you're trying to solve.
Modifications
Optimize TopicResponse toString method
Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
If a feature is not applicable for documentation, explain why?
If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

@jonyangx  Done PTAL~


refact: examples

Description
refact examples build ci.
Type of change
Please select the relevant option.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update

Codecov Report

Merging #120 (caf0ee8) into master (b57d0c1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #120   +/-   ##
=======================================
  Coverage   90.77%   90.77%
=======================================
  Files         155      155
  Lines        7375     7375
  Branches     2026     2026
=======================================
  Hits         6695     6695
  Misses        559      559
  Partials      121      121

Continue to review full report at Codecov.

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


Update to V10

In v10 you can see previously set source classes but you can't see the setting for source classes anymore.

the System Data for Dnd5e changed in V10. The Div Insert after the Spellschool fails.An "easy" temporary fix for the problem should be:

go in the modules\spellbook-assistant-manager\scripts\ folder
open the file levelup.js
change line 63 from
let school = html.find(select[name="data.school"])[0]
to
let school = html.find(select[name="system.school"])[0]

had a look over the div for the spell and that seems to work. i dont know if and what else broke


[FR]: Sort authors by how many resources they have written

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the problem
Currently, authors are sorted alphabetically, which leads to a lot of noise (someone who has written a single article might end up more prominently than someone that has written many).
Describe the solution
Should we consider sorting them by number of resources added?
Additional context
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Is there an optimised way to get the author's resources.

Closing with the removal of authors.


Remove implicit promotion in Conv

Simple change to address https://github.com/patrick-kidger/equinox/issues/308. Previously the code in the issue would result in
ValueError: Operands could not be broadcast together for add on shapes (1, 4, 8) (4, 1) and with the config option jax_numpy_rank_promotion='raise'. For more information, see https://jax.readthedocs.io/en/latest/rank_promotion_warning.html.

Now it results in
Array([[ 0.7041937 ,  0.7041937 ,  0.7041937 ,  0.7041937 ,  0.7041937 ,
         0.7041937 ,  0.7041937 ,  0.7041937 ],
       [-0.42025453, -0.42025453, -0.42025453, -0.42025453, -0.42025453,
        -0.42025453, -0.42025453, -0.42025453],
       [ 0.25013918,  0.25013918,  0.25013918,  0.25013918,  0.25013918,
         0.25013918,  0.25013918,  0.25013918],
       [ 0.36006033,  0.36006033,  0.36006033,  0.36006033,  0.36006033,
         0.36006033,  0.36006033,  0.36006033]], dtype=float32)

I see errors in "  /home/runner/work/equinox/equinox/equinox/internal/_finalise_jaxpr.py:165:56 - error: Argument of type "bool" cannot be assigned to parameter "return_shape" of type "Literal[True]" in function "make_jaxpr""
Is there anything I should do to resolve this?

This was due to an upstream change in core JAX.
I've just pushed a compatibility fix to Equinox! Try rebasing your change on top of the latest Equinox commit.


IR-308: Add support for External platform

The registry shouldn't be installed by default on the External platform.

/assign @flavianmissi

/lgtm

/retest

/assign @stevsmit
/assign @xiuwang
/assign @sferich888
for docs, qe, px approvals

/label qe-approved

/label docs-approved


Use ClimaComms to determine array type

This PR changes from using Krylov.ktypeof to ClimaComms.array_type to determine the array type passed to Krylov.jl

Do we need to modify the compat?

Do we need to modify the compat?

Yeah, I split off the deps part in #181

Do we need to change the minimum compat?

Do we need to change the minimum compat?

Ah, yeah, we'll need to adjust the ClimaComms compat to when ClimaComms.array_type was introduced, I'll take a look

ClimaComms lower bound is "0.4"

bors r+

bors r-

I didn't test this on all the cases, but it worked for the failing case in this commit's build:
https://buildkite.com/clima/climaatmos-ci/builds/9721#0188261d-eb0e-47bc-b882-c5b4ed1decbe

bors r+


View several live preview in Brackets

Hi there
I am using the new version Brackets
The problem I have with it
Always live preview two or more displays
And should always be made to feel refreshed
I searched the forum for my problem, but could not find
How can I solve my problem?

@msmaxsoft This is now possible using MultiBrowser Live Preview introduced in Brackets 1.2.

Use File > Enable Experimental Live Preview to turn it on
Live Preview will start in your default browser
For now, you'll need to copy url from default browser to other browsers (but we hope to make that easier in the future).

Is that what you were looking for?

No no
My point is that when I use the live preview in Chrome
When changing the part repeated twice and must be constantly refreshed
Like the picture below
http://gemupload.ir/images/8mdwm4ejh71fcia4orj.png

I believe this is a duplicate of #10634.

tnk's


Hauwarh's-Setup-completed-and-test-passed

Added a folder containing my submissions.

Thanks @Hauwarh!


Integration with Dressing.nvim

Hello there, first of all I do appriciate your work and thanks for the plugin!
Just found out about the plugin, so added the following lines in my configuration (./lua/paks/esqueleto/init.lua)

├── lua
│   ├── paks
│   │   ├── esqueleto
│   │   │   ├── init.lua
│   │   │   └── templates
│   │   │       └── LICENSE
│   │   │           └── MIT

Thus I shamelessly stolen the template for the MIT License just to test it out.
It doesn't always work (does not detect the file as an empty file?), probably something wrong on my side, but when it does, with Dressing.nvim I'd get a prompt like the following

Thus confirming that at least the configuration is not completly bogus: once selected the file LICENSE is empty.
EDIT 1: Not sure why but filename doesn't always return the filename but, instead, the full path to the file, thus that's the reason it doesn't always work (it does not match the file).
Using %:t instead seems to be working as expected
M.Esqueleto = function()
  -- only prompt if template hasn't been inserted
  local filepath = vim.fn.expand("%:p")
  local filename = vim.fn.expand("%:t") -- <
  local filetype = vim.bo.filetype

EDIT 2: Dressing vim.ui.select is async, thus selection is never set and select returns nil instead.

Let me adress step by step:

There is a bug with the variable filename, I'm going to fix it ASAP.
I'm currently developing the UI for esqueleto, in a couple of week I should have a working prototype
Maybe I could add support for dressing.nvim, but it will be low in my priorities for the time being

P.D. Whats your colorscheme and font? looks nice for creating example gifs and images.
Thanks for the issue!

Glad you like my setup!
The first isn't really a screenshot, more like a snippet of code taken with 0oAstro/silicon.lua, which does in fact use some of the highlight groups defined by the colorscheme.
As for the colorscheme I am using a slighty modified version of the carbonfox variant of EdenEast/nightfox.nvim, while the font is M PLUS Code Latin 60
This is what a real screenshot looks like (Stock awesome wm, just killed the picom compositor to disallow the transparency, with wezterm as terminal emulator)

As for the issues, no problem at all!
I will be patiently wait for an update :yum:

I'm currently working in the insertion prompt UI, once that's out of the way I may add support for Dressing.nvim


'a' tag with target="_blank" opens in the same tab under Browser.application

I have recently updated my app to Elm 0.19 & Browser.application and an a link with an external URL and target="_blank" no longer opens that URL in new tab. Instead it opens in the same tab.
I do not know how to work around this. I'm not sure what other information to include. I can attempt to put together an example if that would be useful.

I cannot reproduce this with a smaller example. Perhaps it is in my set up. I apologise for the noise. I'll reopen if I find out more.


Crash contributors screen when error happens

Describe the bug
We didn't handle the error on Contributors screen also nothing ticket to implement it.
To Reproduce
Steps to reproduce the behavior:

Turn on the AirPlace mode
Go to contributors screen
App crash

Expected behavior
Showing the toast or something instead of app will crash at here
Screenshots
If applicable, add screenshots to help explain your problem.

This is exactly what I am working on these days.
If you interested in this issue, please take a look at these pull requests
https://github.com/DroidKaigi/conference-app-2022/pull/718

I think this will happen in staff screen as well. I will create the issue.

Up to someone who interest to implement it!

This is handled in https://github.com/DroidKaigi/conference-app-2022/pull/767


Using transform-origin cross-platform

Current Behavior
T in consideration a component like the following if you want to animate the height of a component
      <Stack
        animation={'quick'}
        width={200}
        scaleY={isCollapsed ? 0 : 1}
        bg="red"
      />

it woks very well, and also cross-platform (AMAZING!), but it will animate starting from center.
Let say now taht I want to use that Stack to create a collapsible panel, I may want to animate it using top-center as the transform origin, but unfortunately the only way I found to do this is by adding style={{ transformOrigin: 'center top' }}, which breaks cross-platform compatibility.
The only way I found to do it cross platform, is to directly use a RN's Animated.View, and use Animated values to control the height, but by using Animated.View I lose all tamagui style props benefits.
Is there a better way to do it ? Or given this requirements it is the only way to accomplish this?
Expected Behavior
There should be an easier way to animate width and height cross platform
Tamagui Version
latest as of 12/07/2023

Reproduction
There is nothing to reproduce here, it just a "conceptual" issue

System Info
System:
    OS: macOS 13.4
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 321.50 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.17.0 - /usr/local/bin/node
    Yarn: 3.5.0 - ~/.nvm/versions/node/v16.17.0/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
  Browsers:
    Brave Browser: <IP_ADDRESS>
    Chrome: 114.0.5735.198
    Firefox: 112.0.2
    Firefox Developer Edition: 113.0
    Safari: 16.5

does animated.view accept transform origin?

No, it doesn't, but it does animate height if passed as animated value, on the other hand tamagui doesn't animate height if component has animation prop, you can see what I mean in this repo where I reproduced the issue on the home screen

React Native has a PR open for this, once that is merged we can support it.


Track the number of commits dropped per engine roll

quote from @yjbanov

The reason this number is important is because when we drop a lot of commits, there's a much higher chance that it will have to be rolled back, and the extra size of the drop makes the rollback process disproportionately more difficult (e.g. it requires a longer bisection). Large number of commits also means higher latency between an engine change and its landing in the framework.

This should be doable when we parse/collect flutter rollers metrics.

@keyonghan did we ended up adding this dashboard?

No. This is not implemented ever. Un-assigning myself as I am not working on this.


place credentials on individual lines

Reason for change
Fixes  #9473
We want our credential reading experience to include line breaks.
It had before and a regression was introduced. This fixes that regression.

Testing

[ ] have a look a storybook under resource details and peek at a credential (youll be plesently surprised I promise!)

Checklist

[x] CHANGELOG: The Unreleased section of CHANGELOG was updated
n/a Prop changes: docs were updated
n/a Prop changes: E2E tests were updated, testing from the highest level possible
coming soon from :mog: Platform testing: If this change should be tested against a platform, has it been?

The diff in your Happo tests here is odd. Why would that be a change introduced by this PR?

Its a flaky happo test we've been noticing lately

I'll make an issue for it

Ok. Should I accept the change in Happo in the meantime?

YES


Update to Melodic/Foxy

Issue #, if available:
Description of changes:
In this change, we fix two things:
(1) Update the cloudformation to use Melodic and Foxy.
(2) Update the README to use a valid default stack name.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Minor update to change to Melodic.


Update documentation

config.js key values pairs need to reflect what is in the .env file
Refer to https://github.com/spences10/twitter-bot-bootstrap/issues/87 for details on how to resolve

I noticed that the RANDOM_REPLY string is actually pipe-separated, but I believe the documentation says it is comma-separated.

Yeah, I use pipes so that a response can then use a comma, like: "hey @{userName}, how's things?"


Cow: Watch mayurahospitals.com

Cow requests the watch of the watch_keyword mayurahospitals\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

mayurahospitals\.com has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Makyen in Charcoal HQ


language-specific data location

great tool! fastest speed I know of 👀
im sry this is not related to the project, but i would like to know something 🙏
do u know where i can find the song title data of the game?
e.g. priamb = princess be ambitious!!

sorry for late response
you can infer the abbreviation of the song title from the file name
this is the only way afaik


Maintain changelogs

Within a monorepo like this, it would be super useful for consumers to have changelogs for packages. I know how challenging this can be in a monorepo (I maintain several of them) so I would like to propose using Changesets to do this.
It allows you to keep inter-package dependencies in check and pushes people to write meaningful changelog entries which are editable in git like any other regular file and they become part of the code review process (which I feel is important for any package). They can also be quite rich - you get the whole markdown at your disposal, which is also great as you can describe the change, its motivation, code examples and even visuals.
Disclaimer: I'm Changesets maintainer, but I've only become one after being its user and falling in love with the project.

Hey @Andarist thanks for the suggestion. We are just starting to figure out how to best communicate our changelogs so we will definitely take a look.


Infra: Improve Release Notes from Changelog?

Situation
The Releases tab contains all of our released versions. That's fine, but it's a little bit empty. Our users could be confused what we did for this release. :wink:
Interested users need to find the Changelog file and locate the respective version. This is a bit cumbersome.
Proposed Solution
As we already have a Changelog, I would suggest to use this text when we release a new version.
An example how this could look like can be found for the 2.9.0 release: https://github.com/python-semver/python-semver/releases/tag/2.9.0
Currently, it's a little bit cumbersome as the Changelog is in RST, but GitHub expects Markdown. I copied it manually and adapted the text (with the help of some nifty regex).
If you like this idea, this can be done with some scripts or already existing conversion tools to make the conversion a bit easier.
However, I don't see this as a big disadvantage as the text is usually not very long, the text can be automatically converted, and it has to be done only once.
Benefits
I would see the following benefits:

Interested users don't need to find the Changelog
Everything is in one place. :wink:
The respective issues or pull requests are linked and can be easily followed.

Ah!!! Markdown vs reStructuredText it's like choosing between Vi and Emacs (Emacs vs VI in that case)...
I must admit that I have always prefered Emacs.

+1 about adding part of changelog for each release (especially if you have appropriate regexp to change for rst to md)

Thanks! I think, this is one of the tasks that should be done for each release.
That's how I did it:

Open the CHANGELOG.rst file.
Copy the relevant part of the version to a separate file, for example, v2.9.0.rst.
Replace :gh:`(\d+)`  with #\1.
Replace :pr:`(\d+)`  with PR #\1.
Replace :func:(`[\w\._]+`) with \1.
Adjust the headers (I usually use two hash signs).

You can also try pandoc to convert rst to md
pandoc CHANGELOG.rst -f rst -t markdown -o CHANGELOG.md

You can also try pandoc to convert rst to md
pandoc CHANGELOG.rst -f rst -t markdown -o CHANGELOG.md

I did that before, but I wasn't satisfied with the result. :wink: For example, I wanted to distinguish between "normal" GitHub issues (:gh:) and pull requests (:pr:). After the conversion, this information is lost (although I have to admit, it's not thaat important).

Ok, I also updated the release notes for the 2.8.2 release.

I think, we can close this issue now. The most recent versions have now a good description.
If you think I still missed something, just reopen it.
Thanks for your feedback!


Download page must include links to KEYS, sigs, hashes

The download page:
http://skywalking.apache.org/downloads/
must include links to KEYS, sigs and hashes and should indicate how to verify downloads.
Please see:
http://www.apache.org/dev/release-distribution#sigs-and-sums

Thanks for the prompt attention to this


yarn build errror

I would really like to try this. However when running yarn build I do get the error below. Would it be possible to add some screenshots how the weathermaps may look like?
at rejected (/var/lib/grafana/plugins/grafana-weathermap/node_modules/tslib/tslib.js:108:69)
✖ f.getRuleSeverity is not a function
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
.

Hi,
We have deployed a new version which is an intermediate version.
A documentation is available with details (draft version)
Other versions are planned very soon.
Thanks


Trying to build for Apple Silicon using Clang 16.

Attempting to build with Apple clang version 16.0.0 (clang-16<IP_ADDRESS>) on Apple silicon: arm64-apple-darwin24.1.0. Any ideas to resolve include errors.
[ 80%] Building C object CMakeFiles/pd.dir/port/src/utils.c.o
[ 81%] Building C object CMakeFiles/pd.dir/port/src/video.c.o
1 warning generated.
[ 81%] Building CXX object CMakeFiles/pd.dir/port/fast3d/gfx_cc.cpp.o
[ 81%] Building CXX object CMakeFiles/pd.dir/port/fast3d/gfx_opengl.cpp.o
In file included from /Users/ntrischi/Downloads/perfect_dark/port/fast3d/gfx_cc.cpp:1:
/Users/ntrischi/Downloads/perfect_dark/port/fast3d/gfx_cc.h:8:10: fatal error: 'compare' file not found
    8 | #include <compare>
      |          ^~~~~~~~~
1 error generated.
make[2]: [ 81%] Building CXX object CMakeFiles/pd.dir/port/fast3d/gfx_sdl2.cpp.o
*** [CMakeFiles/pd.dir/port/fast3d/gfx_cc.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 81%] Building CXX object CMakeFiles/pd.dir/port/fast3d/gfx_pc.cpp.o
/Users/ntrischi/Downloads/perfect_dark/port/fast3d/gfx_pc.cpp:3:10: fatal error: 'cmath' file not found
    3 | #include <cmath>
      |          ^~~~~~~
/Users/ntrischi/Downloads/perfect_dark/port/fast3d/gfx_opengl.cpp:6:10: fatal error: 'map' file not found
    6 | #include <map>
      |          ^~~~~
1 error generated.
make[2]: *** [CMakeFiles/pd.dir/port/fast3d/gfx_pc.cpp.o] Error 1
1 error generated.
make[2]: *** [CMakeFiles/pd.dir/port/fast3d/gfx_opengl.cpp.o] Error 1
make[1]: *** [CMakeFiles/pd.dir/all] Error 2
make: *** [all] Error 2

fatal error: 'cmath' file not found
This seems to imply your compiler is horribly misconfigured. Not sure how you would fix this, as I'm not well educated on building things on OSX.
In addition is there any reason why you're building with actual Clang instead of using the gcc packages provided in Homebrew?


Menu system breaking

Looking for advice here, not sure if it's my problem or something with the theme, but I noticed that after making a couple of changes, such as adding new pages, nothing drastic, the menu breaks: on Blog pages, for example, the top menu doesn't lead to the Home page anymore, instead it tries to open #links on the current blog page.

I can give you admin access to the site with broken menus to facilitate debugging.

Yes, please.

How can I contact you about this data?

Please contact at<EMAIL_ADDRESS>

Hello. Have you had the chance to look at the issue using the login credentials I provided?

Hello, i have the same issue here. Any news ?

Well. I found a solution here. (I didn't see it was referenced multiple times elsewhere).
Thank you for bringing that solution.


Issues working with Standard + Flow/ Flowtype (question/ asking for help!)

What version of standard?
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>What operating system, Node.js, and npm version?
npm 5.6.9
node 10.1.0
macos 10.12.6
What did you expect to happen?
I'm trying to use flow to enforce some interface types in my code, but struggling to get standard to recognise valid flow syntax.
Currently I have written:

interface Response {
  email: string;
  nickname: string;
  id: number;
}

var val: Response = {
  email: "1",
  nickname: "123",
  id: 1,
}

Which should return no errors
What actually happened?
Standard is underlining Response just after the keyword interface with the message:
[standard] Response is not defined. (no-undef).
In my package.json I have added the following as instructed by the docs
  "standard": {
    "parser": "babel-eslint",
    "plugins": [
      "flowtype"
    ]
  },

I expect I am lacking some config somewhere, but have had no luck getting to the bottom of this! Any help / suggestions much appreciated

According to this comment https://github.com/standard/standard/issues/984#issuecomment-346831391, the best workaround is to pin babel-eslint to 7.2.1.
As far as I'm aware, this is a bug in babel-eslint.


Implement finite momentum Cooper pairs

Pull Request Test Coverage Report for Build<PHONE_NUMBER>6
Details

18 of 18 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build<PHONE_NUMBER>9:
0.0%

Covered Lines:
630

Relevant Lines:
630

💛  - Coveralls


Context should be renamed

I think we should rename Pi4j class to Pi4jProvider and Context to Pi4j.
Currently in all the code examples we use the following code:
var pi4j = Pi4J.newAutoContext();

Some people like to use these vars, but others like to use the actual class. And in this case the class is Context, but the variable is pi4j. IMHO this does not make sense.
So if we rename as described, we get this:
var pi4j = Pi4JProvider.newAutoContext();

or this:
Pi4j pi4j = Pi4JProvider.newAutoContext();

which looks much better and makes more sense for newbies.

I'll have to think on this.  I really like the Pi4J moniker being the static helper.  If we just change Context to Pi4JContext then we still end up with this:
var pi4j = Pi4J.newAutoContext();

The Pi4J static helper only serves to create a context today, but we could add more helper methods to it as needed.

I'll have to think on this.  I really like the Pi4J moniker being the static helper.  If we just change Context to Pi4JContext then we still end up with this:
var pi4j = Pi4J.newAutoContext();

The Pi4J static helper only serves to create a context today, but we could add more helper methods to it as needed.

True, but then the suffic Provider would fit those contexts nicely, as it provides contexts and builders. Those builders are used in initialization and then the actual context will become the main object on which actions are performed.

True, but then the suffic Provider would fit those contexts nicely, as it provides contexts and builders. Those builders are used in initialization and then the actual context will become the main object on which actions are performed.


Support some special LaTeX commands.

In ee5bacd85cef5c15096aebfde8fa7ec9559ef36c, I added the support for \par.
But there must be more such commands like

\@
\\ (This is parsed differently right now.)
\'
\"
These were previously supported in GraTeX. But since I changed the way unknown commands are converted, these are not supported now.

These are now treated as Word::Symbol. But in AST, these will be deleted.


After upgrading to Angular 13, calling scheduleBuilder fails with Error: "The builder requires a target."

🐞 Bug report
Command (mark with an x)

[ ] new
[x] build
[ ] serve
[ ] test
[ ] e2e
[ ] generate
[ ] add
[ ] update
[ ] lint
[ ] extract-i18n
[ ] run
[ ] config
[ ] help
[ ] version
[ ] doc

Is this a regression?

Yes, the previous version in which this bug was not present was: Angular 12
Description
 After upgrading to Angular 13, my custom builder that called `scheduleBuilder('@angular-devkit/build-angular:ng-packagr')` started to fail with Error: "The builder requires a target".
The reason is the commit introduced in Angular 13 https://github.com/angular/angular-cli/commit/5904afd1de3ffa0bb6cd1757795ba9abfce9e523 , now it throws the error, when there is no target https://github.com/angular/angular-cli/blob/5904afd1de3ffa0bb6cd1757795ba9abfce9e523/packages/angular_devkit/build_angular/src/builders/ng-packagr/index.ts#L34-L37
Workaround: thanks to the another commit in Angular 13 https://github.com/angular/angular-cli/commit/51622bdeaff12e1e3109143f9ae28a02ae5ba2fe, now I'm able to fix myself the problem and pass a new option target in the 3rd argument of scheduleBuilder() function.
The point is, it would be nice to add a schematics migration in v13 to pass the original target to the calls of   scheduleBuilder. Or at least document it in the breaking changes section of the package @angular-devkit/build-angular
🔬 Minimal Reproduction
Using Angular 12, create a custom builder that calls inside: scheduleBuilder('@angular-devkit/build-angular:ng-packagr'). Then upgrade to Angular 13, run your builder and observe the build error: "The builder requires a target".
🔥 Exception or Error
"The builder requires a target"
🌍 Your Environment

Angular CLI: 13.0.1
Node: 16.13.0
Package Manager: yarn 1.22.10
OS: darwin arm64

Angular: 13.0.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1300.1
@angular-devkit/build-angular   13.0.1
@angular-devkit/core            13.0.1
@angular-devkit/schematics      13.0.1
@angular/cli                    13.0.1
@angular/pwa                    13.0.1
@nguniversal/builders           13.0.0
@nguniversal/express-engine     13.0.0
@schematics/angular             13.0.1
ng-packagr                      13.0.3
rxjs                            6.6.3
typescript                      4.4.4

Hi @Platonn,
Thanks for opening the issue.
In this case I don't think this warrants a migration, because the architect API is still considered as experimental and scheduleBuilder is not widely used.
I think adding to the changelog will be sufficient.

Hi @alan-agius4 . Thanks for encouraging to provide PR. Here it is https://github.com/angular/angular-cli/pull/22174


M04-LAB07 Python lab fails unless neural voice is provided for text-to-speech

Module: 04
Lab/Demo: 07
Task: Synthesize speech
Step: 4
Description of issue
Two students had the same issue ResultReason.Cancelled when running the python lab without providing neural voice for the text-to-speech part, looks like the sdk tries to use standard by default. It may be related to this warning:   ...but all new users/new speech resources must choose neural voices https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support#standard-voices`
Running after completing task Use a different voice makes it word (adding the neural voice)
// Configure speech synthesis
speechConfig.SpeechSynthesisVoiceName = "en-GB-RyanNeural"; // add this
using SpeechSynthesizer speechSynthesizer = new SpeechSynthesizer(speechConfig);

Thanks @unaihuete93
The instructions have been updated for both Python and C# 👍


[CF] Define DECLARE_STATIC_CLASS_REF macro.

If !DEPLOYMENT_RUNTIME_SWIFT, just defining STATIC_CLASS_REF is
insufficient, since CFBase refers to DECLARE_STATIC_CLASS_REF.

@swift-ci test and merge


basic eslint file for javascript/typescript

add ESLint file for plugin. the extension file already has it.

Yes, that's it! Here are some "rules" flags I've used for other projects to require 2-space indents and 120 line length. VSCode should be able to run eslint for you (might need to enable it) and pull in the .eslintrc.json file.
    "max-len": [
      "error",
      {
        "code": 120
      }
    ],
    "indent": [
      "error",
      2,
      {
        "SwitchCase": 1,
        "flatTernaryExpressions": false,
        "ignoreComments": false
      }
    ],

Add a space after variable and before typescript types (foo:HowdoiResult -> foo: HowdoiResult)
Remove all semicolons (It's weird, I know, but they aren't necessary
in Typescript. I also changed the .eslintrc file to show errors if
semicolons are included)
Prefer using ' everywhere rather than " (added eslint rule)
Make sure that there is always a space after a comma (added eslint
rule)
Fix indentation according to lint suggestions
Some of these changes are personal preference, but by attaching an
associated eslint rule and requiring that linting pass before a PR can
be accepted, you can keep the codebase readable and uniform.

@gleitz right now I'm running eslint via npm. Did you want me to add these linting rules to your Travis CI?

If possible that would be great!
On Mon, Jun 29, 2020, 2:47 PM Diana<EMAIL_ADDRESS>wrote:

@gleitz https://github.com/gleitz right now I'm running eslint via npm.
Did you want me to add these linting rules to your Travis CI?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MLH-Fellowship/howdoi/issues/37#issuecomment-651386556,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AADAP5U5JONSEDAQYT4324DRZEDWHANCNFSM4OF7QRZA
.


CockroachDB architecture

Breakdown of architecture - concise, clear, and with diagrams. Based on CockroachDB design doc.

RFC on structure and location: https://github.com/cockroachdb/docs/issues/1482
Initial PR: https://github.com/cockroachdb/docs/pull/1613


Update BlockBiCGSTB.jl

Corrected capital in function name.

Coverage remained the same at 76.854% when pulling 6f5996e92650b76f947bdd283d1b03ff5ad46bce on erantreister:patch-1 into 8d27374c364813ce6b948afacc70347b972394ee on lruthotto:master.


🚀 Feature: normalize union ordering and readonly array syntax

Bug Report Checklist

[X] I have tried restarting my IDE and the issue persists.
[X] I have pulled the latest main branch of the repository.
[X] I have searched for related issues and found none that matched my issue.

Overview
Splitting out from https://github.com/microsoft/DefinitelyTyped-tools/issues/858#issuecomment-1850833260: @definitelytyped/expect internally "normalizes" commented types by creating a virtual source file with a type annotation, then stringifying the type annotation. https://github.com/microsoft/DefinitelyTyped-tools/blob/3d6c2ffd0b38eac222e03156c3d62d6020b2b94b/packages/eslint-plugin/src/rules/expect.ts#L492
That feature is particularly useful for when you have multiple TS versions (#107). It's also generally nice to be a little less nitpicky for users (see also: #18). Let's take that feature in here!
Additional Info
No response

I will note that our existing normalization both before and after are imperfect, specifically for readonlyness. It's totally possible for someone to have declared a type named ReadonlyArray and it conflict such that an expect passes, but the risk seemed quite minimal.
Union sorting should be fine, though it does have a perf cost (that is avoided on exact matches).

For union ordering specifically, there's some code (and tests) you could grab from literate-ts:
https://github.com/danvk/literate-ts/blob/e6f91f2e15ce59d915fb0f4c08d68a656c32e7e4/src/ts-checker.ts#L367-L388
https://github.com/danvk/literate-ts/blob/e6f91f2e15ce59d915fb0f4c08d68a656c32e7e4/src/test/ts-checker.test.ts#L509-L555

I would recommend not parsing any type strings; this kind of code wouldn't handle string literal types containing | (which is why I did it differently in the rule for DT).


HOT RELOAD: Full end to end Flutter reload benchmark

Request the reload
Send file updates
Reload
Reassemble framework
Frame

We are reporting these times to analytics (both for reload and restart) but do not yet have a canned benchmark.

Now that every single user of hot reload / hot restart report the time from key press to the first frame I don't think we need a canned benchmark. I'm closing this issue.


Connection String Breaks Between Executions Due to .WithDataVolume()

I am attaching a volume to PostgreSQL using the following code snippet:
var postgres = builder.AddPostgres("database")
                      .WithPgAdmin()
                      .WithDataVolume();

However, my service is unable to connect to the database, resulting in the following error:
Unhandled exception. Npgsql.PostgresException (0x80004005): 28P01: password authentication failed for user "postgres"

The connection succeeds when I remove the .WithDataVolume(); line. It appears that the password used in the connection string is being generated anew with each execution, instead of using the password that was generated when the database was initially created.

Yes, this is a known issue when using volumes https://github.com/dotnet/aspire/issues/1151
cc @eerhardt

@davidfowl  Sorry! I searched here before opening, but I did not find it. Thanks.

The workaround is to specify a password as a parameter

@davidfowl, can you point out some examples or documentation that shows how to set the password?
Probably it is obvious, but I am new to the .NET world and am on the learning curve getting used to Microsoft documentation.
I really appreciate your help! Thanks

Wrote something here:
https://github.com/dotnet/docs-aspire/issues/672#issue-2242008335

We should document this as a known issue.

Good job, .WithDataVolume() can pass the database account password validation properly now.

This was fixed in 8.1


fixing bug bash bugs

Added a 500-character cap on the Bio and a 15-character cap on the user name via the maxlength attribute.

Have you considered adding these to the schema? If you add these constraints as .min() and .max() properties on the user schema, they will be enforced at a repository level rather than only at an input level.

Have you considered adding these to the schema? If you add these constraints as .min() and .max() properties on the user schema, they will be enforced at a repository level rather than only at an input level.

Will check over and submit a new PR

i checked the code should be good to merge

This looks good to me too, I'm going to merge


Model Description

The Shop Floor Information Service will be extended in 2405 by a method to exchange process data collected during the production of a process for tracebility or documentation. This service will have two actions: a request asking for the data and the answer with the requested data.
Relevant Standards

None
This Request corresponds to the GetProductionTrackingData Request:
Example Data

Level
Property
mand./opt.
Semantic ID

CX-Header
"senderBpn"
mandatory
string

CX-Header
recipientBpn
mandatory
string

CX-Header
context
mandatory
string

CX-Header
messageId
mandatory
UUID

CX-Header
sentDateTime
mandatory
string

CX-Header
version
mandatory
string

SIS-Payload
versionDataModel
mandatory
string

SIS-Payload
customerId
mandatory
string

SIS-Payload
orderId
mandatory
string

SIS-Payload
positionId
mandatory
string

SIS-Payload
identifierType

[serial, batch, bom]

SIS-Payload
identifierNumber
mandatory
string

SIS-Payload
processReferenceType

[processStep, capability]

SIS-Payload
bopId
0..1
BoP

SIS-Payload
processStepIdentifierList
1

SIS-Payload
capabilityId
(0..n)

partInstanceLevel

[bom, serial]

bomId
1
BoM

bomElementId
1
BoM-Element

serialNumber
1
Seriennummer

SIS-Payload
processStepId
(0..n)
"ProcessStepIdentifier

SIS-Payload
processParameterList
1

SIS-Payload
processParameterName
1..n
"ProcessParameter[string]

processParameterSemanticID
1..n
SemanticID

MS1 Criteria

[ ] The proposed aspect model does not exist already
[ ] The proposed aspect model does not extend an existing aspect but introduces completely new functionality
[ ] The proposal references a Catena-X use case
[ ] Relevant standards are mentioned/linked
[ ] A first draft of the data structure is provided in an example
[ ] A modeling steward has been assigned

modeling_team

Need discussion about using identifier names.
@wehrstedt-jan @jacewski-bosch @jonbckr


Add frame_interval_secs to WindowOpenOptions

To achieve lower input latency in iced, I need the frame interval to run at 120fps. Iced sets the wgpu swapchain to Mailbox mode, so rendering still happens at 60fps. However, this causes less misses for the current frame reducing the perceived latency.

I also find that having the default as exactly 60fps feels smoother with less chugging.

It seems to me like the issue here is that Iced doesn't provide a mechanism for configuring the wgpu swapchain mode, and so in Mailbox mode the draw loop proceeds entirely unsynchronised relative to the vblank.
I'm going to reject this PR because I consider frame timing a window system issue and not one of the application itself. For example, Wayland surfaces receive frame/present requests for drawing their frame, so a Wayland baseview backend wouldn't have a timer at all. Likewise on macOS, we'll be investigating using CVDisplayLink instead of a timer.
X11 is a bit of an outlier in that it doesn't provide a reasonable mechanism for vblank notification for the purposes of timing or triggering frame drawing, and that's largely why we have a very simple timer for the time being. If your wgpu swapchain could be created in the Fifo mode, you would at the very least synchronise your draw loop to vblank (since presenting the drawn buffer blocks until vblank).
Still, this is something I am very interested in solving in the future, but since frame timing is dictated by the window system, you should consider the X11 frame timer a stopgap hack, and for that reason I'm unwilling to expose any part of it in the public API.


Fix(form): Updating an attribute in form with dates does not work

Expected Behaviour
https://equinor.slack.com/files/UKFDMCY8M/F0670DGMHGQ/form-list-inline.gif
Actual Behaviour
Steps to Reproduce

Seems to be working? 🤔


Running the basic example fails with the ATC node being registered as unhealthy by ALB

Bug report

What is the problem?
I have followed the steps for the basic example included in this repo, but the setup results in the concourse ATC node being registered as unhealthy by the ALB, reporting the following:

"Health checks failed with these codes: [502]".

This is the system log from the ATC EC2 instance:
cloud-init[2432]: No packages needed for security; 0 packages available
[   21.929443] cloud-init[2432]: No packages marked for update
[   23.119778] cloud-init[2569]: Cloud-init v. 19.3-2.amzn2 running 'modules:final' at Fri, 24 Apr 2020 13:00:42 +0000. Up 22.78 seconds.
[   23.203070] cloud-init[2569]: /opt/aws/amazon-cloudwatch-agent/bin/config-downloader --output-dir /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d --download-source file:/opt/aws/amazon-cloudwatch-agent.json --mode ec2 --config /opt/aws/amazon-cloudwatch-agent/etc/common-config.toml --multi-config default
[   23.996496] cloud-init[2569]: Successfully fetched the config and saved in /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/file_amazon-cloudwatch-agent.json.tmp
[   24.003060] cloud-init[2569]: Start configuration validation...
[   24.010169] cloud-init[2569]: /opt/aws/amazon-cloudwatch-agent/bin/config-translator --input /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json --input-dir /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d --output /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.toml --mode ec2 --config /opt/aws/amazon-cloudwatch-agent/etc/common-config.toml --multi-config default
[   25.552134] cloud-init[2569]: 2020/04/24 13:00:44 Reading json config file path: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/file_amazon-cloudwatch-agent.json.tmp ...
[   25.635388] cloud-init[2569]: Valid Json input schema.
[   25.636982] cloud-init[2569]: I! Detecting runasuser...
[   25.703905] cloud-init[2569]: No csm configuration found.
[   25.707048] cloud-init[2569]: Configuration validation first phase succeeded
[   25.711295] cloud-init[2569]: /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent -schematest -config /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.toml
[   28.775444] cloud-init[2569]: Configuration validation second phase succeeded
[   28.778805] cloud-init[2569]: Configuration validation succeeded
[   28.801562] cloud-init[2569]: Created symlink from /etc/systemd/system/multi-user.target.wants/concourse-logging.service to /etc/systemd/system/concourse-logging.service.
[   28.932285] cloud-init[2569]: Created symlink from /etc/systemd/system/multi-user.target.wants/amazon-cloudwatch-agent.service to /etc/systemd/system/amazon-cloudwatch-agent.service.
[   29.037133] cloud-init[2569]: Created symlink from /etc/systemd/system/multi-user.target.wants/concourse.service to /etc/systemd/system/concourse.service.
[   41.220325] cloud-init[2569]: State is "initial"
[   52.323735] cloud-init[2569]: State is "initial"
[   63.291027] cloud-init[2569]: State is "initial"
[   74.039353] cloud-init[2569]: State is "initial"
[   85.183772] cloud-init[2569]: State is "initial"
[   96.185059] cloud-init[2569]: State is "initial"
[  106.954684] cloud-init[2569]: State is "initial"
[  117.600431] cloud-init[2569]: State is "initial"
[  128.393705] cloud-init[2569]: State is "initial"
[  139.417152] cloud-init[2569]: State is "initial"
[  150.165313] cloud-init[2569]: State is "initial"
[  160.881475] cloud-init[2569]: State is "initial"
[  171.620078] cloud-init[2569]: State is "initial"
[  182.439120] cloud-init[2569]: State is "initial"
[  193.298698] cloud-init[2569]: State is "initial"
[  203.925341] cloud-init[2569]: State is "initial"
[  214.556201] cloud-init[2569]: State is "initial"
[  225.611424] cloud-init[2569]: State is "initial"
[  236.503390] cloud-init[2569]: State is "initial"
[  247.510155] cloud-init[2569]: State is "unhealthy"

Steps to reproduce

Please post the relevant parts of the failing terraform code here (remember to remove sensitive information):

Follow the steps outlined in: https://github.com/telia-oss/terraform-aws-concourse/blob/master/examples/basic/README.md
Terraform version

Run terraform version and post the output here:

$ terraform version
Terraform v0.12.23

Hey @pinfoldd! I see you closed the issue but I was just wondering if any action was required on your part, or did it just suddenly work?

Hey, thanks for getting back to me.
I changed the module source to explicitly reference the module from the terraform registry,
from:
module "concourse_atc" {
  source = "../../modules/atc"
  ...

to:
module "concourse_atc" {
  source  = "telia-oss/concourse/aws//modules/atc"
  version = "3.8.0"
  ...


Adding: Spectator Camera app.

This PR release the Spectator Camera app
as active in for installation.
The description has been updated with the instructions regarding a necessary configuration to be done in "QML whitelist" to make this app working.
Spectator Camera
Give you a video camera that can display its image on your monitor screen for video capture. It can capture from the camera or from the VR Headset. It can also take classic and spherical 360 snapshots (equirectangular format). A precious tool to generate coherent Ambient Sources for your Zone Entities. (Require a QML Whitelist configuration to work: 1- Go to menu "Setting > Entity Script / QML Whitelist". 2- Enable the whitelist. 3- Add this url to your whitelist: "https://kasenvr.github.io/community-apps/applications/spectator-camera/SpectatorCamera.qml". 4- Click "Save Changes".)
This PR includes also some recent fixes done by Silverfish:
-added tonemapping selector.
-fixed viewfinder scaling.
-new camera model that is not 8 drawcalls.
Rebuild the UI in HTML seems to be a considerable task. If the only interest for this product was only the camera output usage I wouldn't push to release it now, but the 360 snapshot feature is clearly the best option we have to generate efficient "Ambient Sources" for our Zone entities.
I think it's better to release it with the Setup instructions than not release it at all.

https://github.com/kasenvr/project-athena/pull/296 can you adjust the description to not mention anything to do with the whitelist? The whitelist will no longer be necessary, I notice the audio files are missing, are there any other changes that might have been done other than what Silverfish did?

Well I'm supposed to have override all the files with those from the repository from Silverfish.
I will double checked.
Regarding the whitelist, when I tested it, I found out that for QML, that needed to whitelist the path + the filename to work. If you whitelist only the path it don't work. Is the code has been changed to allow that? (if yes let me know, I will adjust the description by removing the configuration part)

The files has been verified, it's all there.


[joysl] Neptune Autoscaling

With this commit, user can choose to enable Neptune Autoscaling along with following configurable paramters [TargetUtilization, MinCapacity,MaxCapacity]
Description
With this commit, user can choose to enable Neptune Autoscaling along with following configurable paramters [TargetUtilization, MinCapacity,MaxCapacity]
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Refactor (existing code being refactored)
[ ] This change includes a documentation update

Submission Checklist

[ ] CI dry-run passing
[ ] Integration tests passing locally
[ x] Change logs generated

Additional Notes:

Thanks @joysl !


Update mailing trigger for resubmitted reports/pre-prints

Add new mail templates
update mail trigger

 Send a specific mail to the manager when the status of a preprint changes from "PRE-SUBMISSION PENDING VALIDATION" to "SUBMISSION PENDING VALIDATION"


Can't navigate to the next lessons. Waited long, restarted console and box and no change

It doesn't seem I can use up-down arrows to go to next lesson. Its always stuck on lesson 1. I waited long and tried it and no luck. I also restarted console and run it as admin too and yet, I can't move to the next session.
Its stuck on lesson one (Scopes) and I can't get into lesson 2 Scope Chains.
As a side note: Others courses worked just fine.
Environment: I'm on Windows 10.

This is a combinatory bug of recent versions of node and windows 10. @jesstelford this can be fixed by using workshopper-adventure instead of workshopper - not quite sure what the relevant difference is. We have not yet determined why that bug happened and how to fix that bug in node. Help welcome.


[Feature][Documentation] Execute more complex php

I had a need to add more complex helpers during the setup phase to assist in generating additional users, admins, etc prior to the test running.
For example, I have the need to test that one admin cannot edit another admin user. For this, I need to seed two users into the database and check that one does not have access to edit the other. Was considering copying the service provider structure used by this package like so:
class CypressHelperServiceProvider extends ServiceProvider
{
    public function boot()
    {
        if ($this->app->environment('production')) {
            return;
        }
        $this->addRoutes();
    }

    protected function addRoutes()
    {
        Route::namespace('')
            ->middleware('web')
            ->group(base_path('Tests/Cypress/routes/cypress_helpers.php'));
    }
}

Then in the route area
return [
    // Create new admin user and assign all permissions
Route::post('/__cypress__/createAdmin', [CypressHelperController::class, 'createAdmin'])->name('cypress.create.admin'),
    // Login via a given email address
    Route::post('/__cypress__/loginByEmail', [CypressHelperController::class, 'loginByEmail'])->name('cypress.login.email'),
    // Login via a given ID
    Route::post('/__cypress__/loginById', [CypressHelperController::class, 'loginById'])->name('cypress.login.id'),
];

Then in AppServiceProvider.php
 public function register()
    {
        if (config('app.env') !== 'production') {
            // Other service providers
            $this->app->register(CypressHelperServiceProvider::class);
        }
    }

Directory like so:

Example Controller
use Laracasts\Cypress\Controllers\CypressController;
use Spatie\Permission\Models\Permission;

class CypressHelperController extends CypressController
{
    public function createAdmin(Request $request)
    {
        $user = factory($this->userClassName())
            ->create($request->input('attributes', []));
        $user->setRole('admin');
        auth()->login($user);
        return $user;
    }

    public function loginByEmail(Request $request)
    {
        $user = User::find(['email' => $request->get('email')]);
        auth()->login($user);
        return $user;
    }

    public function loginById(Request $request)
    {
        $user = User::find($request->get('id'));
        auth()->login($user);
        return $user;
    }
}

Does this appear to be the correct approach for handling this requirement? If so, I can contribute some documentation to help others or update the package to publish some of these assets so users can just drop in their more complex requirements.

Looks great to me.
For Laravel 6+ you don't need to register the service provider. It is done automatically after composer dump-autoload.
Now your package depends on Spatie Permissions, make this optional. Many people don't use this package.
Instead of createAdmin action you could make an setRole($role, $userId) action. It is more versatile.

That was simply an example of how I implemented it. I'll work on some general documentation for this approach and PR it into the library. Closing this for now as it seems like the best approach.


Fix issue #195

Description
Added missing error check.
Fixes #195
Type of change

Bug fix (non-breaking change which fixes an issue)

Codecov Report

Merging #227 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #227      +/-   ##
==========================================
+ Coverage   39.91%   39.95%   +0.04%
==========================================
  Files          11       11
  Lines        1363     1364       +1
==========================================
+ Hits          544      545       +1
  Misses        803      803
  Partials       16       16

Impacted Files
Coverage Δ

server/trigger.go
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


Skip http content compression for small or uncompressable content

Motivation:
Content compression is not very effective for small results (default y 1024 bytes) or for already compresst content like JPEG images. Also the content compressor must be skipped for certain types of responses (like when sending a DefaultFileRegion). Therefore only FullResponses or chunked responses should be considered for content compression as otherwise an invalid result (Content-Encoding: gzip with uncompressed data) can be created.
Modification:
Introduced 2 new parameters for the content compressor: minCompressableContentLength (default: 1024) and compressableContentTypes (default: text/* and application/json) to better control when compression is turned on.
Also added a filter to only compress FullHttpResponses or ones with Transfer-Encoding: chunked.
Result:
Then content compressor now skips small or uncompressable results

AUTOMATED MESSAGE for ADMINS:Please verify and accept the pull request.To accept, say @netkins acceptTo build again, say @netkins buildTo whitelist the author, say @netkins whitelist

Please note that right now one test intentionally breaks: HttpContentCompressorTest.testSplitContent()
In this case a response of unknown length was created and then the result is sent in ByteBufs (but not chunked). With my modification this is not compressed anymore (which fails the test). I'd say this behaviour is good because if the user sends chunks of data but not as "transfer-encoding: chunked" he probably did that on purpose. Therefore the content compressor should not transform this into a chunked transfer secretly. If the user wanted / accepted a chunked transfer in the first place, he could set the appropriate header and the compressor would be turned on.
I'd say that is a better behaviour than trying to compress everything (including DefaultFileRegions) which will fail miserably... So I'd recommend to change the test. But if you prefrer backward compatibility we could also factor that semantic out in a single method so that a used can overwrite it to behave as described as above. (And by default try to compress everything which was the bevahiour up until now).

@trustin I like the idea... WDYT ?

@netkins accept

SGTM

factory method vs default constructor:
HttpContentCompressor.create().withPropA().withPropB();

vs.
new HttpContentCompressor().withPropA().withPropB();

Both looks fine to me, but I prefer using the language construct.
I wonder if using with*() for the setters is a good idea. All our other handlers' setters use set*() and it makes things more natural when a user wants to change the configuration later.
new HttpContentCompress().setPropA().setPropB();

doesn't look that bad, so I'd say let's use set*() instead.

@andyHa let us know when we should review again.

@normanmaurer I fixed (hopefully) all minor code style issues as noted by trustin. When remains open is

My static factory method vs. a "classic" constructor. As I pointed out in one of my earlier comments, this IMHO the best approach (here's my original comment):

I knew you'd ask this question, that's why I put the following in the JavaDoc (see below) - If you don't  share this intend, I can make it private....:

This method is made public so that other handlers can decide which kind of response to generate. For example when sending a file it might be better to send it via new HttpChunkedInput(new ChunkedFile(..)) which enables compression rather than via new DefaultFileRegion(...) which permits a zero copy transfer - but without compression.

Using "something else" to detect if a mime type should be compressed or not: Right now I used regular expressions as they should be the fastest way of determining which mime type to compress. However I'm completely open to a suggestion on how to support other mechanisms - I just don't know how (other than making the method protected so it can be overridden - which it is).

Therefore, please review the code and let me know if you have any suggestions or ideas...

Hi @normanmaurer , @trustin ,
I would like to ask you whether this commit will be ported in Netty 4.1?
Thanks,
Rado

@andyHa - Hey sorry for the delay. Would you mind rebasing your changes?


[Bug]: AttributeError when using .. include::

To Dos

[X] I tested with the latest released version.
[X] I have checked the issues and think that this is not a duplicate.
[X] I added a very descriptive title to this issue.

Example Code (rst)
This is the outer text.

.. include:: _common_definitions.txt

Relevant log output
WARNING:rstcheck_core.checker:An `AttributeError` error occured.
This is most probably due to a code block directive (code/code-block/sourcecode)
without a specified language. This may result in a false negative for source: 'index.rst'.
The reason can also be another directive. For more information see the FAQ
(https://rstcheck-core.rtfd.io/en/latest/faq) or the corresponding
github issue: https://github.com/rstcheck/rstcheck-core/issues/3.

Description
The file above is named index.rst. There is a second file (_common_definitions.txt):
This is some included text.

running rst2html5.py index.rst works as expected: the output html contains the included text.
running rstcheck index.rst gives the warning shown above.

Additionally:

The warning is shown no matter whether the file exists or not.

Operating System
Linux
Operating System Details
No response
Python Version
3.10
rstcheck Version
rstcheck CLI Version: 6.2.0 rstcheck-core Version: 1.2.0
Additional Context
No response

The issue is independent of the CLI so I moved the issue here.
The AttributeError is caused inside sphinx internal code. https://github.com/rstcheck/rstcheck-core/issues/3#issuecomment-1681934867 mentioned that this error can be caused from include directives, but it mostly occurs with language-less code-blocks as far as I know.
Unfortunately this issue is almost a decade old (https://github.com/rstcheck/rstcheck-core/issues/3#issuecomment-1140405059) and I don't have a fix for this. But I am open for PRs if you find a fix.
What wonders me in your case is, that you seem to use rst2html5 and not sphinx for building you docs. The issue only occurs if sphinx is installed inside the venv from where you are running rstcheck. And when you install rstcheck it only installs sphinx too if you run something like pip install rstcheck[sphinx]. Therefore it could be a simple fix to remove sphinx if you do not use it.
Closing as duplicate/in favor of #3.

Sorry, I missed that #3 also mentions include directives.
I'm using sphinx for building the docs. Above I just used rst2html5 to show/test that index.rst compiles fine when using just rst2x.
When not installing sphinx in the environment I get lots of "Unknown interpreted text role" and "Unknown directive type" errors. Thus this seems to not be the solution either :-/

Ah ok. Yeah all those unknown things are then probably sphinx things which are not part of basic RST.


test(docsWeb): docs add test for missing translations

Please check if your PR fulfills the following requirements:

[x] The commit message follows our guidelines: https://github.com/scullyio/scully/blob/main/CONTRIBUTING.md#commit
[x] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[x] Other... Please describe: new test to check if there are a missing translation

What is the current behavior?

Create a test to check if there are a missing translation
Issue Number: #922
What is the new behavior?
Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Hi @AlexScigalszky
Thanks for this test, but we can't merge this.
Merging this would mean tests will fail at the moment we add some new files to the documentation.
As we do trust in the community for language translations that is not something we can enforce in a test.
I really like the idea, but sadly it doesn't fit our way of working, and it would hurt the pace we can roll out documentation updates.
For that, I'm going to close this issue. Sorry.


Question to the image classification score for multi-label object detection

Hello,
I am working on an object detection problem where I have to detect N classes where each bbox may be one or more of those N labels. The image classification score computed in your paper for uncertainty re-weighting uses softmax, assuming that only one class can be present within one instance.

Could you give me some guidance how this formula can be generalized to multi-label case?

Hello,
I think you can change the softmax function to the sigmoid function for multi-label case, considering that multi-label case can be treated as many binary classication problems on each class.

@yuantn right, so if you were to bring it to the code, would it look something like this?
y_head_f_1 = self.f_1_retina(f_1_feat)
y_head_f_2 = self.f_2_retina(f_2_feat)
y_head_f_r = self.f_r_retina(f_r_feat)
y_head_f_mil = self.f_mil_retina(f_mil_feat)
y_head_cls_term2 = (y_head_f_1 + y_head_f_2) / 2
y_head_cls_term2 = y_head_cls_term2.detach()

y_head_f_mil = y_head_f_mil.permute(0, 2, 3, 1).reshape(y_head_f_1.shape[0], -1, self.cls_out_channels)
y_head_cls_term2 = y_head_cls_term2.permute(0, 2, 3, 1).reshape(y_head_f_1.shape[0], -1, self.cls_out_channels)
# computing mil scores for multi-class case (how it is right now)
# y_head_cls = y_head_f_mil.softmax(2) * y_head_cls_term2.sigmoid().max(2, keepdim=True)[0].softmax(1)

# computing mil scores for multi-label case
y_head_cls = y_head_f_mil.sigmoid(2) * y_head_cls_term2.sigmoid().max(2, keepdim=True)[0]

So now y_head_cls outputs scores for C binary classifiers (i.e classes)
And the ground truth mil scores for an anchor would be a binary vector instead of one-hot encoded one?
Feeling a bit hesitant about the impact of the second term. Could you, please, clarify if it is needed for my case?

The code seems to be OK.
But the ground truth mil scores is both a binary vector and an one-hot encoded one, such as [1,0,1,0,0] for an anchor with class 0 and class 2.
If you are still hesitant, you can debug for each component for the y_head_cls. Specifically, you can print the shape of y_head_f_mil, y_head_f_mil(2), y_head_cls_term2, y_head_cls_term2.sigmoid(), y_head_cls_term2.sigmoid().max(2, keepdim=True) and y_head_cls_term2.sigmoid().max(2, keepdim=True)[0] to confirm which one you need.

@yuantn got it, one last question ;)
You demonstrate results on PASCAL VOC dataset doing 7 AL cycles each time adding 5 % of examples from unlabelled set to the labelled one. Do I understand correctly that when applying this active learning pipeline to a real world project, we would need only one cycle? If so, how does one determine the amount of data to be used for Label Set Training and the rest for Re-weighting and Max/Min Instance Uncertanty?

@yuantn I also noticed that in the L_wave_max function you do not calculate image classification loss for the labelled set, although you have it in the equation 8 in the paper. Is it an intentional change?

I mean this place in the code.

@yuantn got it, one last question ;)
You demonstrate results on PASCAL VOC dataset doing 7 AL cycles each time adding 5 % of examples from unlabelled set to the labelled one. Do I understand correctly that when applying this active learning pipeline to a real world project, we would need only one cycle? If so, how does one determine the amount of data to be used for Label Set Training and the rest for Re-weighting and Max/Min Instance Uncertanty?

I am afraid not.
As mentioned in our paper: The key idea of active learning is that a machine learning algorithm can achieve better performance with fewer training samples if it is allowed to select which to learn.
So if you unfoundedly select 20% of the samples at one time as the labeled samples, the quality of them will not be as high as those of the 20% samples that are gradually selected through multiple cycles.
The latter samples can cover more uncertainty aspects, can be more diverse, and can be more representative, instead of the former randomly selected samples.
However, if it is trained with too many cycles during the active learning, a longer and more useless early training process will be introduced. So there needs a trade-off between the number of cycles and the sample quality.
According to the existing experimental results for multiple tasks on CIFAR, ImageNet, PASCAL VOC, MS COCO, BDD100K, CityScapes and other datasets, 5~7 active learning cycles are usually selected. To avoid cold-start problems, the size of the initial labeled set should also not be too small.
In each cycle, the number of unlabeled samples used for the three steps should be the same as the number of labeled samples, which is randomly selected from the set of all unlabeled samples.


Feature preview: ai-generated image keywords

off by default, turn on with the new yaml setting:
use_ai_generated_keywords
FEATURE PREVIEW: If set, the bot will ask Oobabooga to generate
image keywords from a user's message.  It will then pass the
keywords that Oobabooga produces to Stable Diffusion to finally
generate an image.
Otherwise, the bot will simply extract keywords directly
from the user's message using a simple regex.
This is an experiment to see if we can get a more accurate image by passing the user's request to oobabooga first, to have it generate image keywords, rather than passing the request straight to stable diffusion.
To come: also include the bot's initial chat response to the user in the keyword generation.  That way if the message tells the user that the bot is generating an image of something, that information is actually conveyed to Stable Diffusion.
Would welcome any comments on the advantages / disadvantages of this in your testing.

See https://github.com/chrisrude/oobabot/commit/92f0299b1e8a59ccfd98c5dc6fcfe9a07d13e430 for details
One thing that's cool is that this is an actual benefit of integrating images and text processing together, rather than just having a SD image generator inside a chat bot.

AI, please take the user's input and transform it into a rich, imaginative narrative. Enrich the description with vivid language, evoking a sense of wonder, magic, and beauty. Create a flowing narrative filled with striking details, breathtaking scenes, and unforgettable characters. Then, format this narrative into a list of descriptive phrases separated by commas. These descriptions should be concise yet powerful, suitable for guiding the creation of a complex and intricate image using an image generation tool. Remember to capture the nuances of the narrative and preserve the essence of the story in each phrase, allowing for a seamless visual interpretation
Imagine you are a master wordsmith, tasked with creating an imaginative narrative inspired by the user's prompt. You will be provided with a prompt from the user, and your goal is to craft a visually captivating story using rich, descriptive language. Your narrative should be filled with vivid imagery, transporting the reader to a world of wonder and enchantment. Remember to utilize a variety of sensory details, employing a palette of descriptive words to engage the reader's imagination. Each descriptive phrase should be separated by commas to facilitate its use in an image generation prompt.
I have the results of various testing with image generation, if you want to have a browse, drop me a line

I have oobabot setup via the oobabot_plugin on my docker instance of the Oobabooga TextGeneration-WebUI, whenever I try to add the "use_ai_generated_keywords: true" value to my config.yml file it seems to force delete it whenever the plugin initializes the bot. How exactly can I enable this. Is there an Environmental Value I can pass like with the Discord API key?

I have oobabot setup via the oobabot_plugin on my docker instance of the Oobabooga TextGeneration-WebUI, whenever I try to add the "use_ai_generated_keywords: true" value to my config.yml file it seems to force delete it whenever the plugin initializes the bot. How exactly can I enable this. Is there an Environmental Value I can pass like with the Discord API key?

The feature was removed :(
Might have to check old commits and merge it back into your own fork.


Clipboard Editor extension

Description
Allow the user to edit it's clipboard content using a form.
Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Thanks for the review @pernielsentikaer


fix: avoid clipping fabtabbaritem

closes https://github.com/unoplatform/uno.toolkit.ui-private/issues/8
PR Type
What kind of change does this PR introduce?

Bugfix

What is the current behavior?

What is the new behavior?

Is your second screenshot supposed to have corner radiuses ? ;-)

Is your second screenshot supposed to have corner radiuses ? ;-)

No they are removed as they were not matching Figma designs


implement loan example

https://github.com/Vortecsmaster/EA_PlutusExamples/tree/master/PlutusApps/V2_110/LendingPlatform
https://github.com/input-output-hk/plutus-use-cases

data LoanActions = RequestLoan | CancelLoan deriving Eq
data LoanBond = LB { borrower :: PubKeyHash
                   , request  :: Ledger.Value
                   , duration :: POSIXTime
                   , collateral :: Ledger.Value
                   }

{-# INLINABLE loanRequest #-}
loanRequest :: LoanBond -> LoanActions -> PlutusV2.ScriptContext -> Bool
loanRequest datum action sContext
  | action == RequestLoan      = requestLoan
  | action == CancelLoan       = cancelLoan
  | otherwise                  = False
  where

https://github.com/Vortecsmaster/EA_PlutusExamples/blob/f66688a3eecd803eed4582a3de279c844a427505/PlutusApps/V2_110/LendingPlatform/src/UsingSCvalidator.hs#L70-L76


is this repo maintained?

The reason I ask is because I wish to use this in production, and I see no activity on code which is fine as it may have accomplished whatever it needed to do, but I see less conversation on issues and Pull Requests too.

For production you should maybe take a look at pm2.

we did 😄 thanks for response 🙂

pm2 is AGPL, not sure that I can use that in my case


Sickle Plugin Integration for Farmer

When single click right click harvest and plant give configurable percent credit similar to mcmmo. Currently you get no credit for the harvest or the planting.
https://www.spigotmc.org/resources/sickle-harvest-crops-with-a-right-click.29443/

Because that plugin not fires BlockBreakEvent on right clicking plant. Literally we're not going to add this resource as a new dependency. We have tons of dependency and it takes long time to get the request from the repository site. You should talk to the developer of that harvest plugin to fire BlockBreakEvent on right clicking.


Replacing special ASCII characters in README.rst

Fixes issue #7.
I am not sure why this has not come up in the python 3.6 tests, but I can read the README.rst after making these two changes.

The Python 3 tests are failing because you're using the Python 2 syntax for exception catching (see Travis link). (I'd change it myself if this weren't a PR from your fork.) Thanks for fixing this!

Thanks, old habits die hard ;).

Looks good!


Generate @azure/arm-scheduler package

Autogenerated. Matching specification pull request - undefined
Skipping spec generation
Found azure-rest-api-specs repository in D:\azure-rest-api-specs
Refreshed D:\azure-rest-api-specs repository successfully
>>>>>>>>>>>>>>>>>>> Start: "["\"@azure/arm-scheduler\""]" >>>>>>>>>>>>>>>>>>>>>>>>>
Executing command:
------------------------------------------------------------
autorest --typescript --typescript-sdks-folder=D:\azure-sdk-for-js2 --license-header=MICROSOFT_MIT_NO_VERSION D:\azure-rest-api-specs\specification\scheduler\resource-manager\readme.md --use=D:\autorest.typescript
------------------------------------------------------------
AutoRest code generation utility [version: 2.0.4283; node: v10.11.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      'C:\Users\kamip.NORTHAMERICA\.autorest\@microsoft.azure_autorest-core<EMAIL_ADDRESS>(2.0.4289)
   Loading local AutoRest extension<EMAIL_ADDRESS>(D:\autorest.typescript)
   Loading AutoRest extension<EMAIL_ADDRESS>(2.3.51->2.3.51)
INFORMATION: The output folder doesn't contain a pre-existing package.json file to get the package version from.
INFORMATION: Getting the package version for package "@azure/arm-scheduler" from NPM.
INFORMATION: Package doesn't exist on NPM, so setting its initial version to "1.0.0".

Installing dependencies...
>>>>>>>>>>>>>>>>>>> End: "["\"@azure/arm-scheduler\""]" >>>>>>>>>>>>>>>>>>>>>>>>>

Generated @azure/arm-scheduler SDK successfully

Matching specs PR: https://github.com/Azure/azure-rest-api-specs/pull/4130/files


auto inverts freqs depending on the job type

This key inverts all the imaginary frequencies that have arisen, except for the lowest ones in the TS calculations. This is applicable for multiple calculations of different type of states.

@bobbypaton, What do you think about it?

Thanks for contributing!


[🐛]  Attempted import error: 'TurboModuleRegistry' is not exported from 'react-native-web/dist/index'.

After successfully installing and importing this library, i get this warning on web version

I believe it has to do with reanimated package which doesnt work on react native but maybe its something else.

Related to https://github.com/react-native-image-picker/react-native-image-picker/issues/2102
Should be fixed by https://github.com/react-native-image-picker/react-native-image-picker/pull/2105


Ignore ClientSNIAcceptanceTest on windows

Our windows CI machines don't have docker-compose, so don't run this test.

Note - it appears on Windows we only run geode-assembly:acceptanceTest, rather than all acceptance tests. @jdeppe-pivotal Is this intentional?
We reused this docker compose rule because the connector tests use it, but we added to add our test to geode-assembly which is why it actually got run on windows, unlike the rest of the acceptanceTests.


Error when get all users

Hi,
there is the following error when I try to retrieve user informations
NHibernate.Exceptions.GenericADOException: Failed to execute multi query[SQL: select applicatio0_.applicationuser_key as Id6_0_, identityro2_.Id as Id9_1_, applicatio0_1_.AccessFailedCount as AccessFa2_6_0_, applicatio0_1_.Email as Email6_0_, applicatio0_1_.EmailConfirmed as EmailCon4_6_0_, applicatio0_1_.LockoutEnabled as LockoutE5_6_0_, applicatio0_1_.LockoutEndDateUtc as LockoutE6_6_0_, applicatio0_1_.PasswordHash as Password7_6_0_, applicatio0_1_.PhoneNumber as PhoneNum8_6_0_, applicatio0_1_.PhoneNumberConfirmed as PhoneNum9_6_0_, applicatio0_1_.TwoFactorEnabled as TwoFact10_6_0_, applicatio0_1_.UserName as UserName6_0_, applicatio0_1_.SecurityStamp as Securit12_6_0_, applicatio0_.Name as Name11_0_, applicatio0_.Surname as Surname11_0_, identityro2_.Name as Name9_1_, case when identityro2_1_.applicationrole_key is not null then 1 when identityro2_.Id is not null then 0 end as clazz_1_, roles1_.UserId as UserId0__, roles1_.RoleId as RoleId0__ from ApplicationUser applicatio0_ inner join AspNetUsers applicatio0_1_ on applicatio0_.applicationuser_key=applicatio0_1_.Id left outer join AspNetUserRoles roles1_ on applicatio0_.applicationuser_key=roles1_.UserId left outer join AspNetRoles identityro2_ on roles1_.RoleId=identityro2_.Id left outer join ApplicationRole identityro2_1_ on identityro2_.Id=identityro2_1_.applicationrole_key where upper(applicatio0_1_.UserName)=?;
↵select applicatio0_.applicationuser_key as Id6_0_, claims1_.Id as Id10_1_, applicatio0_1_.AccessFailedCount as AccessFa2_6_0_, applicatio0_1_.Email as Email6_0_, applicatio0_1_.EmailConfirmed as EmailCon4_6_0_, applicatio0_1_.LockoutEnabled as LockoutE5_6_0_, applicatio0_1_.LockoutEndDateUtc as LockoutE6_6_0_, applicatio0_1_.PasswordHash as Password7_6_0_, applicatio0_1_.PhoneNumber as PhoneNum8_6_0_, applicatio0_1_.PhoneNumberConfirmed as PhoneNum9_6_0_, applicatio0_1_.TwoFactorEnabled as TwoFact10_6_0_, applicatio0_1_.UserName as UserName6_0_, applicatio0_1_.SecurityStamp as Securit12_6_0_, applicatio0_.Name as Name11_0_, applicatio0_.Surname as Surname11_0_, claims1_.ClaimType as ClaimType10_1_, claims1_.ClaimValue as ClaimValue10_1_, claims1_.UserId as UserId10_1_, claims1_.UserId as UserId0__, claims1_.Id as Id0__ from ApplicationUser applicatio0_ inner join AspNetUsers applicatio0_1_ on applicatio0_.applicationuser_key=applicatio0_1_.Id left outer join AspNetUserClaims claims1_ on applicatio0_.applicationuser_key=claims1_.UserId where upper(applicatio0_1_.UserName)=?;
↵select applicatio0_.applicationuser_key as Id6_, applicatio0_1_.AccessFailedCount as AccessFa2_6_, applicatio0_1_.Email as Email6_, applicatio0_1_.EmailConfirmed as EmailCon4_6_, applicatio0_1_.LockoutEnabled as LockoutE5_6_, applicatio0_1_.LockoutEndDateUtc as LockoutE6_6_, applicatio0_1_.PasswordHash as Password7_6_, applicatio0_1_.PhoneNumber as PhoneNum8_6_, applicatio0_1_.PhoneNumberConfirmed as PhoneNum9_6_, applicatio0_1_.TwoFactorEnabled as TwoFact10_6_, applicatio0_1_.UserName as UserName6_, applicatio0_1_.SecurityStamp as Securit12_6_, applicatio0_.Name as Name11_, applicatio0_.Surname as Surname11_, logins1_.UserId as UserId0__, logins1_.LoginProvider as LoginPro2_0__, logins1_.ProviderKey as Provider3_0__ from ApplicationUser applicatio0_ inner join AspNetUsers applicatio0_1_ on applicatio0_.applicationuser_key=applicatio0_1_.Id left outer join AspNetUserLogins logins1_ on applicatio0_.applicationuser_key=logins1_.UserId where upper(applicatio0_1_.UserName)=?;
↵select applicatio0_.applicationuser_key as Id6_, applicatio0_1_.AccessFailedCount as AccessFa2_6_, applicatio0_1_.Email as Email6_, applicatio0_1_.EmailConfirmed as EmailCon4_6_, applicatio0_1_.LockoutEnabled as LockoutE5_6_, applicatio0_1_.LockoutEndDateUtc as LockoutE6_6_, applicatio0_1_.PasswordHash as Password7_6_, applicatio0_1_.PhoneNumber as PhoneNum8_6_, applicatio0_1_.PhoneNumberConfirmed as PhoneNum9_6_, applicatio0_1_.TwoFactorEnabled as TwoFact10_6_, applicatio0_1_.UserName as UserName6_, applicatio0_1_.SecurityStamp as Securit12_6_, applicatio0_.Name as Name11_, applicatio0_.Surname as Surname11_ from ApplicationUser applicatio0_ inner join AspNetUsers applicatio0_1_ on applicatio0_.applicationuser_key=applicatio0_1_.Id where upper(applicatio0_1_.UserName)=?;
↵] ---> System.InvalidOperationException: A Command è già associato un DataReader aperto, che deve essere chiuso.

Do you have any sample to reproduce the error?

Hi @Inu the problem is happening when I try to make more calls togheter in a multithreading scenario... When  I try more requests in parallel I have this exception. How can I solve this?

Without a sample to reproduce the issue it's almost impossible to help you. What do you mean by multithreading? Is your session correctly configure?

Hi @lnu ,
you can reproduce the issue if you simulte a multithreading scenario.
If you simulate more than 5 request concurrently you have the error.

How did you configure your session. Do you reuse the same session between different requests? The session is not thread safe.


Limit is overruled by paginate

When I just want the 2 first unstarted stories, I get all of them. I think it is because the limit I set is overruled by the paginate method of the endpoint.

@forest this behaviour is confusing since there is no mention of auto_paginate in the readme but it's enabled by default.
Additionally, limit option is mentioned but will not work by default like this:

project.stories(with_state: :unscheduled, limit: 10) # Get 10 unscheduled stories for a project

This will by default return all stories.
I think auto_paginate should be disabled automatically if limit is provided.


Create ServiceList for MacAddressTableRec

First ideas what kind of services could be needed:

provide-mac-table-of-device (Device/MAC-address/Interface/VLAN)
provide-mac-address-at-interface/VLAN :  device + interface/VLAN => list of mac-addresses received by the device at this interface/VLAN
provide-interface/VLAN-for-mac-address :  devices + mac address => interface/VLAN at which the mac-address is received by the device
provide-breadcrumbs-of-mac-address :   mac-address => list of devices with list of interfaces/VLAN at which the mac-address was received by the device

comment to become a reviewer

Hi Markus,
I found a difference between my file and yours.
Please check together the issue:


import/no-named-as-default error using static properties ES7 + Babel in HOC

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior
Next.JS should successfully compile without any errors/warnings.
Current Behavior
Parse errors in imported module '../lib/Apollo/withData': Unexpected token = (24:24)  import/no-named-as-default
Parse errors in imported module '../lib/Apollo/withData': Unexpected token = (24:24)  import/no-named-as-default-member
Next.JS + ESLint is outputting an error with the following message:

Steps to Reproduce (for bugs)
N/A
Context
I am trying to get Next.JS working with the ApolloClient.. and also with the new _app.js functionality. However I am getting the following error above when I try to use withData in my _app.js file. I have researched this error and it seems to be something to do with Babel and the static properties that can only be used with ES7? However I am using the decoratorsLegacy option that I found in one of the example projects in nextjs. Does anyone know how I can fix this?
.babelrc
{
  "presets": [
    "next/babel",
    ["@babel/preset-stage-0", { "decoratorsLegacy": true }]
  ]
}

utils.js
export function isAuthPath(path) {
  // Other routes can be added like /forgot-password, etc
  return path === '/login' || path === '/signup'
}

_app.js
import React from 'react'
import App, { Container } from 'next/app'

import { isAuthPath } from '../lib/utils'

import redirect from '../lib/redirect'
import withData from '../lib/Apollo/withData'
import checkLoggedIn from '../lib/Apollo/checkLoggedIn'

class MyApp extends App {
  static async getInitialProps({ Component, ctx }, apolloClient) {
    let pageProps = {}

    const { loggedInUser } = await checkLoggedIn(ctx, apolloClient)

    // Check whether path is an "authorization" specific page
    const auth = isAuthPath(ctx.asPath)

    if (!loggedInUser.me) {
      // User is not logged in. Redirect to Login.
      if (!auth) redirect(ctx, '/login')
    } else if (auth) {
      // User is logged in. Redirect to Dashboard.
      redirect(ctx, '/')
    }

    if (Component.getInitialProps) {
      pageProps = await Component.getInitialProps(ctx)
    }

    return { pageProps }
  }

  componentDidCatch(error, errorInfo) {
    super.componentDidCatch(error, errorInfo)
  }

  render() {
    const { Component, pageProps } = this.props
    return (
      <Container>
        <Component {...pageProps} />
      </Container>
    )
  }
}

export default withData(MyApp)

withData.js
import React from 'react'
import cookie from 'cookie'
import PropTypes from 'prop-types'
import { ApolloProvider, getDataFromTree } from 'react-apollo'
import Head from 'next/head'

import initApollo from './initApollo'

function parseCookies(ctx = {}, options = {}) {
  return cookie.parse(
    ctx.req && ctx.req.headers.cookie
      ? ctx.req.headers.cookie
      : document.cookie,
    options
  )
}

function getComponentDisplayName(Component) {
  return Component.displayName || Component.name || 'Component'
}

export default ComposedComponent =>
  class WithData extends React.Component {
    static displayName = `WithData(${getComponentDisplayName(
      ComposedComponent
    )})`
    static propTypes = {
      serverState: PropTypes.object.isRequired
    }

    static async getInitialProps(ctx) {
      let serverState = {}

      // Setup a server-side one-time-use apollo client for initial props and
      // rendering (on server)
      let apollo = initApollo(
        {},
        {
          getToken: () => parseCookies(ctx).token
        }
      )

      // Evaluate the composed component's getInitialProps()
      let composedInitialProps = {}
      if (ComposedComponent.getInitialProps) {
        composedInitialProps = await ComposedComponent.getInitialProps(
          ctx,
          apollo
        )
      }

      // Run all graphql queries in the component tree
      // and extract the resulting data
      if (!process.browser) {
        if (ctx.res && ctx.res.finished) {
          // When redirecting, the response is finished.
          // No point in continuing to render
          return
        }

        // Provide the `url` prop data in case a graphql query uses it
        const url = { query: ctx.query, pathname: ctx.pathname }
        try {
          // Run all GraphQL queries
          const app = (
            <ApolloProvider client={apollo}>
              <ComposedComponent url={url} {...composedInitialProps} />
            </ApolloProvider>
          )
          await getDataFromTree(app, {
            router: {
              query: ctx.query,
              pathname: ctx.pathname,
              asPath: ctx.asPath
            }
          })
        } catch (error) {
          // Prevent Apollo Client GraphQL errors from crashing SSR.
          // Handle them in components via the data.error prop:
          // http://dev.apollodata.com/react/api-queries.html#graphql-query-data-error
        }
        // getDataFromTree does not call componentWillUnmount
        // head side effect therefore need to be cleared manually
        Head.rewind()

        // Extract query data from the Apollo's store
        serverState = apollo.cache.extract()
      }

      return {
        serverState,
        ...composedInitialProps
      }
    }

    constructor(props) {
      super(props)
      // Note: Apollo should never be used on the server side beyond the initial
      // render within `getInitialProps()` above (since the entire prop tree
      // will be initialized there), meaning the below will only ever be
      // executed on the client.
      this.apollo = initApollo(this.props.serverState, {
        getToken: () => parseCookies().token
      })
    }

    render() {
      return (
        <ApolloProvider client={this.apollo}>
          <ComposedComponent {...this.props} />
        </ApolloProvider>
      )
    }
  }

Your Environment

Tech
Version

next
6.0.2

node
9.11.1

OS
Windows 10

browser
Google Chrome

etc

@timneutkens Don't think it has anything to do with Eslint.. i'm still getting an error even with ESLint off..
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check your code at _app.js:50.

Sounds like you're using an old version of with-apollo, this is incompatible with adding it to _app.js.
Use https://github.com/zeit/next.js/tree/canary/examples/with-apollo instead.

Yeah most likely @timneutkens thanks for the help. I'll just wait until the example for the https://github.com/zeit/next.js/issues/4372 is updated I guess since I don't understand very well how the withData and initApollo files work 😭