mysql permission issues

Hello All,
Could you advise of cause on this error and support a solution?
Running command:
docker run -it --rm \
		    -v /docker/misp-db:/var/lib/mysql \
		    harvarditsecurity/misp /init-db &&

Met with:

chown: cannot read directory '/var/lib/mysql': Permission denied
chown: changing ownership of '/var/lib/mysql': Permission denied
Cannot change ownership of the database directories to the 'mysql'
user.  Check that you have the necessary permissions and try again.
chown: cannot read directory '/var/lib/mysql': Permission denied

I looked into container file system and permissions of the mysql folder is set to "root" though unable to access.
Thank you!

Disregard - unaware the host needed to meet a "matching"  build requirement first.

@RANGERBEE Just curious - what do you mean by matching build requirement?

Thought I simply needed to run docker environment and build - unaware the host had dependencies:
https://github.com/MISP/MISP/blob/2.4/INSTALL/xINSTALL.centos7.txt

@RANGERBEE I think there might be some confusion here.
These do not apply here - they are for CentOS.
The docker image is based on Ubuntu and it just works out of the box "as is".
You don't need any other pre-requirements. It's all self contained.

Yes that was the issue. Was installing onto a Centos7 minimal build.
Was just trying to NOW to build centos instance to support the Ubuntu container.
Do I need anything more than an Ubuntu minimal iso install and docker to support the image?

If your host (docker "engine") is CentOS -- that's not a problem.
The host abstracts the container system. The container itself however is Ubuntu, but all of the dependencies are provided for you (see: https://github.com/harvard-itsecurity/docker-misp/blob/master/container/Dockerfile)
As long as you have a functional docker engine and the Ubuntu:16.04 container, you should be fine.
You can test your setup by doing:
docker run -it --rm ubuntu:16.04 /bin/bash

If that works - you are good to go.

@ventz  Thank you!!  Saved me some work.
I am working on a Centos host and the Ubuntu container starts just fine.
My originally stated issue persists.
I was looking at the Docker build file and noticed the Volume mount.
Does this not require the host to have that "/var/lib/mysql" pre-existing or does Docker create the folder upon build followed by mount - for storage persistence?    Could this be my issue?
Thank you again for the quick response!

Docker will create it for you -- everything is abstracted into $docker-root/misp-db if you are following the tutorial/example.
If you are using /docker for $docker-root, I would suggest this:
# rm -Rf /docker/misp-db
# mkdir -p /docker/misp-db

And then start with the 1-3 steps.

@ventz  I still have this annoying error that I can not find a solution.
I did include your last suggestion.
Met with:

chown: cannot read directory '/var/lib/mysql': Permission denied
chown: changing ownership of '/var/lib/mysql': Permission denied
Cannot change ownership of the database directories to the 'mysql'
user.  Check that you have the necessary permissions and try again.
chown: cannot read directory '/var/lib/mysql': Permission denied
180511 18:32:46 mysqld_safe Logging to syslog.
180511 18:32:46 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directo                                    ry")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directo                                    ry")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directo                                    ry")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directo                                    ry")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directo                                    ry")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directo                                    ry")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directo                                    ry")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directo                                    ry")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directo                                    ry")
touch: cannot touch '/var/lib/mysql/.db_initialized': Permission denied
chown: cannot read directory '/var/lib/mysql': Permission denied

everything else looks to work fine..
Any ideas?

It looks like mysql:mysql is not being applied via chown in the Dockerfile...  (?)

@RANGERBEE I think you are looking at the local file system (the host) instead of the container file system.
The entire docker file system will be in /docker/misp-db on the host.
The other possibility is that selinux is applying something to / on the host, and preventing docker access. The easiest way to check that is to change your docker root to /root/docker and create a /root/docker/misp-db, and try it there.

@ventz  Thanks.
I will check that out.
The directory you see in the image is from the container. ( I use Rancher to manage)
I prep my hosts with this script code:( see anything ?)
                        sed -i -- "s/SELINUX=.*/SELINUX=disabled/g" /etc/sysconfig/selinux &&
			cat /etc/sysconfig/selinux;
			sysctl -w vm.swappiness=1;
			sysctl -w vm.max_map_count=262144;
			sed -i -e "\$avm.max_map_count=262144" /etc/sysctl.conf &&
			chcon -R system_u:object_r:admin_home_t:s0 /opt/MISP/;
			groupadd docker;
			usermod -aG docker $USER;
			gpasswd -a $USER docker;
			cd /usr/libexec/docker;
			ln -s docker-runc-current docker-runc;

Thanks for your time!!

The first line will disable selinux but only after a reboot (in case you have not rebooted yet)
Ah - you are not launching the container as root -- that's the issue I believe.
(If you are adding $USER, that $USER would have to have ownership rwx of /docker)

@ventz Thank you.
I will be circling back around to thie CentOS host to check against that folder...  Currently have it running in an Ubuntu host just fine for my PoC.
Side note: have you given thought to using these base images?
https://github.com/whiteops-dot-com/centos-baseimage
https://github.com/phusion/baseimage-docker
Thanks again!

Np - glad it's working.
I have -- the phusion one is very popular (and they make a great point about "multiple processes" vs vs "logical level services", which a lot of people argue on re: "fat containers" and how you should run "1 thing" in a docker container).
With this container, the the goal was to follow the manual MISP instructions as close as possible, for two reasons:
1.) to stay ideally as close as possible to the upstream branch so that we can effortlessly update as it updates. We chose Ubuntu because we think it's a better OS choice for this kind of stuff (vs CentOS/RHEL which tends to be ideal for a flat appliance that doesn't require the latest package versions, and needs stable packaging that doesn't change)
2.) to only add additional "docker specific" things, and convenient automation of the original steps. (ex: if there are 5 steps - adding a single step that automates the 5 is acceptable)
This really summarizes as: we wanted this truly to be an official docker version of the official MISP release. There are a lot of extra features we can add, but we tried holding off of that.
That said, for other images - there's nothing wrong with using the phusion container. I am not quite convinced on the need for ssh, but I would argue that having cron is needed, and having an init system is basically a must. Back to the phusion argument, the philosophy of docker that's "one thing per container" is really one service, versus one process. I think it's much worse to launch 5 containers for 1 service, rather than 1 container with 5 processes for 1 service.

Rebuilt the Centos7 instance -
add the following to my prep script:
mkdir /docker;
mkdir /docker/misp-db;
chown -R 1000:1000 /docker;
cd /opt/docker-misp;

Then build / init / run all working fine now...
Thanks!


Problem with globalSetup

💬 Questions and Help
I  configure the globalSetup option of jest.config.js to read the setup.ts file. In setup.ts some singletons will be called to create their instances. When my tests start, all the values stored in singletons have disappeared. Is that normal?

please ask this question in Jest Discord, you will get more help there. GitHub issue is for tracking issues only.


emit signal when tabbars are cleared

I've got titlebars on every border.
When the tabbar appears, my titlebar at the bottom get's replaced with the tabbar.
When the tabbar disappears, my old titlebar doesn't get restored. instead i get a new titlebar with 3 pixel height instead.
I think this happens in clear_tabbar from helpers.lua.
It would be nice if machina saves your existing titlebar and restores it (or alternatively if you could pass the titlebar you want to machina instead of a hardcoded 3px one)

The bottom bars we use for creating the tabs are actually titlebars themselves. That's how everything works smoothly without creating actual awesomewm widgets and placing them on the screen which would complicate the regions you create with layout-machi.
I think the most efficient way to handle this would be to emit a signal when tabbars are cleared to let users attach their own logic via their rc.lua. I added it to my todo the for the rewrite of machina.

I didn't want to make a commit before I test this out throughly, you can do this:
replace the function in helper.lua with:
local function clear_tabbar(c, position)
   if not c then return end
   local position = position or "bottom"
   local titlebar = awful.titlebar(c, {size=3, position=position})
   titlebar:setup{
      layout=wibox.layout.flex.horizontal, nil
   }
   c:emit_signal("tabbar_cleared", c);
end --|clears bottom tabbar

then in your rc.lua, you can put your own titlebar logic:
client.connect_signal("tabbar_cleared", function(c)
    awful.titlebar(c, {size=20, position = "bottom"})
end)

This will probably fire a few times but it shouldn't really effect rendering or anything. Give it a go.

With this change it works great.


Get no result after running openpilot docker

Hi, I've followed the instructions described on this page. Carla's simulator and openpilot docker also runs successfully. After running openpilot simulator caral map also changed to a new map. but openpilot application just shows a blue screen. no road and no vehicle information.

