General discussions

This issue is for general discussions about packaging for AUR.  Please note that

We can discuss anything here, but if the issue is expected to be more than a few comments, do open a new issue and link it.
For actual works, we will use Project to track the progress.
At this moment, only participants would be me, @StefansM, and @Foggalong, we all can edit this issue body, please do edit this to keep issue body up to date, when you add discussions to the list, mark them when complete, update when necessary.
I am planning to leave Pipeseroni no later than the end of April, whichever comes first, April 30 or the establishment of packaging, that will be the time I leave, no matter what.  I will leave this or any issues I've opened for as long as I could tolerate if they aren't resolved by then.  We might use Project's ToDo column, that way, even closed wouldn't matter much.
Previous discussions: pipeseroni/pipes.sh#29 and Packagers team discussions (1 and 2) (not public accessible, unfortunately)

Discussions List
This list is numbered, use the item numbers to refer to any discussions that you wish to discuss.  Note that: this list tracks whether the discussion has resulted a conclusion, not a task list for actual works.

[ ] 1. Name of this repository
[x] 2. Organization for each pipe
[ ] 3. Packaging release process
[ ] 4. CI, automation?
[ ] 5. Documentation
[ ] 6. AUR accounts
[x] 7. License of this repository (everything, from the PKGBUILD to the master branch)

As I am not familiar with AUR, I might be very wrong about anything.
Before I get into my thoughts, I'd like to propose that @StefansM should be the one do the actual works (commits) on the current repository, I will help whatever I can when I have a clear assignments.  Please also note that the current pipes.c and pipes.sh branches can be deleted or completely rewritten if needed to be.

1
I kind of like pipeseroni-aur, because someday I might see a pipeseroni package somewhere.  But for now, packaging-aur is okay.
2
Currently, we use branches to store PKGBUILD for each pipe, although I have seen a few AUR repositories that organize files under directories.  I believe using branches would be better option since we only have a handful of pipes, and the commit history is very clean, they don't mix with other pipes, and no need to specify which pipes we are working on in commit message.
The only minor (and slightly annoying) issue I can see is that GitHub would prompt those green "Compare & pull request" buttons for us.  GitHub might still try to create pull request against master, anyone who wishes to contribute will need to manually select the correct branch.
3
While trying to understand the packaging, I noticed that there are a few steps must be done when doing a release:

Updating version string
@StefansM has mentioned a way to automate this with git describe, if there is no need to change anything in, say pipes.sh's repo, to get that method working, I am all for that.  But I don't know what exactly that needs.

Updating checksum for integrity check
I used updpkgsums, but it updates with md5sum, can we have hash liks SHA*?  Or do we really need those?  Also, there doesn't seem to have any options for updpkgsums to choose.

Generating .SRCINFO
From what I understand, we need to re-generate it every time we update PKGBUILD, so how do we make sure the file is up to date?

4
Do we need CI to check or do anything for us?  If that's possible, and what we need it do for us?
I don't feel we really need CI, but if it can check the validity of PKGBUILD, that might be nice, automatically trying to build and install, to verify a simply version bump would result a good build.  Although it's still best that packagers would still test on personal computer.  This might have to achieve with Docker, if we are going to that, which I have no idea how.  I don't think we have Arch tools on Travis CI, more precisely, on Ubuntu.
5
I've put in a section "Packaging" in README, it's meant for brief packaging instructions that details packaging release process (4), but we can move it to separate file or wiki.
@StefansM you will decide where the documentation goes to and also write them.
6
@StefansM and @Foggalong should have the accounts on AUR.  Perhaps also list @Foggalong as maintainer in PKGBUILD?
7
What license should we license this repository under?  I think we should go for CC0 or Unlicense or any public domain equivalent license, I don't really think we need to use those more common open source license, all actual codes in this repository probably just snippets.

I am sending an email to invite @Acidhub to join us as @pipeseroni/bash-devs and/or @pipeseroni/aur packager, or the very least hoping he would provide some thoughts and experiences on the discussions here.
Please note that: if he agrees to join @pipeseroni/aur, @StefansM will have to agree to have him.  As for @pipeseroni/bash-devs, I can put him into the team.

@livibetter, brilliant work. Sorry I haven't had the chance to look at this earlier. I agree with all your points.

Currently, we use branches to store PKGBUILD for each pipe

I think this is the best solution, because we can push to the AUR by just configuring a remote and pushing the repo branch to the remote master:
git remote add pipes.c<EMAIL_ADDRESS>git checkout pipes.c
git push pipes.c pipes.c:master

Updating version string
@StefansM has mentioned a way to automate this with git describe

