Exclamation mark or Node Tags are breaking the serialization

When using Node Tags as defined in the YAML specs here the serialization is throwing an exception
In the sample
%YAML 1.2
---
!XL.Handler
Configuration:
  Beacon:
    UseBuzzer: True
  WidthAdjustment:
    EnableWidthAdjustment: False
    ConveyorWidth: 1150
    ConveyorWidthOffset: 2000

Im getting a
unknown tag !<!XL.Handler> at line 11, column 1:

You must define a type for that tag as shown in custom_types example: https://github.com/nodeca/js-yaml/tree/master/examples

Thanks, need much less than in the example, but it works
    var ConfigYamlType = new jsyaml.Type('!XL.Handler', {
	  kind: 'mapping',
	  construct: function (data) {
			return data;
	  }
    });
    var CONFIG_SCHEMA = jsyaml.Schema.create([ ConfigYamlType ]);
    var loaded = jsyaml.load(response, { schema: CONFIG_SCHEMA });

It is just enough in this case to return the data.


Implement

This is just a shell repository @ShMcK is working on an implementation :D

@ShMcK, I just noticed the update in the README. Could you give me a link to the issue you posted on angular-material?

Sure, posting. The issue was closed and I didn't pursue it further.

As usual, they want people to use Google Forums to report/discuss an issue :(
It's like we're back in the 90's, I think we might as well use BBS...

With the latest releases of angular-material this is possible I think, I've created a basic wrapper and input and everything seems to work.
Wrapper:
md-input-container
  label {{::to.label}}
  formly-transclude
  div(ng-messages="fc.$error" ng-show="fc.$dirty"
      ng-messages-include="shared/templates/error_messages.jade")

Input:
input(type='{{::to.inputType}}' name='{{::options.key}}' ng-model="model[options.key]")

Module run:

Yeah, I actually added elementAttributes to angular-formly to support the flex and layout attributes that angular-material requires. Then I started to implement this library again but got side-tracked. If someone wants to pick it up, that would be amazing :-)

A few things this library needs to be considered "done"

[ ] Update all the types to not be bootstrap-like (some still use bootstrap classes because this was copied from the bootstrap version).
[ ] Make sure the mdInputContainerFlex manipulator works
[ ] Fix the wrappers (still bootstrap stuff here).
[ ] Update the local demo
[ ] Add an example that utilizes each type to the website
[ ] Publish to bower and npm as 1.0.0

Honestly, whoever decides to implement this has as much freedom as they like. I personally have no use case for this right now (which is why it hasn't gotten much love). So whoever builds it can pretty much build it to their own specifications.

I'm keen to help out.
I'll do what I can.

Fantastic! Let me know how I can help you :-)

@mmmoli : we are looking to work on this as well - do you have anything to share ?

@jmls Not really; only that tests wouldn't run.
I'll try to have another crack at it this weekend.


ENH: Improve type annotations for IV

Add type annotations for IV models and results

This pull request introduces 1 alert when merging<PHONE_NUMBER>3c6dfa9b02d2c73e9c7ce766cdc0ba into a659a0b1c8fc95fac853dd27c8baee237b1820f6 - view on LGTM.com
new alerts:

1 for Module is imported with 'import' and 'import from'

Comment posted by LGTM.com


Comma separated values for device in test meta doesn't work

I tried to run --test-meta with comma separated devices for e.g. { device: 'web,mobile' } but it doesn't work. Our objective is to run same tests in multiple devices and without duplicating device statement in the test meta.
What is your Test Scenario?
test.meta({ device: 'web,mobile' })('Login to client', async t => {
What is the Current behavior?
ERROR No tests to run. Either the test files contain no tests or the filter function is too restrictive.
What is the Expected behavior?
Test meta matches with web or mobile should run.
What is the best solution you suggest other than duplication of device?

testcafe version:  0.23.2
node.js version: v8.12.0
command-line arguments:  testcafe -e chrome . --test-meta device=web

The described behavior is unsupported. Meta is a key and just a value that should not be parsed. You can use a set of metadata entries if you want to combine device types, for example:
test.meta({ mobileDevice: 'true', webDevice: 'true' })(`Test 1`, async t => { ... });
test.meta({ mobileDevice: 'true' })(`Test 2`, async t => { ... });
test.meta({ webDevice: 'true' })(`Test 3`, async t => { ... });

and use the following arguments:
--test-meta webDevice=true
--test-meta mobileDevice=true
--test-meta webDevice=true,mobileDevice=true
--test-meta mobileDevice=true,webDevice=true

Reference links:
Specifying Testing Metadata
--test-meta <key=value[,key2=value2,...]>

Here is the problem:
Tests
test.meta({ web: 'true', mobile: 'false', suite: 'sanity' })(`Create folder1`, async t => { ... });
test.meta({ web: 'true', mobile: 'false', suite: 'smoke' })(`Create folder2`, async t => { ... });
test.meta({ web: 'true', mobile: 'false', suite: 'smoke' })(`Create folder3`, async t => { ... });
test.meta({ web: 'true', mobile: 'false', suite: 'functional' })(`Modify folder1`, async t => { ... });
test.meta({ web: 'true', mobile: 'false', suite: 'functional' })(`Modify folder2`, async t => { ... });
test.meta({ web: 'true', mobile: 'false', suite: 'functional' })(`Modify folder3`, async t => { ... });

Test pattern:
Run tests where pattern matches to 'Create' and suite = sanity or smoke.
testcafe -e -q chrome . -T 'Create' --test-meta 'web=true,suite=sanity,suite=smoke'

Actual result (Only runs below 2 tests):
It looks like --test-meta only picks last 'suite=smoke' and intial ignores 'suite=sanity'. Is there any solution for performing OR operation instead of AND without defining another meta variable?
test.meta({ web: 'true', mobile: 'false', suite: 'smoke' })(`Create folder2`, async t => { ... });
test.meta({ web: 'true', mobile: 'false', suite: 'smoke' })(`Create folder3`, async t => { ... });

Expected result (Run first 3 tests):
test.meta({ web: 'true', mobile: 'false', suite: 'sanity' })(`Create folder1`, async t => { ... });
test.meta({ web: 'true', mobile: 'false', suite: 'smoke' })(`Create folder2`, async t => { ... });
test.meta({ web: 'true', mobile: 'false', suite: 'smoke' })(`Create folder3`, async t => { ... });

The metadata filtering mechanism does not support this behavior. It is based on the  lodash.isMatch function, which performs a partial deep comparison between the object and source to determine if the object contains equivalent property values. Thus you cannot pass two values of the same property to the filtering mechanism.
I think the best option to implement your own filtering mechanism is to use TestCafe API.
Please refer to the following link.
I also prepared an example to demonstrate this approach:
const createTestCafe = require('testcafe');
let testcafe         = null;

createTestCafe('localhost', 1337, 1338)
    .then(tc => {
        testcafe = tc;

        return testcafe.createRunner();
    })
    .then(runner => {
        return runner
            .src('test.js')
            .browsers('chrome')
            .filter((testName, fixtureName, fixturePath, testMeta, fixtureMeta) => {
                return testMeta.suite === 'sanity' || testMeta.suite === 'functional';
            })
            .run();
    })
    .then(() => {
        return testcafe.close();
    });


Iris interface handles standard constructors enabling unit tests

This PR allows the iris interface to handle the standard tuple and dict based constructors making it equivalent to the grid interface. This means all the unit tests, except for aggregation and sampling (which are not yet implemented), can be shared across the two interfaces.

Fixes various inconsistencies and adds better coverage. Ready to merge.

Looks good and good to support those constructors. My only worry is won't changing the way it does inclusive/exclusive bounds be an issue for backwards compatibility? Perhaps I'm missing something...

My only worry is won't changing the way it does inclusive/exclusive bounds be an issue for backwards compatibility?

Backwards compatibility for the Iris backend? I guess so, but it was a bug since it was inconsistent with the other interfaces.

Ok, as long as that is clear. I agree consistency is more important, especially as this interface is new.
I'm happy to merge now, although maybe you might like to implement my self.epsilon suggestion? Defining something called epsilon helps make it clear that all you want is a small increment to include something in the bounds that would otherwise be excluded.

I'll do that quickly in addition to adding a comments about the disabled tests.

Done. Ready to merge.

Looks good. Merging.


Repeated normalisation during calculate_indices function

When more than 1 index is supplied to the calculate_indices function in the bandindices.py script, the surface reflectance data is repeatedly normalised, resulting in SR and indice values that are increasingly deflated in value with increasing number of supplied indices.

This is not an issue with the current version of the script. I was using an out-of-date version, sorry!


can not specify trailing typeclass argument with named argument

Prerequisites

[X] Put an X between the brackets on this line if you have done all of the following:

Checked that your issue isn't already filed.
Reduced the issue to a self-contained, reproducible test case.

Description
class Foo (n : Nat)

def foo : Foo 37 := {}

def bar (n : Nat) [i : Foo n] := n + 1

def baz : bar 37 (i := foo) = 38 := rfl

worked in nightly-2022-11-19, but fails in nightly-2022-11-20 and later.


New App Submission - Valora

App Logo (Required)

App Details (Required)
Type: Wallet
Name: Valora
Homepage Url: https://valoraapp.com/
Chains supported: Celo
App Url (Required - at least one)
Browser Url:
iOS Url: https://apps.apple.com/app/id1520414263
Android Url: https://play.google.com/store/apps/details?id=co.clabs.valora
Mac Url:
Windows Url:
Linux Url:
Mobile Linking (Optional)
Deep Link: celo://wallet/wc
Universal Link: https://valoraapp.com
Desktop Linking (Optional)
Deep Link:
Universal Link:
Metadata (Optional)
Short Name: Valora
Primary Color: #42D689
Secondary Color: #FBCC5C

@chadyj is there anything further we need to do on our end for this?

Added on commit 7048a41


Wrong variable naming?

Just had a small doubt! I came across this in .../datasets/ksdd2.py and I think they have been typed in wrong? Shouldn't it be swapped?
test_img_path = os.path.join(KSDD2_DIR, 'test')
train_img_path = os.path.join(KSDD2_DIR, 'train')

Even this has got the wrong variable naming?


config: strictSSL param

Hi, in this commit strictSSL param was added.
Now I figure out the case if I want pass strictSSL = undefined (aka not pass the param).
In http/https request if I don't pass the strictSSL param is equal to strictSSL = true?
Thanks 👍

Hi! Hm you're right

Fixed in version 2.15.6


Deployment through VS Code must do pip freeze from virtual environment

Azure Functions Extensions in VS Code must auto pip freeze and deploy from virtual environment settings. While debugging etc it is able to run from virtual environment, but while deploy it isnt able to pip freeze and deploy - doing this will provide a seamless developer experience from core tools.

@priyaananthasankar we made an intentional decision to not automatically pip freeze the dependencies since it ignores the edge cases for e.g. when a package is installed from a git link instead of PyPI. Instead, the guidance is is to add the required package to requirements.txt and then run pip install -r requirements.txt if you want to test locally.

@elprans who had more opinions on this :)


ObserveInjection too restricted?

https://github.com/johnno1962/InjectionNext/blob/e8b0a356620d9dab34aa20dc58cc6f150bee5a81/App/InjectionNext/Experimental.swift#L105
Any reason to lock this to iOS? If the sole dependency there is on ObservableObject, why not replicate its availability?
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
It could also be a #if canImport(SwiftUI) && canImport(Combine) at the top and not check availability at all for ObserveInjection, since (it seems!) the injection machinery only uses core SwiftUI types available since day 1...

Thanks for pointing this out, I've pushed a new commit opening things up. This code in Experimental.swift is kind of a fallback and people have found it useful to understand what is going on behind the scenes. You'd normally import the HotSwiftUI or Inject projects.

Sometimes it's easier to convince stakeholders (managers or teammates alike) if the number of dependencies is kept minimum... Technically speaking, what's the upside of adopting Inject or HotSwiftUI in place of the "fallback"?

There is no upside to HotSwiftUI as it is the same code except you can use it in multiple targets. The same applies to Inject but it takes the idea a bit further and explores "hosting" where you can wrap the instantiation of your UIViewController subclass in a way it gets re-instantiated on injection.


Is there exists any contribution guide?

Hi @alfredh
Thanks for your great project. Because of good project structure and excellent architecture I tried to have some contribution, but unfortunately after each pull request I encountered some error in CI check and I closed my pull request and try again. Is there any way to check the code structure on my local machine before creating a pull request?
Regards,
Ali

I found that ccheck.py hosted here https://github.com/alfredh/pytools/raw/master/ccheck.py.
Thanks ;)