Operating system: Ubuntu 16.04
Docker version: 19.03.12

Check out our community discord at https://discord.comma.ai for help getting started with the simulator. There's a channel called openpilot-simulation for this.


Hide CMake variables in non-superbuild dirs

On the superbuild level, we now have only very few, high-level CMake options visible. However, the configured CTK-build directory adds a couple of other non-advanced options which clutters again the list of CMake variables.

Closing. Build system improvement idea now described in https://github.com/commontk/CTK/wiki/Build-System-Improvement-idea


[theme] Validate fontSize in createTypography

[x] I have followed (at least) the PR section of the contributing guide.

Throw an error in createTypography if fontSize isn't a number

The type definition is correct.
Closes #15980

@eps1lon I was most interested in adding a warning rather than a check that runs in production. Non TypeScript checks are valuable for ~1/2 of the people. I'm fine with duplicating the effort for the most commonly used, non-obvious APIs. Do you have a specific strategy in mind, something that is less empirical than what we have now

I was most interested in adding a warning rather than a check that runs in production

@oliviertassinari Can wrap it in a if ... !== "production", used error over warning because of the issues a invalid value can have

@merceyz What do you think of using the warning module?

If i'm not mistaken, warning will let the execution continue, shouldn't it stop when invalid values will be produced? (NaN in this case)

A warning would be closer to the value TypeScript or the prop-types provide. We have been discussing this problem with @eps1lon extensively in the past:

If we throw, we always throw (no prod branch logic)
Adding JavaScript checks everywhere is not manageable, we can only do it at strategical places, TypeScript is the solution that scales.

I see two viable options.

We do nothing in the core, we encourage people to move to TypeScript.
We use warning for this sensitive case, we don't change the branch logic nor we increase bundle-size in production.

If we want to go down the path n°2, we should handle htmlFontSize too.

Updated to use warning and check htmlFontSize


Feature request: Epson Firmware

According to unverified sources, most of Epson's ink-based printer firmware consists on an embedded Linux and are distributed in a proprietary format. A recent security advisory has been posted. So I'd like to know more about these images. In the current context I have the firmware FWE826TL.rcx for an intercepted update for an Epson L365 which is a very popular WiFi/USB-only printer.
For example, for a descriptor file (named FWE826TL_HDR.rcx) they refer to a file format called RCX3.
What is the format of this? And what would be the way to extract it? Perhaps somebody knows if it's based on something already known to binwalk?

Please disregard, FW image partially extracted with 7zip!!


ML 1.9 : Hypothesis Testing (D)

Welcome to 'ML' Team, good to see you here
This issue will helps readers in acquiring all the knowledge that one needs to know about Hypothesis Testing.
To get assigned to this issue, add your Batch Numbers mentioned in the spreadsheet of "Machine Learning", the approach one would follow and choice you prefer (Documentation, Audio, Video). You can go with all three or any number of options you're interested to work on.
Domain : Machine Learning
Points to Note :

The issues will be assigned on a first come first serve basis, 1 Issue == 1 PR.

"Issue Title" and "PR Title should be the same. Include issue number along with it.

Changes should be made inside the Machine Learning/Machine_Learning/Statistics_for_Machine_Learning Branch.

Follow Contributing Guidelines & Code of Conduct before start Contributing.

This issue is only for 'GWOC' contributors of 'Machine Learning' domain.

To be Mentioned while taking the issue :

Full name
Batch Number
GitHub Profile Link
Which type of Contribution you want to make :

[ ] Documentation

All the best. Enjoy your open source journey ahead. 😎

Hey, I am M. Ashish Reddy, I would like to work on this issue. @Isha307
Batch Number: 2
GitHub Profile Link: https://github.com/ashish-reddy-20-08
contribution you want to make :  Documentation

/assign

/assign

@ashish-reddy-20-08 You can work on this issue 👍

thank you, @Isha307

Hello @Isha307.
I have completed the work and created a PR.
You can check my PR in this link  :https://github.com/girlscript/winter-of-contributing/pull/1861


Feat:Want to Organize Login-Signup file #787

breaked login-Signup.js into Login and Signup components
-Added comments

hey @mdazfar2 please review this pr

hey @mdazfar2 I have updated branch please check it


[Feature]: Custom diff for custom asymmetric matcher

🚀 Feature Proposal
I would like to do the asymmetric matcher objectContainingOrNot, that takes an object that should be contained and a list of properties that should not be contained.
If I use the toAsymmetricMatcher method, no diff will be displayed.
Motivation
Having better diffs will ease the debugging in case values don't match.
Example
No response
Pitch
Jest purpose is to test, hence diffing is a core element of this.

Should be kept

No


docs: add umi migration doc

Summary
Add Umi migration guide, an Umi project based webpack can switch to Rsbuild by following this guide
Related Links
aumi
aumi-example
Checklist

[] Tests updated (or not required).
[x] Documentation updated (or not required).

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


Foundation: support OS version query for Windows

Fix the build after the recent changes to the ProcessInfo which
attempted to use utsname on Windows which does not provide that
interface.

CC: @millenomi @spevans

@swift-ci please test

@swift-ci please test and merge


Wire up @wdio/logger

Output the commented console.log statements using @wdio/logger

Please check the linked PR at your own convenience and leave me some hints for improvement.
Thanks.

Closing issue @corny1989 has presented PR #69.


Dragonphy ports should all be at top level for proper black boxing.

In general, our CI servers are not powerful enough to do a full chip build with flat hierarchy, so it's useful to be able to black-box the various subcomponents. For successful blackboxing, any port that connects to the outside world should exist at the top level of the design. Unfortunately, dragonphy2 as currently built does not meet that criteria. But it's very easy to fix!
Image 1 below shows metal layer nine of the dragonphy_top cell. Circled in yellow are some of the AVDD/AVSS ports, highlighted in white, and enlarged in image 2 for better detail. Unfortunately, these ports only exist in layer 1 of dragonphy_top, and they do not appear in the top level layer 0.

When we black-box the dragonphy for LVS, only the top level ports are visible, so the wires that connect to these layer 1 ports are seen as floating and that causes errors, i.e. LVS cannot identify the floating net as part of AVSS. To fix this, I hand edited the tape and copied the ports from layer 1 up to the top layer (see image 3---note you have to copy both the text e.g. "AVSS" and the accompanying little M9 square that forms the port itself).

For now, we are using the hand edited version, but it would be nice to have an "official" dragonphy2.gds that has the ports lifted (lowered?) to layer 0.
FYI the hacked dragonphy can be seen here, on host "r7arm-aha":
/sim/steveri/dragonphy/Dec_2020/dragonphy_top.gds
If you look at it you'll see I only lifted a few of the ports to layer 0, out of laziness mostly. One lifted port is sufficient for LVS to establish the named connection for the entire net, but for completeness, it seems like they should all be the same...

Note latest successful run using the blackboxed/hacked/LVS-CORRECT dragonphy2 can be seen here:
https://buildkite.com/tapeout-aha/fullchip/builds/203

Note latest successful run using the blackboxed/hacked/LVS-CORRECT dragonphy2 can be seen here:
https://buildkite.com/tapeout-aha/fullchip/builds/203


Pygments, support background color from style

Supporting pygments background color from style if provided. On some default pygments styles the background is provided, but kivy forgot to get advantage of this.
Also added try statement on text color to avoid crashing the app if the user provide color as HEX.

Maintainer merge checklist

[x] Title is descriptive/clear for inclusion in release notes.
[x] Applied a Component: xxx label.
[ ] Applied the api-deprecation or api-break label.
[x] Applied the release-highlight label to be highlighted in release notes.
[ ] Added to the milestone version it was merged into.
[ ] Unittests are included in PR.
[x] Properly documented, including versionadded, versionchanged as needed.

Bug fixing, new future, documenting properly and documenting in between the lines.
I double checked before to post this comment.


Kubernetes: simplify addons implementation

What this PR does / why we need it: Addons surface area was getting obtuse. FYI @ritazh @sozercan @CecileRobertMichon
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Special notes for your reviewer:
If applicable:

[ ] documentation
[ ] unit tests
[ ] tested backward compatibility (ie. deploy with previous version, upgrade with this branch)

Release note:

Kubernetes: simplify addons implementation

/lgtm


@ F implement CI in GitHub Actions (JavaScript, Mac/Linux only)

This helps ensure that the sample code and build instructions work as expected.

looks good

merged


Update options.py

Support of pointFormatter introduced in 4.1.0.