If the PKGBUILD is configured to pull directly from git (e.g. source=("git+https://github.com/pipeseroni/pipes.c.git), $pkgver can be set by the pkgver() function:
pkgver() {
    cd "$srcdir/$_repo"

    # Git, tags available
    printf "%s" "$(\
        git describe --long --tags \
        | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')"
}

If we're building from releases rather than git, pkgver needs to be set manually. It's pretty easy to get the version from the GitHub API with a simple script, though. Since we only merge working pull requests, I think I should just get in the habit of making releases for each commit on the master branch and updating the PKGBUILDs to point to the new release.

Updating checksum for integrity check
I used updpkgsums, but it updates with md5sum, can we have hash liks SHA*?

If you replace md5sums=(...) with, for example, sha256sums=() and run updpkgsums, it will detect which hash to use. See #3 and #4.

Generating .SRCINFO
From what I understand, we need to re-generate it every time we update PKGBUILD, so how do we make sure the file is up to date?

I think we should include a pre-commit hook in the master branch that automatically runs makepkg --printsrcinfo > .SRCINFO, and a pre-push hook that

Checks the AUR remote being pushed matches the branch name. This should help prevent confusion by giving an informative error message when accidentally trying to push the pipes.sh branch to the pipes.c master.

Checks the .SRCINFO in the git index is identical to a .SRCINFO generated from the PKGBUILD in the index. This should prevent mistakes due to unmerged changes.

Most of the time, the updates for the packaging scripts are going to be trivial version number bumps, which will be pretty easy to automate. See #2

@StefansM
I like the automation (still reading through) and I think if using Git is better for you to work with, then by all means switching to Git.  (I'd against it if our repositories are monsters that require long cloning time)
A couple of things:

Since you have written several Bash scripts, I think you should choose a license for this repository.

You can already add you as Maintainer in the PKGBUILD files.

@StefansM
I didn't think of all the autotools have to be pulled, now I am against using Git.  I also don't like versioning those files, especially when those two generated files are really huge.
CC0 is a good choice.  I think most people's Bash skill isn't great, me included, really not our fault!  Bash, well, it's a complicated thing.

This is a reminder note, for next revision/release of pipes.sh, list ncurses as direct dependency as now pipes.sh is relying on tput even more (pipeseroni/pipes.sh#56).


Pass correct node bounds to PushOpacityMask.

Use node bounds not clip bounds for opacity mask rect.
The opacity mask on the Rectangle on CanvasPage in ControlCatalog is now rendered correctly.
Fixes #1118

Also fixes #1693

CI didnt liked this very much, it seems
Failed: Avalonia.Visuals.UnitTests.Rendering.DeferredRendererTests.Should_Push_Opacity_Mask

Fixed the tests, now all passing.


Release v2023.3

This PR prepares the release of v2023.3. It should only contain changes from other PRs that have already been approved and merged (and possibly merge commits from the master branch).

I believe this PR has all the commits it will have, with the exception of the submodule updates. I'll go ahead and mark it as ready.


web-sys: add WorkerType feature

PR #2656 added support for setting type and request_credentials on
WorkerOptions. However, the WorkerType struct` was not exposed, as
the feature was not added to Cargo.toml.

A bit delayed but I'm getting around to it now at https://github.com/rustwasm/wasm-bindgen/pull/2675


isr_wrapper: Use 'bx' instead of 'b' to jump to _IntExit

'b' can't jump very far on Cortex-M0 and will cause linker issues when
isr_wrapper and _IntExit are placed far away from each other.
To resolve this we use the 'bx' instruction, as it can jump much
further. Using 'bx' is not dangerous because we are jumping to thumb
mode code.
This fixes #11167
Signed-off-by: Sebastian Bøe<EMAIL_ADDRESS>

Codecov Report

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

@@           Coverage Diff           @@
##           master   #11189   +/-   ##
=======================================
  Coverage   53.11%   53.11%
=======================================
  Files         218      218
  Lines       26871    26871
  Branches     5952     5952
=======================================
  Hits        14273    14273
  Misses      10163    10163
  Partials     2435     2435

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 58781d5...9972861. Read the comment docs.

lgtm

I wonder @SebastianBoe if we need to do similar things elsewhere.

We do.
All Cortex-M0 assembly that uses 'b' to functions in other files should be ported to C or rewritten.

@SebastianBoe would you take care of this, then?

I don't have time for that unfortunately.


Bug: Newlines and extraneous vertical whitespace in endpoint configuration files causes failures

Describe the bug
When a newline or newlines are inserted into endpoint configuration files ie: sample-complex-endpoints-us-east-1.txt synthesis will fail with a message Error: Interface Endpoint named  not found in discovery files.
To Reproduce
Add a newline to sample-complex-endpoints-us-east-1.txt then attempt to synthesize the sample-complex example.
Expected behavior
Newlines should be ignored

Addressed by #7


Slower than frozen snot (<IP_ADDRESS> - installer pkg) and it interferes with ProcExplorer

Description
It's slow -- very slow.  And I got a notice upon opening that, because it was running as admin, drag and drop wouldn't work (WTF???) and sure 'nough, drag-n-drop doesn't work.  Also, the app or perhaps only the installer interferes with Process Explorer -- somehow removing all text from the data window but leaving the color coding behind.
Steps To Reproduce
install 3300 from installer package
wait a long time
observe notice re: admin drag-n-drop failure
open ProcExplorer to kill process
all text missing from procexp!
use task manager to kill process from background processes
that doesn't work -- still running
finally able to kill it, once it showed up on the 'apps' tasklist
uninstall Files <IP_ADDRESS>!
Requirements

e.g. Fix crash that occurs when...
The the app wold work pretty well

Files Version
<IP_ADDRESS>
Windows Version
10.0.19045.3693
Log File
Upon attempting to include the log file, got this error msg:
Visual Studio Just-In-Time Debugger
---------------------------
An unhandled exception occurred in [3688] PowerToys.MonacoPreviewHandler.exe. Just-In-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. In Visual Studio, Just-In-Time debugging can be enabled from Tools/Options/Debugging/Just-In-Time.

Check the documentation
[debug.log](https://github.com/files-community/Files/files/14890434/debug.log)
 index for 'Just-in-time debugging, errors' for more information.
---------------------------
OK   ---------------------------
Visual Studio Just-In-Time Debugger
---------------------------
An unhandled exception occurred in [3688] PowerToys.MonacoPreviewHandler.exe. Just-In-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. In Visual Studio, Just-In-Time debugging can be enabled from Tools/Options/Debugging/Just-In-Time.

Check the documentation index for 'Just-in-time debugging, errors' for more information.
---------------------------
OK
---------------------------

---------------------------
and this one:
---------------------------
PowerToys.MonacoPreviewHandler.exe - Application Error
---------------------------
The exception unknown software exception (0xe0434352) occurred in the application at location 0x00007FFE7CABCF19.

---------------------------
OK   Cancel
---------------------------```

Thanks for the report, you haven't said anything specific.

Drag and drop doesn't work because of Windows issues and would crash Files otherwise.

The text being missing wouldn't likely be from Files alone.

Then why did it show ONLY when I tried to insert the log into the Git hub form?
Have a good day
Won't be back

Sorry for you bad experience but you can enable drag and drop by enabling UAC (type User account control in the start menu > set it to the 3rd level from the bottom > Restart your computer) and not running Files as admin if you are (you don't need to anyway). If you don't have any other specific issue or not willing to give the information needed to fix it then we won't be able to help you

Thank you for your feedback, there is a limitation in the WinUI framework that prevents drag & drop from working properly when the process is running as admin. Unfortunately, this also happens when user account control is disabled even if the app isn't running as admin. Microsoft is aware of this issue and they recently shared that they are working to address this limitation, but this is out of our hands and no timeline was provided.
I'm closing this issue for now as a workaround has been provided (enabling UAC) and because the limitation is from WinUI.


edit your code error

Problem encountered on https://dotnet.microsoft.com/en-us/learn/dotnet/hello-world-tutorial/edit
Operating System: windows
Provide details about the problem you're experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.

Can you give more details about the error you're getting?


a

Steps to reproduce
I have a modal bottom sheet with textfield inside. It works on android like a charm but it has some performance issue on IOS. It is like phone is burning after focusing on textfield.
Code sample
Code sample
What target platforms are you seeing this bug on?
iOS
OS/Browser name and version | Device information
IOS 17
Does the problem occur on emulator/simulator as well as on physical devices?
Unknown
Logs
Logs
Flutter Doctor output
Doctor output


Unable to upload after upgrading from 4.1.3 to 5.1.0

Upgraded to 5.1.0 and no longer able to upload files.  Tried to made changes per the README.  When trying to upload a file, I get back "OPTIONS https://[bucketname].s3.amazonaws.com/ net::ERR_INSECURE_RESPONSE where [bucketname] is the bucket name I specified in the S3.config.  Unless I am wrong, the URL doesn't seem to make sense as it should be something like https://s3.amazonaws.com/[bucketname].
Thanks in advance for any help!

Hmm, that makes sense. I'll check over the weekend hopefully. Unless you've been able to figure it out?

Didn't get a chance.  I will try to look at it when I get some time.

Same deal here.  I even used the example in this repo to rule out anything I was doing on my end.  Same result.
And I agree, the URL format appears to be wrong.  It definitely doesn't match what AWS gives you in their dashboard.

Have you tried forking the project and modifying that particular part? The code is very easy to read and follow ^_^. If you can make the test and let me know your findings that would really save me some time.

Okay, I think I know where the problem is.  However, I have no idea how to get my Meteor app to point to my local "fork" copy.  I have been trying for the last hour or so with no luck.  I tried google this and I am not sure all the answers out there are still relevant with Meteor 1.0. A quick pointer as to how I can test with my local "fork" copy (with minimal pain) would be appreciated!

You should be able to drag and drop the folder to your packages folder inside the .meteor project

Okay, I submitted a pull request.

Sweet! I'll have a look tonight after work :)

Is this fixed, i am facing the same issue.
Unable to upload files, below CORS error in browser console.
XMLHttpRequest cannot load https://s3.amazonaws.com/erecaho. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access


301 response missing Location header

Following up on #5 & #6,
Thanks for icepie's effort, I've made it pass the login scan step.
But this is what I'm getting now:
访问下面网址扫描二维码登录
https://login.weixin.qq.com/qrcode/obQ...Ztg==
Get<EMAIL_ADDRESS>301 response missing Location header

I'm logging in from oversea BTW. That might be the reason why WX asking for "Location header".
I've tried to use KW of mmwebwx-bin or webwxnewloginpage to search in this repo, but didn't find anything.
So I cannot tell where the problem comes from as of now.
Please take a look.

已修复！see https://github.com/golang/go/blob/cde2d857fe1f13ade269e3f7d58c6c2379a53c50/src/net/http/client.go#L647

When requesting cgi-bin/mmwebwx-bin/webwxnewloginpage, this patch is needed. Besides, wxsid and wxuin should be obtained from Cookie, not XML response.

I think the above is the reason that I'm getting the 301 response missing Location header error, i.e., if proper patch is applied and proper wxsid and wxuin is used when making the cgi-bin/mmwebwx-bin/webwxnewloginpage request, I might not see that loginForbiddenError error, I think.
comment?

这个问题的引发的原因是请求返回的response的状态码为301（跳转）, 但是在response在Header里面没有Location, 而是直接返回了一个禁止登陆的xml。(正常登陆会有这个Header)
go的client源码认为如果需要跳转响应的Header中没有Location(浏览器会根据这个字段跳转对应的网页)，则这个响应是一个不合法的response


Fix Boost.Regex build with Visual Studio 2005.

This fixes a problem caused by running bjam (b2) from within a Visual Studio build.  In our case, that happens because bjam is run from CMake ExternalProject, which creates a VisualStudio project to run the commands.
Boost's bjam captures the compiler log so that it can run configure-style tests without them appearing as errors in the log. Visual Studio 2005 (possibly later versions too) sets an environment variable, VS_UNICODE_OUTPUT, that causes cl.exe to output a unicode log to a special pipe.    This causes the configure-stage output to leak into the log that Visual Studio sees, and VS aborts the build thinking there was a failure, even when there wasn't.
According to this bug report https://public.kitware.com/Bug/view.php?id=14266, this has been fixed.  However, the fix must not be working (test CMake 3.1 and 3.2).  The bug report mentions that enabling logging in ExternalProject happens to have the desired effect, because it wraps the bjam command in other script that isolates it from Visual Studio's environment.
This change uses the logging workaround to fix the problem in Hunter.  I'm not sure why I didn't see this in the past.  The ExternalProject command in url_sha1_boost_library.cmake.in has changed a bit, but not in any way that would obviously cause this change.
See more:
http://lists.boost.org/boost-users/2013/04/78414.php
http://blogs.msdn.com/b/freik/archive/2006/04/05/569025.aspx

If anyone is curious, this is what the log for a failing run looked like: http://pastebin.com/jv7NSAkh

Thanks :)

Just for your information I'm still not able to compile boost.regex for visual studio 2005. Looks like I hit into this problem: http://stackoverflow.com/questions/27319963/boost-1-57-0-bootstrap-bat-not-working-for-visual-studio-net-2003

Yes, me too with recent Boost.  I forgot to mention I'm using Boost 1.49


k8s: Recreate CEP on update errors

This is a different approach to https://github.com/cilium/cilium/issues/4979 than https://github.com/cilium/cilium/pull/4981, which proved a little annoying to work out.
We sometimes see errors updating CEPs. These are updated from a single
source (a single controller in a single cilium-agent per pod) and so
there errors here are not update races, but something more fundamental
and can be deleted as a way to reset things
Signed-off-by: Ray Bejjani<EMAIL_ADDRESS>

This change is

test-me-please

closing to lower clutter (for now)


Error packaging entt, confusing paths for EnTTConfig.cmake

Hi! I was just going to package entt using the Nix package manager. Usually, with cmake-based projects, there isn't much to do. Just specify the dependencies and everything else is automagical. With entt, there's something strange, however.
Installation fails because:
file INSTALL cannot find
  "/build/entt-3.2.2/build//nix/store/m35413in5rsdzwfpil6jwmgbv67igka7-entt-3.2.2/lib/cmake/entt/EnTTConfig.cmake":
  No such file or directory.

After some debugging, I found the following statement(s) in CMakeLists.txt to be the culprit:
configure_package_config_file(
    cmake/in/EnTTConfig.cmake.in
    ${CUSTOM_INSTALL_CONFIGDIR}/EnTTConfig.cmake
    INSTALL_DESTINATION ${CUSTOM_INSTALL_CONFIGDIR}
    PATH_VARS CMAKE_INSTALL_INCLUDEDIR
)
...
install(
    FILES
        ${EnTT_BINARY_DIR}/${CUSTOM_INSTALL_CONFIGDIR}/EnTTConfig.cmake
        ${EnTT_BINARY_DIR}/EnTTConfigVersion.cmake
    DESTINATION ${CUSTOM_INSTALL_CONFIGDIR}
)

Removing the line:
${EnTT_BINARY_DIR}/${CUSTOM_INSTALL_CONFIGDIR}/EnTTConfig.cmake

Makes entt build and install and I can use it then. I cannot (yet) tell you exactly what Nix does with respect to cmake. However, the code above looks a little fishy to me. Why is there a call to configure_package_config_file specifying ${CUSTOM_INSTALL_CONFIGDIR}/EnTTConfig.cmake as the destination (and a corresponding INSTALL_DESTINATION ${CUSTOM_INSTALL_CONFIGDIR}), and then an explicit install for this file, but using EnTT_BINARY_DIR? This seems redundant. Is there a reason for doing it this way?

I don't remember the details (this part was written long time ago) but afaik it's to allow installing EnTT in the build directory, then finding it directly from an outer project that includes the library.

The <ProjectName>Config.cmake file is the file that let's cmake know all the locations, build options, etc... of the built library, it definitely should be installed.  It would probably be better to say what error message nix is giving you instead of breaking installed cmake usage of this library.

@OvermindDL1 I absolutely agree that this file should be installed, and in fact, it is installed, even without the explicit install line. The confusing thing about this line isn't whether the file is supposed to be installed or not, it's the mention of ${EnTT_BINARY_DIR} in the installation path. This is what trips Nix up (which seems to be fine with hundreds of other CMake-based projects).

So, you suggestion is just to turn this:
install(
    FILES
        ${EnTT_BINARY_DIR}/${CUSTOM_INSTALL_CONFIGDIR}/EnTTConfig.cmake
        ${EnTT_BINARY_DIR}/EnTTConfigVersion.cmake
    DESTINATION ${CUSTOM_INSTALL_CONFIGDIR}
)

Into this:
install(
    FILES
        ${CUSTOM_INSTALL_CONFIGDIR}/EnTTConfig.cmake
        ${EnTT_BINARY_DIR}/EnTTConfigVersion.cmake
    DESTINATION ${CUSTOM_INSTALL_CONFIGDIR}
)

Did I get it right?

As I said in my original post, removing the line
${EnTT_BINARY_DIR}/${CUSTOM_INSTALL_CONFIGDIR}/EnTTConfig.cmake

fixes the issue for me. The thing is, you're using the INSTALL_DESTINATION parameter for CONFIGURE_PACKAGE_CONFIG_FILE, which already installs the .cmake file to ${CUSTOM_INSTALL_CONFIGDIR}/EnTTConfig.cmake (as the name says). You might install it to another destination using the install command, but specifying ${EnTT_BINARY_DIR}/${CUSTOM_INSTALL_CONFIGDIR}/EnTTConfig.cmake apparently isn't portable.

Let's see if @m-waka can help us.
If I remember right, that part is due to one of his PR. Maybe he can tell us why the install command has this form, what was the goal originally. :+1:


Cannot find kiosk.. :(

Hi, I know this is not really an issue but I also dont know how to ask in a better way so here goes.
I can't find Kiosk.. Please help

See https://forum.huawei.com/enterprise/en/settings-for-single-plant-sharing-kiosk-view-in-fusionsolar-7-server/thread/806217-100027
I think you are logged in as an installer?


Compile error when summing empty Array of Enum that doesn't start at 1

Bug Report
Playing around with the language on Advent of Code, I noticed that when you call Enumerable#sum on an Array of an Enum that starts at 1 the compiler errors out because it cannot figure out the zero-value of the Enum.
Example:
enum Command
    RUN = 1
    STOP = 2
end

commands = [] of Command
commands.sum

Running this will trigger:
Showing last frame. Use --error-trace for full trace.

In /usr/lib/crystal/enumerable.cr:1569:12

 1569 | type.zero
             ^---
Error: undefined method 'zero' for Command.class

I think the error makes sense. I would love Crystal to either let me tell it what's the zero-value of my Enum. Or it could assume it's the first.

This doesn't really work. Enum does not implement generic arithmetics. Enum#+(Enum) is not defined.
What you need to do here is to sum up the values: commands.sum(&.value)

I would love Crystal to either let me tell it what's the zero-value of my Enum.

That's totally possible. It just won't lead very far for the reason mentioned above.
But you can implement Command.zero for a generic zero value (alternatively, you can also call it Command.additive_identity). Or pass the zero value as an argument to #sum.

Or it could assume it's the first.

Again, for the reason mentioned above, this won't happen. Enum is not a numerical type.

Gotcha, @straight-shoota. I thought that because my Enum was of the standard type (some variation of Int, if I recall correctly), Crystal would do some "magic" to make it work for me.
All the ideas proposed sound plausible to me. :D
Definitely not a bug then. Closing this, sorry for the noise.

@straight-shoota if Enum does not implement generic arithmetic, then I am surprised that sum is even a method on Enum at all.  I would have expected a compiler error that sum is not defined.  Instead you get a confusing error that zero is not defined.

then I am surprised that sum is even a method on Enum at all

I think the catch is that there isn't, as it's called on the Array type. But that implementation expects T to have either .zero or .additive_identity defined.

Oh my apologies.  For some reason I misread and I was thinking sum was defined on the Enum, but this is on Array.
Even so, the error message is not clear to me, and I think there might be a nicer way to present it.

But that implementation expects T to have either .zero or .additive_identity defined.

And the addition operation itself.
Yes, these kind of compile time errors are difficult to understand, because the actual error happens somewhere down the stack and it doesn't immediately point out the problem. It's hard to improve that though.
I suppose we would either need some kind of rescue for catching and rewriting compiler errors, or check all possible error conditions at the entry point, in this case Enumerable#sum which would be a lot of duplication.

I think this brings us back to --error-trace being insufficient in its current form.  If more of the stack was shown, the user would have know why .zero was being called.
Interestingly, I was looking for the old PR where asterite was working on it and he gave this exact example: https://github.com/crystal-lang/crystal/pull/11756#issuecomment-1019326187.  I still contend that while we couldn't come to full agreement there, we still need to do something about --error-trace.

Mind that I am new in the Crystal world, but why can't the compiler tell me cannot call Array(T)#sum when type T doesn't implement X, where X is AdditiveIdentity interface/signature or something like this? Seems like a great case for applying abstract class, from the little I know about Crystal.
Indeed, as @asterite wrote on his original issue, this error is so cryptic to a beginner like me. The compiler should report an error on my code, not on enumerable.cr.

where X is AdditiveIdentity interface/signature

There are a couple of issues with that:

Type signatures might become extremely long and hard to read/understand. I'd like to avoid that.
It requires a new language feature.

For point 2, we want something like:
module Enumerable(T)
  def sum where T < Additive
  end
end

that is, putting a restriction on the T that's in Enumerable(T): the type isn't on any argument.
And even after making it match an Additive module you'll get an error saying "Hey, T must be Additive". But that isn't enough to know what you need to implement. You'll have to jump to the Additive docs, read it, etc.
In Crystal you get an error similar to what you would get in Ruby: "Hey, you need to implement a zero class method for this type in order to sum it" And I personally think that's a clear error message: if you want to sum a bunch of values you have to start by the value zero, and then you need to define what's the value "zero" for your type.
Once you do that I think the compiler will tell you to implement + on your type. So the compiler is already guiding you toward a solution, one method at a time.
That said, this can definitely be improved, it's just that it's not clear how.

That is #3298. My preferred syntax would be something like:
module Enumerable(T); end

module Enumerable(T) forall T <= Additive
  def sum; end
end

But I don't like the idea that types must explicitly include Additive, because such a module is unlikely to have anything other than abstract defs. So ultimately we would probably be looking for some kind of trait / concept types or #2549


Partially fix memonger with networkx 2.0

This fixes the apparent discrepancy (list vs iterator). After this, there are still 3 failures regarding topological sort but that seems a bit involved. Someone shall look deeper.

Remaining failures:
https://travis-ci.org/Yangqing/caffe2/jobs/278072558


UE5.3 Upgrade

The project compiles and has most functionality back
High priority to resolve:

Character Visualization
Item Drop placement
General cleanup/documentation

Lower priority:

Entity Selection

Depending on the complexity, this branch may get merged in first, then the remaining features will get slowly implemented.
As a small bonus, I've also been working on dividing large features into smaller parts. The first example is in the MassWanderAI plugin currently in the project to showcase simple Mass State Tree functionality.

With 5.4 released, ill merge my remaining work here and begin towards upgrading to 5.4


run as adminstrator

when i pin windows terminal to taskbar, i would like to have access to adminstrator mode.
please add run as aminstrator in right click on icon in taskbar

This is a /dupe of #1032. Also, right-click on Windows Terminal (Preview) again.

No this is different.i said right click on taskbar.look at the picture.

Regardless, if you right-click the name of the application again you’ll be able to access “run as administrator.”

@khoshroomahdi
Right click icon in taskbar -> Right click Windows Terminal (Preview) -> Left click run as administrator.


[QUESTION] Background color to editor box for web

I use this package for web, but i need change the background color the editor, and i see this solution #27  that was presented is only for mobile.
Have a solution for in web usage?

Hi, here is a solution for web. It's a little complex for various reasons but it gets the job done.
You need to make an HTML file in your assets like this:

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="description" content="Flutter Summernote HTML Editor">
    <meta name="author" content="tneotia">
    <title>Summernote Text Editor HTML</title>

    <link href="summernote-lite.min.css" rel="stylesheet">

Then pass the file location in your HtmlEditor > HtmlEditorOptions> filePath parameter to load it.
Make sure to disable dark mode, otherwise the background will be overridden when the editor is dark. Let me know if this doesn't work or you have any other questions.

Note for me:
Update internal code to prevent .replaceAll("jquery.min.js", "...") from overriding custom jquery in custom files. Marking with the bug label for reference.

Update: I made this even easier to accomplish by adding support for JavaScript in Web. See here, you just need the "editorBG" WebScript, and you can run the controller.evaluateJavascriptWeb("editorBG"); line in the onInit callback. Hope it helps!


404 when using remote WASM code from private github repos

Title: Cannot use the remote wasm code from a private github repo
Description:

Is it possible to use a private github repo as the uri for httpuri? If so, how? I am getting a 404 issue. It doesn't seem like this it is able to do this directly from here, from reviewing the docs. It seems to expect the github repo to be public!

[optional Relevant Links:]

The docs are provided here: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/core/v3/http_uri.proto#envoy-v3-api-msg-config-core-v3-httpuri

cc @envoyproxy/wasm-dev


Object id from the created factory not correct.

I'm using factory girl to create a new object (Dish), but when I try to get the id of the new object is giving a incorrect id (An Id that is not actually on the database). After a few moments of debugging I discovered It's actually giving me the id of the association (in this case the User)
Example:
user  = FactoryGirl.create :user
dish = FactoryGirl.create(:dish, user: user)

If I print the object the id value is nil, but the object is actually saved on the database.
#<Dish:0x007ff68b8710e8
 id: nil,
 name: "Pork belly buns",
 description: "Delectus sed in sint aliquid rerum maiores.",
 price: 5000,
 image: "nullahicdoloremque.png",
 user_id: 5,
 created_at: Wed, 04 Oct 2017 12:37:24 CDT -05:00,
 updated_at: Wed, 04 Oct 2017 12:37:24 CDT -05:00,
 category_id: 9,
 extra_drinks_included: 0,
 extra_food_included: 0,
 deleted_at: nil,
 promoted: false,
 preparation_time: 12>

@carlosguerreroo how did you solve this problem ?

@carlosguerreroo  how this problem was solved? I am facing a similar issue with FactoryBot.
u = FactoryBot.create(:user, nick_name: 'test', mobile_number: '+41216931110', role: :admin)

=> #<User id: nil,
full_name: "TestUser",
nick_name: "test",
mobile_number: "+41216931110",
company_id: 1>


cmd/compile: optimization across packages to avoid allocations

What version of Go are you using (go version)?

$ go version
go version go1.19.1 linux/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/thockin/.cache/go-build"
GOENV="/home/thockin/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/thockin/src/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/thockin/src/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/tmp/opt/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build991974462=/tmp/go-build -gno-record-gcc-switches"

What did you do?
Using github.com/go-logr/logr, I ran a benchmark that shows an optimization that is missing.  In fact, we wrote the code this way because Russ et al said this optimization could be done in future, so this is not so much a bug report as it is a feature request.
Here is the benchamark:
package main

import (
	"testing"

	"github.com/go-logr/logr"
)

//go:noinline
func doV9(b *testing.B, log logr.Logger) {
	b.ReportAllocs()
	for i := 0; i < b.N; i++ {
		log.V(9).Info("multi",
			"bool", true, "string", "str", "int", 42,
			"float", 3.14, "struct", struct{ X, Y int }{93, 76})
	}
}

//go:noinline
func doManualV9(b *testing.B, log logr.Logger) {
	b.ReportAllocs()
	for i := 0; i < b.N; i++ {
		// This manual optimization should not be needed?
		if logV := log.V(9); logV.Enabled() {
			logV.Info("multi",
				"bool", true, "string", "str", "int", 42,
				"float", 3.14, "struct", struct{ X, Y int }{93, 76})
		}
	}
}

// This is a simple repro all in one package.
type Repro struct {
	enabled bool
}

//go:noinline
func (r Repro) Info(msg string, keysAndValues ...interface{}) {
	// It looks like the slice allocation is elided?
	if r.enabled {
		r.Impl(msg, keysAndValues...)
	}
}

//go:noinline
func (r Repro) Impl(_ string, _ ...interface{}) {
	panic("this should not get called")
}

//go:noinline
func doLocalRepro(b *testing.B, repro Repro) {
	b.ReportAllocs()
	for i := 0; i < b.N; i++ {
		repro.Info("multi",
			"bool", true, "string", "str", "int", 42,
			"float", 3.14, "struct", struct{ X, Y int }{93, 76})
	}
}

func BenchmarkLocalReproDisabled(b *testing.B) {
	r := Repro{false}
	doLocalRepro(b, r)
}

func BenchmarkDiscardV9(b *testing.B) {
	var log logr.Logger = logr.Discard()
	doV9(b, log)
}

func BenchmarkDiscardManualV9(b *testing.B) {
	var log logr.Logger = logr.Discard()
	doManualV9(b, log)
}

What did you expect to see?
I expected all cases to show 0 allocations.  It should be able to see that the variadic slice is only used if the log-level is enabled, and thereby elide the whole thing.  It seems that works within a package but not across packages.
What did you see instead?
Allocations where they are not needed.
BenchmarkLocalReproDisabled-6   	100000000	        10.12 ns/op	       0 B/op	       0 allocs/op
BenchmarkDiscardV9-6            	15072631	        79.46 ns/op	     176 B/op	       2 allocs/op
BenchmarkDiscardManualV9-6      	552702112	         2.008 ns/op	       0 B/op	       0 allocs/op

cc @pohly

The "local repro" doesn't do exactly what the logr function does. Specifically, Impl doesn't use the parameters, therefore does not escape them, unlike the actual logr function, which passes them to an interface call, which makes them escaped.
If I make the local repro does a similar interface call, like
// This is a simple repro all in one package.
type Repro struct {
	enabled bool
	impl    interface { Impl(string, ...any) }
}

//go:noinline
func (r Repro) Info(msg string, keysAndValues ...interface{}) {
	// It looks like the slice allocation is elided?
	if r.enabled {
		r.Impl(msg, keysAndValues...)
	}
}

//go:noinline
func (r Repro) Impl(x string, a ...interface{}) {
	r.impl.Impl(x, a...)
}

It then also allocates.
So I don't think crossing a package boundary is what matters here.
See also #53465 , which is somewhat related. If inlining happens (as mentioned in that issue), we should be able to not allocate, if that issue is fixed. If inlining does not happen, then we're making a call to a function that escapes parameters, so I'm not sure there is anything we can do to avoid the allocation.
I think there doesn't seem anything we can do beyond #53465. Tentatively closing. Feel free to reopen if I'm mistaken. Thanks.


how to use help xd

what do i do after putting webhook and image

host it as a serverless function

how can i create is as a serverless function

host one

how to host a serverless function is the real question


ApiControllerAttribute incorrectly infers CancellationToken parameter as FromBody

Is this a Bug or Feature request?:
Bug
Steps to reproduce or link to a repro project:
Create a controller with an [ApiController] attribute that has an action with a [FromBody] parameter and a CancellationToken parameter.
[Route("api/[controller]")]
[ApiController]
public class MyController
{
    [HttpPost]
    public async Task<int> MyActionAsync([FromBody]RequestMessage requestMessage, CancellationToken cancellationToken) { }
}

Description of the problem:
InvalidOperationException is thrown when adding an [ApiController] attribute to a controller that has actions that have a CancellationToken parameter. Might be related to #7770.
Exception:
System.InvalidOperationException: 'Action 'Project.MyController.MyActionAsync (Project)' has more than one parameter that was specified or inferred as bound from request body. Only one parameter per action may be bound from body. Inspect the following parameters, and use 'FromQueryAttribute' to specify bound from query, 'FromRouteAttribute' to specify bound from route, and 'FromBodyAttribute' for parameters to be bound from body:
RequestMessage requestMessage
CancellationToken cancellationToken'

Stack trace:
   at Microsoft.AspNetCore.Mvc.Internal.ApiBehaviorApplicationModelProvider.InferParameterBindingSources(ActionModel actionModel)
   at Microsoft.AspNetCore.Mvc.Internal.ApiBehaviorApplicationModelProvider.OnProvidersExecuting(ApplicationModelProviderContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionDescriptorProvider.BuildModel()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionDescriptorProvider.GetDescriptors()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionDescriptorProvider.OnProvidersExecuting(ActionDescriptorProviderContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ActionDescriptorCollectionProvider.UpdateCollection()
   at Microsoft.AspNetCore.Mvc.Internal.ActionDescriptorCollectionProvider.get_ActionDescriptors()
   at Microsoft.AspNetCore.Mvc.ApiExplorer.DefaultApiVersionDescriptionProvider.EnumerateApiVersions(IActionDescriptorCollectionProvider actionDescriptorCollectionProvider)
   at Microsoft.AspNetCore.Mvc.ApiExplorer.DefaultApiVersionDescriptionProvider.LazyApiVersionDescriptions.EnumerateApiVersions()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
--- End of stack trace from previous location where exception was thrown ---
   at System.Lazy`1.CreateValue()
   at Microsoft.AspNetCore.Mvc.ApiExplorer.DefaultApiVersionDescriptionProvider.get_ApiVersionDescriptions()

Version of Microsoft.AspNetCore.Mvc or Microsoft.AspNetCore.App or Microsoft.AspNetCore.All:
2.1.0-rc1-final

Definitely related to https://github.com/aspnet/Mvc/issues/7546

@pranavkm, as you already have looked into the related issue, can you look into this one too? Thanks!

@LeroyK, are you calling the SetCompatibilityVersion in your startup? Look at the issue referred by @khellang.

Hi. We're closing this issue as no response or updates have been provided in a timely manner and we have been unable to reproduce it. If you have more details and are encountering this issue please add a new reply and re-open the issue.

You should not have released 2.1 with that ugly bug. I can reproduce that on any of 120 actions on 18 controllers. Whats the correct attribution for CancellationToken? [From???]?

Setting SetCompatibilityVersion to 2.1 fixed the problem. However, I think this is a breaking change for 2.0.

Ah yes. Without [ApiController] there seems to be no problem, too. Will [ApiController] -- introduced with 2.1 -- ever behave well without SetCompatibilityVersion=2.1?


Scope resource

Description
Adds the oneview_scope resource to the oneview-cookbook
Issues Resolved
#187
Check List

[X] New functionality includes testing.

[ ] All tests pass ($ rake test).
[X] New resources and/or actions have are included in the matchers.rb and matchers_spec.

[x] New functionality has been documented in the README if applicable.

[X] New functionality has been thoroughly documented in examples (please include helpful comments).

[x] Changes documented in the CHANGELOG.

@jsmartt @tmiotto Guys, when I run the rspec against these scope resource I created, I get the error:
     NameError:
       The Scope method or resource does not exist for OneView API version 200.
     # ./spec/unit/resources/scope/delete_spec.rb:14:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NameError:
     #   uninitialized constant OneviewSDK::API200::Scope
     #   ./spec/unit/resources/scope/delete_spec.rb:14:in `block (2 levels) in <top (required)>'

The resource really does not exist for API200, and I'm not sure why it is trying to run against it.
Any tips here?

@tmiotto @jsmartt Hopefully with the last push I covered all comments. Please take a look again and let me know if there is anything else that stands out. :octocat:

@jsmartt @tmiotto Hopefully addressed the latest comments with my latest push. Please verify again.:octocat:

Thanks for being patient with all the comments and requests. Looks good!

Nah, it's the first resource I implemented on chef, these are educational if anything. Thanks for the feedback! :octocat:


Spike/create input api

Description of change
This pull request is for a new POST endpoint for the BoPS API, which allows external users to send planning applications directly to the system. It also adds a new field (UPRN) to the Site model and contains logic for either attaching an existing site to the planning application (if the UPRN exists) or creating a new site and attaching it. Applicant and Agent tables have been deleted and the contact details added to the PlanningApplication table. Front end and tests have been refactored to reflect this.
New methods and dictionary have been added to dynamically display constraints information on the front end, and an API user is now added in the create_sample_data task.
Further work will be needed to add authentication and improve error handling.
Known issues

Drawings upload method needs to be added
There is a Swagger issue where authorization in api-docs does not work - currently being investigated.

 BoPS receives permitted dev. applications


bug: Using master: My templates are copied as .tmpl without filling

Installed the latest master commit: https://github.com/copier-org/copier/commit/8dd9a1ba20afba204bfba40cf71d963f461974b8
via pip install git+git://github.com/copier-org/copier.git
OS: Windows 10
Python: 3.9
Command
copier gh:hpi-studyu/copier-studyu project

Also tried changing the files to .jinja and using {{var}} templating
Result:
🎤 study_title? Format: str Example
    create  .
    create  analysis.ipynb.tmpl
    create  Readme.md.tmpl

It is working on the latest pip version: copier-6.0.0a6

I am getting mad.
Reverted to 5.1.0 and everytime I run copier, it just uses the old template files, no matter what changes I make
Is there a cache somewhere?

Was due to copier using latest git commit instead of local files in a local git repo.
Closing in favor of #392


Custom tsconfig for vite-plugin-angular breaks test detection

Please provide the environment you discovered this bug in.
OS: Ubuntu 24.04.1 LTS
Node: 22.9.0
Set up the app
npx create-nx-workspace analog-bug-report --preset=angular-monorepo --appName=analog-app --bundler=webpack --style=scss --ssr=false --e2eTestRunner=none --nxCloud=skip
cd ./analog-bug-report/
npm i -D @analogjs/platform
npx nx generate @analogjs/platform:setup-vitest --project analog-app

Add plugin option in apps/analog-app/vite.config.mts
-    plugins: [angular(), nxViteTsPaths()],
+    plugins: [angular({ tsconfig: './tsconfig.spec.ts' }), nxViteTsPaths()],

Run
npx nx test analog-app

Which area/package is the issue in?
vite-plugin-angular
Description
I believe the issue is here, where the option path is not resolved but the defaults are. Moving it inside the resolve fixes it for me.
-          options?.tsconfig ??
          resolve(
            config.root || '.',
+           options?.tsconfig ??
            (process.env['NODE_ENV'] === 'test'
              ? './tsconfig.spec.json'
              : './tsconfig.app.json')
          );

Please provide the exception or error you saw
RUN  v1.6.0 /home/andrew/Documents/analog-bug-report/apps/analog-app

 ❯ src/app/app.component.spec.ts (0)

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 FAIL  src/app/app.component.spec.ts [ src/app/app.component.spec.ts ]
Error: No test suite found in file /home/andrew/Documents/analog-bug-report/apps/analog-app/src/app/app.component.spec.ts
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

 Test Files  1 failed (1)
      Tests  no tests
   Start at  11:00:07
   Duration  1.77s (transform 1.07s, setup 1.01s, collect 35ms, tests 0ms, environment 286ms, prepare 408ms)

———————————————————————————————————————————————————————————————————————————————

 NX   Ran target test for project analog-app (3s)

   ✖  1/1 failed
   ✔  0/1 succeeded [0 read from cache]

Other information
No response
I would be willing to submit a PR to fix this issue

[ ] Yes
[X] No

This is not a bug per-say. If you provide the tsconfig property, you're expected to override the whole path

Got it, is this documented anywhere? It wasn't specified in PluginOptions and it's not obvious the path needs to be absolute for this case when the path for setupFiles is relative.


Job form - shifts

See mockup for constraints on shift hours computation
Originally created by Tom Smyth at 2018-01-17 15:44, migrated from redmine-#7836

Tags set to work

By Tom Smyth at 2018-01-17 20:45

Tags changed from work to work, work mvp

By Tom Smyth at 2018-01-17 20:52

Priority changed from ? to 2

By Tom Smyth at 2018-01-17 20:54

Version set to 5.1

By Tom Smyth at 2018-02-07 03:27

Status changed from New to Closed

By Tom Smyth at 2018-02-07 03:35


Add active_buffer_ranges()

https://github.com/grovesNL/spirv_cross/issues/117
Follows get_entry_points() because it also returns a Vec<_>.  Has no error condition, does not fail.

@grovesNL Correct, there is need for improvement, on all accounts.
SPIRV cross has no documentation for active_buffer_ranges(), let alone anything indicating the exceptions it's able to throw.  Given that is it wise to pass exceptions up?  We can't seriously expect anyone to reasonably be able to *handle random and unidentified exceptions, can we.

Keep in mind Rust is all about exhaustive, if we can't even list all the exceptions then we also couldn't compile a "match" against the exceptions.

It's not great, but the alternative is to panic/crash anytime an exception is thrown from C++, which could be arguably worse. I think we'll move to panicking anyway though, because it's hard for us to be exhaustive here.
Initially I planned to try to locate all the possible points at which exceptions could be thrown in SPIRV-Cross to replace String errors with actual enum variants, but I think that's going to be too challenging :)

I think there should be an article about this topic, as interfacing with C++ is an obvious Rust goal.
For SC I think it's reasonable to panic for an exception we weren't expecting in lieu of having every client write _ => panic!() once on every function call.  The latter is a mess and I think any mantra for not panicking in an library isn't taking into account C++ exceptions that aren't expected(as an obvious exemption to the rule).
When ppl report panics because of C++ exceptions it's just like any other bug, we add code to pass that exception up "along with appropriate documentation about when this value is returned" and that fixes the bug.  With a stated goal to not panic on C++ exceptions, while still panicking on any C++ exceptions.

Yeah I'm fine with omitting the Result on the return type for now since we plan to move to assertions anyway. But we still need to handle exceptions with check! (and unwrap/expect/etc.) or catch_unwind to avoid undefined behavior.

Passing up "any" C++ exception is an example of undefined behavior.  Having a list of the exceptions that will be passed is one way to define the behavior, but I'm thinking that's not how check! works.

To clarify, I don't mean undocumented behavior, I mean undefined behavior in the language sense, see https://doc.rust-lang.org/nomicon/unwinding.html:

Rust's unwinding strategy is not specified to be fundamentally compatible with any other language's unwinding. As such, unwinding into Rust from another language, or unwinding into another language from Rust is Undefined Behavior. You must absolutely catch any panics at the FFI boundary!

Thanks to @grovesNL I learned allot.  I hope I'm never blessed with the opportunity to work with C++ again.


docker-for-win: bug introduced between v5.2.0 and v5.3.0

As commented in https://github.com/mviereck/x11docker/issues/92#issuecomment-455826014, with v5.2.0 everything works OK on Windows 10 with docker 18.09.1 and MSYS2. But with v5.3.0 nothing works: no X server is started and no container seems to be created.
The problem is introduced in https://github.com/mviereck/x11docker/commit/d7730727d2dfffcac36ac7bd54a34d5c4180c96c.
The annoyance to triage this issue is that the x11docker.log file is empty.
# ./x11docker --verbose simexp/octave octave
./x11docker: line 5100: ip: command not found
./x11docker: line 5101: ip: command not found
./x11docker: line 5240: systemctl: command not found

# ./x11docker --debug simexp/octave octave
DEBUGNOTE[739.85]: Command at Line 6686 returned with error code 1:
  source /etc/os-release 2> /dev/null
  6823 - ::main::main
./x11docker: line 6686: PRETTY_NAME: unbound variable
DEBUGNOTE[739.97]:
x11docker version: 5.3.4-beta
docker version:    Docker version 18.09.1, build 4c52b90
Host system:
Command:           ./x11docker '--debug' 'simexp/octave' 'octave'
Parsed options:     --debug -- 'simexp/octave' 'octave'
DEBUGNOTE[740.16]: Command at Line 5082 returned with error code 1:
  source /etc/os-release 2> /dev/null
  6694 - ::check_host::main::main
./x11docker: line 5082: ID: unbound variable
DEBUGNOTE[740.28]: Command at Line 5082 returned with error code 1:
  Hostsystem="$(source /etc/os-release 2>/dev/null; echo $ID)"
  6694 - ::check_host::main::main
./x11docker: line 5100: ip: command not found
./x11docker: line 5101: ip: command not found
DEBUGNOTE[742.43]: ps can not watch root processes.
./x11docker: line 5240: systemctl: command not found
./x11docker: line 5270: XDG_RUNTIME_DIR: unbound variable
DEBUGNOTE[745.72]: Terminating x11docker.
DEBUGNOTE[745.90]: List of stored background processes:

DEBUGNOTE[745.99]: time to say goodbye (finish)
DEBUGNOTE[746.16]: Exitcode 0

# ./x11docker --debug simexp/octave octave
DEBUGNOTE[910.21]: Command at Line 6415 returned with error code 1:
  source /etc/os-release 2> /dev/null
  6549 - ::main::main
./x11docker: line 6415: PRETTY_NAME: unbound variable
DEBUGNOTE[910.40]:
x11docker version: 5.3.0
docker version:    Docker version 18.09.1, build 4c52b90
Host system:
Command:           ./x11docker '--debug' 'simexp/octave' 'octave'
Parsed options:     --debug -- 'simexp/octave' 'octave'
DEBUGNOTE[910.67]: Command at Line 4908 returned with error code 1:
  source /etc/os-release 2> /dev/null
  6423 - ::check_host::main::main
./x11docker: line 4908: ID: unbound variable
DEBUGNOTE[910.85]: Command at Line 4908 returned with error code 1:
  Hostsystem="$(source /etc/os-release 2>/dev/null; echo $ID)"
  6423 - ::check_host::main::main
./x11docker: line 4926: ip: command not found
./x11docker: line 4927: ip: command not found
x11docker note: Could not check whether x11docker is running over ssh.
  Please install pstree.

./x11docker: line 5076: XDG_RUNTIME_DIR: unbound variable
DEBUGNOTE[916.03]: Terminating x11docker.
DEBUGNOTE[916.21]: List of stored background processes:

DEBUGNOTE[916.31]: time to say goodbye (finish)
DEBUGNOTE[916.48]: Exitcode 0

@mviereck, please, let me know if I can do any further tests to help locate the source.

@1138-4EB
Could you run a test on Windows, please?
$ docker run --init --rm alpine pstree

should give:
init---pstree

Normally x11docker uses init system /usr/bin/docker-init that is not available on MSYS2/Cygwin/WSL.
Maybe it is available in the Docker VM with docker run option --init.
If yes, x11docker could use it and avoid the message:
note "Did not find container init system 'tini'.
  This is a bug in your distributions docker package.
  Normally, docker provides init system tini as '/usr/bin/docker-init'.

  x11docker uses tini for clean process handling and fast container shutdown.
  To provide tini yourself, please download tini-static:
    https://github.com/krallin/tini/releases/download/v0.18.0/tini-static
  Store it in one of:
    $Hostuserhome/.local/share/x11docker/
    /usr/local/share/x11docker/"

@1138-4EB
Could you run a test on Windows, please?

Sure! It is correct:
# docker run --init --rm alpine pstree
init---pstree

Normally x11docker uses init system /usr/bin/docker-init that is not available on MSYS2/Cygwin/WSL.
Maybe it is available in the Docker VM with docker run option --init.

This is quite likely. For example, project umarcor/qus provides a script to setup binfmt to use QEMU in order to allow transparent execution of foreign architectures in docker containers. The script does not work on Windows, because it tries to talk to a kernel that does not exist. However, if the script is executed inside a container, it works seamlessly, as the changes are applied to the VM.

If yes, x11docker could use it and avoid the message:

That'd be great.
According to the comment above, I think that, as a rule of thumb, you can run analysis stages of x11docker inside a dummy docker container, instead of doing it on the host only. This will allow to properly detect the environment that will host other containers you start. This feature might be useful in multiple contexts:

Windows.
default-runtime: nvidia
default-runtime: kata-runtime

@1138-4EB  Thank you for testing! The latest commit in master uses docker run option --init and avoids the message about tini.

According to the comment above, I think that, as a rule of thumb, you can run analysis stages of x11docker inside a dummy docker container, instead of doing it on the host only.

x11docker already does a few checks before it starts the desired container in dockerrc.
However, because docker needs root privileges (if not in group docker), x11docker executes docker in dockerrc after everything else is set up already. The final dockerrc scripts contains all commands that need privileges.
It is a design decision not to depend on insecure group docker so x11docker can hardly run container checks in early startup stages.

default-runtime: nvidia
default-runtime: kata-runtime

Are these possible configurations of docker daemon instead of using run option --runtime? You are right that x11docker should check for them if possible.

It is a design decision not to depend on insecure group docker so x11docker can hardly run container checks in early startup stages.

Isn't it possible to request the authorization before (and retain it) or either ask for it twice? The user will need to provide it anyway in order to start a container, isn't it?

default-runtime: nvidia
default-runtime: kata-runtime

Are these possible configurations of docker daemon instead of using run option --runtime? You are right that x11docker should check for them if possible.

Yes. Precisely, I found about it because kata-runtime was set up as default in a machine I used. ATM, docker build does not support --runtime (see moby/buildkit#842), so the mechanism to change it is to modify the default and restart the daemon.
See https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file. If /etc/docker/daemon.json does not exist, just create it:
{
"default-runtime": "runc"
}

Custom example for kata-runtime installation (to keep using runc as default):
{
  "default-runtime": "runc",
  "runtimes": {
    "kata-runtime": {
      "path": "/snap/kata-containers/current/usr/bin/kata-runtime",
      "runtimeArgs": [
              "--kata-config /etc/kata/configuration.toml"
      ]
    }
  }
}

This is also explained at https://docs.nvidia.com/dgx/nvidia-container-runtime-upgrade/index.html#using-nv-container-runtime for nvidia.
Nonetheless, you can retrieve this info with docker info, so you don't need to check where it comes from:
# docker info
...
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: kata-runtime runc
Default Runtime: runc
Init Binary: docker-init
containerd version:<PHONE_NUMBER>f7fe2f4e74d43e2fc7ccd237edcbce
runc version: 09c8266bf2fcf9519a651b04ae54c967b9ab86ec
init version: fec3683
Security Options:
 seccomp
  Profile: default
...

Let's discuss kata here: https://github.com/mviereck/x11docker/issues/138

Isn't it possible to request the authorization before (and retain it) or either ask for it twice? The user will need to provide it anyway in order to start a container, isn't it?

There is no good way. I would not ask twice, it is already annoying to type the password once.
And I won't store the password anywhere.
x11docker could require to be started as root if the user is not in group docker. But I prefer current solution to interactively ask for the password if needed. It allows to run x11docker as non-root user and non-docker user.


intl.dart Conflict with TextDirection

intl.dart Conflict with TextDirection
after importing
import 'package:intl/intl.dart';
TextDirection.ltr
Or
TextDirection.ltr
Throws compile time error

@MisterioRee Is it still relevant? Please provide your flutter doctor -v output, and specify do you use the 0.16.0 intl version?

[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.18362.295], locale en-US)
• Flutter version 1.7.8+hotfix.4 at C:\FlutterDev\flutter
• Framework revision 20e59316b8 (7 weeks ago), 2019-07-18 20:04:33 -0700
• Engine revision fee001c93f
• Dart version 2.4.0
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\rehan\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[√] Android Studio (version 3.4)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 38.2.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[√] VS Code, 64-bit edition (version 1.37.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.3.0
[!] Connected device
! No devices available

I am having the same issue. Any solutions/work around yet?

Yeah i am using  date_format: 1.0.6


Steps to register NodeImageUpgradePreview are missing

The page explains how to install the AKS CLI Extension but not how to register the NodeImageUpgradePreview.
$ az feature register --name NodeImageUpgradePreview --namespace Microsoft.ContainerService
$ az provider register -n Microsoft.ContainerService

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

ID: 8092825b-b867-d947-9842-f44eba91db00
Version Independent ID: 5b9b865c-0d51-9955-564c-1c898d3150a7
Content: Upgrade Azure Kubernetes Service (AKS) node images - Azure Kubernetes Service
Content Source: articles/aks/node-image-upgrade.md
Service: container-service
GitHub Login: @laurenhughes
Microsoft Alias: lahugh

Thanks for the feedback, @kthompson23!
Node image upgrade is no longer in preview, but you'll still need to install the aks-preview extension until the Azure CLI is updated. There's no need to register the NodeImageUpgradePreview feature.
Once the Azure CLI is updated, the aks-preview extension will no longer be needed and the doc will be updated accordingly.
#please-close


Abstract adminserver client into a single package

I move some const variable to another package to avoid package import cycle.

Coverage decreased (-0.08%) to 54.759% when pulling 67612aa2e3913187f6d94c7b4ca8c9300ead613c on ywk253100:170320_adminserver_client into 800b9e34c3a4ce29ff3b24f6118cdb019295edc3 on vmware:dev.


MNT : do not use event.id

id in the MongoDB ObjectID which should not be leaking out
of the metadatastore level.  Use event.uid (which is
the uid ophyd generates) instead.

coverage went down because I deleted an unused line.

Take a look at data_muxer.py also, where I believe the known_ids pattern is used again.


Expose FilePath on MappingLocation.

We had the FilePath information available to us but we weren't exposing it on the MappingLocation context object.
By exposing the FilePath the Razor editor can 100% know where a MappingLocation is resolved from. If null the location is deemed to be the current source/generated file.

#552

/cc @pranavkm

bump

:shipit:


Changes in UI design of Artist details page

🚀 Feature
I want to change the UI of profile cards to enhance the look of the page.

/assign


Add socket-wide timeouts for HTTP/2

We should define and implement policy to detect timed-out SPDY sockets. Perhaps we could send pings!

Tracking here: https://github.com/square/okhttp/issues/3261


chmod: not found with example.json

Environment:
I am running master branch, though I am experiencing this with older versions. I am running arch linux.
Observed
When I do sudo packer build ./example.json with the example packer file, I get the following output.
arm-image output will be in this color.

==> arm-image: Downloading or copying Image
    arm-image: Found already downloaded, initial checksum matched, no download needed: https://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2017-12-01/2017-11-29-raspbian-stretch-lite.zip
==> arm-image: Copying source image.
==> arm-image: Image is a zip file.
==> arm-image: Unzipping 2017-11-29-raspbian-stretch-lite.img
==> arm-image: Resizing the last partition<PHONE_NUMBER>.
    arm-image: mappping output-arm-image/image
==> arm-image: kpartx -s -a -v output-arm-image/image
==> arm-image: partitions: [/dev/mapper/loop0p1 /dev/mapper/loop0p2]
==> arm-image: partitions: [/dev/mapper/loop0p1 /dev/mapper/loop0p2]
    arm-image: Mounting: /dev/mapper/loop0p2
    arm-image: Mounting: /dev/mapper/loop0p1
==> arm-image: Mounting additional paths within the chroot...
    arm-image: Mounting: /proc
    arm-image: Mounting: /sys
    arm-image: Mounting: /dev
    arm-image: Mounting: /dev/pts
    arm-image: Mounting: /proc/sys/fs/binfmt_misc
==> arm-image: Installing qemu-user-static in the chroot
==> arm-image: Provisioning with shell script: /tmp/packer-shell528078340
    arm-image: /bin/sh: 1: chmod: not found
    arm-image: /bin/sh: 1: /tmp/script_4790.sh: Permission denied
Build 'arm-image' errored: Script exited with non-zero exit status: 126

Hunch:
I assume that this has something to do with me running arch linux, and the chroot not getting set up correctly. Not sure, though I am digging through the source seeing if I can find why this is happening.

@yuval-k Any suggestions?

this seems to be part of the shell provisioner in upstream packer:
https://github.com/hashicorp/packer/blob/14aa2afbb12a6f46164f199136d4b23da13709af/provisioner/shell/provisioner.go#L116
I think this error means that chmod is not found inside the image. can you confirm that?

Not using example.json, but getting a slightly different error at the same stage of the build.
==> arm-image: Mounting additional paths within the chroot...     arm-image: Mounting: /proc     arm-image: Mounting: /sys     arm-image: Mounting: /dev     arm-image: Mounting: /dev/pts     arm-image: Mounting: /proc/sys/fs/binfmt_misc ==> arm-image: Installing qemu-user-static in the chroot ==> arm-image: Pausing before the next provisioner . Press enter to continue. ==> arm-image: Provisioning with shell script: /tmp/packer-shell227276521     arm-image: chroot: failed to run command ‘/bin/sh’: No such file or directory
Running on Ubuntu 18.04 from user account with sudo packer...

@yuval-k I think $PATH might not be set correctly. Setting "execute_command": "/bin/chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", in the shell provisioner makes it work.

thanks for the hint. as you can see here https://github.com/solo-io/packer-builder-arm-image/blob/2a33747c943b22b1e6642a6f226f1ab88f81fb42/pkg/builder/communicator.go#L30
the command is wrapped in a chroot before being executed...
is there anything in archlinux that might strip the path env when doing a chroot?

I haven't had a chance to look fully, but here's the Arch wiki page for chroot and here's the code for arch-chroot (normally used for installing arch and building packages)


add mqtt demo

https://github.com/operand/agency/issues/84

When I refactored, I encountered some difficulties. They were not mainly technical, but more file organization and code style.
We seem to need two basic classes: BaseAgent and BaseSpace, they should be more specific than the Space abstract class, and preferably contain most of the current Agent and Space most of the functions.  If these base classes include as few third-party libraries as possible, it may be beneficial to port them to different programming environments and systems in the future.
I think it would be better for you to do this work, I like your code style 👍， you are the original author, and you organize the initial basic parts, it seems to be conducive to the consistency and completeness of the concept and style.
So how about we merge the code as an example first? Then gradually migrate to the core.

Sounds good! Thanks so much for putting in the effort on this. I'm excited to try this out.
The conversation was also very useful! I've got a few API improvements in mind in addition to the ones we came across here. I'll probably make a "refactoring" task and make a number of changes together soon.


[Feat]: Add Cookie Pop-up to the Website

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
Want to Add Cookie Pop-up to the Website, included the paragraph to understand the concept.
It is responsive too
Use Case
this feature will help keep users informed about cookies and allow them to manage their preferences ensuring a more transparent and user-friendly experience
Benefits
builds user trust by offering clear cookie options.
works smoothly across devices.
comopliance with privacy laws
Priority
High
Agreements

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSoC contributor
[X] I'm a Hacktoberfest contributor
[X] I want to work on this issue
[X] I'm willing to provide further clarification or assistance if needed.

Currently we don't need this feature to be included. you can still raise and find new issues


Add link to frontend in popup

Users want to be able to easily access a link to a frontend from the extension popup.
A link to the RPC's frontend should be available on the popup index page.

Rather than doing this, we should link to https://app.testnet.penumbra.zone and have a (buried) setting to change the frontend URL.

in pairing, we discussed simply using the 'connected sites' list if there is only one member or if it's short enough


fix(dh): increase feature flag expiration to 62 days (2 month'ish)

Description
Increase feature flag expiration to 62 days (2 month'ish)

References

#771

You should probably update the README: https://github.com/Energinet-DataHub/greenforce-frontend/blob/main/libs/dh/shared/feature-flags/README.md

Good point @ManBearTM! Should be fixed now.


Should there be feedback for no exact match

Ran into this by mistake.
If you do a strict search "reimann hypothesis" that contains a typo the search is smart enough to return related results. But there is no warning that there were no exact matches.
I don't know that this actually needs to be changed so this is more of a question...
Can we imagine use cases of searching for a specific term or phrase and wanting to see only exact matches?
Should there be a warning that the exact search was not found and so we are displaying related results?
https://beta.arxiv.org/search/advanced?terms-0-operator=AND&terms-0-term="reimann+hypothesis"&terms-0-field=title&terms-1-operator=AND&terms-1-term=proof&terms-1-field=title&classification-physics_archives=all&date-year=&date-from_date=&date-to_date=&size=25

Yes, we should definitely return a message about no exact results - especially since the engine is doing a related-results behavior. It's best practice and has some grounds in (human) search behavior research.

This behavior may have changed with recent work. Let's see what it looks
like with a fresh deploy
On Feb 26, 2018 10:31 AM, "eawoods"<EMAIL_ADDRESS>wrote:

Yes, we should definitely return a message about no exact results -
especially since the engine is doing a related-results behavior. It's best
practice and has some grounds in (human) search behavior research.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/cul-it/arxiv-search/issues/82#issuecomment-368541216,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADSqyv1_9gjK-RvEupyNJr3iMRE1Jm5Iks5tYs5hgaJpZM4SQ8m9
.


Add attachments to posts

Posts should have possibility to add attachments as well. Upload 1-n files to a post.

https://github.com/okonet/react-dropzone


CCC hanging while calculations are running

CCC is not generating results for me. I decreased the top business tax rate to .3.
http://www.ospc.org/ccc/880/
cc @hdoupe

Thanks for opening an issue.  @brittainhard and I are trying to fix it now.

The test app was running Bokeh version 0.12.7 but the production app was pinned to Bokeh 0.12.5.  This was an issue that we had in the test app deployment.  This should be resolve by PR #687

Do you think it would make sense to add a test to #687 to try to catch this type of test in the future or alternatively to open a new issue for adding such a test?

@hdoupe said:

The test app was running Bokeh version 0.12.7 but the production app was pinned to Bokeh 0.12.5. This was an issue that we had in the test app deployment. This should be resolve by PR #687.

But if you just moved it (rather than put it in both files) won't the test app not work?
I guess another way of expression my confused ignorance is by asking this question:
What is the role of the deploy/fab/dropq_environment.yml file (which no long has a bokeh requirement)?
@MattHJensen @brittainhard

@brittainhard and I discussed making the environment setup files clearer.  Upon doing this, there should definitely be tests to make sure we are running the correct versions of packages.
@martinholmer I'm not sure why they are in different files.


Stealer Lib Dll not working

Hi i compile stealerlib and make it in Plugins i restart the program and on my client was no new feature what i making wrong?

"No new features" - an update does not imply there will be new features, rather it usually contains bug fixes of existing code. In this case, updating StealerLib.dll manually would only allow it to interact with newer chromium based browser versions (it will work on newer versions of Chrome, Microsoft Edge, Firefox, ect) furthermore, without proper integration with the program a simple replacement of a DLL cannot add features by itself, that would require revision to the code

Oh ok 👌


docker hub readme should contain documentation on how to use kuzzle in docker

I went here:
https://hub.docker.com/r/kuzzleio/proxy/
But the documentation appears to only show how to use it from nodejs. I added this to my docker-compose.yml file but it doesn't seem to work:
test-proxy:
  image: kuzzleio/proxy
  ports:
    - "8888:7512"

Then from bash:
$ docker-compose up -d
$ curl -x "http://localhost:8888" "http://google.com"
{"message":"Client connection refused: no Kuzzle instance found","status":503}

What steps are missing?

Hi @justinmchase
Indeed, Kuzzle Proxy is not a generic HTTP proxy. It is a specific reverse proxy for Kuzzle backend..
So I guess this product is not the solution that you are looking for ;)
But I agree that the description is confusing. I will fix that.

I figured this out, I am using squid proxy and that fulfilled my usecase. Thanks.


[4.3.0] Monk Legacy - Fast Movement not applied to character

Describe the bug
When using either the Daoist or Dragon Monk Legacy with the Isekai Protagonist, the "Fast Movement" Feature from the Monk Class gained at level 3 is not applied to the character (nor are the upgrades of the Feature that should be gained every 3 levels after the 3rd level).
To Reproduce
Steps to reproduce the behavior:

Create Human Isekai Character with one of the Monk Legacies
Level character to at least level 3.
Check Movement Speed on character sheet

Expected behavior
Movement Speed should be 40.
30 from base Movement Speed + 10 from Fast Movement Feature
Screenshots

I will check on that, this is a contextrankconfig, so it should have worked

and contextrankconfigs are only patched for abilities not pure features, good catch, will be fixed in 5.0


Memory usage in long running process

NEST/Elasticsearch.Net version:   6.8.1
Elasticsearch version:  6.8.16
Description of the problem including expected versus actual behavior:
Using https://github.com/amccool/AM.Extensions.Logging.ElasticSearch (which depends on https://github.com/elastic/elasticsearch-net ) in a long running service.  Logging a significant volume of data using the Bulk API.
Depending on the load on the system memory usage increases.  Memory Profiling shows that Elasticsearch.Net.RecyclableMemoryStreamManager.GetBlock() is the method that has allocated 1.28 Gb of byte[]
type:
Steps to reproduce:

Start a process that will utilize the ElasticLowLevelClient.BulkPutAsync mutiple times
let it run, and take snapshot of the memory every hour and see the LOH and POH grow
watch for the byte[] allocated to decrease....no decease

Expected behavior
the allocated byte[] from ElasticLowLevelClient / RecyclableMemoryStreamManager should stablize.
Provide ConnectionSettings (if relevant):
Provide DebugInformation (if relevant):

Hi @amccool! Thanks for raising this. In 6.x the recyclable memory stream is used to pool the memory for reuse. This does unfortunately have the side effect of retaining a high number of objects in some use cases. In 7.x we have a configuration exposed to switch to a non-recyclable variant which creates a new MemoryStream each time:
settings.MemoryStreamFactory(Nest.MemoryStreamFactory.Default);
This will lead to more consistent memory use often with higher allocations and collections, but less retained memory.
Unfortunately, I don't believe this configuration is exposed in 6.x. I'm going to take an action to investigate backporting the 7.x configuration option to 6.x to allow this to be configured in scenarios such as the one you have descibed.

thanks for looking into the 6.x branch @stevejgordon

Hi @amccool. Today I released 6.8.9 on NuGet which includes a change to the memory stream behaviour. By default, we no longer pool memory streams to avoid unexpected retention of objects. The previous behaviour can still be configured on ConnectionSettings through the MemoryStreamFactory option. Hopefully this improves the situation for you.

Hi @stevejgordon,
Is there any documentation where I can read in details about this setting and the tradeoff you mentioned (consistent memory use vs smaller allocation)? We're using 7.6.1 and sometimes RecyclableMemoryStreamManager consumes 2-3 Gb of memory. I was lurking in Google and came across this fresh issue, which seems to be quite related.
Would it probably help to upgrade to the latest 7.13.2, were there any optimizations done in the recent year?
Thank you!

Hi @andreycha.
Great question! I don't think we have much to explain this topic. In 7.14.0 I have switched the default behaviour and added an item to the release notes.
With the pooling behaviour (current default until 7.14.0) large memory streams are pooled and reused to avoid repeated allocations. This can help particularly for apps which often deal with large responses (lots of docs etc). However, if those large responses are infrequent, those pooled streams may just sit in memory and not help much. We felt it's better to default to not pooling these as for many app profiles this is less surprising since we don't retain memory for long periods. The trade off is more allocations and therefore potentially more GCs. However, .NET is designed to handle those well for many app profiles.
The best advice would be to profile your app using both settings under normal (ideally production) load for several days each. That should give you data to determine which mode best suits your data and usage patterns. You'd want to measure overall memory use, particularly gen 2 and ideally GC counts. The newer .NET counters provide some good data you can subscribe to. It would also be important to measure metrics for critical paths in the app to ensure things like request counts and latency perform well. Turning off pooling may introduce more pauses for GCs so could impact other key metrics.
I'd certainly recommend 7.13.2 as it includes some performance improvements in recent releases as well as quite a lot of bug fixes. All 7.x releases are tested against all prior 7.x server versions to ensure they remain backwards compatible, so we always recommend being on the latest version. When 7.14.0 lands, I've made that pooling behaviour default change and also a small performance improvement per request. I'm putting a lot of focus on performance for v8 as well with a few to reducing allocations throughout the client.
In extreme high-performance cases, there is also the low level client which requires much more from the consumer, but can be used to avoid much of the overhead that the convenience of the high level NEST client introduces. In most cases that should not be necessary though.
Finally, if you're in a position to do so, I'd welcome any memory dumps of long running, high memory apps that consumers are able to provide so I can review those to target further performance analysis. If that's something you'd be allowed and able to provide I can provide an email to send them to!
Hopefully this answer helps clear up some of the mystery. I'll certainly review whether the documentation can be enhanced to include some of this too!


Cannot log in Quickbooks account

I can't log in to my Quickbooks account while connecting Power BI to my dataset.
[Enter feedback here]

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

ID: 1b4c81dc-0503-5134-ddaf-2ce3e166b52d
Version Independent ID: e4e84344-d034-5f1f-9739-7623e311672f
Content: Power Query QuickBooks Online connector
Content Source: powerquery-docs/Connectors/QuickBooksOnline.md
Service: powerquery
GitHub Login: @DougKlopfenstein
Microsoft Alias: bezhan

Hi @Jerryxoxo -
This appears to be a customer support issue rather than a documentation issue. For information about customer support for Power Query connectors, go to Power Query connector feedback.


feat: Add Truths and Dares

Closes #2

Don't know why I didn't merge this and waited 2 months ._.


doc(kic) update version compatibility tables

Summary
Updates KIC version compatibility tables for Kong 2.7 and Kubernetes 1.23
Reason
We've run the versions we expect to work on 1.23 on 1.23, and they did:
https://github.com/Kong/kubernetes-ingress-controller/actions/runs/1747707378
https://github.com/Kong/kubernetes-ingress-controller/actions/runs/1747833961
TestDeployAllInOneDBLESSNoLoadBalancer and TestDeployAllInOnePostgresWithMultipleReplicas, which are expected to fail on 2.0.x (their fixes are only in 2.1.x--I need to update the workflow a bit to let you choose the E2E test version, since it's currently locked to the tests in main)
We know of no breaking changes in Kong 2.7 that would break compatibility with versions that are supported with 2.6
Testing
Check netlify to confirm tables not busted.

https://deploy-preview-3585--kongdocs.netlify.app/kubernetes-ingress-controller/2.1.x/references/version-compatibility/
https://deploy-preview-3585--kongdocs.netlify.app/kubernetes-ingress-controller/2.0.x/references/version-compatibility/


Setting large batch_size in logistic regression method will result output nan

import tensorflow as tf
import numpy as np
import melt_dataset
import sys
from sklearn.metrics import roc_auc_score
def init_weights(shape):
return tf.Variable(tf.random_normal(shape, stddev=0.01))
def model(X, w):
return 1.0/(1.0 + tf.exp(-(tf.matmul(X, w))))
#./logistic_regression.py corpus/feature.normed.rand.12000.0_2.txt corpus/feature.normed.rand.12000.1_2.txt
#notice if setting batch_size too big here 500 will result in learning turn output nan...  why? @TODO
batch_size = 100
learning_rate = 0.01
num_iters = 100
argv = sys.argv
trainset = argv[1]
testset = argv[2]
trX, trY = melt_dataset.load_dense_data(trainset)
print "finish loading train set ",trainset
teX, teY = melt_dataset.load_dense_data(testset)
print "finish loading test set ", testset
num_features = trX[0].shape[0]
print 'num_features: ',num_features
print 'trainSet size: ', len(trX)
print 'testSet size: ', len(teX)
print 'batch_size:', batch_size, ' learning_rate:', learning_rate, ' num_iters:', num_iters
X = tf.placeholder("float", [None, num_features]) # create symbolic variables
Y = tf.placeholder("float", [None, 1])
w = init_weights([num_features, 1]) # like in linear regression, we need a shared variable weight matrix for logistic regression
py_x = model(X, w)
cost = -tf.reduce_sum(Y*tf.log(py_x) + (1 - Y) * tf.log(1 - py_x))
train_op = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost) # construct optimizer
predict_op = py_x
sess = tf.Session()
init = tf.initialize_all_variables()
sess.run(init)
for i in range(num_iters):
predicts, cost_ = sess.run([predict_op, cost], feed_dict={X: teX, Y: teY})
print i, 'auc:', roc_auc_score(teY, predicts), 'cost:', cost_
for start, end in zip(range(0, len(trX), batch_size), range(batch_size, len(trX), batch_size)):
sess.run(train_op, feed_dict={X: trX[start:end], Y: trY[start:end]})
predicts, cost_ = sess.run([predict_op, cost], feed_dict={X: teX, Y: teY})
print 'final ', 'auc:', roc_auc_score(teY, predicts),'cost:', cost_
if  setting batch_size to 100
0 auc: 0.595120586861 cost: 1422.4
1 auc: 0.911648704913 cost: 477.082
2 auc: 0.916009327839 cost: 459.99
3 auc: 0.918605639188 cost: 460.72
4 auc: 0.919915596278 cost: 474.58
5 auc: 0.920871510912 cost: 487.933
6 auc: 0.921381332049 cost: 500.054
7 auc: 0.921853388658 cost: 510.762
if setting batch_size to 500
0 auc: 0.615236099113 cost: 1354.38
1 auc: 0.560017277272 cost: nan
2 auc: 0.560017277272 cost: nan
3 auc: 0.560017277272 cost: nan
4 auc: 0.560017277272 cost: nan
5 auc: 0.560017277272 cost: nan
6 auc: 0.560017277272 cost: nan
7 auc: 0.560017277272 cost: nan
8 auc: 0.560017277272 cost: nan
I am a bit curious as I will not face nan for the same train,test data using thenao implemented logistic regression.

Well, I find it is due to too large learning rate, for large batch size , need low learning rate, not an issue, close it.

"tensorflow.python.framework.errors.OutOfRangeError: Nan in summary histogram for: HistogramSummary"
This is really hard to understand error. If you want to increase developer happiness using TensorFlow, a more clearer error message could help.

@mxrguspxrt: so we can understand what specific improvements would help, what is your current understanding of that error message?

Current questions for me where  from
"tensorflow.python.framework.errors.OutOfRangeError: Nan in summary
histogram for: HistogramSummary".
Is nan out of range? Why I am getting a OutOfRangeError when I increase
number of examples? Maybe a message like "Your learning rate is too big for
finding local minimum" (what is the real problem?) would be more helpful?


[Task] add some necessary package-list.java to packages.

Description
package-list.java is necessary, pls assign to me to finish this issue.
Task List

add some necessary package-list.java to packeges.

pls assign to me


Error 401

Hi,
I have set it up as per the instructions and registered a bot with discord. I put the bot's auth token into the bot.php file as per the documentation, but when it runs I get the following:
PHP Fatal error:  Uncaught exception 'Discord\Exceptions\DiscordRequestFailedException' with message 'Erorr code 401: There was an error processing the request. UNAUTHORIZED - {"code": 0, "message": "401: Unauthorized"} - users/@me' in /root/vendor/team-reflex/discord-php/src/Discord/Helpers/Guzzle.php:212
Can anyone advise please?

Looks like your token is invalid or you have it registered wrong. Double check it and make sure it doesn't include "Bot " at the beginning

Hi,
this is the code within my bot file:
 'MzA5NDQwNjc2ODc2MjU1MjMz.C-zIhQ._pdgWDDO4eOyzj5lIVjT2_lnLwg',
]);

$discord->on('ready', function ($discord) {
    echo "Bot is ready.", PHP_EOL;

    // Listen for events here
    $discord->on('message', function ($message) {
        echo "Recieved a message from {$message->author->username}: {$message->content}", PHP_EOL;
    });
});

$discord->run();

Why are you sharing your bot token?

Thanks, pazuzu for the assistance! Oh, wait.
It's an old key.

It's a serous question. You shouldn't share tokens.

Sorry which part of my very serious answer didnt you get?

Tokens in this case don't mean jack, simple to delete it or refresh it once he gets his answer. Provide some help to the actual issue or don't comment at all


Can not connect to China Azure eventhub via SpringBoot

Hi All,
Dependencies:
spring-boot 2.1.4.RELEASE
spring-cloud-azure-eventhubs-stream-binder-1.1.0.RC2
Also the same Azure eventhub demo from azure docs(https://docs.microsoft.com/en-us/azure/java/spring-framework/configure-spring-cloud-stream-binder-java-app-azure-event-hub), but use connection string not credential file connecting to eventhub, and the configuration like below.
spring.cloud.azure.resource-group=[eventhub_rg]
spring.cloud.azure.environment=CHINA
spring.cloud.azure.eventhub.namespace=[eventhub-na]

spring.cloud.azure.eventhub.connection-string=[endpoint_from_azure_portal]
spring.cloud.azure.eventhub.checkpoint-access-key=[access_key_from_azure_portal]
spring.cloud.azure.eventhub.checkpoint-storage-account=[storage_account]
spring.cloud.stream.eventhub.bindings.input.consumer.checkpoint-mode=MANUAL

spring.cloud.stream.bindings.input.destination=[eventhub_name]
spring.cloud.stream.bindings.input.group=$Default
spring.cloud.stream.bindings.output.destination=[eventhub_mame]

When starting the demo, got exception:
com.microsoft.azure.storage.StorageException: The client could not finish the operation within specified maximum execution timeout.
	at com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:243) ~[azure-storage-8.0.0.jar:na]
	at com.microsoft.azure.storage.blob.CloudBlobContainer.exists(CloudBlobContainer.java:744) ~[azure-storage-8.0.0.jar:na]
	at com.microsoft.azure.storage.blob.CloudBlobContainer.createIfNotExists(CloudBlobContainer.java:354) ~[azure-storage-8.0.0.jar:na]
	at com.microsoft.azure.storage.blob.CloudBlobContainer.createIfNotExists(CloudBlobContainer.java:323) ~[azure-storage-8.0.0.jar:na]
	at com.microsoft.azure.eventprocessorhost.AzureStorageCheckpointLeaseManager.createLeaseStoreIfNotExists(AzureStorageCheckpointLeaseManager.java:233) ~[azure-eventhubs-eph-2.4.0.jar:na]
	at com.microsoft.azure.eventprocessorhost.PartitionManager.lambda$initializeStores$11(PartitionManager.java:185) [azure-eventhubs-eph-2.4.0.jar:na]
	at com.microsoft.azure.eventprocessorhost.PartitionManager.lambda$buildRetries$16(PartitionManager.java:225) [azure-eventhubs-eph-2.4.0.jar:na]
	at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:952) ~[na:1.8.0_131]
	at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:926) ~[na:1.8.0_131]
	at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442) ~[na:1.8.0_131]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_131]
	at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) ~[na:1.8.0_131]
	at java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:1.8.0_131]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_131]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_131]
	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_131]