sorry to reply in a closed post, but I wrote a quick contribution guide
as requested:
https://github.com/alfredh/baresip/wiki/Contribution-Guide
Alfred

Thanks a lot.


Potential Security Vulnerabilities

While it is obvious that this is a demo project for https://markjohnson.io/articles/asp-net-core-identity-without-entity-framework/ it is quite popular and may be used as a template for a real project.
Summary
dapper-identity is vulnerable to Cross-Site Scripting (XSS) and Cross-Site Request Forgery (CSRF) that may lead to the elevation of privileges and per-user denial of service (DoS).
Details
Issue 1: XSS (CVE-2018-0784)
The application doesn't have the fix for CVE-2018-0784 that was found in ASP.NET Core templates. It is vulnerable to XSS if the logged-in user is tricked into clicking a malicious link like https://localhost:44315/manage/EnableAuthenticator?AuthenticatorUri=%22%3E%3C/div%3E%00%00%00%00%00%00%00%3Cscript%3Ealert(%22XSS%22)%3C/script%3E and enters an invalid verification code. Mode details are available in the blog post.
Impact
This issue may lead to the elevation of privileges.
Remediation
Modify the code according to the instructions from the advisory.
Issue 2: CSRF (CVE-2018-0785)
The application doesn't have the fix for CVE-2018-0785 that was found in ASP.NET Core templates. It is vulnerable to CSRF. A logged-in user with enabled Second Factor Authentication (2FA) may lose their recovery codes if they are tricked into clicking a link like https://localhost:44315/manage/GenerateRecoveryCodes or visit a malicious site that makes the request without the user's consent. As a result the user may be permanently locked out of their account after loosing access to their 2FA device, as the initial recovery codes would no longer be valid.
Impact
This issue may lead to the per-user DoS.
Remediation
Modify the code according to the instructions from the advisory.

@mark-j  Any updates please


Fix kenlm loading in readme

thanks, @lopez86 might be able to help, I no longer have maintainer privileges I apologize

Sorry for the delay, I was out on vacation and just getting around to this now. I should get to this some time today


refactor: move injectPosition to cssPath

This should also make injectPosition more clear to be related to cssPath and not add to root-config.
Last config change I promise!

Moving to merging this to proceed with 6.11.0 progress


Cannot run external script.

Hi, I am trying to execute nodejs script from ha-bridge and getting errors, I set command type to "Execute Script/Program" and my command is
[{"item":"nodejs ~/Downloads/ha-bridge/scripts/led.js 2 on", "type":"cmdDevice"}]
The command nodejs ~/Downloads/ha-bridge/scripts/led.js 2 on runs fine in terminal. But running in ha-bridge I am getting error:

Request Error, Please look in your habridge log: error {"type":6,"address":"/lights/2","description":"Error on calling out to device","parameter":"/lights/2state"}

Looking into debug log I see
Decode Json for url items: [{"item":"[{\"item\":\"nodejs ~/Downloads/ha-nridge/scripts/led.js 2 on\"}]","type":"cmdDevice"}]
Exec Request called with url: [{"item":"nodejs ~/Downloads/ha-nridge/scripts/led.js 2 on"}]
Executing request: [{"item":"nodejs ~/Downloads/ha-nridge/scripts/led.js 2 on"}]    com.bwssystems.HABridge.plugins.exec.CommandHome
Could not execute request: [{"item":"nodejs ~/Downloads/ha-nridge/scripts/led.js 2 on"}]

Any idea what's wrong?
Thanks!

So the first thing I see is you are using a relative path to your script. Fully qaulify that. Also, I'm not sure if a cmd shell is needed for nodejs to run on windows, if it does, you'll need to use cmd.exe to execute it.