Awesome, thanks for the submission!


It seems that av1 compression is not supported

When i try to generate avif image with sharp (which is basically just heif with av1 compression) i get:
Error: heifsave: Unsupported compression

It seems that libaom is disabled, why?

I'm experiencing the same issue, any ideas @zoellner ?

I attempted to add it at some point but the build wasn't stable. I forgot what the issue was.
Since I don't need the support for my projects it's not a priority for me but if you want to create a PR that produces a stable build with libaom I'm happy to include it.
Please include some instructions/example code for me to test it.

@zoellner I actually solved it for myself, https://github.com/faradaytrs/sharp-heic-lambda-layer/blob/main/sample-buildproject.yaml
What do you mean build was unstable? I use this version in production right now and it's absolutely stable.

I'm experiencing the same issue, any ideas @zoellner ?

you can build from my fork https://github.com/faradaytrs/sharp-heic-lambda-layer/

I also tried to replace aom with dav1d+rav1e, I got a working build, but it happened to be slower than libaom on real data and picture was larger.


Updated metadata to new article author

Based on email update from PR #3253.

@Justinha - Kindly assist to review and merge the content of this PR. Thank you.


[PyTorch] Miscellaneous fixes for FA3 FP8 attention

Description
This PR makes a few changes to the FA3 FP8 attention path:

Adds descale_q, descale_k and descale_v to the FA3 call. It allows custom descaling factors for q/k/v instead of the default 1s. This change requires FA3 PR 1210 to be included in the FA3 installation.
Fixes the transposes in the qkv_format=sbhd case when fp8_mha=true.
Replaces the FA3 installation warning with a debug-level logging message.
Casts FA3 output to the same type as cuDNN attention in the unit test.

Type of change