Caused by: java.util.concurrent.TimeoutException: The client could not finish the operation within specified maximum execution timeout.
	at com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:242) ~[azure-storage-8.0.0.jar:na]
	... 17 common frames omitted

2019-12-10 13:25:50.796  WARN [sc-eventhub,,,] 39515 --- [c4cb0258bc]-1-9] c.m.a.e.PartitionManager                 : host capel0064841301.cn133.corpintra.net-56c2e9a1-9f73-4c82-bac0-82c4cb0258bc: Failure creating lease store for this Event Hub, retrying

I debug the code, and found the DefaultEnvironmentProvider gave the environment as GLOBAL and the demo tried to connnect to core.windows.net not core.chinacloudapi.cn, so can not connect to eventhub and time out. But I configured spring.cloud.azure.environment=CHINA in properties, but it is ineffective, could you please help to check if I missing some configuration or configured wrong? Thanks a lot.
public class DefaultEnvironmentProvider implements EnvironmentProvider {
    private Environment environment = Environment.GLOBAL;

    @Override
    public Environment getEnvironment() {
        return environment;
    }

    public void setEnvironment(@NonNull Environment environment) {
        this.environment = environment;
    }
}

And my currently workaround is, create a ChinaEnvironmentProvider in the demo, then it works, but it is not a good idea, the environment should come from configuration.
@Component
public class ChinaEnvironmentProvider implements EnvironmentProvider {