Thanks for the prompt reply.  Tried full paths to both Node and the script:
[{"item":"/usr/bin/nodejs   /home/ygalanter/ha-bridge/scripts/led.js   2   off"}]
This is Ubuntu, am I missing something?
Thanks,
Yuriy.
From: BWS Systems
Sent: Friday, February 24, 2017 1:52 PM
To: bwssytems/ha-bridge
Cc: ygalanter ; Author
Subject: Re: [bwssytems/ha-bridge] Cannot run external script. (#496)
So the first thing I see is you are using a relative path to your script. Fully qaulify that. Also, I'm not sure if a cmd shell is needed for nodejs to run on windows, if it does, you'll need to use cmd.exe to execute it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

try putting /bin/sh in front of that to see if it needs a console

Unfortunately same thing is happening, I am at a loss.
From: BWS Systems
Sent: Friday, February 24, 2017 1:59 PM
To: bwssytems/ha-bridge
Cc: ygalanter ; Author
Subject: Re: [bwssytems/ha-bridge] Cannot run external script. (#496)
try putting /bin/sh in front of that to see if it needs a console
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Alrighty, Put that command into a shell script then call the shell script form the bridge.

Am I doing this right? I created script that works from terminal if I call it:
/home/ygalanter/ha-bridge/scripts/led.sh 2 on
and use it in bridge command:
[{"item":"/home/ygalanter/ha-bridge/scripts/led.sh 2 on"}]
And still getting same error :(
From: BWS Systems
Sent: Friday, February 24, 2017 2:31 PM
To: bwssytems/ha-bridge
Cc: ygalanter ; Author
Subject: Re: [bwssytems/ha-bridge] Cannot run external script. (#496)
Alrighty, Put that command into a shell script then call the shell script form the bridge.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

You will need to have the whole command in the script:
/usr/bin/nodejs   /home/ygalanter/ha-bridge/scripts/led.js   2   off

Yes, this is content of the led.sh (I am passing params to it):
#!/bin/sh
/usr/bin/nodejs /home/ygalanter/ha-bridge/scripts/led.js $1 $2
if I call it from terminal as
/usr/bin/nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 off
it works. But bridge stirll throws
Request Error, Pleae look in your habridge log: error {"type":6,"address":"/lights/2","description":"Error on calling out to device","parameter":"/lights/2state"}
From: BWS Systems
Sent: Friday, February 24, 2017 2:56 PM
To: bwssytems/ha-bridge
Cc: ygalanter ; Author
Subject: Re: [bwssytems/ha-bridge] Cannot run external script. (#496)
You will need to have the whole command in the script:
/usr/bin/nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 off
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

So for fun, put the parameters in the script and do not pass them... this is just a test

That didn't work, but I found if instead of JSON I enter in Target Item
field raw command "nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 on" -
it works and command is executed successfully.
The only strange thing I found if I pass 2 parameter - it work. But if I
try 3, e.g. "nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 dim 10" - it
works, but bridge throws error at the end. That make Echo execute command,
but at the end say "Device not found"
Any idea why this is happening?
On Fri, Feb 24, 2017 at 4:33 PM, BWS Systems<EMAIL_ADDRESS>wrote:

So for fun, put the parameters in the script and do not pass them... this
is just a test
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bwssytems/ha-bridge/issues/496#issuecomment-282410336,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHhqwGo8YXA0qvGd-2xV2BcfmguyUF-Hks5rf0y0gaJpZM4MLitI
.

Never mind, deleted and re-added the device and it's is working now. Here's
final commands:
ON: nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 on
DIM: nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 dim
${intensity.percent}
OFF: nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 off
btw, I am using https://github.com/mwittig/node-milight-promise module,
which is a very nice wrapper for Milight v6. Maybe others can use it too.
Thanks for your help!
Yuriy.
On Fri, Feb 24, 2017 at 3:02 PM<EMAIL_ADDRESS>wrote:

Yes, this is content of the led.sh (I am passing params to it):
#!/bin/sh
/usr/bin/nodejs /home/ygalanter/ha-bridge/scripts/led.js $1 $2
if I call it from terminal as
/usr/bin/nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 off
it works. But bridge stirll throws
Request Error, Pleae look in your habridge log: error
{"type":6,"address":"/lights/2","description":"Error on calling out to
device","parameter":"/lights/2state"}
From: BWS Systems<EMAIL_ADDRESS>Sent: Friday, February 24, 2017 2:56 PM
To: bwssytems/ha-bridge<EMAIL_ADDRESS>Cc: ygalanter<EMAIL_ADDRESS>; Author<EMAIL_ADDRESS>Subject: Re: [bwssytems/ha-bridge] Cannot run external script. (#496)
You will need to have the whole command in the script:
/usr/bin/nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 off
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bwssytems/ha-bridge/issues/496#issuecomment-282389034,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHhqwD0tqLj7RYK6wxv86tNViu40i2xrks5rfzXugaJpZM4MLitI
.

It's working out beautifully. I put together a small blog post:
http://codecorner.galanter.net/2017/02/24/full-control-of-your-limitless-ledmilight-v6-bulbs-from-amazon-echo/
maybe will be useful to others struggling with Milight v6.
Thanks,
Yuriy.
On Fri, Feb 24, 2017 at 8:45 PM, Yuriy Galanter<EMAIL_ADDRESS>wrote:

Never mind, deleted and re-added the device and it's is working now.
Here's final commands:
ON: nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 on
DIM: nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 dim
${intensity.percent}
OFF: nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 off
btw, I am using https://github.com/mwittig/node-milight-promise module,
which is a very nice wrapper for Milight v6. Maybe others can use it too.
Thanks for your help!
Yuriy.
On Fri, Feb 24, 2017 at 3:02 PM<EMAIL_ADDRESS>wrote:

Yes, this is content of the led.sh (I am passing params to it):
#!/bin/sh
/usr/bin/nodejs /home/ygalanter/ha-bridge/scripts/led.js $1 $2
if I call it from terminal as
/usr/bin/nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 off
it works. But bridge stirll throws
Request Error, Pleae look in your habridge log: error
{"type":6,"address":"/lights/2","description":"Error on calling out to
device","parameter":"/lights/2state"}
From: BWS Systems<EMAIL_ADDRESS>Sent: Friday, February 24, 2017 2:56 PM
To: bwssytems/ha-bridge<EMAIL_ADDRESS>Cc: ygalanter<EMAIL_ADDRESS>; Author<EMAIL_ADDRESS>Subject: Re: [bwssytems/ha-bridge] Cannot run external script. (#496)
You will need to have the whole command in the script:
/usr/bin/nodejs /home/ygalanter/ha-bridge/scripts/led.js 2 off
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bwssytems/ha-bridge/issues/496#issuecomment-282389034,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHhqwD0tqLj7RYK6wxv86tNViu40i2xrks5rfzXugaJpZM4MLitI
.

Hello everyone,
I had a problem that may be related to this. I tried some of the formats in the
documentation, but it seems that none of them work correctly. Like @ygalanter mentioned above, it only started working when I entered the raw command (or prefixed with exec://), but not when using the JSON.
In fact, when I entered the command [{"item":"exec://touch /root/testietest","type":"cmdDevice"}], this created a file called testietest\"\,\"type\"\:\"cmdDevice\"\}\], which is clearly not the desired behaviour. Additionally, when I left out the exec, nothing worked, as @kennyhq already remarked in #373 (towards the end).
So, we should at least change the documentation. But maybe there is a bigger underlying problem?

That is very interesting, I'll take a look

@Nielius I have tried this on my Pi and it creates just the file "testietest"
Did you use the UI? And if so the only thing that goes in the target item field is "exec://touch /root/testietest"

Yes, I did actually use the UI. Thanks for looking into it.

As I mentioned, just enter the line in target item as "exec://something". The UI handles the JSON format for you underneath.

I know this old topic is there a way to call this line up in windows? what would the path be?? Or is this lose cause.. Im using my only pi for my Octiprint and don't want to buy another pi right now.  Is there a way to call the script within windows. Thanks

You can execute windows commands as well by using cmd.exe as your first argument.

@bwssytems - Not sure if you're able to help, but I'm fairly new to this and set up node-milight-promise and habridge on my raspberrypi. I can get the Echo to see the bridge device and can terminal command: nodejs /home/pi/ha-bridge/scripts/led.js 1 on and the sort in order successfully toggle the lights.
The issue is when I add use "nodejs /home/pi/ha-bridge/scripts/led.js 1 on" with the "Execute command" on any of the actions within HA bridge. I get an error saying:
Request Error, Please look in your habridge log: error {"type":6,"address":"/lights/5","description":"Error on calling out to device","parameter":"/lights/5state"}
and the log says:
"Could not execute request: nodejs /home/pi/ha-bridge/scripts/led.js 1 on with message: Cannot run program "nodejs": error=2, No such file or directory"
I'm inexperienced with these tools and have been trying to figure out for hours why I can run the command in terminal and trying various syntax in HA Bridge to get this to run. Why is it saying replying with "no such file or directory" and how can I fix this?

Did you try /usr/bin/nodejs instead of nodejs? Or /etc/alternatives/node?

I have and it generates the same error:
"/usr/bin/nodejs": error=2, No such file or directory
This same code does work in terminal when I SSH into my pi with the path as well.

To test I even tried creating a test.sh with a "mkdir" command and using "/home/pi/ha-bridge/scripts/test.sh"  returns
Could not execute request: /home/pi/ha-bridge/scripts/test.sh with message: Cannot run program "/home/pi/ha-bridge/scripts/test.sh": error=2, No such file or directory
Is it looking in a different directory or something? what am I doing wrong?


Fix margin values not working for html

Source

Here is some long text

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vitae luctus mauris. Pellentesque aliquam turpis a ligula luctus, ac aliquet nisl viverra. Nulla augue mauris, lobortis id aliquam vitae, dignissim rhoncus augue. Duis aliquam pharetra sodales. Ut faucibus molestie odio, vel vestibulum sapien eleifend in. Nullam consequat ipsum ac magna iaculis, eget rutrum orci tempor. Proin at enim facilisis, ullamcorper urna eu, cursus arcu. Sed ac tincidunt libero. Mauris maximus libero sapien, vel dignissim orci vulputate in.

More content

Some more very very very long text

jsPDF code
var doc = new jsPDF();
doc.html(document.getElementById('a'), {
  callback: function () {
    window.open(doc.output('bloburl')); // to debug
  },
  y: 60,
  margin: 20,
});

Output

Resolves #2924

I thought about the margin/width behavior once again... the two options are basically these:

The blue/red rectangle is the size and position of the canvas inside the PDF document. What you implemented is a), what I originally had in mind is b). But I'm starting to like option a) better, because it's behavior is easier to understand and makes the margins independent of the x/y and width options. What do you think?

@HackbrettXXX Yeah, I think a) is better as it is more predictable and allows for more fine-tuned behavior. I feel that the functionality of b) could be possibly set in a flag or something, like options.scaleToFitMargins = true

Ok, so the behavior for the left side of the canvas is the same? If I specify, say, x=0 and margin-left=10 the canvas size is not adjusted, but instead 10px on the left are just clipped off? Same thing for the top margin/y on the first page?

@HackbrettXXX Currently the behavior is as you specified in the issue. the content will be shifted to the left by  max(marginLeft, x). The first page will be offset by max(marginTop, y), subsequent pages will start from marginTop away from the top of the page.

Ok, then I suggest we change that behavior such that the margin option has no impact on the position of the canvas but clips any overlapping content on the left and on the top on the first page.

@HackbrettXXX To be honest, I'm not sure with how to "clip" content, will it be acceptable to do just omitting the letters of text completely if they lay outside the margin?

@HackbrettXXX Then what about margins for the second page, if we define margins as so, won't the margins cut off any content in the top part of the second page?

@HackbrettXXX After some thinking on my own, I feel that margins should inset the content on their own.
Your current proposal could be useful, but I feel that this should not be the default behavior.
When I think of margins, I would use them to inset content, instead of clipping content. I think the current behavior of clipping the content on the right still makes sense though.
So, I would counter-propose the following:

marginLeft pushes content left; x will push content further left by that amount (i.e. the content will start from marginLeft + x)
marginRight clips content that exceed pageWidth - marginRight
marginTop causes content to be rendered starting from marginTop pixels below the top of the page, and is applicable for every page; y offsets content of the entire PDF downwards by that amount (content starts from marginTop + y for the first page, and starts from marginTop for subsequent pages)
marginBottom causes content to be rendered only until pageHeight - marginBottom, after which the next line is output to the top of the following page (at y position = marginTop)

This means making the following changes:

Shift content to the left by marginLeft + x instead of  max(marginLeft, x)
Start content on the first page from marginTop + y instead of max(marginTop, y)

After some thinking I agree with you. I think the margins and x/y properties should behave similar to HTML and CSS.

The equivalent of the margins would be padding in CSS terms. Why padding and not margin? Basically what we want to achieve here are insets inside of the PDF page and not some margins around our virtual canvas.
The equivalent of the x/y properties would then be margin-left and margin-top.

For the top/left corner HTML/CSS behaves exactly like you propose:

The dashed rect is for illustrating the padding, the blue rect would be our virtual canvas.
On the bottom/right corner, in HTML/CSS the rect extends beyond the padding. This is different than your proposal.
However, I still think we should implement it like you propose: cut any overlapping content at pageWidth - rightMargin and move any overlapping content at the bottom to the next page starting at topMargin. Otherwise, the bottom and right margins would have no effect at all.
What's left to discuss would be if we call the property "margins" or "padding". I think both names would be fine. "Padding" would be closer to the HTML world, whereas "margin" intuitively fits better into jsPDF's world. What do you think?

@HackbrettXXX I think margins would be better, as margins are what we usually call it when we talk about pages.

Alright. Could you implement the changes? :) Should be basically replacing all the Math.maxs by +

@HackbrettXXX I'm not sure why that happens too, is it because I'm using a different version of Chrome? I'm currently using Chrome 88.0.4296.0. And somehow the test cases I've created don't really work on the CI, but they work on my local machine.

I don't think it's an issue of the browser. I rather think it's an issue of how the files are transmitted to the "reference server" or how the reference server saves the files. It might also be an issue of your Git configuration. Which OS do you use? We've had similar issues with different line ending styles in the past. Maybe the OS or Git or something changes the encoding of the PDF files?

@HackbrettXXX I'm using Windows 10, and git for Windows 10

Mmh same setup as I have. Which node version? I have 10.21.0. The CI tests also use node 10.

Hi, I needed the contributions of this pull request with some urgency so I took the liberty to fix some of the bugs mentioned by @HackbrettXXX and some others I found on my own.
I reviewed the code and added my changes as comments. I did not test the changes for big font sizes or unreasonably big margin sizes (both cases are not applicable to my use case).

I seem to be having same problems with margins, any way I can help move this forward?

Hey, do you have a rough estimate as to when this is going to merged in?

@HPieters help is always welcome ;) Could you maybe also try debugging the text stuff? Take the test cases I committed for orientation. The reference PDFs are currently wrong. I checked them in so the others can see the issues.
@nathan755 That depends on the contributors. I plan on preparing a new release within the next couple of days. If the contributors manage to make it work by then, the fix will be included. Otherwise it will take a little longer.

Any updates on this?

@jburfield92 not that I know of. But you're welcome to step in ;)

@HackbrettXXX I've managed to get things working visually on the page break with text with some tweaks to the updates @jeffsieu and @Rui-Jesus have proposed (see https://github.com/MrRio/jsPDF/compare/master...bjsawyer:master). The other tests need some work (and it looks like some other tests are failing now) but it's progress. Given my very limited knowledge of how the library works under the hood I doubt I'll be able to take it much further on my own.

@bjsawyer thanks for looking into this. The text rendering looks promising. The red rectangle is still has no margins. @jeffsieu @Rui-Jesus maybe you could assist @bjsawyer? Would be really awesome if we could fix this issue :)

Any updates on margins not working when using the html option?
Thanks.

Hi all, I'm keen to help on this. Never really contributed to open source before but will take a look this evening.

@RBSUS thanks. Every bit of help is appreciated :)

Great fix for the problem, but it looks like there is still a problem, when you have a long text (more than 1 page) the margin will be ignored on the next page.
You can test it yourself by using this test HTML file: https://paste.jonasled.de/joyuxuqoyi.html

One thing to look into: Chrome does an awesome job of applying margins when you hit CTRL+P (to bring up the "Print Preview" window) and toy around with custom margins under "More settings". From what I can tell, the source code for this is public (seems like https://github.com/chromium/chromium/blob/master/printing/page_setup.cc is the place to look).
Not sure I'll be able to translate things into jsPDF but if anyone looks into this issue, it may help to use what Chromium is already doing calculation-wise.

I've fixed a lot of bugs and it seems like it's working quite well now. Haven't tried it with a real-world example though.
I'm planning on adding a switch between two different autopaging modes:

one that's optimized for text (the one that's implemented so far in this PR).
one, where text will just be cut in half if it runs across two pages. I think this second mode is still necessary, because the first mode only works for simple, but common cases. The first mode does not work well when we have e.g. text in multiple columns where the lines don't start at the same y position. This mode just cuts the canvas in tiles and will give better results for anything else than just plain text.

Awesome, great work. I'm happy to try this out with a real-world example next week. Do ping me if I don't get back to you :)

Who not want to wait for merge: clone and build https://github.com/jeffsieu/jsPDF

Guys-any idea when this will be merged in? Also, wanted to confirm that the proper setting to ensure text that continues to a subsequent page w/o cutoff is autoPaging = true on the jsPDF.context2d instance. Thanks!

@JamesDAdams did you

build the sources
pass autoPaging: 'text' to the html function?

@Rickardo228 did you get the chance to test it with real world examples?

@HackbrettXXX I couldn't get it to work from my side, can you tell me if I did anything wrong?
First, here's the code calling the .html method. I've skipped most variables as they're not the focus. I used lorem ipsum with big font size.
 const doc = await document.html(
      `<div class="p-margin-zero" style="width:${marginedWidthInPixels}px;">${remarks}</div>`,
      {
        x,
        y,
        jsPDF: document,
        autoPaging: 'text',
        html2canvas: {
          svgRendering: true,
          allowTaint: true,
          width: marginedWidthInPixels,
          imageTimeout: 0,
          backgroundColor: 'none',
          scrollY: (s.page.height + s.margins.top) * pixelsPerInch,
          scale: 0.01,
        },
      }
    );

What I did was:

Clone https://github.com/jeffsieu/jsPDF locally
npm install in cloned repo
Reference it in my project's package.json like this "jspdf": "file:../../jsPDF",
npm install jspdf(which updated my *.d.ts files)
Run the code above
Resulting in this page-break-test.pdf, scroll down to see the text

@Yabonev you need to run npm run build in the cloned repo first. Otherwise the bundles aren't up to date.

@HackbrettXXX Thanks for the help, it works.
Here's the "before" document page-break-test.pdf
If you scroll a few pages you can easily see the issue.
Here's the pdf with up to date bundles and autoPaging: 'text' page-break-test-correct.pdf
Here's the pdf with paging and margin page-break-test-margin-bottom.pdf
doc.html(...,
{
  autoPaging: 'text',
  margin: [0, 0, 1, 0], // I am using inches here, replace with what you're using.
}

Will check if pictures work in a bit.

@Yabonev thanks for testing it. Unfortunately, I wasn't able to reproduce it by myself. This test case
  it("page break text + image with autoPaging: 'text'", async () => {
    const text = Array.from({ length: 30 })
      .map((_, i) => `ABC${i}`)
      .join(" ");

    const doc = jsPDF({ floatPrecision: 2, unit: "pt" });
    await new Promise(resolve =>
      doc.html(
        `${text}

${text}`,
        {
          callback: resolve,
          margin: [10, 30, 10, 30],
          autoPaging: "text"
        }
      )
    );

    const numberOfPages = doc.getNumberOfPages();
    const pageWidth = doc.internal.pageSize.getWidth();
    const pageHeight = doc.internal.pageSize.getHeight();
    for (let i = 1; i <= numberOfPages; i++) {
      doc.setPage(i);
      doc.rect(30, 10, pageWidth - 60, pageHeight - 20);
    }
    comparePdf(
      doc.output(),
      "html-margin-text-image-page-break-text.pdf",
      "html"
    );
  });

produces this output:
html-margin-text-image-page-break-text.pdf
Could you share the markup you used for your test case? I've checked your PDF file, and it seems like there are some clip paths where they shouldn't be or the clip paths aren't properly wrapped with save/restore graphics state commands.

@HackbrettXXX I somehow lost the data while testing more. Here's a case with similar input and same output, just the images are more, but smaller.
Here's the image_text_test.txt file.
This data is coming from rich html editor, so the image is base64 encoded string, maybe this creates the problem.
Here's the result once again invisible_text_on_image_clip.pdf

@Yabonev thanks. I still can't reproduce it though. When I div my PDF with yours there are indeed differences in the save/restore graphics state commands, but I don't know why. I think I need a complete repro, otherwise I can only make guesses. Maybe we have different html2canvas versions?

I think I will merge it now and create a release later. If there are still bugs, we can fix them afterwards.

@HackbrettXXX Sorry for not responding, been focusing on other things, I also think that's okay. I will create a new issue with minimal reproduction when I have the time.

While trying to create minimal repro, I found the issue. The text below is for those to who it may concern.
Initial problem - vertical distance between
 tags is too big
The problem I was trying to solve is that there was too much vertical distance between my
 tags when the text was pasted from notepad. The first file is my initial problem. The second file shows the end result after a fix.
text_padding_issue.pdf
text_padding_issue_fixed.pdf
Solution to the initial issue - set margin: 0 to all
 tags
Using custom CSS class to remove the margin between p tags - p-margin-zero. I am using angular, so I will add it as context.
// styles.scss (global styles file for the app)
.p-margin-zero {
  p {
    margin: 0;
  }
}

const doc = new jsPDF('portrait', 'in', 'a4');
const html = `

A

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAAAA

<img src="data:image/png;base64,[encoded data, 4135 characters]`;
await doc.html(html, {
  x: 0.6,
  y: 0.9,
  jsPDF: doc,
  autoPaging: 'text',
  margin: [0, 0, 1, 0],
  html2canvas: {
    imageTimeout: 0,
    backgroundColor: 'none',
    scale: 0.01,
  },
});

New problem - content on new pages is invisible
For some reason, HTML tags were disappearing when an  tag was sliced from a new page. At least, that's what I thought.
Here's what it looked like - invisible_text_on_image_clip.pdf
The actual issue - margin collapsing
Seems like when you margin:0 to
 tags, their margins collapse, which bugs the whole thing. I am not sure if this is an issue with jsPDF, html2canvas or pdf as general but removing this margin collapse fixed my problem with the disappearing text, here's the result when the fix is applied - visible_text_on_image_clip.pdf
How to fix margin collapsing?
You want to "remove margin collapsing" between adjacent elements. Maybe even parent-child element.
I've personally removed the margin collapsing by putting overflow: auto on the parent of all
 tags.
This was especially useful https://stackoverflow.com/questions/19718634/how-to-disable-margin-collapsing
.p-margin-zero {
  overflow: auto;
  p {
    margin: 0;
  }
}

@HackbrettXXX I will not be creating a new issue for this, but you might want to think if the problem is from jsPDF or somewhere else. Also thanks for the help and for merging this 🥇

@Yabonev thanks for the repro. It is definitively an error in jsPDF and I was able to reproduce it now. I've created an issue for it: #3265.

Update on overflow: auto
Overflow:auto fixed the the issue created below for me, but it had 2 other side effects.

File size increased by ~0.5 of the original file size - that's okay, I can live with that
Scrolling for the pdf broker in some weird way, if you open the file with chrome you should be able to reproduce it - scroll_issue.pdf

Solution
Instead of overflow: auto I used display:flow-root. My initial problem is fixed(the vertical distance between text), but #3265 stays. Since @HackbrettXXX  said that it's with jsPDF, after the fix for 3265 is in, everything should work as expect.
but there may be an issue with overflow:auto and jsPDF.
@HackbrettXXX do you want me to try creating a minimal repro for this?

You're running into #3137 with the scroll_issue PDF: every letter on the second page is written in its own text chunk. This increases the file size enormously and hurts viewing performance.


Update zio, zio-streams, zio-test, ... to 2.0.2

Updates

dev.zio:zio
dev.zio:zio-streams
dev.zio:zio-test
dev.zio:zio-test-sbt

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

Files still referring to the old version number
The following files still refer to the old version number (2.0.1).
You might want to review and update them manually.
docs/website/yarn.lock

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "dev.zio" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "@monthly" },
  dependency = { groupId = "dev.zio" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, old-version-remains, commit-count:1

Codecov Report

Merging #1407 (bfcf109) into main (7e76ce3) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1407   +/-   ##
=======================================
  Coverage   61.11%   61.11%
=======================================
  Files          71       71
  Lines        2456     2456
  Branches       90       90
=======================================
  Hits         1501     1501
  Misses        955      955

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Unable to Register for Cloud skills Challenge

I recently got an email from Microsoft for the Cloud Skills Challenge in Australia. When I followed the link in the email, I landed on this page: https://www.microsoft.com/en-au/cloud-training-events/cloud-skills-challenge?mkt_tok=eyJpIjoiTlRjeU16aGlabVk1T0RReSIsInQiOiJFU2V1Zm9PMGx1bEZXR09TWjJtc3NuRDB4RVNCNjE5NVwvOHorZkxwWGRyTUJBdlpuc0dJeHlcL3h0N25ka0FKVWZWejlPYlNzckVEanhjZ1RtQW5rSlNVVW00TzRPekNncTRITkRiV21vR3VMdHM4c1lrRmRiWVNpVUtVVUF0NWRHK1JCYVltUnhcLzRYYnhWRXFTUmh6U3c9PSJ9#register-form
The page prompts to register the details on the right but the section fails to load as seen here:

Could you please fix this up at the earliest or give the pointers to provide the feedback to fix this? I am not able to register for the challenge owing to this issue.
Thanks

@Lekha30 This challenge has closed.


How to ignore a folder from indexing

Category

[ ] fzf binary
[ ] fzf-tmux script
[ ] Key bindings
[ ] Completion
[ ] Vim
[ ] Neovim
[ x] Etc.

OS

[ ] Linux
[x ] Mac OS X
[ ] Windows
[ ] Windows Subsystem for Linux
[ ] Etc.

Shell

[ ] bash
[ x] zsh
[ ] fish

I have this function I use to jump to folders
# cd to selected directory
fa() {
  local dir
  dir=$(find ${1:-.} -path '*/\.*' -prune \
                  -o -type d -print 2> /dev/null | fzf +m) &&
  cd "$dir"
}

Is it possible to ignore node_modules from being indexed?

Yes find can do that. man find will help you.


Newbranch

merging the changes from branch to master

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: lohitdevana sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


[Feature Request] Add highlights download

Please add the ability to download Highlights (archived stories). Thanks!

I'll take a look at implementing it later this week.

Implementing this requires a large rewrite of code, the used API library does not support the endpoint responsible for retrieving highlight medias. It's unlikely that I'll do this anytime soon, so in the meantime use an alternative project like https://github.com/instaloader/instaloader to download highlights.


More efficient introspection of column names

We use dbt's native get_columns_in_relation to get column names.
This eliminates two SQL queries: one to determine if the table exists, and one
to retrieve the column names.
get_columns_in_relation seems much faster, at least for BigQuery.
Partially resolves #51

This change reduces the runtime for my test for a BigQuery model with about 10 dependencies from ~35s to ~10s.

Now also changed the code to get the number of rows in actual and expected output, so that we only use one query to get both.

I see that something failed with snowflake. I'm not sure why -- could you send me the output from a run with debug output on?

Hi @halvorlu,
There were one test that failed: model_refers_source_with_dashes.sql
This was the output:
08:12:29  Database Error in test model_refers_source_with_dashes (tests/unit/model_refers_source_with_dashes.sql)
08:12:29    001003 (42000): SQL compilation error:
08:12:29    syntax error line 1 at position 55 unexpected '-'.
08:12:29    syntax error line 1 at position 31 unexpected '.'.
08:12:29    syntax error line 1 at position 48 unexpected '.'.
08:12:29    syntax error line 1 at position 55 unexpected '-'.
08:12:29    syntax error line 1 at position 67 unexpected '<EOF>'.
08:12:29

*the test model_refers_model_with_dashes passed, the issue is just for sources.
Thank you for your effort!


The library can not be used with ES6 import, do you have any way for es6 usage?

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Hopefully this is now fixed

Thank you for the update and work, maybe next time I can try.


ExpectedError("Number", "-99")

I'm trying to export my mkv to csv using the given command substudy export csv episode_07_01.mkv \     episode_07_01.fr.srt episode_07_01.en.srt but I can't seem to get it working. I get ExpectedError("Number", "-99").
I'm having no problems using the combine code for the bilingual subtitles. I just can't seem to get the export working for the life of me..

Sorry about this!
Try setting export RUST_LOG=substudy=trace in your environment and posting logs. Also try searching through your *.srt files for "-99" and editing them by hand to get rid of any offending lines.
(Actually, if you do find any offending lines, please post them, so I can see if there's any way to fix the parser.)

Hey,
Had a look through the .srt files and couldn't find anything for "-99", ran the command with the trace and got the following:
kent$ substudy export csv episode_07_01.mkv \ episode_07_01.fr.srt episode_07_01.en.srt
DEBUG:substudy::video: Video metadata: {
    "streams": [
        {
            "index": 0,
            "codec_name": "mpeg2video",
            "codec_long_name": "MPEG-2 video",
            "profile": "Main",
            "codec_type": "video",
            "codec_time_base": "1/50",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "width": 720,
            "height": 576,
            "coded_width": 0,
            "coded_height": 0,
            "has_b_frames": 1,
            "sample_aspect_ratio": "64:45",
            "display_aspect_ratio": "16:9",
            "pix_fmt": "yuv420p",
            "level": 8,
            "color_range": "tv",
            "chroma_location": "left",
            "field_order": "tt",
            "refs": 1,
            "r_frame_rate": "50/1",
            "avg_frame_rate": "50/1",
            "time_base": "1/1000",
            "start_pts": 0,
            "start_time": "0.000000",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "BPS": "2915936",
                "BPS-eng": "2915936",
                "DURATION": "00:49:57.000000000",
                "DURATION-eng": "00:49:57.000000000",
                "NUMBER_OF_FRAMES": "74925",
                "NUMBER_OF_FRAMES-eng": "74925",
                "NUMBER_OF_BYTES": "1092382599",
                "NUMBER_OF_BYTES-eng": "1092382599",
                "_STATISTICS_WRITING_APP": "mkvmerge v17.0.0 ('Be Ur Friend') 64-bit",
                "_STATISTICS_WRITING_APP-eng": "mkvmerge v17.0.0 ('Be Ur Friend') 64-bit",
                "_STATISTICS_WRITING_DATE_UTC": "2017-10-22 05:23:06",
                "_STATISTICS_WRITING_DATE_UTC-eng": "2017-10-22 05:23:06",
                "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES",
                "_STATISTICS_TAGS-eng": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
            }
        },
        {
            "index": 1,
            "codec_name": "mp2",
            "codec_long_name": "MP2 (MPEG audio layer 2)",
            "codec_type": "audio",
            "codec_time_base": "1/48000",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "sample_fmt": "s16p",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/1000",
            "start_pts": 0,
            "start_time": "0.000000",
            "bit_rate": "192000",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "language": "fre",
                "BPS": "192000",
                "BPS-eng": "192000",
                "DURATION": "00:49:57.000000000",
                "DURATION-eng": "00:49:57.000000000",
                "NUMBER_OF_FRAMES": "124875",
                "NUMBER_OF_FRAMES-eng": "124875",
                "NUMBER_OF_BYTES": "71928000",
                "NUMBER_OF_BYTES-eng": "71928000",
                "_STATISTICS_WRITING_APP": "mkvmerge v17.0.0 ('Be Ur Friend') 64-bit",
                "_STATISTICS_WRITING_APP-eng": "mkvmerge v17.0.0 ('Be Ur Friend') 64-bit",
                "_STATISTICS_WRITING_DATE_UTC": "2017-10-22 05:23:06",
                "_STATISTICS_WRITING_DATE_UTC-eng": "2017-10-22 05:23:06",
                "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES",
                "_STATISTICS_TAGS-eng": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
            }
        },
        {
            "index": 2,
            "codec_name": "mjpeg",
            "codec_long_name": "Motion JPEG",
            "codec_type": "video",
            "codec_time_base": "0/1",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "width": 600,
            "height": 859,
            "coded_width": 600,
            "coded_height": 859,
            "has_b_frames": 0,
            "sample_aspect_ratio": "0:1",
            "display_aspect_ratio": "0:1",
            "pix_fmt": "yuvj444p",
            "level": -99,
            "color_range": "pc",
            "color_space": "bt470bg",
            "chroma_location": "center",
            "refs": 1,
            "r_frame_rate": "90000/1",
            "avg_frame_rate": "0/0",
            "time_base": "1/90000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 269730000,
            "duration": "2997.000000",
            "bits_per_raw_sample": "8",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 1,
                "timed_thumbnails": 0
            },
            "tags": {
                "filename": "cover.jpg",
                "mimetype": "image/jpeg"
            }
        },
        {
            "index": 3,
            "codec_name": "mjpeg",
            "codec_long_name": "Motion JPEG",
            "codec_type": "video",
            "codec_time_base": "0/1",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "width": 120,
            "height": 172,
            "coded_width": 120,
            "coded_height": 172,
            "has_b_frames": 0,
            "sample_aspect_ratio": "0:1",
            "display_aspect_ratio": "0:1",
            "pix_fmt": "yuvj444p",
            "level": -99,
            "color_range": "pc",
            "color_space": "bt470bg",
            "chroma_location": "center",
            "refs": 1,
            "r_frame_rate": "90000/1",
            "avg_frame_rate": "0/0",
            "time_base": "1/90000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 269730000,
            "duration": "2997.000000",
            "bits_per_raw_sample": "8",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 1,
                "timed_thumbnails": 0
            },
            "tags": {
                "filename": "small_cover.jpg",
                "mimetype": "image/jpeg"
            }
        }
    ]
}