[ ] Documentation change (change only to the documentation, either a fix or a new content)
[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Infra/Build change
[ ] Code refractor

Changes
Please list the changes introduced in this PR:

See description above.

Checklist:

[x] I have read and followed the contributing guidelines
[x] The functionality is complete
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes

/te-ci pytorch

/te-ci pytorch

/te-ci pytorch

FA3: pipeline 18489052

/te-ci pytorch

FA3 pipeline 18528229

/te-ci pytorch

/te-ci pytorch

FA3 pipeline 18528479

/te-ci pytorch

/te-ci pytorch

FA3 pipeline 18528978

/te-ci pytorch

LGTM. Only one small question or comment: seems like FA3 only can support FP8 with BSHD/SBHD format, THD format is not supported with FP8. Should we added an assert message for this in TE? Anyway, this will finally trigger error in Tri Dao's code, but I think better to tell users this in TE also.

/te-ci pytorch

FA3: 19002912

@xrennvidia do you mind taking another look at the PR? I made a couple more changes after your last review. Thanks!

/te-ci pytorch

FA3: 19123312


Adding a button "Select all / Unselect all"

Hi,
Thank you so much for your Chrome extensions. Really helpful !
Can you add a button to (un)select all the results, please ?
My use case is to select all the result in order to delete them through your extension !
Thanks,
Rasmey

@rsareth Thanks for the support. We can add a button that toggles selection of all the results in the user's view.

"Select / Unselect All" feature has been added and published as part of v0.6.0 release on the chrome webstore.


Limit StreamReader to use a specifed number of cores

🚀 The feature
Impact of number of cores on StreamReader's performance:
Unlike torchaudio.load, the time taken by StreamReader to load an audio files (.opus files specifically) varies a lot from machine-to-machine. The inference is that, this variation (in loading time) is related to the number of cores in the machine as well as the length of audio samples.
Given the high expense of CPU usage by StreamReader (varies with machine) against a max CPU usage of 100% by torchaudio.load, it is expected to perform better than the latter. But this is not always the case.
Hence, the ability to limit/set the number of CPU cores to be used by StreamReader is required.
How to reproduce
Notebook to reproduce this behaviour
Iterate the provided function audio_loader_sr for the given dataset and note the time taken.
What was tested
A dataset of .opus files was loaded by iterating the below functions - audio_loader and audio_loader_sr. The average duration of audio samples in the provided valentini dataset is ~2.95s. For such short audio files, distributing the loading across all available cores seems to create a dip in the performance on machines with many cores.
Results
The following benchmarking was done in different machines with different number of cores, to load 1000 .opus files

num_cores
Time taken

12
00:15s

24
00:12s

256
01:11s

Some other benchmarking references

Ref1
Ref2

Solution
The underlying ffmpeg library has an option to set the number of cores to be used to load the audio, using -threads arg. The auto detection of the -threads value may not be preferable for all scenarios (say, we want to obtain a constant loading time in a certain machine at different times) and also does not always seem to do a good job in terms of loading times. If we could pass this argument value using StreamReader, we would be able to limit the number of cores used.

Hi
Thanks for the detailed report. Could you try passing decoder_option={"threads": "NUM_THREADS"} to add_XXX_stream and see if that makes difference?
Looking at the source code of the ffmepg CLI (ffmpeg, ffplay), it seems that threads are set par stream, and decoder_option is somewhat analogous in StreamReader.

Thank you for the suggestion. I tried
streamreader_obj.add_basic_audio_stream(
    frames_per_chunk=sampling_rate,
    decoder_option={"threads": str(num_threads)},
)

But the CPU usage is constant (~600%) for num_threads: 1,2,4,8 in a machine with 12 cores. The time taken to load the files also did not change.

Thank you for the suggestion. I tried
streamreader_obj.add_basic_audio_stream(
    frames_per_chunk=sampling_rate,
    decoder_option={"threads": str(num_threads)},
)

But the CPU usage is constant for varying num_threads: CPU usage = ~600% for num_threads: 1,2,4,8 in a machine with 12 cores. CPU usage = ~540% for num_threads: 1,2,4,8,16 in a machine with 24 cores.
The time taken to load the files also did not change.

@DanTremonti Could you show equivalent ffmpeg commands to test the threading for your OPUS decoding case? I remember reading about ffmpeg threading behavior being inconsistent across decoders. The reference 1 and almost all ffmpeg performance talks are about video processing. It's easier for me to find the right nob if there is a reference ffmpeg command.

@DanTremonti Could you show equivalent ffmpeg commands to test the threading for your OPUS decoding case? I remember reading about ffmpeg threading behavior being inconsistent across decoders. The reference 1 and almost all ffmpeg performance talks are about video processing. It's easier for me to find the right nob if there is a reference ffmpeg command.

@mthrok I ran the below python script in a 256 core machine.
import subprocess
from tqdm import tqdm

it = 1000
threads = [1, 2, 4, 8, 16, 32, 64, 128, 256]
opus_path = "<path-to-opus-file>"

def load_audio_ffmpeg(audio_path, threads=None):

    # init command
    if threads:
        ffmpeg_command = [
            "ffmpeg",
            "-threads", str(threads),
            "-i", audio_path,
            "-threads", str(threads),
            "-acodec", "libopus", "-f", "wav", "pipe:1",
        ]
    else:
        ffmpeg_command = [
            "ffmpeg",
            "-i", audio_path,
            "-acodec", "libopus", "-f", "wav", "pipe:1",
        ]

    # excute ffmpeg command
    pipe = subprocess.run(ffmpeg_command,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        bufsize=10**8,
    )

    # debug
    # print(pipe.stdout, pipe.stderr)

for thread in threads:
    for _ in tqdm(range(it), desc=str(thread)):
        load_audio_ffmpeg(opus_path, thread)

for _ in tqdm(range(it), desc="unspecified"):
    load_audio_ffmpeg(opus_path)

And this was the output:

With regard to

Could you try passing decoder_option={"threads": "NUM_THREADS"} to add_XXX_stream and see if that makes difference?

I came across this thread. This made me wonder at which position relative to -i option does the passed decoder_option get placed.

@DanTremonti What's the version of your ffmpeg?
The command you used does not work with my ffmpeg 4.2.2.
-i <audio_path> -acodec libopus -f wav pipe:1  generates the following error.
[libopus @ 0x55e59073aec0] No bit rate set. Defaulting to 64000 bps.
[wav @ 0x55e590739780] opus codec not supported in WAVE format
Could not write header for output file #0 (incorrect codec parameters ?): Function not implemented
Error initializing output stream 0:0 --
Conversion failed!

In my understanding, options provided after -i <input> are for output file, so the above command suggests that decode the input file, then encode it with libopus and write as WAV format, thus leading to the error.

Looking at the decoder help message libopus does not support threading.
$ ffmpeg -h decoder=libopus

Decoder libopus [libopus Opus]:
    General capabilities: dr1
    Threading capabilities: none
                            ^^^^
    Supported sample formats: flt s16
libopusdec AVOptions:
  -apply_phase_inv   <boolean>    .D..A.... Apply intensity stereo phase inversion (default true)

I tried changing the thread option, but no change in runtime.
script
#!/usr/bin/env bash

filename="test.opus"

if [ ! -e "${filename}" ]; then
    ffmpeg -f lavfi -i "sine=sample_rate=48000:frequency=360:duration=600" "${filename}"
fi

echo -e "thread: $(nproc)"
time ffmpeg -hide_banner -acodec libopus -i "${filename}" -f wav pipe:2 2> /dev/null;

for thread in 1 8 16 32 64 96; do
    echo -e "thread: ${thread}"
    numactl --physcpubind=0-"$(( thread - 1 ))" nproc
    time numactl --physcpubind=0-"$(( thread - 1 ))" ffmpeg -hide_banner -threads "${thread}" -i "${\
filename}"  -f wav pipe:2 2> /dev/null;
    echo -e "\n"
done

result
thread: 96

real	0m1.341s
user	0m1.297s
sys	0m0.028s
thread: 1
1

real	0m1.183s
user	0m1.143s
sys	0m0.020s

thread: 8
8

real	0m1.185s
user	0m1.141s
sys	0m0.028s

thread: 16
16

real	0m1.181s
user	0m1.144s
sys	0m0.024s

thread: 32
32

real	0m1.190s
user	0m1.146s
sys	0m0.032s

thread: 64
64

real	0m1.183s
user	0m1.150s
sys	0m0.025s

thread: 96
96

real	0m1.177s
user	0m1.143s
sys	0m0.024s

Coming back to the original issue, I changed the number of CPU cores and see how it affects the decoding, and I do not observe the issue.
script

#!/usr/bin/env bash

filename="test.opus"

if [ ! -e "${filename}" ]; then
    ffmpeg -f lavfi -i "sine=sample_rate=48000:frequency=360:duration=600" "${filename}"
fi

for thread in 1 8 16 32 64 96; do
    echo -e "thread: ${thread}"
    numactl --physcpubind=0-"$(( thread - 1 ))" nproc
    numactl --physcpubind=0-"$(( thread - 1 ))" \
            python -m timeit -n 1 -r 5 -s \
            "from torchaudio.io._compat import load_audio" "load_audio(\"${filename}\")"
    echo -e "\n"
done

result
thread: 1
1
1 loop, best of 5: 1.27 sec per loop

thread: 8
8
1 loop, best of 5: 1.3 sec per loop

thread: 16
16
1 loop, best of 5: 1.3 sec per loop

thread: 32
32
1 loop, best of 5: 1.34 sec per loop

thread: 64
64
1 loop, best of 5: 1.3 sec per loop

thread: 96
96
1 loop, best of 5: 1.33 sec per loop

@DanTremonti What's the version of your ffmpeg?

ffmpeg version 4.2.7-0ubuntu0.1

In my understanding, options provided after -i  are for output file ...

@mthrok Yes you are right. The code snippet I shared was setting -threads to encode the audio too. So, I modified the command and executed the script again.

modified code block

    # init command
    if threads:
        ffmpeg_command = [
            "ffmpeg",
            "-threads", str(threads),
            "-i", audio_path,
            "-f", "libopus", "pipe:1",
        ]
    else:
        ffmpeg_command = [
            "ffmpeg",
            "-i", audio_path,
            "-f", "libopus", "pipe:1",
        ]

Here is the output:

The above output should again confirm your comment:

Looking at the decoder help message libopus does not support threading.

Summarising,

StreamReader

the latency of loading a .opus file using StreamReader varies with the number of cores in the machine.
passing -threads through StreamReader's decoder_option argument didn't work for loading .opus files.
loading .opus file seems to consume >100% cpu in machines with multiple cores.

ffmpeg

libopus and opus decoders do not support threading
loading .opus file using the above code snippet seems to consume <=100% cpu in machines with multiple cores.

Although, I'm guessing StreamReader uses a default decoder to load a .opus file, would figuring out which one it is help?

@mthrok I ran the mentioned script.
Here are the results:

Run 1: `threads - 1 2 4 8 16 32 64 128 256`

Run 2: `threads - 1 2 4 8 16 32 64 128 256`

Run 3: `threads - 1 2 4 8 16 32 64 128 192`

I also noticed that the CPU usage scaled from 1 to 128 thread values, ranging from:

thread=1 -> CPU usage=100%
thread=64 -> CPU usage=~6200%
thread=128 -> CPU usage=~12200%

Without passing decoder_option, the CPU usage was 100% (same as when thread=1) and the output:

@DanTremonti The result looks like it is fine for CPU count < 64. It does not look like StreamReader is using all the CPUs, instead there is something strange going on when CPU count is >=64. Perhaps it's something else with your system.
I will close the issue because I cannot reproduce the issue, and it's highly unlike that your issue is caused by StreamReader.

Re-opening this issue as I encounter some issue when modifying the number of available CPU cores.
Looking at torchvision's codebase, looks like thread_count and thread_type need to be set.
https://github.com/pytorch/vision/blob/32d254bbfcf14975f846765775584e61ef25a5bc/torchvision/csrc/io/decoder/stream.cpp#L60-L75
(although, at a glance, the way the thread_type is set seems not correct there.)
The capacity constants related threading seem to be the following three

AV_CODEC_CAP_FRAME_THREADS - FF_THREAD_FRAME
AV_CODEC_CAP_SLICE_THREADS - FF_THREAD_SLICE
AV_CODEC_CAP_AUTO_THREADS

well actually, looking at the example, it seems possible to set thread_type via dictionary.
https://github.com/FFmpeg/FFmpeg/blob/cc2b1a325162fd76969ce21fff9ba84228bc8212/tools/venc_data_dump.c#L85-L99

Note:
In https://github.com/pytorch/audio/pull/2949, we are setting the default number of decoder threads to 1.
I was not able to reproduce the issue described here, and the only hypothesis I have at the moment for
the reported phenomenon is that  the fact that we did not set default thread number is causing some issue.
(FFmpeg CLIs sets to value "auto" by default)
It is my best belief that #2949 resolves the issue.

@mthrok thanks!


Epic: UI redesign

Document As Is and To Be flow diagrams for the UI, based on v3 API redesign & new UI hierarchy.
Refer to this document ( ) for the new UI hierarchy.

Closing out, as not in use.


Fix conformance test flags are exported to other libraries that use the conformance test suite

What type of PR is this?

What this PR does / why we need it:
/kind bug
/area conformance
Which issue(s) this PR fixes:

Fixes https://github.com/kubernetes-sigs/gateway-api/issues/2841.
Currently when implementing GEP-2162, the features need to be imported.  However, in the test suite, this import results in the variation of flags within our production code. The goal is to allow the importation of features without modifying the product code.
Does this PR introduce a user-facing change?:

@keithmattix @kflynn can you PTAL when you get a chance? Thanks!

Also cc @LiorLieberman to take a look, the feature was introducted in https://github.com/istio/istio/pull/48770.

Thanks @hanxiaop!
Can you elaborate on the problem? I am not sure I understand

Thanks @hanxiaop! Can you elaborate on the problem? I am not sure I understand

@LiorLieberman So basically, in that PR, you imported the test suite code into the product code:
https://github.com/istio/istio/blob/42572fab5be79af8de284953ec72cbf439631da8/pilot/pkg/config/kube/gateway/supported_features.go#L24,
and after https://github.com/kubernetes-sigs/gateway-api/pull/2801/files#diff-3532d0dde2d46785ab138cfe0fa7bddc5c1901dde4fe4079880451c010ea8254R34, the flag package was also imported into the suite. After that, our command-line tool was filled with gateway conformance test flags alongside our own pflags, since the test flags were imported in the dependency and thus in the flag set. This PR moves the features file out of the suite, so that we can directly import the features instead of the entire suite package and avoid issues like flags being altered.

cc @mlavacca - since you're refactoring the experimental suite

Thanks, I think many implementations uses suite to import features. This would require all of them to move to features or their code wont work.

If we really want to maintain Go-level compatibility (which I think is a non-goal of the project, but I could be wrong) we can always add a type alias in suite.

Not sure whats the procedure in such case and whether it is considered breaking change or not. /cc @youngnick @shaneutt @robscott

I think this will not be an issue or a breaking change, as it's fairly common for bumping a dependency to result in a change in the package path.

This looks good to me, @hanxiaop! Would you mind if we wait for #2868 to land before merging this one (that's part of the conformance suite epic and is required for 1.1)?

@mlavacca no problem, I'll rebase once it's merged, thanks for the review!

@mlavacca PTAL, thanks!

Thanks @hanxiaop! Can you elaborate on the problem? I am not sure I understand

@LiorLieberman So basically, in that PR, you imported the test suite code into the product code:
https://github.com/istio/istio/blob/42572fab5be79af8de284953ec72cbf439631da8/pilot/pkg/config/kube/gateway/supported_features.go#L24,
and after https://github.com/kubernetes-sigs/gateway-api/pull/2801/files#diff-3532d0dde2d46785ab138cfe0fa7bddc5c1901dde4fe4079880451c010ea8254R34, the flag package was also imported into the suite. After that, our command-line tool was filled with gateway conformance test flags alongside our own pflags, since the test flags were imported in the dependency and thus in the flag set. This PR moves the features file out of the suite, so that we can directly import the features instead of the entire suite package and avoid issues like flags being altered.

Thanks, I think many implementations uses suite to import features. This would require all of them to move to features or their code wont work.
Not sure whats the procedure in such case and whether it is considered breaking change or not. /cc @youngnick @shaneutt @robscott

Many changes have been made to the suite for its graduation; implementations will have to adapt to those changes in any case when bumping to the next Gateway API version. I do not see this kind of change as problematic.

We need to change all the references to the features in the actual tests, under conformance/tests. As it is, the code does not even compile.

@mlavacca Fixed, missed that dependency. It would be great if someone could add the ok-to-test label so I can check if there are more things being broken.

@mlavacca @youngnick @shaneutt @robscott @howardjohn @keithmattix PTAL, thanks!

@howardjohn PTAL again, thanks!

@robscott PTAL, thanks!

/lgtm

Thanks @hanxiaop!
/approve

/ok-to-test
/release-note-none

@hanxiaop if you'd prefer we can use #2980 which copied this PR and made some modifications to pass presubmits.

@hanxiaop if you'd prefer we can use #2980 which copied this PR and made some modifications to pass presubmits.

@robscott Thanks! I think it should be good now. New tests are continually being added to the folder, so I need to do a rebase again. If it doesn't work I think we can use that PR.

@howardjohn just rebased and can you LGTM again? Thanks!

/lgtm


Don’t find setting option

I do not find setting option to set icon files path
IDE: Android Studio 1.4

... because I removed them. The packs are now bundled with the plugin.

...But, I can't use Icons Packages Drawable Import feature because I select it will cause NPE .And I can't use Batch Drawable Import because I can't select file path which i want to import

Please check #87 - it is probably the same issue. If so, can you attach the requested logs there?

thanks, It is same issue


common: Add CHANGES.md.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.48%. Comparing base (ca88ccd) to head (ed7a536).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #456   +/-   ##
=======================================
  Coverage   88.48%   88.48%
=======================================
  Files          60       60
  Lines        4716     4716
  Branches      448      448
=======================================
  Hits         4173     4173
  Misses        542      542
  Partials        1        1

Flag
Coverage Δ

unittests
88.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Very limiting character length for descriptions

Descriptions for projects, jobs, and tasks are hard-coded. As descriptions are subjective, there should be no hard limits on them.
Can this be addressed such that limits in the context described above are more flexible?
(maybe I will do a PR)

You mean we need change data type from varchar(255) to text @damms005?

Yes. But I am doing a PR now

Hello @damms005, sorry I am closing this outdated issue.


prediction_output elements are of type ultralytics.engine.results.Results. Requirements.txt need nvgpu

Hi Team,
for result in prediction_output:
pass
here the result is of type ultralytics.engine.results.Results, when we try to get result.keys, we get an exception.
In order to get the boxes and confidence scores, we need
for result in prediction_output:
        boxes = result.boxes.xyxy
        conf = result.boxes.conf

As I checked the documentation, we also have attributes masks, keypoints and probs. The boxes is ultralytics.engine.results.Boxes object. The object has attributes of xyxy, xywh, xyxyn etc.
boxes.xyxy or boxes.xywh return tensor element so to get the float point we need .item() function to retrieve.
In the requirements.txt, we need to add nvgpu, somehow the aws doesn't have nvgpu installed when we deploy the endpoint.
Can I raise a PR by fixing it?

Added nvgpu. Thanks for identifying the issue.


Consumer details view should show the consumer id

It would be great to see the uuid for the consumer on the details page:

or perhaps on the table view

closing this out, the information can be gotten by clicking the eye icon


Error Installation in Rails 5

Hey Bro,
I'm trying to install the gem in both ways
gem 'bcn_ni', git: 'https://github.com/mldoscar/bcn_ni', branch: 'master'
gem 'bcn_ni', '>= 0.1.4'
But I got the following  error, I am using 'rails', '~> 5.1.5'

Any idea to resolve? Thanks in advance

Try to rebuild your Gemfile.lock
Delete Gemfile.lock file and execute bundle install again
Let me know how that work for you,
Regards

The gem does not work with rails 5.1.5 so upgraded to 5.2.3
Now it works smoothly in scrapping mode
Thanks Oscar


[BACKLOG-20906] Add Google Big Query to assembly

@ddiroma

Build Skipped
:white_check_mark: There was nothing to build. The changes are probably excluded by the build rules. If this is an error, please contact your system administrator.


List valid options in error messages

When an option value fails to parse, no custom error message is
provided, and a list of valid candidate values is available, include the
list as part of the error message.
Addresses #344.
Checklist

[x] I've added at least one test that validates that my change is working, if appropriate
[x] I've followed the code style of the rest of the project
[x] I've read the Contribution Guidelines
[x] I've updated the documentation if necessary

@swift-ci Please test

@swift-ci Please test

Not holding any strong opinions about the specific wording. Suggestions welcome.

Not holding any strong opinions about the specific wording. Suggestions welcome.

This is great, @dduan!
I want to make sure this doesn't fall apart if allCases is more than a handful of cases. Can we switch to a bulleted list format in that case? Do you think 6 would make a good upper limit on the comma-delimited list?
What do you think of this for the output?
The value 'png' is invalid for '--format <format>'. Please provide one of 'text', 'json', or 'csv'.

The value 'png' is invalid for '--format <format>'. Please provide one of the following:
  - text
  - json
  - csv
  - plist
  - yaml
  - xaml
  - bson
  - xml

nit: for array arguments with non-empty allValues the help message should read "one or more of"

the help message should read "one or more of"

I've considered this suggestion and find it confusing in context.

While it's true that the some parsing strategies allow --format text json, it's also possible that the list is supplied separately like --format text --format json.
The beginning of the error message points to a single erroneous value: The value 'png' is invalid for....

IMO it's more accurate to suggest alternatives for a singular value, namely, the attempted value from the user's input.

@swift-ci test

@swift-ci test

@swift-ci test Linux platform

@swift-ci test Linux platform

I've implemented @natecook1000's suggestion.

Looks great, thanks @dduan!


Trim values of whitespace before parsing

A format has gone over this file - if you're not happy with it, I'll revert the changes
Fixes #525

thank you


What is the Handiness of sokol_gl?

I was wondering when I am using sokol_gl what is the Handiness of my coordinate system? I am using SOKOL_GLCORE33 right now as my rendering backend so I assume I am using the right handed matrix winding of opengl.
So when I switch to DirectX do I have to change the winding of my matrices, or does sokol_gl abstracts this in any way?
I couldn't find this to be documented anywhere.

Matrix-handedness and face-winding in sokol-gl should behave the same as in GL 1.x, and you can use the same matrix layout for all backends.
The underlying sokol_gfx.h doesn't care about the coordinate system handedness, it just passes matrices through to the shader without changing their memory layout.
The default for face-winding is different between sokol-gfx (clockwise) and sokol-gl (counter-clockwise), however you can tell sokol-gl to use counter-clockwise face-winding in the setup call.
For testing, I wrote this GL sample:
https://github.com/floooh/sokol-samples/blob/master/glfw/sgl-test-glfw.c
...which produces the same output as this sokol-gl sample:
https://github.com/floooh/sokol-samples/blob/master/sapp/sgl-sapp.c

Matrix-handedness and face-winding in sokol-gl should behave the same as in GL 1.x, and you can use the same matrix layout for all backends.
The underlying sokol_gfx.h doesn't care about the coordinate system handedness, it just passes matrices through to the shader without changing their memory layout.
The default for face-winding is different between sokol-gfx (clockwise) and sokol-gl (counter-clockwise), however you can tell sokol-gl to use counter-clockwise face-winding in the setup call.
For testing, I wrote this GL sample:
https://github.com/floooh/sokol-samples/blob/master/glfw/sgl-test-glfw.c
...which produces the same output as this sokol-gl sample:
https://github.com/floooh/sokol-samples/blob/master/sapp/sgl-sapp.c


Please add flag to download (but not install) linters

Basically, gometalinter --install --download-only should add -d to go get. Something like:
$ gometalinter --help
…
  -i, --install             Attempt to install all known linters.
  -u, --update              Pass -u to go tool when installing.
  -f, --force               Pass -f to go tool when installing.
      --download-only       Pass -d to go tool when installing.
…

We (https://github.com/go-reform/reform/pull/82) need this to download dependencies to cache directory $GOPATH/src, then install it with different Go versions to own copies of $GOPATH/{bin,pkg}.
We can make a pull request if you are OK with it.

That seems pretty weird, but sure.


Support for .astro files

Currently, there's no support for .astro files. Astro is one of the most popular SSG/SSR frameworks. In my opinion, it makes sense to support it.
Thanks a lot!

Thanks for bringing this up! I'll have a look soon. Also, PRs are always welcome :-)

Added support for Astro! However, this will only apply to newly inserted data. If you want to change historic data retroactively, you'll have to Clear & Regenerate Summaries under Settings -> Danger Zone.

Added support for Astro! However, this will only apply to newly inserted data and data inserted today. If you want to change historic data retroactively, you'll have to Clear & Regenerate Summaries under Settings -> Danger Zone.

Thanks for the fast implementation, I do appreciate it 🥳


视频尺寸96mb，传送失败

从win10传96mb的视频到苹果手机，每次传60mb就失败了，实验多次都不成功。

Try upgrading the iOS App.

Try upgrading the iOS App.

就是今天升级后出现的问题

What's the error message. Do you have screenshots?

What's the error message. Do you have screenshots?

重启电脑又可以了


"Type 'Document' has no property [...] and no string index signature."

It's not possible to destruct fields from a document, as they don't come back from the server with types, and only come back defined as Documents, which don't have the fields I'm looking to destruct.
Code example:
async function foo(): Promise<void> {
    const problematicDocument = await someModel.findOne({});
    const {someField} = problematicDocument;  // Compiler error.
    const someFieldSecondTry = problematicDocument.someField; // Compiler error
}

How do I circumvent this?

Yep! This worked for me. Thanks, everybody!


Using mount on  with muted=true causes React console.error

Current behavior
When using mount on a component with a video tag which is muted,  React throws an error. If the muted attribute is removed, then no error is logged.
Code example:
describe('Mounting this component causes React DOM to log an error', () => {
  const Component = () => (
    <video muted>
      <source src="url" />
    </video>
  );

  it('Will it?', () => {
    const wrapper = mount(<Component />);
  });
});

Even if the component is only <video muted /> it still happens.
Output in test:
console.error node_modules/react-dom/cjs/react-dom.development.js:530
    Warning: unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.
        in video (created by Comp)
        in Comp (created by WrapperComponent)
        in WrapperComponent

Expected behavior
There should be no printed error.
Your environment
API

[ ] shallow
[x] mount
[ ] render

Version

library
version

enzyme
3.10.0

react
16.12.0

react-dom
16.12.0

react-test-renderer
16.10.1

adapter (below)
1.14.0

Adapter

[x] enzyme-adapter-react-16

PS. First time opening an issue here, I hope I didn't miss anything

Interesting; presumably React itself works fine. Can you try with enzyme v3.11.0, and with v1.15.2 of the adapter, and confirm the problem still exists?
Also, are you sure you don't have any version of react-test-renderer in your tree, whether it's a direct dep or not?

Hi, thanks for the quick answer! I do have react-test-renderer (version 16.10.1) as a dependency from enzyme-adapter-react-16, I will update my first comment.
I tried your suggestion and it still happens, these are the versions:

library
version

enzyme
3.11.0

react
16.12.0

react-dom
16.12.0

react-test-renderer
16.10.1

enzyme-adapter-react-16
1.15.2

Thanks; that update was going to be my next question.
Can you make a PR with a failing test case? I'd be happy to fix it with a repro.

Yeah sure! Could you point me in the right direction? Like where I should put the test?

Ideally one in both shallow and mount - so one in https://github.com/airbnb/enzyme/blob/master/packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx, and one in https://github.com/airbnb/enzyme/blob/master/packages/enzyme-test-suite/test/ReactWrapper-spec.jsx :-) Thanks!

Thanks for the help! The PR is created, I hope it's what you expected :-)

@ljharb any update on this issue?

This appears to be the same issue as https://github.com/testing-library/react-testing-library/issues/470 as well as https://github.com/facebook/react/issues/10389 - this isn't something that's possible to fix in enzyme.
I'll leave #2330 open, however - if react ever fixes it, i'll land the test case to ensure it doesn't regress in the future.


sizePerPageDropDown not working in IE 11

I am using react-bootstrap-table 4.0.1, IE 11.0.9600.18762, bootstrap 3.3.7.
When I use the sizePerPageDropDown option and create my own sizePerPageDropDown control, it works fine in Chrome, but for IE 11 it seems to ignore this option completely. My sizePerPageDropDown render function creates a drop down box with the values 10, 20, 30, 40, 50. I see this fine in Chrome. However, when rendering in IE it shows the default 10, 25, 30, 50 and doesn't render anything in my function for sizePerPageDropDown. My code is below:
renderSizePerPageDropDown(props) {
const sizes = [10, 20, 30, 40, 50]
const sizePerPageOptions = sizes.map(sizeItem => {sizeItem})
return (

<FormGroup style={{ marginBottom: "0" }}>
<FormControl.Static style={{ display: "inline-block" }} >Size Per Page:  </FormControl.Static>
<FormControl
componentClass="select"
value={20}
onChange={(event) => this.props.dispatch(doSomething(parseInt(event.target.value, 10)))}
style={{ display: "inline-block", width: "5em" }}
>
{sizePerPageOptions}

)
}
render() {
....
    const options = {
      sizePerPage: 20,
      sizePerPageDropDown: this.renderSizePerPageDropDown,
    }
    const TableHeaderColumns =[an array of TableHeaderColumn]

    return (
          <BootstrapTable
            ref={tableRef => { this.tableRef = tableRef }}
            data={data}
            options={options}
            tableStyle={{ border: "none" }}
            condensed
            striped
            pagination
          >
            {TableHeaderColumns}
          </BootstrapTable>
   )

}
Any idea why this doesn't work in IE 11?

@nperriwp Can you please check if the console shows any error? Thanks.

@nperriwp please refine your source code, it's to hard to understand.
can you try to remove FormControl, just use div.

There are no console errors.
I tried removing FormControl and just put a div in, but that did not work either on Internet Explorer.

Here is my code again. Is this better?

renderSizePerPageDropDown(props) {
    const sizes = [10, 20, 30, 40, 50]
    const sizePerPageOptions = sizes.map(sizeItem => {sizeItem})
    return (
      <div>
        <FormGroup style={{ marginBottom: "0" }}>
          <FormControl.Static style={{ display: "inline-block" }} >Size Per Page:  </FormControl.Static>
          <FormControl componentClass="select" value={20} style={{ display: "inline-block", width: "5em" }}
                       onChange={(event) => this.props.dispatch(doSomething(parseInt(event.target.value, 10)))} >
           {sizePerPageOptions}
          </FormControl>
        </FormGroup>
      </div>
   )
}

render() {

    const options = {
      sizePerPage: 20,
      sizePerPageDropDown: this.renderSizePerPageDropDown,
    }
    const TableHeaderColumns =[an array of TableHeaderColumn]

    return (
           { this.tableRef = tableRef }}
            data={data}
            options={options}
            tableStyle={{ border: "none" }}
            condensed
            striped
            pagination
          >
            {TableHeaderColumns}

   )
}

@nperriwp Thanks for the simplified code. I'm not so sure about this but this can be just another issue similar to #1565, if you are using react-bootstrap. Please try without using them.

I cannot try removing react-bootstrap from my project because too much of my code depends on that library. I am not using MenuItem at all. In fact, if I just use a <div> tag in renderSizePerPageDropDown rather than the react-bootstrap tags, I still have a problem with Internet Explorer. Also, this feature works fine in Chrome, it is just not working in Internet Explorer. #1565 is not an issue with a specific browser like this issue.

@nperriwp could you help me to try this page on your IE?

@AllenFang That page works for me in IE, but none of the examples on the page use the sizePerPageDropDown option.

@nperriwp how about this page: https://allenfang.github.io/react-bootstrap-table/example.html#custom
I think the bootstrap dropdown haven't bug on IE, btw, what's the version of your bootstrap

@AllenFang I can see "Default Custom SizePerPage DropDown" working in IE, but "Fully Custom SizePerPage DropDown" does not work in IE. In Chrome for "Fully Custom SizePerPage DropDown" I see 3 blue buttons labeled 10, 25 and 30. However, in IE "Fully Custom SizePerPage DropDown" shows the default drop down of 10, 25, 30, 50.
My bootstrap is 3.3.7.

In Chrome for "Fully Custom SizePerPage DropDown" I see 3 blue buttons labeled 10, 25 and 30

yes, that's a demo that i custom the sizePerPage component as a buttongroups

However, in IE "Fully Custom SizePerPage DropDown" shows the default drop down of 10, 25, 30, 50

In my IE, it's work well

@AllenFang I have IE 11.0.9600.18762 on Windows 7, I see the default drop down of 10, 25, 30, 50 for "Fully Custom SizePerPage DropDown".

hmm.  there are any error log in the console log?

@AllenFang No, no errors in the console log.


Execution failed for task ':@react-native-community_geolocation:generateDebugRFile'.

What went wrong:
Execution failed for task ':@react-native-community_geolocation:generateDebugRFile'.
java.nio.file.NoSuchFileException: /Users/serhatyilmaz/Desktop/development/react/TaxiBookingApp/node_modules/@react-native-community/geolocation/android/build/intermediates/merged_man?fests/debug/../../l?brary_man?fest/debug/AndroidManifest.xml
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

+1

Changing Windows display language from Turkish to English(US) will solve this issue.

Same here


[Script]: AI-driven 2048(New game)

Aim
AI-driven 2048 game involves implementing an AI algorithm to make the moves and decisions. In this example, we'll use the Expectimax algorithm, which is a variant of the minimax algorithm that takes into account uncertainty and randomness.
Details
we've implemented the AI2048 class to represent the AI player. The AI2048 class has methods to calculate the heuristic score, perform moves, and generate children states. The expectimax function is the core of the AI, where we recursively explore the game tree and consider both the AI's moves and the random moves of the new tiles.
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSoC'23 contributor
[X] I want to work on this issue

/assign


V1.9.9: Add whitelist mode. V1.9.10: Support s.team/a/{appid}

#45, #33

#45
#33

You should put this in the main PR description, along with a special keyword like Closes #45

many thanks


[BUG]: Drizzle Studio doesn't trigger $onUpdate on Postgres

What version of drizzle-orm are you using?
0.33.0
What version of drizzle-kit are you using?
0.24.2
Describe the Bug
As it says in the title.
https://github.com/user-attachments/assets/1aa5a448-9872-433b-bd66-53429cb136dd
Expected behavior
Behavior should be consistent with that of drizzle-orm client package
https://github.com/user-attachments/assets/2a516b11-03a9-4c1d-932e-4652a628df85
Environment & setup
Windows: Microsoft Windows NT 10.0.22631.0 x64
Package Manager: Bun v1.1.26

Ref: https://github.com/drizzle-team/drizzle-orm/pull/1509#issuecomment-2315187335

same bug, the actual sql is not generated when using generate command, using Postgres and v0.33 too

Same in sqlite


Do not merge

Added a dummy PR to check that the flake8 workflow works (it does - at least for me).

Added a dummy PR to check that the flake8 workflow works (it does - at least for me).

It works for me too

@thetaxas2468 cool. Thanks for checking.


make DiffNode objects Serializable

Signed-off-by: Jamin W. Collins<EMAIL_ADDRESS>

Coverage remained the same at 90.483% when pulling a24f05ef9f74387a846bd76400105bcec1c91c09 on jamincollins:serializable into 6f576669d49087f0e825a417cadc3d4c707a4924 on SQiShER:master.


Add InteractiveBrowserCredentialOptions.CustomizeClientAppBuilder

This is an attempt to resolve #44550: Since the update to Microsoft.Identity 4.61.3, it is no longer possible to use an embedded WebView2 form for interactive authentication, as winforms code was removed from Microsoft.Identity. In order to switch to the embedded webview, you have to add the package "Microsoft.Identity.Client.Desktop" and call an extension method ".WithWindowsEmbeddedBrowserSupport".
With the current Azure.Identity implementation, this is not possible. So I added a callback to "InteractiveBrowserCredentialOptions", where I could do further customization in my application:
InteractiveBrowserCredentialOptions options = new InteractiveBrowserCredentialOptions
{
  TenantId = myTenant,
  ...
  CustomizeClientAppBuilder = builder =>
  {
    builder.WithWindowsEmbeddedBrowserSupport();
    builder.WithParentActivityOrWindow(() => myFormHandle);
  }
};

Something similar already existed internally ("IMsalPublicClientInitializerOptions.BeforeBuildClient"). I first tried to move this property, but got stuck in "Azure.Identity.Broker". So, I kept it. If you consider this pull request acceptable, we could think about further changes.
Also, "BrowserCustomizationOptions.UseEmbeddedWebView" could be marked "obsolete", as it has no effect any longer.
I fear that @christothes does not like this idea, as we already struggled in the linked issue ;-), but I give it a try anyway.
I have to admit that the part where I called "WithParentActivityOrWindow" caused an ugly deadlock in "MsalPublicClient.AcquireTokenInteractiveAsync" in my app. I had to call "AppContext.SetSwitch("Azure.Identity.DisableInteractiveBrowserThreadpoolExecution", true);". But this would be a followup discussion.