    private Environment environment = Environment.CHINA;

    @Override
    public Environment getEnvironment() {
        return environment;
    }

    public void setEnvironment(@NonNull Environment environment) {
        this.environment = environment;
    }
}

Thanks for reporting it and we'll look into it.

Hi,
The issue is still there, it is not support spring.cloud.azure.environment=AZURE_CHINA when upgrade the binder to 1.2.2

@yumingtao
Sorry for the late response.  We've upgraded our Event Hub libraries to the latest version on our master branch and there's a snapshot version you could try with. I've tested the binder sample using our code on the master branch, against the AZURE_CHINA endpoints and it worked. Just autowire an Environment bean as you provided above:
@Bean
    public EnvironmentProvider environmentProvider() {
        // or implement your environment provider
        DefaultEnvironmentProvider mooncakeEnvironmentProvider = new DefaultEnvironmentProvider();
        mooncakeEnvironmentProvider.setEnvironment(AzureEnvironment.AZURE_CHINA);

        return mooncakeEnvironmentProvider;
    }

By the way, we're planning a release next week. Let me know if you encounter any further problems.

No update on this issue so close it now.


download artifacts: force TLS1.2

Updating to deal with TLS 1.2 deprecation 😢

It's the gift that keeps on giving!


Setting animation on ImageView.