ExpectedError("Number", "-99")

I see that "level" is -99

I see that "level" is -99

Yup, that's almost certainly it.
Probably the fix is to remove this line, recompile using cargo install -f, and see if it works. Do you know how to fork a repository on GitHub, download it, and make a change?
I can look into this later, but this week is ridiculously busy, and I thought I should at least offer to point you in the right direction.

Hey, no problem, thanks for the help anyway! I forked the repository, downloaded it and deleted the line. I'm a bit clueless when it comes to the recompile phase - I just went into the forked repository folder on my desktop using cd and put cargo install -f.
I entered the export csv command again and gotNo such file or directory (os error 2). I think probably did something wrong during the recompiling phase, no experience doing this type of thing. Anyway, thanks again.

Don't worry, no problems!
I've updated substudy to v0.4.3 and fixed this bug. You can install it using cargo install -f substudy. But I think the No such file or directory (os error 2) is caused by still being cded into the substudy/ directory instead of the directory with your *.srt and *.mov files.

Cheers Emk, it's working. Thanks for your help again it's very much appreciated.


forcing codeActionsOnSave config in settings.json

this is getting added.
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
code cannot be removed in settings.json

The reason is that you have "eslint.autoFixOnSave": true in your setting. To preserve the feature with the new code action on save implementation the setting gets added. If you remove "eslint.autoFixOnSave": true the setting will not be added.