@microsoft-github-policy-service agree

Sorry, I see that I introduced a bug which makes the tests fail. Will push a fix in about 10 hours, don't have push access currently.

About removal of IMsalPublicClientInitializerOptions.BeforeBuildClient: I think this could be a two step process:

First step: make the property obsolete
Second step: update "Azure.Identity.Broker" to the next release nuget package of "Azure.Identity".
Third step: fix the warning in "Azure.Identity.Broker" - switch it to the new property InteractiveBrowserCredentialOptions.CustomizeClientAppBuilder. This could be set in the constructor of the subclasses.
Fourth step: remove IMsalPublicClientInitializerOptions.BeforeBuildClient

But I don't know whether this really is smart. If a user would add a custom CustomizeClientAppBuilder callback, it would overwrite the code from InteractiveBrowserCredentialBrokerOptions, which is probably required. So the approach from my pull request of having two callbacks might be reasonable.

Thanks for the contribution, however, as mentioned in the related issue, we cannot expose MSAL types like Microsoft.Identity.Client.PublicClientApplicationBuilder in our public API surface.

API change check
API changes are not detected in this pull request.

API change check
API changes are not detected in this pull request.

API change check
API changes are not detected in this pull request.

OK, closing this pull request. I misunderstood you in the related issue and thought that only the interface "IMsalPublicClientInitializerOptions" should not be made public.