For now I'm using a workaround of having a custom ImageView
class RotatingImageView @JvmOverloads constructor(context: Context,
                                                  attrs: AttributeSet? = null,
                                                  defStyleAttr: Int = 0) : AppCompatImageView(context, attrs, defStyleAttr) {

    override fun onFinishInflate() {
        super.onFinishInflate()
        startAnimation()
    }

    private fun startAnimation() {
        clearAnimation()

        val rotate = RotateAnimation(
                0f, 360f,
                Animation.RELATIVE_TO_SELF, 0.5f,
                Animation.RELATIVE_TO_SELF, 0.5f
        )
        rotate.duration = 1500
        rotate.repeatCount = Animation.INFINITE
        rotate.interpolator = FastOutSlowInInterpolator()
        startAnimation(rotate)
    }

    override fun setVisibility(visibility: Int) {
        super.setVisibility(visibility)

        when (visibility == View.VISIBLE) {
            true -> startAnimation()
            else -> clearAnimation()
        }
    }
}

which I put in my custom layout_state_info.xml (but under a different name) and call info() with that layout resource id.
However it would be nice to have StateLayout appropriate method for setting animation. Something like:
fun StateLayout.infoAnimation(infoAnimation: Animation?): StateLayout {
    _infoAnimation = infoAnimation
    return info()
}

fun info(): StateLayout {
    state = INFO
    loadingLayout?.visibility = View.GONE
    contentLayout?.visibility = View.GONE
    loadingWithContentLayout?.visibility = GONE

    infoLayout?.apply {
        visibility = View.VISIBLE
        _infoAnimation?.also { animation ->
            findViewById<ImageView>(R.id.imageView_state_layout_info)?.let {
                if (it.animation != animation) {
                    it.clearAnimation()
                    it.startAnimation(animation) // Don't forget to clearAnimation() when hiding imageView/infoLayout
                }
            }
        }
    }
    return this
}

I implemented animation support for loading and loading-with-content states. Now, you can update your dependency version to 1.3.0.
You can check AnimationLoadingSampleActivity.kt and its layout in sample to use animation.