Please ping if this is not the case for you and provide steps on how to reproduce. Thanks!

Thanks about that.


Feat: Introduce focus method

:tada: This PR is included in version 1.1.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Criteo bidder refactoring.

Hi @CTMBNara
Is this a mere refactoring or are there any business logic changes as well? I'm asking because criteo said their bidder is currently in alpha and I wanted to understand if this is a step towards a "beta version" :smile:

Hi @muuki88
This is just refactoring and some fixes to get rid of NPE bugs. No business logic changes here.


mpi_add_mpi fails when all arguments are the same mpi (in-place doubling)

Problem
The mbedtls_mpi_add_mpi routine produces incorrect results when used as follows:
mbedtls_mpi_add_mpi( X, X, X );

I have attached a patch for the mpi test suite, demonstrating the behaviour. The behaviour doesn't occur all the time, I think only if the result mpi is grown.
V2.1.1 is affected, I have not tested other versions.
Workarround
Use mbedtls_mpi_shift_l( X, 1 ) to double an integer in-place.
Solution
I propose one of the following solutions:

Fix the routine (and check if other routines are affected, I only checked the addition).
Clarify behaviour in the documentation, if this is deliberate. At least the multiplication allows squaring an integer in place, so I guess this is a bug?

diff --git a/tests/suites/test_suite_mpi.function b/tests/suites/test_suite_mpi.function
index 72b4940..c42ae0b 100644
--- a/tests/suites/test_suite_mpi.function
+++ b/tests/suites/test_suite_mpi.function
@@ -428,17 +428,35 @@ exit:
 void mbedtls_mpi_add_mpi( int radix_X, char *input_X, int radix_Y, char *input_Y,
                   int radix_A, char *input_A )
 {
-    mbedtls_mpi X, Y, Z, A;
+    mbedtls_mpi X, Y, Z, A, T1, T2, T3;
     mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A );