[Feature Request] Need a Go Home Button on remote

Don't know if this is possible, but it will be useful to have a go to Kodi Main Screen button on remote (like Esc key on keyboard) which will dismiss all overlays and popups on Kodi and get back to Home Screen on Kodi.
Very useful, especially in display-less use of Kodi for Audio. The remote becomes unresponsive if there are some unintended popups or overlays on Kodi (for example, New Media Detected popup that requires a manual dismissal) and without a display it is difficult to know what the situation is.
The current work around is to do a number of back key taps until the remote starts responding.

Doesn't the Home icon on the bottom left of the main Kore remote screen do that?
In any case, I agree getting out of layers of popups, lyrics and music visualisation can sometimes be a pain. If the home button doesn't do that, then I'll add my vote to this :)

It goes to the Home Screen but will not dismiss any popups that may be up. It may be a limitation of Kodi API but a klutzy workaround would be to send a couple of back commands first in any case and then send Home when the Home on the Kore tool bar is tapped.


Why timezone-ii::rhel doesnt rewrite /etc/localtime?

Why timezone-ii::rhel doesnt rewrite /etc/localtime? Only when I run linux-generic /etc/localtime gets updated.
Before we use chef, we did both. Updating clock and symlinking /etc/localtime to UTC

@laapsaap, please see whether the latest changes I pushed to the master branch help.

Works fine here on Centos 6.5
Tested with master branch be26fef6da1ecb96e9830dc11302a3292d56bbb1


search: regex matches '$' differently if file is open

VSCode Version: Code 1.15.1 (41abd21afdf7424c89319ee7cb0445cc6f376959, 2017-08-16T18:07:25.676Z)
OS Version: Windows_NT x64 10.0.15063
Extensions:

Extension
Author (truncated)
Version

xml
Dot
1.9.2

gitlens
eam
4.4.1

tslint
eg2
0.17.0

macros
ged
1.2.0

mssql
ms-
1.1.0

cpptools
ms-
0.12.3

csharp
ms-
1.12.1

debugger-for-chrome
msj
3.1.8

vscode-preview-server
yui
0.7.0

Steps to Reproduce:

open code in new empty folder
create file containing several lines of text
open that file in the editor
regex search for '$' (no quotes)
note that the search results include every line
now close the file and repeat the search
note that the search results only includes the last line in the file

Reproduces without extensions: Yes

also: if you disable 'repgrep' in the settings, it doesn't find anything if the file isn't open in the editor.

What do you expect $ to match? It doesn't seem like a useful search. Ideally it would be consistent but it's up to the difference between the JS and Rust regex engines.

sure, it's not a useful search, but it's the simplest example that repros the bug. any search that includes the $ anchor potentially yields inconsistent results depending on whether or not the file is open in the editor.
i guess the bug should just be: you're using two different regex engines.