+    mbedtls_mpi_init( &T1 ); mbedtls_mpi_init( &T2 ); mbedtls_mpi_init( &T3 );

     TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 );
     TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 );
     TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 );
     TEST_ASSERT( mbedtls_mpi_add_mpi( &Z, &X, &Y ) == 0 );
     TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 );
+    /* Works */
+    TEST_ASSERT( mbedtls_mpi_lset( &Z, 42 ) == 0 );
+    TEST_ASSERT( mbedtls_mpi_add_mpi( &Z, &Z, &Z ) == 0 );
+    TEST_ASSERT( mbedtls_mpi_cmp_int( &Z, 84 ) == 0 );
+    /* Works */
+    TEST_ASSERT( mbedtls_mpi_add_mpi( &T1, &Y, &Y ) == 0 );
+    TEST_ASSERT( mbedtls_mpi_add_mpi( &T2, &X, &X ) == 0 );
+    TEST_ASSERT( mbedtls_mpi_add_mpi( &Z, &T1, &T2 ) == 0 );
+    TEST_ASSERT( mbedtls_mpi_add_mpi( &T3, &A, &A ) == 0 );
+    TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &T3 ) == 0 );
+    /* Fails */
+    TEST_ASSERT( mbedtls_mpi_add_mpi( &Y, &Y, &Y ) == 0 );
+    TEST_ASSERT( mbedtls_mpi_add_mpi( &X, &X, &X ) == 0 );
+    TEST_ASSERT( mbedtls_mpi_add_mpi( &Z, &X, &Y ) == 0 );
+    TEST_ASSERT( mbedtls_mpi_add_mpi( &A, &A, &A ) == 0 );
+    TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 );

 exit:
     mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A );
+    mbedtls_mpi_free( &T1 ); mbedtls_mpi_free( &T2 ); mbedtls_mpi_free( &T3 );
 }
 /* END_CASE */

This looks like a bug indeed. We'll investigate and fix it, thanks for your report.

http://jira-dev0.cambridge.arm.com/browse/IOTSSL-469

ARM Internal Ref: IOTSSL-512

I am terribly sorry, but I don't know what the label mirrored means or what the is the significance of the internal reference number. Does it mean that this issue will be dealt with internally?
I am just curious, because I already started working on it...

We've just recently started mirroring all github issue to our internal task tracker. This does not change in the slightest the way we handle issue (except it'll make easier for us to track priorities), and there is nothing special about this particular issue.
As all bugs, we intend to fix it as soon as we can get to i :) But if you're already working on a fix, pull requests are always welcome!


Load test changes

Context
This PR points the load testing to the new application on AKS (which will be more the rule and the PaaS being the exception) so it is worth including in the codebase.
Also it fixes one non existing provider in manage plan (we want to avoid data errors on load testing and to avoid 403 in load testing).
The manage plan didn't have a JMETER_THREAD_CONFIG so we add one (totalising almost 200 threads in the plan)

 Performance testing


configPath in Options

It would be great to have a path to current config file in Options object, that returns after auth.
If we pass the param --configFile, we can parse it in our application and add custom properties in it. But if we use the default one, we don't know what config file will be used.
Thanks!

Thanks for posting the offer, yep, it would be cool to have this setting.
Will apply corresponding changes shortly.

Have updated the NuGet. Please check ver 1.0.7.

Closing this.


How can I change the infinite loop to a rectangle with round corner?

Hi GrishTad, your work is absolutely amazing! I want to use the effect in my vision os app, but i'm not good at Metal. Can you please add a new effect for a line moving along a rounded rectangle? Thanks so much!

Hi @lulinxuan, Thank you so much for your kind words! I'm glad you like my work. I'll add the effect this weekend.

I have started working on it in a new branch. I am not happy with the current state, will continue working on it.

Thanks! Looking forward to your change!


Correctly override equals and hashCode for our OpenSslSession sub-types

Motivation:
We did not correct override equals and hashcode methods for some of the OpenSslSession implementations
Modifications:
Override methods
Result:
Be able to correctly understand if a session is equal or not

@chrisvest I noticed this while working on the other session related PRs.


feat: add public api headers

A convenient way to represent strings without allocation is string_view... It can be better than a C string in some instances. In either case, you need to have clear rules about who allocates and deallocate the memory.

A convenient way to represent strings without allocation is string_view... It can be better than a C string in some instances. In either case, you need to have clear rules about who allocates and deallocate the memory.

Does this also apply to URL struct?

All I am saying is that one should consider using string_view in some instances. It uses more memory than a mere pointer (since it also tracks the length), but having access to the length in constant time is also a benefit. In practice, it tends to generate very fast code.

(This is not to say that C strings are obsolete!!!)


Translate docs/tasks/administer-cluster/kubeadm/upgrading-windows-nodes/ into Japanese.

This is a Feature Request
What would you like to be added
Translate docs/tasks/administer-cluster/kubeadm/upgrading-windows-nodes/ into Japanese.
Why is this needed
This page has not been translated.
Comments
/language ja
/assign

/close


Added support for variable amount of function arguments

Added build in functions avg (mean) and sum (total)
Updated unit tests to check new avg and sum functions as well as function argument check

Closing this b/c of inactivity


Add Codecov coverage reporting and badge

Summary
What's the motivation for this change, what approach did you take, and why?
Test plan
How was this change tested & verified?
Versioning impact
Does this change necessitate a major, minor, or patch semver update for the affected package?

Codecov Report

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

@@           Coverage Diff           @@
##           master       #1   +/-   ##
=======================================
  Coverage   42.59%   42.59%
=======================================
  Files         223      223
  Lines        7419     7419
  Branches     1711     1711
=======================================
  Hits         3160     3160
  Misses       3594     3594
  Partials      665      665

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 24e1247...8b201e7. Read the comment docs.


IDisposable services using factory methods (Work in progress)

Ensuring that services resolved using factory method that implement IDisposable can be resolved #325

This is failing because master is broken, please merge #329 first and then we should re-run this build before merge.

Closing this out, it is not ready yet


Reflex FormComponent::Base#handle_click failed: uninitialized constant FormComponent::BaseReflex

I am trying a simple example
<%= component_controller do %>
  <%= reflex_tag :handle_click, :button, "Click Me", class: "button is-primary", type: "button" %>
<% end %>

# frozen_string_literal: true

module FormComponent
  class Base < ViewComponentReflex::Component
    def handle_click
      puts 'foo'
    end
  end
end

and I am getting the following error:
StimulusReflex::Channel#receive({"target"=>"FormComponent::Base#handle_click", "args"=>[], "url"=>"http://localhost:3000/", "attrs"=>{"class"=>"button is-primary", "type"=>"button", "data-reflex"=>"click->FormComponent::Base#handle_click", "data-key"=>"245b0f2cb6d05f6b57a2d86278f6b53be4852f2cb9bc38268789e960c1e35853", "data-controller"=>"stimulus-reflex", "data-action"=>"click->stimulus-reflex#__perform", "checked"=>false, "selected"=>false, "tag_name"=>"BUTTON", "value"=>""}, "dataset"=>{"data-reflex"=>"click->FormComponent::Base#handle_click", "data-key"=>"245b0f2cb6d05f6b57a2d86278f6b53be4852f2cb9bc38268789e960c1e35853", "data-controller"=>"stimulus-reflex", "data-action"=>"click->stimulus-reflex#__perform"}, "selectors"=>[], "reflexId"=>"0ac57349-ac26-4e60-9e9d-7b4d2c27e3e7", "resolveLate"=>false, "xpath"=>"/html/body/div[1]/div[1]/button[1]", "cXpath"=>"/html/body/div[1]/div[1]/button[1]", "reflexController"=>"stimulus-reflex", "permanentAttributeName"=>"data-reflex-permanent", "formData"=>""})
19:39:29 guard.1 | Reflex FormComponent::Base#handle_click failed: uninitialized constant FormComponent::BaseReflex
19:39:29 guard.1 | /Users/cj/.asdf/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-6.1.0/lib/active_support/inflector/methods.rb:288:in `const_get' [http://localhost:3000/]

rails 6.1
gem 'stimulus_reflex', '~> 3.4.0.pre9'
stimulus": "^2.0.0
stimulus_reflex": "3.4.0-pre8
gem 'view_component_reflex', '~> 3.0.0'
gem 'view_component', '~> 2.23.1'
Let me know if you need any more information!

I thought maybe removing https://github.com/joshleblanc/view_component_reflex/blob/master/lib/view_component_reflex/reflex_factory.rb#L18 would fix it, but the error still persists.

Ok, so looks like it's a combination of:

https://github.com/joshleblanc/view_component_reflex/blob/master/lib/view_component_reflex/reflex_factory.rb#L18
https://github.com/joshleblanc/view_component_reflex/blob/master/lib/view_component_reflex/engine.rb#L16
https://github.com/hopsoft/stimulus_reflex/blob/master/app/channels/stimulus_reflex/channel.rb#L25

@joshleblanc @hopsoft Is there a reason Reflex or Component is required in the name of a class?

@cj view_compoennt_reflex implicitly creates a reflex with the name Reflex. It's not created by the user, the libraries generates it on the fly. Given that, every reflex generated by view_component_reflex has Reflex at the end of its name.
VIewComponent's naming scheme has every component post-fixed by Component. Absolutely nothing makes the developer maintain this pattern, but view_component_reflex operates on the assumption that it's followed.
The monkey patch you linked in engine is used to initialize my generated reflex. When we receive a request to stimulate a component, we initialize the reflex.
Just looking at it, I could probably constantize anything being sent and checking if it responds to #init_stimulus_reflex instead of checking for the Component postfix

@joshleblanc thank you for the response and that makes sense.
View component is working without having the child class appended with Component.  It seems like just removing https://github.com/joshleblanc/view_component_reflex/blob/master/lib/view_component_reflex/engine.rb#L16 fixes all the issues I was having with naming.  As you have this check component_name.constantize.init_stimulus_reflex which will fail if the component is not a stimulus reflex one, would it be possible to remove it?
Cheers!

Can't just only remove the check. That will throw incorrect warnings.
You'd have to constantize the component name, suppress any errors that throws, then check if it responds to init_stimulus_reflex, and run it if so. If the constantize succeeds, and it doesn't respond to init_stimulus_reflex, you could omit the current warning.

Would something like this work?
            component = component.constantize

            if component_name.respond_to?(:@initialized_state)
              begin
                component.init_stimulus_reflex
              rescue StandardError
                p "Tried to initialize view_component_reflex on #{component_name}, but it's not a view_component_reflex"
              end

            end

Something more like this
            component = begin
              component_name.constantize
            rescue
              # Since every reflex runs through this monkey patch, we're just going to ignore the ones that aren't for components
            end

            if component&.respond_to?(:init_stimulus_reflex)
              component.init_stimulus_reflex
            else
              p "Tried to initialize view_component_reflex on #{component_name}, but it's not a view_component_reflex"
            end

That looks better.... (I had updated my comment as I made a mistake, I was writing it while eating lunch. lol)

@joshleblanc If you'd like me to open a pull request let me know.  Thank you again!

Just testing it now


Active UDP receive discrepancy between esp32 and generic_unix on feature/smp branch

On the feature/smp branch there is a discrepancy in active receive between esp32 and generic_unix.
The generic_unix receives:
{udp, Socket, Address, Port, Packet}
which is the correct OTP behavior.
The ESP32 incorrectly receives:
{udp, Socket, {Address, Port, Packet}}
when in active receive mode.

Fixed with the merge of #589


Cannot turned off sorting from grunt-spritesmith with algorithmOpts

All others properties that I passed in the spritesmithOptions object work great (algorithm, padding), but I can't seems to make the sorting work properly.
Here is the config from my Gruntfile:
spritesheet: {
      generate: {
        spritesmithOptions: {
          algorithm: 'left-right',
          algorithmOpts: {
            'sort': false
          }
        },
        sprites: {
          "images/spritesheet.png": ['images/sprites/**/*.png'],
        },
        sheet: "app/stylus/_spritesheet.styl",
      }
    },

No matter if I add 'sort' or not, the position of my sprites seems to be kind of random. I need them to follow the order from the folder so I can animate them.
Anything I'm missing in my config?
Thanks

I'm also unable to get this to work. I think it's still sorting by width even when I specify the sprites as a list of filenames.


Support compiling openresty under arm64 architecture

I remember that @bzp2010  tried

I remember that @bzp2010 tried

I have done it, will add PR

Currently we use apisix-base as the patched openresty version, in alpine we already support building ARM64 versions.
https://github.com/api7/apisix-build-tools/blob/504cf4b30491003f775a55646a1991d00b180a98/.github/workflows/push-apisix-base-image.yml#L47


[snippets] Provide snippets for the mode at the location

say i have a php script (*.php) ext, and i want to add some html code into it, why visual code does not provide the html snippets provided by the installed plugins ?

Verified in PHP with HTML snippets.


Drop Zone too complicated

Feature request type
Enhance component
Component name
MudDropZone
Is your feature request related to a problem?
I already have a list of designed items. I want to enable reordering them through drag-and-drop. The drop zone examples provided all showcase multiple drop zones, but none demonstrate how to implement it for simply reordering content within a single list.
Describe the solution you'd like
To illustrate reordering within a simple list, consider a scenario where you have a list of steps for baking a cake and want to adjust the order.
Have you seen this feature anywhere else?
No response
Describe alternatives you've considered
No response
Pull Request

[ ] I would like to do a Pull Request

Code of Conduct

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

Doesn't the Reorder Items example work for what you want? Just exclude the additional zones an the rest of the logic remains the same.
https://try.mudblazor.com/snippet/GEQSYSkdTgTJsypz

@Anu6is No, it doesn't. Maybe I'm just misunderstanding how the control works.
For example, let's say I have a list of people retrieved from my database. Do I need to add a Selector property to my PersonEntity class for this to work? If so, what value should be set for the selector?
Also, does dragging and dropping an item to a different location automatically update the order in the underlying list?
For clarification, my items are already displayed how I want them. I just want to be able to reorder them using drag and drop functionality.

For example, let's say I have a list of people retrieved from my database. Do I need to add a Selector property to my PersonEntity class for this to work? If so, what value should be set for the selector?

No. You don't need to modify your list in any way.

Also, does dragging and dropping an item to a different location automatically update the order in the underlying list?

No, Your underlying list is unaffected.
See this simplified example

@koddek can this issue be closed?
Or are you still having difficulties?

Hi @Anu6,  based on your responses, it seems like I'm misunderstanding how the control works. I'll give it another try. If it's still too difficult, I'll use the normal up/down buttons to rearrange the list items.
It would still be great to have an exmaple dedicated to showcasing rearranging items in a single list.
... and yes the issue can be closed.


asciinema-player with React

Hello.
Asciinema player has very strange behavior in my small React project. On static page with same parametrs it works perfetct both online and offline. On React it doesn't work properly. It shows on page, but when I click on play button it start endless loading. Also there is no any errors in console.
Anybody know how to fix it?
Thanks.

When you use it in your React-driven page, do you embed the player outside of your React tree, or you add <asciinema-player> in your JSX?

Directly in jsx! Is it wrong?

I don't think this will work our of the box. <asciinema-player> element is wrapping reagent (an thus React) component, which comes with its own bundled version of React. So there may be some conflicts there.
Maybe we could expose the component directly, without the wrapper, so it can be used within existing React component tree. Not sure how to do that yet though.

Hmmm, interesting thought. I`ll try it! Whait for response :)

@sickill So is there no way of using the asciinema player inside a react component? Should I try the iframe route:

This doesn't work for me though. Working my way through this, but I was wondering what the recommended workaround at the moment is?

Looks like you just found a bug with iframe embedding ;) I need to modify or remove this X-Frame-Options header.

Ah, and now I see you already suggested solution in the other issue, thx!

I can confirm that the iframe embed works with react.
Minor issues with resize at: https://github.com/asciinema/asciinema-server/pull/286#issuecomment-345064775

I’m hoping to add hosted asciicasts to my React site. Has anyone had any further luck or tips for using the self hosted player in React?

The player component is reagent component, and it seems it can be converted into native React component as described here: https://github.com/reagent-project/reagent/blob/master/docs/InteropWithReact.md#creating-react-components-from-reagent-components
The released asciinema-player.js bundle includes React and other deps, it's basically a standalone script to be added to a page.
It seems to me that in order to support consuming it as React component it would be better if asciinema-player was released as npm package with React defined as proper npm dependency, without bundled React code in the player itself, and with a proper way to import AsciinemaPlayer from 'asciinema-player';.
Latest versions of ClojureScript compiler made lots of improvements for integrating with node/npm so I think it's something we could try implementing already.

A React npm package would be fantastic!

A standalone version would be great; But for now I have included the CSS and JS file as static assets, and I've written a simple wrapper for now:
class Asciinema extends React.Component {
  render() {
    return (
      <asciinema-player
        src={this.props.src}
        preload
        poster="npt:0:3"
        idle-time-limit="2"
      />
    );
  }
}

...

<Asciinema src={'/example.cast'}/>

The full screen functionality doesn't resize the text as I would have expected, but I believe this isn't supported out of the box currently.

Have there been any updates on an npm package for a React player? Looking forward to this to use in my React websites and slide decks.

@trevordmiller The API for refs changed in the latest versions of React, what version are you currently using? As you might have to tweak the example code a little if you're using the latest and greatest react

@AlanFoster Callback refs like you are using work in latest react as well as previous versions and I've also tried createRef so I don't think that is the problem. I'm trying to use the player inside of presentation slides (mdx-deck, which abstracts React and other config). I was mainly wondering if you'd be willing to publish your React Asciinema player to npm to use directly without having to host built .js and .css files manually - but if not, I'll wait for an official one from @sickill :)

I've also considered using a tool like xterm to embed a terminal directly in my slides, with asciinema installed, and just use asciinema play ...

@sickill is there any news on releasing proper npm package? I'm interested in creating minimal asciinema editor in react, and so far I'm getting hit hard by need for learning tooling system of clojure & java, which is demotivating. Namely I tried to install leningen and end up hitting java dependency issues.

@ultrox One thing you can try is to play along with the travis build log.
The winning move for me was to install java10.
xomg% java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

@AlanFoster this functions are coming from asciinema.js file.But the problem is that it says to me Unresolved function or method CreatePlayer and UnmountPlayer.How can i solve this ?

asciinema.player.js.CreatePlayer(
this.ref,
this.props.src,
this.props
);

asciinema.player.js.UnmountPlayer(this.ref);

@Zeljkomk You can add asciinema-player.js to your HTML page, then call window.asciinema.player.js.CreatePlayer(...).

@AlanFoster's solution works very well!
Tip: If you want to autoplay, set autoPlay: true (not autoplay).

@AlanFoster , not sure why I'm getting 'asciinema' is not defined
Tried importing it multiple (incorrect) ways..
import "./asciinema-player";     (having it locally in the component path)
//import 'asciinema-player'       (when installed as node module)
Also tried putting a

I was able to get this integration working by following @AlanFoster's approach. Just thought I'd share a Hooks example in case others find it useful!
I am using it in a Gatsby project so the inclusion of the asciinema-player.css/js bundle is a bit different but the wrapper and usage should still be applicable.

Component
Usage
Gatsby bundle

👌

The next version of the player (3.0, see next branch) is going to be a proper npm package, finally 😅.
It's also a rewrite from ClojureScript to modern JS. For rendering it doesn't use React.js anymore, instead it uses small and fast Solid.js.
There's been several different issues raised in this thread and I hope the new version will address most, if not all, of them 🤞
It's around the corner, there's just a few small missing bits I plan to address in next few weeks. I plan to publish a series of alpha/beta releases to npmjs.org and would love a feedback from you 🙌

The new version of the player has been published to npmjs.org (currently at 3.0.0-rc.1). Feel free to give it a spin. Check out the updated self-hosting quick-start guide: https://github.com/asciinema/asciinema-player#quick-start

Anyone coming here who is still confused on how to use Asciinema with React, see the following example:
npm install --save-dev<EMAIL_ADDRESS>
import React, { useEffect, useRef } from 'react';
import * as AsciinemaPlayerLibrary from 'asciinema-player';