this still repos in 1.16.0: the '$' works completely differently if the file is open in the editor.

;$ now matches correctly from a bug fixed upstream. $ only matches the first line of the file, but I'm not gonna follow it up.


The error message is incorrect when moving files to a non-existed folder in one ADLS Gen2 blob container

Storage Explorer Version: 1.36.0-dev (100)
Build Number: 20240925.3
Branch: rel/1.36.0
Platform/OS: Windows11/Windows 10/Linux Ubuntu 22.04/MacOS Sonoma 14.6.1(Apple M1 Pro)
Architecture: arm64/x64/x64/x64
How Found: From running test cases
Regression From: Previous release (1.35.0)
Steps to Reproduce

Expand one ADLS Gen2 storage account -> Blob Containers.
Create a blob container -> Upload a blob.
Select the blob -> Click 'Move'.
Type a character into the  'Destination directory' field -> Click 'Move'.
Click 'Details...' next to the failed activity log.
Check whether the error message is 'RenameDestinationParentPathNotFound'.

Expected Experience
The error message is 'RenameDestinationParentPathNotFound'.

Actual Experience
The error message is 'AuthorizationPermissionMismatch'.

@v-kellyluo This is a message from the service, not something we have any control over. Maybe the service made some changes recently. Or maybe perhaps you don't have the needed permissions?

Hi @craxal , thank you for the update! I can still reproduce this issue on rel branch, here is the record:

In addition, I found that this issue doesn't reproduce if I add myself as owner.
In 1.35.0, we don't need to add this access.

@v-kellyluo

Can you provide app logs, please?
Are you also able to remove yourself as owner? Does the problem reproduce when you do so?
Are you using OAuth in both 1.35.0 and the release branch build?

@MRayermannMSFT Also agrees this is not a serious problem. The difference in error message could have something to do with whether OAuth or key is being used, in which case authorization errors can be returned instead of the expected error.
Why different versions would be behaving differently is more of a mystery. Please make absolutely sure you are using the exact same account, the same container, the same credential types, the same blob, and the same input into the destination name.

@v-kellyluo Can you verify that this is still reproducing?

@craxal ,Yes, verified this issue on the build 20241205.2, it still reproduces.

@v-kellyluo We're still unable to repro on our end. Can you provide the VM you are using to test? Can you also answer the questions I asked above?

@craxal , Will share the VM on teams.
1. Can you provide app logs, please?
Here is the logs: 2024-12-05_184707.zip
2. Are you also able to remove yourself as owner? Does the problem reproduce when you do so?
Yes,  this issue doesn't reproduce if I remove myself as owner.
3. Are you using OAuth in both 1.35.0 and the release branch build?

If use OAuth in both 1.35.0 and current build, this issue doesn't reproduce on both versions.
If don't use OAuth in both 1.35.0 and the current buil,. this issue only reproduces on current build.

I am still unable to reproduce, even on the VM.

If don't use OAuth in both 1.35.0 and the current build, this issue only reproduces on current build.

This is the most interesting detail. What method are you using and what permissions are given with that method?
All in all, it sounds to me like the error you're getting is in fact the correct error message due to a permissions issue of some kind. I don't think we need to worry about spending more time on this unless this throws customers off.


{{< in code highlighting breaks page renderer

hi,
thanks for writing hugo, i love it so far!  i apologize if this is already filed, but i searched and didn't see anything.
anyhow, i was trying to write a blog post about how i migrated to hugo, and my page breaks due to the presence of "{{<" anywhere in a code snippet.
an easy way to repro is:
~~~bash
# this is a {{< comment
~~~
in case it matters, i am using the hyde-x theme. the said error while building is:
ERROR: 2015/07/19 Unable to locate template for shortcode 'comment' in page 2015-07-19-migrating-to-hugo-from-hexo
thanks!

Yes,
{{< and {{% are reserved keywords. You must "comment out" them to get them rendered.
{{</* myshortcode */>}}
Hello World!
{{</* /myshortcode */>}}

thanks!

Is there any reason that shortcodes without markdown in the document are not commented out?
{{< myshortcode >}}
Hello World!
{{< /myshortcode >}}

All the doc shortcodes examples are commented out. They have to be to "be visible as plain text".

Ah, I see. My misunderstanding, sorry.


Enable better logging for rhol_crc

Until now, we were missing all of the setup and startup logs for the
CRC.
As a pull request owner and reviewers, I checked that:

[X] Appropriate testing is done and actually running

/approve


Add A Before Render Callback

I was looking at how to populate multiple areas using pjax and noticed this post where you say you dont want to over complicate pjax.
https://github.com/defunkt/jquery-pjax/pull/7
I think it would be beneficial to have a callback that could be called just before pjax updates the container. This would allow users to do any pre-processing of data they needed (probably not a requirement but could be useful to some) and importantly would allow users to update multiple places.
From what i have created its a very simple change and uses the event system already being used.
My current implementation only updates the container if the beforeRender callback returns true, although this could be changed to return the content if the pre-processing feature mentioned above might be of use.
If your interested i can tidy up the code a bit more and do some more testing.

I want to add something similar to this to support animations. #17
However, it can't be a callback since those aren't going to persist across back/forward.

Shouldn't have used callback, i have implemented it using events


Mongo 1: Server side implementation

Reviewer notes

This is the largest change and will require the most discussion
It leaves jobs (pipelines/training/summary) in a broken state fixed by #1068, but I spearated them because the changes are pretty much completely independent, and I thought it would be easier to review by breaking it apart.

Design
This is a soft delete implementation that tolerates data duplication in favor of defending against data loss.

By modeling the annotations with a rev_created and rev_deleted, you can check out any point in history.  This is the simplest implementation I could come up with, and should be looked at critically.  I'm open to changing it.
There is also a revision log collection.  This collection is non-critical (doesn't need to be joined in order to reconstruct history).  It's just a convenience for attaching metadata to revisions, such as author, description, and timestamp.

Logic - Creation

revision is an increasing integer key (per dataset)
When a track is saved, the full track is saved as a single mongo record.  rev_created is set as the current revision
If a previous version of the track existed, its rev_deleted field is set, marking that previous version as lazy-deleted.

Logic - Checkout
{
        DATASET: dsFolder['_id'],
        REVISION_CREATED: {'$lte': head},
        '$or': [{REVISION_DELETED: {'$gt': head}}, {REVISION_DELETED: {'$exists': False}}],
    }

"Get annotations from this dataset where revision_created is less than or equal to target and either deleted is greater than target or deleted is not set."
Deconflicting
There's another concern we could address here: deconflicting multi-user saves.  Suppose User A loads, User B Loads, User B saves, and User A saves.  Currently, each save is an overwrite and User A might break some of B's work.
Now that we have revisions, each save could require that the user provide the ID they loaded and if the ID has changed since they loaded, the server could attempt to merge and detect a collision.   This could be considered in-scope, but I think maintaining the existing behavior for now is best.
There are even advanced options where we could utilize the notification stream to deliver notifications to all users who have a given dataset open.  This is well out of scope for this stage of changes, but interesting to think about.

Responded to comments.