type AsciinemaPlayerProps = {
    src: string;
    // START asciinemaOptions
    cols: string;
    rows: string;
    autoPlay: boolean
    preload: boolean;
    loop: boolean | number;
    startAt: number | string;
    speed: number;
    idleTimeLimit: number;
    theme: string;
    poster: string;
    fit: string;
    fontSize: string;
    // END asciinemaOptions
};

const AsciinemaPlayer: React.FC<AsciinemaPlayerProps> = ({
    src,
    ...asciinemaOptions
}) => {
    const ref = useRef<HTMLDivElement>(null);

    useEffect(() => {
        const currentRef = ref.current;
        AsciinemaPlayerLibrary.create(src, currentRef, asciinemaOptions);
    }, [src]);

    return
;
};

export default AsciinemaPlayer;

Use like so:
import AsciinemaPlayer from './components/AsciinemaPlayer';
import 'asciinema-player/dist/bundle/asciinema-player.css';

[...]
   <AsciinemaPlayer src="/fseval/cast/examples_quick_start.cast" rows={30} idleTimeLimit={3} preload={true} />

So for anyone who runs into a double rendering problem with react 18, here is my solution, including typescript types:
AsciinemaPlayer.tsx:
import React, { useEffect, useRef, useState } from 'react';
import 'asciinema-player/dist/bundle/asciinema-player.css';

type AsciinemaPlayerProps = {
    src: string;
    // START asciinemaOptions
    cols?: string;
    rows?: string;
    autoPlay?: boolean
    preload?: boolean;
    loop?: boolean | number;
    startAt?: number | string;
    speed?: number;
    idleTimeLimit?: number;
    theme?: string;
    poster?: string;
    fit?: string;
    fontSize?: string;
    // END asciinemaOptions
};

function AsciinemaPlayer ({src, ...asciinemaOptions}: AsciinemaPlayerProps) {
    const ref = useRef<HTMLDivElement>(null);
    const [player, setPlayer] = useState<typeof import("asciinema-player")>()
    useEffect(() => {
        import("asciinema-player").then(p => {setPlayer(p)})
    }, [])
    useEffect(() => {
        const currentRef = ref.current
        const instance = player?.create(src, currentRef, asciinemaOptions);
        return () => {instance?.dispose()}
    }, [src, player, asciinemaOptions]);

    return
;
}

export default AsciinemaPlayer

asciinema-player.d.ts:
declare module "asciinema-player" {
    export function create(
        src: string,
        element: HTMLElement | null,
        // START asciinemaOptions
        opts: {
            cols?: string,
            rows?: string,
            autoPlay?: boolean,
            preload?: boolean,
            loop?: boolean | number,
            startAt?: number | string,
            speed?: number,
            idleTimeLimit?: number,
            theme?: string,
            poster?: string,
            fit?: string,
            fontSize?: string
        }
    )
}

Does anyone has an example that works with nextjs and typescript please ?


[BUG] Interval value overload

Setting the interval to [60] [Days] and pressing [Save] causes the value of Interval to overload displaying an Unhandled exception with the error message:
Value '-2147483648' is not a valid value for Interval. Interval must be greater than 0. Parameter name. Interval.
--
I suggest using BigInteger instead of Integer to store the value of Interval as well as surrounding the setting  of Interval in a try catch block.

Thanks for the report. I'll get it fixed in the next release. :)

Addressed. Went with the easier option of adding checks so that now, 7 days is the upper limit.
To be honest I can't imagine anyone wanting to change their wallpaper less than daily anyway so I think a 7 day upper limit is more then enough. :)

Will close once live.

Live.


Update project status

This PR is a

[ ] Feature Implementation
[ ] Bug Fix
[x] Documentation

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

Related to:

https://github.com/kyma-project/kyma/issues/5217
https://github.com/kubernetes-sigs/service-catalog/issues/2633

Please leave this checklist in the PR comment so that maintainers can ensure a good PR.
Merge Checklist:

[ ] New feature

[ ] Tests
[ ] Documentation

[ ] SVCat CLI flag
[ ] Server Flag for config

[ ] Chart changes
[ ] removing a flag by marking deprecated and hiding to avoid
breaking the chart release and existing clients who provide a
flag that will get an error when they try to update

/ok-to-test

/ok-to-test

/test pull-build-all-images-for-arm

/test pull-build-all-images-for-arm64

/test pull-build-all-images-for-arm64

/test pull-build-all-images-for-arm

/test pull-build-all-images-for-arm

/test pull-build-all-images-for-ppc64le

/test pull-build-all-images-for-ppc64le

/test pull-build-all-images-for-arm64


python-language-server prints placeholders

$ kak -n /tmp/test.py

:set buffer filetype python
source /usr/share/kak-lsp/rc/lsp.kak
lsp-enable

Now type print and press C-n to select the first (and only) entry in the autocomplete.
Here's what will appear in the buffer:
print(${1:value}, ${2:...}, ${3:sep}, ${4:end}, ${5:file}, ${6:flush})$0

Reproduced on Arch Linux with kak-lsp 6.0.1 and python-language-server 0.24.0

kak-lsp doesn't set snippetSupport flag explicitly. It looks like python-language-server either treat it as true by default or ignores it completely (the latter is the most likely from the quick glance at the code).
Chances are that some other language servers do the same and some kak-lsp users depend on this behaviour and use snippets.
So it might worth introducing an option in kak-lsp and both sending explicit snippetSuport based on it and filtering out snippets by insertTextFormat (if it is set properly by language server) when the option is false.

Upstream bug: https://github.com/palantir/python-language-server/issues/515
Do you want to keep the issue open for tracking the work for what you suggested in the last sentence? If not, feel free to close 😉

I think workaround I proposed is a wrong solution because if language server will ignore snippetSupport and return snippets anyway, and we will filter them out, then it could be that completions left in the list (if any!) are not going to be very useful.

This workaround https://github.com/autozimu/LanguageClient-neovim/issues/737#issuecomment-465089402 referenced from the upstream bug could be used with kak-lsp:
set global lsp_server_configuration python.plugins.jedi_completion.include_params=false

(I didn't test it)

I'm closing this as for this particular case we can't do much except using a workaround. Setting snippetSupport explicitly I think is in the scope of #126

This workaround autozimu/LanguageClient-neovim#737 (comment) referenced from the upstream bug could be used with kak-lsp:

FYI, tried this and it didn't work for me.
hook global WinCreate .* %{ set global lsp_server_configuration python.plugins.jedi_completion.include_params=false }

Sorry, I did a mistake in the key, it should be
set global lsp_server_configuration pyls.plugins.jedi_completion.include_params=false

I will update my original comment as well.

https://github.com/palantir/python-language-server/pull/529 landed!


Support .Time() on appended boxes.

Travis seems to be refusing to use the latest commit, so I'll cancel this one.


min-height bug when changing from jquery 2.3.3 to jquery 3.1.1

if you update jquery to version 3.1.1, the app.js that changes the min-weight of the "content-wrapper" class would not work

In app.js change line 252 to:
var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight() || 0;
This fixxed it for me.
It seems that jQuery  2.3.3 returns "null" when reading the outer height of a non-existant element.
This was changed in jQuery 3, and it now returns NaN.
50 + null = 50
50 + NaN = NaN
So the min-height wasn't actually being set because the calculation results into NaN

Thanks! I removed $('.main-footer').outerHeight() and it works now.

Why there isn't an official version of AdminLTE using jQuery 3+?

For me, this worked in Edge, Firefox, IE11 and Chrome:
      //Get window height and the wrapper height
      var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight() || 0;
      var window_height = $(window).height() ;
      var sidebar_height = 0;
      if ($(".sidebar").height() !== undefined) {
          sidebar_height = $(".sidebar").height();
      }

$('.main-footer').outerHeight() is returning 51, but  $(".sidebar").height() its returning undefined when used the Top Navigation configuration.

What is the best way to fix this w/o changing the Core app.js?

That's the only way.
On Dec 5, 2016 12:33 AM, "Chris Landeza"<EMAIL_ADDRESS>wrote:

What is the best way to fix this w/o changing the Core app.js?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/almasaeed2010/AdminLTE/issues/1204#issuecomment-264766036,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AELStMDckX0mJu7hLN14C0rlRjtpiIffks5rE5QVgaJpZM4KMFYi
.

@chrislandeza fixed in #1276


Fix PytestWarning: Error when trying to teardown test databases: RuntimeError("generator didn't stop after throw()")

============================================ warnings summary ============================================
v1/validators/tests/validator.py::test_validator_patch
  /Users/bucky/Desktop/Projects/Bank/venv/lib/python3.7/site-packages/django/db/backends/postgresql/base.py:310: RuntimeWarning: Normally Django will use a connection to the 'postgres' database to avoid running initialization queries against the production database when it's not needed (for example, when running tests). Django was unable to create a connection to the 'postgres' database and will use the first PostgreSQL database instead.
    RuntimeWarning

v1/validators/tests/validator.py::test_validator_patch
  /Users/bucky/Desktop/Projects/Bank:0: PytestWarning: Error when trying to teardown test databases: RuntimeError("generator didn't stop after throw()")

-- Docs: https://docs.pytest.org/en/stable/warnings.html

Latest version of pytest fixes this.

Latest version of pytest fixes this.

If you are a poor developer like me coming here from Google after seeing this error from your Django test suite, add this to your pytest.ini file:
addopts = --reuse-db --create-db
source: https://dev.to/dwmedina/my-findings-for-a-pytest-django-warning-error-when-trying-to-teardown-test-databases-48a5


fixing multipart in keyauth

This fixes some bugs in the key authentication, especially for multipart/data.
I am not happy by the code quality, so I would like to refactor it a little bit.

Coverage increased (+0.41%) to 74.77% when pulling 1bddcbd741cd3e4bb0ec6a0e9402b480a0918057 on fix/auth into 83a862ae038010506a670d6527a0032b8b421f7f on master.

Coverage increased (+0.45%) to 74.81% when pulling 64a27d2bf8105501b204ca34de2b71a85d9611e0 on fix/auth into 83a862ae038010506a670d6527a0032b8b421f7f on master.

Coverage increased (+0.44%) to 74.8% when pulling 9f90b02de9ca225df962342b84fddcdb2257469c on fix/auth into 83a862ae038010506a670d6527a0032b8b421f7f on master.

Coverage increased (+0.44%) to 74.8% when pulling 9f90b02de9ca225df962342b84fddcdb2257469c on fix/auth into 83a862ae038010506a670d6527a0032b8b421f7f on master.

This closes #116