downloadcliclient.component.html markdown

Feature Request
Desired behaviour
downloadcliclient.component.html contains alot of html tags when it can be greatly simplified if it uses as much markdown as possible.  Simply put <markdown></markdown>  Going forward, it should be easier to update and read.

It's a good idea although last I tried, the problem is that weird things happened when I tried to use variables inside the markdown.

Should be possible, even if it isn't, there's always the option of converting the parts of the variables that don't use markdown.  feature/issue-994 for sample


[FEATURE_REQUEST] APOD widget custom instance/local scrapper

Is your feature request related to a problem? If so, please describe.
It seems that the 'official' APOD API is dead and I can't get the widget to work.
Describe the solution you'd like
From a quick glance at the Dashy code I don't see an option for a custom instance. The code for the 'official' instance is public and it might still work. Another solution would be to have a local scrapper of the NASA website in Dashy, rather than relying on an API.
Priority
Low (Nice-to-have)
Is this something you would be keen to implement
No

The API wrapper is indeed down. And I did just try and deploy my own instance to Heroku, but seems it would take a bit of work to get it working. And NASA's official APOD API is a bit of a pain to use, it requires an API key, needs to be proxied, and doesn't even return the actual image.
That said, scraping is absolutely not the way to go. It's against NASA's ToC, and definitely out of scope for this project.
Possibly the best option would be to remove this widget instead of fixing it, as the functionality can probably be used through one of the dynamic widget options instead. E.g. the Iframe widget, Image widget, Embed widget or maybe the RSS Widget with https://apod.nasa.gov/apod.rss

Iframe seems to be not working for me. Tried it on Firefox, but it got blocked since it was an embed. Tried on different browsers and devices, but then it was not rendering at all.
As for the RSS Widget it could work, but from what I've seen in the XML, it returns a small resolution picture (60x40, not ideal).
Image Widget wouldn't work, as the image on website has a distinct name (SomeName.jpg rather than apod.jpg).
Finally, I tried Embed Widget. Created an iframe with the APOD address (in options: html), but same situation as with the regular Iframe Widget. There's no JS to link to on the website (apart from tracking one).
Maybe it could be achieved with putting the JS oneself (the options: script, rather than scriptSrc), but I don't know how.

I've rebuilt the old API, which is available here: Lissy93/go-apod. When I get a moment, I'll update the APOD widget to use that new service. Or, if you'd like to submit a PR, then that would be awesome!
In the meantime, I also made a raw image endpoint, that you could use with the image widget, it's https://go-apod.herokuapp.com/image.
Hope that helps :)

Very helpful, thanks.
I submitted a PR, which updates the APOD Widget with the new API.
Thanks for all your help.


Day offset bug probably because of timezone +/- difference

Did some debugging and I think I've found the problem with the day offset mentioned in #12 :
It's probably working ok for you because you are in a negative timezone (UTC - x), while I'm using the plugin from a positive timezone (UTC + x). Here is the code block:
utcDate = function(date){

    	if (typeof date === 'undefined')
            date = new Date();
            // This is according to system settings

    	else if (typeof date === 'string')
            date = new Date(date);
            // Sets the time to 00:00:00 +/- timezone offset. So if the offset is 120, then it will set 02:00:00, but if the offset is -120, then it sets the time to 22:00:00 the day BEFORE

    	date.setTime( date.getTime() + date.getTimezoneOffset()*60*1000 );
        // If the timezone is negative it adds to the time, if it's positive it subtracts

    	date.setHours(0,0,0,0);
        // This sets the time to UTC then applies timezoneOffset. So if the offset is -120, it sets 22:00:00 the day BEFORE. It doesn't seem to be affected by the .setTime above.

    	return date;
    }

This seems to be working ok for positive timezones, but when the timezone is negative the only way I got it working is this:
utcDate = function(date){

    	if (typeof date === 'undefined')
            date = new Date();

    	else if (typeof date === 'string')
            date = new Date(date);

        var timezoneOffset = date.getTimezoneOffset();

    	date.setTime( date.getTime() - timezoneOffset*60*1000 );
        // - - = +

    	date.setHours(-timezoneOffset/60,0,0,0);
        // Convert timezoneOffset to hours, switch to positive value

    	return date;
    }

But I couldn't figure out a catch-all that will render correctly for both positive and negative timezones.

Thank you for the insight.
I've switched to javascript's native utc date implementation.
Please see if that resolves the issue

Still not fixed unfortunately. I changed my computer's location to somewhere in the US and the date was correct, but as soon as I changed it to somewhere in Europe it selected the previous day

Correct. I successfully reproduced the bug myself.
flatpickr now confirmed working from Amsterdam :star2:
Let me know if the issue still holds.
Thank you

Yes, it seems to be working correctly now for any timezone. I also fixed it last evening by removing the date.setTime() and date.setHours() lines, I inspected the code and couldn't figure out why they were needed. I didn't get around to making a PR.


New line added when pasting data

Description
When pasting in decimal data from a spreadsheet into a handsontable cell set as type 'numeric' , what appears to be a hidden new line character is added into each cell. This then triggers my error validation on the cells as my data is now treated as 'text' rather than 'numeric'.
Each cell can be manually editied to resolve the issue but for large datasets this is time consuming and annoying for my users.
This error occurs on Chrome and Edge but I have been unable to reproduce on Firefox.
Steps to reproduce

Generate some random decimal values in a column in a spreadsheet (7202.33, 887.6, 878.59235 etc...). The error does not seem to occur for 'point zero' values.
Copy the data into the table
The cells should be highlighted red indicating that they are not valid.
Double click on the red cell to edit the value and you will see the new line.

Demo
https://stackblitz.com/edit/handsontable-angular-seuuhc
Your environment

Angular version: 7.0.0 (6.1.0 also affected)
Handsontable version: 4.0.0
Wrapper version: 2.0.0 (@angular/handsontable)
Browser Name and version: Chrome 70.0.3538.67, Firefox 62.0.3, Edge 41.16299.611.0
Operating System: Windows 10

Hi @tasinclair1
can you check if updating Handsontable to 6.1.0 solves the issue?

Hi @AMBudnik
That seems to fix the issue but when I run Yarn install it throws a warning as the latest version of the angular wrapper only supports up to version 4.0.0 of handsontable.
warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>
Will Handsontable 6.1.0 work with the wrapper with no issues if that is the advised solution?
Thanks.

We are planning to update the version but haven't had time to test it properly.
You still can use 6.1.0. We haven't been reported about any issues that relate to the use of higher Handsontable versions in the wrapper.

Brilliant, thanks for your help!


Setup & Deploy MySQL Operator

~* Install KubeDB Operator using this guide~
~* Deploy a MySQL CRD using this guide~
~* Write a script to create users with proper accesses on MySQL instance~
~* Make sure backups are enabled and scheduled~
~* More MySQL docs~

Add a ServiceMonitor to fetch MySQL metrics
Add a metrics user in MySQL

Don't use KubeDB
Use Percona's MySQL Operator: https://www.percona.com/doc/kubernetes-operator-for-pxc/index.html
Demo of how to deploy it: https://www.percona.com/doc/kubernetes-operator-for-pxc/kubernetes.html
Manifests: https://github.com/percona/percona-xtradb-cluster-operator/tree/main/deploy

Helm chart: https://www.percona.com/doc/kubernetes-operator-for-pxc/helm.html

Depends on: https://github.com/raspbernetes/multi-arch-images/pull/228


As a CIF Project Coordinator, I want to be able to add contact information related to a project, so that I know who to contact if I have any questions

Description:
Updates to existing 'contacts' functionality based on the updated designs from #666. During usability testing with CIF Ops Team, it became clear that the existing design and functionality of the contacts page was not intuitive, not always functional and could use a re-design to help improve usability.
Wireframe:

Acceptance Criteria:
Given I am a CIF Project Coordinator
When I have selected a contact from the drop down list
Then key contact information is displayed (email, company, position)
Development Checklist:

[ ] Display additional contact information under contact drop down (once selected)
[ ] Remove 'show details' button
[ ] Remove 'view contact list' button
[ ] Update secondary contact button design
[ ] Add search icon for 'select contact'  to indicate searchability of the field
[ ] Meets the DOD

Definition of Ready (Note: If any of these points are not applicable, mark N/A)

[x] User story is included
[x] User role and type are identified
[x] Acceptance criteria are included
[x] Wireframes are included (if required)
[x] Design / Solution is accepted by Product Owner
[ ] Dependencies are identified (technical, business, regulatory/policy)
[ ] Story has been estimated (under 13 pts)

Definition of Done (Note: If any of these points are not applicable, mark N/A)

[ ] Acceptance criteria are tested by the CI pipeline
[ ] UI meets accessibility requirements
[ ] Configuration changes are documented, documentation and designs are updated
[ ] Passes code peer-review
[ ] Passes QA of Acceptance Criteria with verification in Dev and Test
[ ] Ticket is ready to be merged to main branch
[ ] Can be demoed in Sprint Review
[ ] Bugs or future work cards are identified and created
[ ] Reviewed and approved by Product Owner

Notes:

Hey team! Please add your planning poker estimate with ZenHub @BCerki @dleard @gurjmatharu @mikevespi @pbastia @Sepehr-Sobhani

@suhafa should we only display this contact info when the user is filling in the form? Or would we also like it displayed when in "view" mode?

I think seeing it also in view mode would be helpful - that is something I noticed during testing yesterday of the other contact ticket, but would also like @suhafa 's feedback.

@mikevespi yes! That would be a great point of reference even in view mode. Thanks Mike and @LindsayMacfarlane

Thanks @mikevespi ! Meets acceptance criteria.
A couple of observations that can be addressed in a separate ticket(s):

I wonder if phone number should also be displayed? Do we have a sense if the Ops team typically communicates via email vs phone?
The view display on the submit page - name is displayed under the subheading, while the rest are displayed beside

FYI @suhafa and @nanyangpro


workspace previous goes to incorrect workspace

On latest master, hyprctl dispatch workspace previous seems to behave unpredictably for 3+ workspaces.
binds {
    workspace_back_and_forth = true
}

bind = $mod, grave,         workspace, previous

https://user-images.githubusercontent.com/721196/236652097-111b1bfa-3fe6-44ee-9d7f-84a44b4a64de.mp4

git bisect if this is a regression plox.

Regression in 287e6c4ede30c8e5e85863cd85f157e17e24879c.

not so sure, but give allow_workspace_cycles=true a shot.

I have this issue also, and it seems like the behavior of allow_workspace_cycles has been effectively inverted. So setting allow_workspace_cycles = true seems to "fix" it (and setting it explicitly to false does the same as default), though obviously this inversion is a regression.

What is considered the correct behaviour of workspace previous?
At the moment it appears to me that workspace previous will go through all the previous workspaces instead of just going back and forth.

At the moment it appears to me that workspace previous will go through all the previous workspaces instead of just going back and forth.

this is the case for me as well, on 918d8340afd652b011b937d29d5eea0be08467f5
my use case is wanting to swap back and forth with the previous workspace in the classic alt+tab style, using
bind = $mainMod, tab, workspace, previous
this doesn't provide the desired behavior, instead going through the whole history stack.
allow_workspace_cycles = false
"fixes" it. as mentioned this seems to be the opposite of the documented behavior for that option.


RFC: Extract stderr_width to crate and make more portable

tl;dr: See winsize and my winsize branch of cargo.
Describe the problem you are trying to solve
I noticed whilst doing some development on my FreeBSD workstation that the new progress bar was not showing up for me. I did some research and saw that it all boiled down to whether there is an implementation of stderr_width for the platform.
Upon finding that code I was surprised to find it limited only to Linux and MacOS as I would have expected the behaviour to be pretty universal across UNIX like systems. Further research showed that this code was originally cfg(unix) but it was gated to linux and macos in https://github.com/rust-lang/cargo/pull/4713 as there were build failures on some platforms due to the differing size of an argument to ioctl. Additionally, looking at the libc crate shows that almost all of the unix platforms define the TIOCGWINSZ ioctl.
Describe the solution you'd like
I'd like the progress bar to work on FreeBSD, but ideally all platforms that support TIOCGWINSZ.
Notes
Since Alex Crichton said "I just didn't want to deal with all the portability stuff here" I'm proposing that this the window sizing stuff be extracted to a separate crate and deal with the portability there. I've gone ahead and done that:
https://github.com/wezm/winsize
I've also got a branch of cargo using the crate: https://github.com/rust-lang/cargo/compare/b3d0b2e...wezm:winsize
I've added CI for FreeBSD, Linux, MacOS, and Windows to that repo and plan to add more platforms as sr.ht adds support for more build platforms (which is planned). Currently I've only added FreeBSD to the code path using the ioctl, I'd like to add others as methods become available to have them in CI too.
Currently it's a direct extraction from cargo. I wanted to get feedback on this before spending more time on it. If this seems like a reasonable approach I'd like to do the following before proposing cargo use it:

Generalise the crate more (allow different fds to be supplied)
Support width and height
Add documentation
Publish to crates.io

There's prior art for this being done in cargo (the example I'm thinking of is the platform specific code for handling the --open in cargo doc --open), so I think we'd be happy for this effort to go ahead.

Closing as the progress bar now works in FreeBSD.


Type 'ConstructNode' is missing the following properties from type 'Node': _locked, _children, _context, _metadata, and 6 more.

Hello
I'm running  ./cloud9_install.sh  on Cloud9 and I get the following error:
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
253 packages excluded due to repository priority protections
Package jq-1.5-1.amzn2.0.2.x86_64 already installed and latest version
Nothing to do
export ACCOUNT_ID=937224085622
export AWS_REGION=us-east-1
us-east-1
Checking CDK Status
Updating CDK
up to date, audited 487 packages in 2s
39 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
Installing Typescript
up to date, audited 487 packages in 2s
39 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
Installing Node Modules
up to date, audited 487 packages in 2s
39 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
Creating SciPy and MXNet Lambda layer artifact
Creating layer compatible with python version 3.6
Requirement already satisfied: pip in /var/lang/lib/python3.6/site-packages (21.0)
Collecting pip
Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.0
Uninstalling pip-21.0:
Successfully uninstalled pip-21.0
Successfully installed pip-21.3.1
Collecting scipy==1.5.2
Downloading scipy-1.5.2-cp36-cp36m-manylinux1_x86_64.whl (25.9 MB)
Collecting mxnet==1.4.0
Downloading mxnet-1.4.0-py2.py3-none-manylinux1_x86_64.whl (29.6 MB)
Collecting numpy>=1.14.5
Downloading numpy-1.19.5-cp36-cp36m-manylinux2010_x86_64.whl (14.8 MB)
Collecting requests>=2.20.0
Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting graphviz<0.9.0,>=0.8.1
Downloading graphviz-0.8.4-py2.py3-none-any.whl (16 kB)
Collecting numpy>=1.14.5
Downloading numpy-1.14.6-cp36-cp36m-manylinux1_x86_64.whl (13.8 MB)
Collecting certifi>=2017.4.17
Downloading certifi-2<IP_ADDRESS>-py3-none-any.whl (160 kB)
Collecting idna<4,>=2.5
Downloading idna-3.3-py3-none-any.whl (61 kB)
Collecting charset-normalizer~=2.0.0
Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Installing collected packages: urllib3, idna, charset-normalizer, certifi, requests, numpy, graphviz, scipy, mxnet
Successfully installed certifi-2<IP_ADDRESS> charset-normalizer-2.0.12 graphviz-0.8.4 idna-3.3 mxnet-1.4.0 numpy-1.14.6 requests-2.27.1 scipy-1.5.2 urllib3-1.26.12
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Done creating layer!
-rw-r--r-- 1 root root 74M Sep 13 00:06 layer.zip
/home/ec2-user/environment/aws-serverless-for-machine-learning-inference
Deploying CDK Application
/home/ec2-user/environment/aws-serverless-for-machine-learning-inference/node_modules/ts-node/src/index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
lib/batch-resources.ts:87:7 - error TS2345: Argument of type 'this' is not assignable to parameter of type 'Construct'.
Type 'BatchResources' is not assignable to type 'Construct'.
Types of property 'node' are incompatible.
Type 'ConstructNode' is missing the following properties from type 'Node': _locked, _children, _context, _metadata, and 6 more.
87       this,
~~~~
at createTSError (/home/ec2-user/environment/aws-serverless-for-machine-learning-inference/node_modules/ts-node/src/index.ts:859:12)
at reportTSError (/home/ec2-user/environment/aws-serverless-for-machine-learning-inference/node_modules/ts-node/src/index.ts:863:19)
at getOutput (/home/ec2-user/environment/aws-serverless-for-machine-learning-inference/node_modules/ts-node/src/index.ts:1077:36)
at Object.compile (/home/ec2-user/environment/aws-serverless-for-machine-learning-inference/node_modules/ts-node/src/index.ts:1433:41)
at Module.m._compile (/home/ec2-user/environment/aws-serverless-for-machine-learning-inference/node_modules/ts-node/src/index.ts:1617:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
at Object.require.extensions.<computed> [as .ts] (/home/ec2-user/environment/aws-serverless-for-machine-learning-inference/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1004:32)
at Function.Module._load (node:internal/modules/cjs/loader:839:12)
at Module.require (node:internal/modules/cjs/loader:1028:19) {

diagnosticCodes: [ 2345 ]
}
Subprocess exited with error 1

+1, I'm running this locally from install.sh with the same error

@larrygoyeau I'm pretty sure this relates to this issue it seems updating package json to v2 of cdk should work. However, all the dependencies in this project have the highest version of 1.172.0 I still get this error after changing dependency versions around; here is what I"m left with:
{
  "dependencies": {
    "@aws-cdk/assert": "^1.172.0",
    "@aws-cdk/aws-apigateway": "^1.172.0",
    "@aws-cdk/aws-batch": "^1.172.0",
    "@aws-cdk/aws-ec2": "^1.172.0",
    "@aws-cdk/aws-ecr": "^1.172.0",
    "@aws-cdk/aws-ecr-assets": "^1.172.0",
    "@aws-cdk/aws-iam": "^1.172.0",
    "@aws-cdk/aws-lambda": "^1.172.0",
    "@aws-cdk/aws-lambda-event-sources": "^1.172.0",
    "@aws-cdk/aws-logs": "^1.172.0",
    "@aws-cdk/aws-s3": "^1.172.0",
    "@aws-cdk/aws-ssm": "^1.172.0",
    "@aws-cdk/custom-resources": "^1.172.0",
    "@types/jest": "^29.0.2",
    "@types/node": "^18.7.18",
    "cdk-ecr-deployment": "^2.5.6",
    "ts-node": "^10.9.1",
    "typescript": "^4.8.3"
  }
}

+1 facing same issue

As @sudosean  mentioned, I believe these errors are possibly related to CDK v1 entering maintenance mode after June 1, 2022  .
I have migrated the code to CDK v2 (2.59.0) and pushed the changes to the main branch. Changes successfully tested on an AWS Cloud9 m5.large.
@buissmaster - Please let me know if this resolves the issue.
Thank You!

Closing issue.  Please reopen if issue persists.  Thank you.


Question: Question on how to properly configure type mapping for FSharp Option types

I am trying to configure mapping for F# option types but have run into an exception that I could not diagnose. Attached is my attempt.
ConsoleApp1.zip

Would you be able to check this project? I am not the best resource for F#, maybe I can ask the community. @AngelMunoz would you be a help here?

Or if it is just a technical thing, you can visit the Class Mapping documentation for attributes-based setup, or Implicit Mapping if you wish to setup a mapping without any attributes.

Hey there, I just took a brief look at the sample
I'm not much experienced in that area either but since RepoDB uses Reflection there might be an issue with F#'s explicit interface usage
I stumbled across that recently (https://github.com/worldbeater/Live.Avalonia/blob/main/Live.Avalonia/LiveControlLoader.cs#L40) if you use a class from F# and want to use it's interface via reflection you must be sure to get the method from the interface type not the concrete class, I'm not sure how RepoDB does that but that would be my best guess and I'm not sure that could be the real problem
that being said...
F# types are sometimes complex to interop with C# libraries (and json serialization) I tend to avoid them when writing to the database/serializing to json 😞 and use either DTO's + anonymous records with the shape of the database table with raw queries, you can check these lines to give you an idea

https://github.com/AngelMunoz/Migrondi/blob/master/src/Migrondi/Queries.fs#L80
https://github.com/AngelMunoz/Migrondi/blob/master/src/Migrondi/Queries.fs#L95
https://github.com/AngelMunoz/Migrondi/blob/master/src/Migrondi/Queries.fs#L101

But I'd just use the Execute'Query family

Just to add to this
Exception has occurred: CLR/System.NullReferenceException An unhandled exception of type 'System.NullReferenceException' occurred in RepoDb.dll: 'Object reference not set to an instance of an object.'

stacktrace
Exception has occurred: CLR/System.NullReferenceException
An unhandled exception of type 'System.NullReferenceException' occurred in RepoDb.dll: 'Object reference not set to an instance of an object.'
   at RepoDb.Reflection.FunctionFactory.<>c__DisplayClass7_0`1.b__0(Int32 entityIndex, Expression instance, ParameterExpression property, DbField dbField, ClassProperty classProperty, Boolean skipValueAssignment, ParameterDirection direction)
   at RepoDb.Reflection.FunctionFactory.GetDataEntitiesDbCommandParameterSetterFunction[TEntity](IEnumerable`1 inputFields, IEnumerable`1 outputFields, Int32 batchSize, IDbSetting dbSetting)
   at RepoDb.FunctionCache.DataEntitiesDbCommandParameterSetterFunctionCache`1.Get(String cacheKey, IEnumerable`1 inputFields, IEnumerable`1 outputFields, Int32 batchSize, IDbSetting dbSetting)
   at RepoDb.FunctionCache.GetDataEntitiesDbCommandParameterSetterFunction[TEntity](String cacheKey, IEnumerable`1 inputFields, IEnumerable`1 outputFields, Int32 batchSize, IDbSetting dbSetting)
   at RepoDb.DbConnectionExtension.<>c__DisplayClass252_0`1.b__0(Int32 batchSizeValue)
   at RepoDb.Contexts.Execution.InsertAllExecutionContextCache`1.Get(String tableName, IEnumerable`1 fields, Int32 batchSize, Func`2 callback)
   at RepoDb.DbConnectionExtension.InsertAllInternalBase[TEntity](IDbConnection connection, String tableName, IEnumerable`1 entities, Int32 batchSize, IEnumerable`1 fields, String hints, Nullable`1 commandTimeout, IDbTransaction transaction, ITrace trace, IStatementBuilder statementBuilder, Boolean skipIdentityCheck)
   at RepoDb.DbConnectionExtension.InsertAllInternal[TEntity](IDbConnection connection, IEnumerable`1 entities, Int32 batchSize, String hints, Nullable`1 commandTimeout, IDbTransaction transaction, ITrace trace, IStatementBuilder statementBuilder)
   at RepoDb.DbConnectionExtension.InsertAll[TEntity](IDbConnection connection, IEnumerable`1 entities, Int32 batchSize, String hints, Nullable`1 commandTimeout, IDbTransaction transaction, ITrace trace, IStatementBuilder statementBuilder)
   at Program.main(String[] argv) in C:\Users\scyth\Downloads\ConsoleApp1\ConsoleApp1\Program.fs:line 61

which leads me think this might be the method with the issue it might as well happen with the Getter
https://github.com/mikependon/RepoDb/blob/b1e0b5a9a0d9ec938a33688cefe20268d517d7e1/RepoDb/RepoDb/Reflection/FunctionFactory.cs#L984-L989

Thanks @AngelMunoz for the reply.

F# and want to use it's interface via reflection you must be sure to get the method from the interface type not the concrete class, I'm not sure how RepoDB does that but that would be my best guess and I'm not sure that could be the real problem

This is handled internally, the type references of the underlying interface used by the class is always passed before the compilation. If that reference is null, then I used the DeclaringType property in the compilation. So that would fix the problem there.
The only problem that I know in relation to F# is that, F# classes are immutable and that RepoDb would not work there until you specific the CLIMutable attribute.
Maybe you can guide the guy how to call the FluentMapper.Entity().Table("TableName") method?

@lambdakris, is the issue above mentioned by @AngelMunoz the same as what you are encountering? If that is the case, then I need to look at it. It seems the RepoDb is failing in reflecting the type in F#. Have to research it.

Hey @mikependon  and @AngelMunoz, thanks for looking at this. I have a feeling that @AngelMunoz might be on to something because the problem seems to occur before the PropertyHandler methods have a chance to execute. I tried to recreate the example in the docs which simply serializes and deserializes a json string to an object, and I still get the same exception. I haven't tried it in C#, but assuming that it works as expected there, then it really might be an issue with how interfaces are implemented in F#. Below is the example:
the table...
create table dbo.Customer (
	Id int identity(1,1) not null,
	Name nvarchar(100) not null,
	Address nvarchar(500) not null
);

the code...
open System
open System.Data.SqlClient
open RepoDb
open RepoDb.Attributes
open RepoDb.Interfaces
open Newtonsoft.Json

[<CLIMutable>]
type Address = {
    City: string
    State: string }

type AddressPropertyHandler() =
    interface IPropertyHandler<string, Address> with
        member this.Get (input, property) =
            JsonConvert.DeserializeObject<Address>(input)
        member this.Set (input, property) =
            JsonConvert.SerializeObject(input)

[<CLIMutable>]
type Customer = {
    Id: int
    Name: string
    [<PropertyHandler(typeof<AddressPropertyHandler>)>]
    Address: Address
}

[<EntryPoint>]
let main argv =
    RepoDb.SqlServerBootstrap.Initialize()

    let customer1 = { Id = 0; Name = "customer 1"; Address = { City = "San Juan"; State = "Puerto Rico" } }

    use connection = new SqlConnection("server=localhost;database=repodb;trusted_connection=true")

    connection.Insert<Customer>(customer1) |> ignore

    0 // exit code

@lambdakris - now that I have your model and table schema, can you also paste your exception here? Is it identical to what @AngelMunoz  has encountered (i.e.: NullException)?

Sure, here is the serialized exception...
System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=RepoDb
  StackTrace:
   at RepoDb.Reflection.FunctionFactory.<>c__DisplayClass6_0`1.<GetDataEntityDbCommandParameterSetterFunction>b__0(Expression instance, ParameterExpression property, DbField dbField, ClassProperty classProperty, Boolean skipValueAssignment, ParameterDirection direction)
   at RepoDb.Reflection.FunctionFactory.GetDataEntityDbCommandParameterSetterFunction[TEntity](IEnumerable`1 inputFields, IEnumerable`1 outputFields, IDbSetting dbSetting)
   at RepoDb.FunctionCache.GetDataEntityDbCommandParameterSetterFunctionCache`1.Get(String cacheKey, IEnumerable`1 inputFields, IEnumerable`1 outputFields, IDbSetting dbSetting)
   at RepoDb.FunctionCache.GetDataEntityDbCommandParameterSetterFunction[TEntity](String cacheKey, IEnumerable`1 inputFields, IEnumerable`1 outputFields, IDbSetting dbSetting)
   at RepoDb.DbConnectionExtension.<>c__DisplayClass242_0`2.<InsertInternalBase>b__0()
   at RepoDb.Contexts.Execution.InsertExecutionContextCache`1.Get(String tableName, IEnumerable`1 fields, Func`1 callback)
   at RepoDb.DbConnectionExtension.InsertInternalBase[TEntity,TResult](IDbConnection connection, String tableName, TEntity entity, IEnumerable`1 fields, String hints, Nullable`1 commandTimeout, IDbTransaction transaction, ITrace trace, IStatementBuilder statementBuilder, Boolean skipIdentityCheck)
   at RepoDb.DbConnectionExtension.InsertInternal[TEntity,TResult](IDbConnection connection, TEntity entity, String hints, Nullable`1 commandTimeout, IDbTransaction transaction, ITrace trace, IStatementBuilder statementBuilder)
   at RepoDb.DbConnectionExtension.Insert[TEntity](IDbConnection connection, TEntity entity, String hints, Nullable`1 commandTimeout, IDbTransaction transaction, ITrace trace, IStatementBuilder statementBuilder)
   at Program.main(String[] argv) in C:\Users\cax9124\source\repos\ConsoleApp1\ConsoleApp1\Program.fs:line 36

And the content of the {exception}.TargetSite property just in case...
{System.Linq.Expressions.Expression <GetDataEntityDbCommandParameterSetterFunction>b__0(System.Linq.Expressions.Expression, System.Linq.Expressions.ParameterExpression, RepoDb.DbField, RepoDb.ClassProperty, Boolean, System.Data.ParameterDirection)} | System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}

The fix for this has been checked in to the main branch. #499. Will be a part of the next beta release.

Does this mean that Option thats or any types are mappable using FluetMapper?

@Swoorup - Apology for overlook. The options are not a part of our latest beta released. I will re-open this issue.

@mikependon Any timeline for the release?
Starting the evaluate this library to replace current TypeProvider based library on a F# codebase. It hits a sweet spot before EF and directly writing queries. 👍

@mikependon @lambdakris @AngelMunoz
Can confirm that I can directly use Option types in POCO model with the latest release.

Can you provide the error stack trace if you are using that attribute?

@mikependon this is the sample you can test
open System
open System.ComponentModel.DataAnnotations.Schema
open Npgsql
open RepoDb
open RepoDb.Interfaces

[<Struct>]
type TenantId = TenantId of Guid

type TenantIdPropertyHandler () =
    interface IPropertyHandler<Guid, TenantId> with
        member _.Get (input, _) = TenantId input
        member _.Set (TenantId input, _) = input

type ValueOptionPropertyHandler<'t> () =
    interface IPropertyHandler<'t, 't voption> with
        member _.Get (input, _) =
            match input |> box with
            | null -> ValueNone
            | _ -> ValueSome input
        member _.Set (input, _) =
            match input with
            | ValueNone -> null |> box :?> 't
            | ValueSome x -> x

type OptionNullablePropertyHandler<'t when 't:> ValueType and 't: struct and 't: (new: unit -> 't )> () =
    interface IPropertyHandler<'t Nullable, 't option> with
        member _.Get (input, _) = input |> Option.ofNullable<'t>
        member _.Set (input, _) = input |> Option.toNullable<'t>

type ValueOptionNullablePropertyHandler<'t when 't:> ValueType and 't: struct and 't: (new: unit -> 't )> () =
    interface IPropertyHandler<'t Nullable, 't voption> with
        member _.Get (input, _) = input |> ValueOption.ofNullable<'t>
        member _.Set (input, _) = input |> ValueOption.toNullable<'t>

type DriverRiskAssessmentSession = {
    [<Column "tenant_id">]
    TenantId: TenantId
    [<Column "started_at">]
    StartedAt: DateTimeOffset voption
}

let [<Literal>] TableName = "test.assessment_sessions"

let assessment1 = {
    TenantId = Guid.NewGuid() |> TenantId
    StartedAt = ValueNone
}
let assessment2 = {
    TenantId = Guid.NewGuid() |> TenantId
    StartedAt = DateTimeOffset.UtcNow |> ValueSome
}

PostgreSqlBootstrap.Initialize();
PropertyHandlerMapper.Add<TenantId, TenantIdPropertyHandler>()
//PropertyHandlerMapper.Add<option<_>, OptionNullablePropertyHandler<_>>()
PropertyHandlerMapper.Add<voption<DateTimeOffset>, ValueOptionNullablePropertyHandler<DateTimeOffset>>()
//let connection = new NpgsqlConnection("Host=localhost;Port=5432;Database=risk;Username=postgres;Enlist=false;Integrated Security=true;")
let connection = new NpgsqlConnection("Host=localhost;Port=12605;Database=risk;Username=postgres;Enlist=false;Integrated Security=true;")

connection.Open()
connection.CreateCommand(
"""CREATE SCHEMA IF NOT EXISTS test;
    CREATE TABLE IF NOT EXISTS test.assessment_sessions (
        --session_id uuid PRIMARY KEY,
        tenant_id uuid NOT NULL,
        started_at TIMESTAMP WITH TIME ZONE NULL
    );
    """)
    .ExecuteNonQuery() |> printfn "Created: %A"

connection.Insert<DriverRiskAssessmentSession>(TableName, assessment1) |> printfn "Inserted: %A"
connection.Insert<DriverRiskAssessmentSession>(TableName, assessment2) |> printfn "Inserted: %A"

connection.QueryAll<DriverRiskAssessmentSession>(TableName) |> Seq.iter (printfn "Found: %A")

Console.ReadKey() |> ignore

It would be nice if you can make all 3 property handlers work out of the box:

FSharpOption
FsharpValueOption
Single case discriminated union which at the end is a value object that has a single property Item like

record SingleCaseDU<T>(T Item);

@Swoorup correct my if I'm wrong


Collapsing the left sidebar, as a proper feature and not a hack

Summary
The left sidebar takes a lot of screen space, and application of the .wide CSS class does not remove it when author_profile: false is specified in the frontmatter, resulting in an awkward asymmetric layout.
Multiple issues have been opened regarding this problem, resulting in an endless maze of "Go see this other issue" or partial answers burried in comments and questions.
Hence, I would like to suggest the following:

Add the official, canonical way to remove the left sidebar in the documentation, at least to avoid more people opening issues like this one
Add a way to remove this sidebar with a configuration parameter, such as sidebar: false in order to avoid copying theme files

Motivation
This subject is requested in multiple issues, yet no canonical solution has been offered by the dev team, or added to the documentation. At least one issue has users requesting this feature to be available as part of the theme, but this request has never been addressed by the devs. Documenting the solution would avoid more issues being opened.
The current mostly working solution is a hack that involves copying and modifying one of the theme's core files. This solution is not maintainable in the long term, especially in case this file is updated in the theme.
Finally, since there is a feature to extend the page content to the right, it is only logical that there should be a similar feature to extend the page content to the left.

Looks like a combination of #2453 and #2397

A lot of the difficulty with this revolves around the CSS used for layout. It's all float and width based, which is why things don't magically fill the empty space when a left or right sidebar is omitted.
Instead of more hacks and configs the proper solution would be to migrate the entire layout/grid to something modern like flexbox or ideally CSS grid. Flexbox probably would be the more straight forward path as the layout isn't that complicated.


Helios2Mqtt Crashes some seconds after  connection

I installed V0.1.8 and just tried to connect to helios kwl500. Connection to mqtt is established and also first values can be seen on mqtt broker side (status topic and connected item).
After few seconds helios2mqtt crashes, refer to added log information
2020-11-20 15:01:48.336 <info>  mqtt connected mqtt://<IP_ADDRESS>
(node:21026) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of undefined
    at /usr/lib/node_modules/helios2mqtt/helios.js:190:168
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:21026) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:21026) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Sorry for the late reply - This seems to be a problem with an unforseen response in helios2mqtt from your Helios. Could you please add the parameter "-v debug" to your cmdline, so we can see what exactly happes here?

Sorry for the late reply - This seems to be a problem with an unforseen response in helios2mqtt from your Helios. Could you please add the parameter "-v debug" to your cmdline, so we can see what exactly happes here?


Segmentation fault: 11

Hi, I have installed logomaker from pip. But whenever I import logomaker in my jupyter notebook, the kernel will die. And when I import logomaker in python command line, it outputs Segmentation fault: 11, and ends my process.
My python version is Python 3.7.4, the operating system is macOS Big Sur.
Thank you if you could take a look!

Hi, I think this issue may be specific to Big Sur and python 3.7 and not an issue with logomaker itself. Are you able to import matplotlib? Can you try importing logomaker in a different version of python, perhaps in a virtualenv? It will be possible to isolate the issue that way. Let me know.

Thank you, yes, I can import matplotlib in python 3.7. And seems python 3.7 is the issue. I successfully imported logomaker in python 3.9.


[1.2.0] insert historical data

Bug report
System info: [ influxdb_1.2.0, Ubuntu 14.04, 8GB RAM]
Steps to reproduce:

InfluxDB install

sudo dpkg -i influxdb_1.2.0_amd64.deb
sudo service influxdb start

Historical data to insertion - average temperature for each day from year 1775 to 2016

 wget http://www.deskriptiva.com/temperature.txt
head -n 4 temperature.txt
prg_weather t_avg=-7.0 -6153541064
prg_weather t_avg=-2.2 -6153454664
prg_weather t_avg=-1.0 -6153368264
prg_weather t_avg=0.1 -6153281864

wc temperature.txt
  88054<PHONE_NUMBER>853 temperature.txt

Insert

curl -i -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE historical_data"
time curl -i -XPOST 'http://localhost:8086/write?db=historical_data&precision=s' --data-binary @temperature.txt

...

HTTP/1.1 500 Internal Server Error
{"error":"timeout"}

...

influx
Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp <IP_ADDRESS>:8086: getsockopt: connection refused
Please check your connection settings and ensure 'influxd' is running.

Expected behavior: insertion 88054 points to DB
Actual behavior: Server Error and "sudo service influxdb restart" does not help

You'll need to alter the shard group duration of your retention policy if you are writing that far into the past.  By default, it would use 1w shards which would create about 44K shards with that time span.  I'd suggest increasing that to several years to reduce the number of shards you have.
For backfilling data, you may also need to lower snapshot write cold duration to avoid having all of your data held in cache for every shard:
[data]
cache-snapshot-write-cold-duration = "10s"


Time Based Releases [RFC]

Problem
Very long time between releases causes problems when known bugs has been fixes in upstream but new version has not been released on PyPI. Also planning of dependent projects is difficult because new versions on Flask-Admin are coming in unpredictable manners.
Proposal
Release in time based manners bug fix releases. New feature will get to the release only when it is well tested.
Repository structure

maint-1.X (maint-1.0, maint-1.1, ...) maintenance branches for bugfixes only
master latest development branch
pu (proposed updates) for experimental features that can be cherry-picked to master

Release 1.X.Y regularly - not later than few days/weeks after bugfix has been integrated.
New 1.X or W.X should come 2 times per year so project can rely on time when new feature arrives max. 6 months.

     +----------------+----------+----------------> master
                      |          |
     +-----------+----+----+-----+--------->  maint-1.1
                 |   1.1.0 |    1.1.1
     +-----------+---------+---------->  maint-1.0
                1.0.0     1.0.1

Bumping this one. I'm going to create organization, but it won't be strictly Flask-Admin related. I have few ideas for other projects too.
Now, I have to come up with a name and that's hardest part.

Just start with Flask-Admin as the name and change when/if you materialize those projects?

@mrjoes I can see that you created the Flask-Admin organization now. Considering how difficult it is to depend on versions not released to PyPI in your own packages I was wondering if you might be able to release a new version to PyPI?

@pawl Is there something special I should to do in order to include localizations to distributable package?

I can't think of anything that needs to be done differently from previous releases.

Just python setup.py sdist/bdist_wheel and make sure that all the needed files are still in the archive.

@mrjoes Anything stopping you from a new release? Would you like some assistance?


Review compiler support

Thanks for the feedback. Quite some confusion potential it seems. Is my new suggestion clearer now?

Yes, it's clearer now. Thanks!
bors r+

bors r+


Create Iceberg Table from pyarrow Schema with no IDs

Feature Request / Improvement
I see three ways a user would want to create an Iceberg table:

Completely manual - by specifying the schema, field by field
By inferring the schema from an existing strongly-typed file or pyarrow table
By copying the schema of an existing iceberg table (migration)

create_table function currently takes a pyiceberg.Schema as the input. The existing visitors support patterns (1) and (3), but not (2).
This is because the creation of a pyiceberg.Schema is only supported in the following two ways:

From a pyarrow schema with valid field-id metadata
using a NameMapping which have field-ids. Currently, the only way to create a NameMapping is by constructing it field-id by field-id, or by using a utility function on an existing Iceberg Schema.

Therefore, we need to update an existing Visitor, or create a new Visitor in order to support the generation of a pyiceberg.Schema from a pyarrow Schema with no IDs.
On https://github.com/apache/iceberg-python/pull/219 the following approaches have been discussed so far:

Update _ConvertToIceberg to create a pyiceberg.Schema from pyarrow schema by assigning "-1" field_ids and use _SetFreshIDs to assign ordered fresh IDs. This idea unfortunately does not work as _SetFreshIDs requires different IDs to track each column and assign new ones.
Create a new Visitor _CreateMappingFromPyArrowSchema that creates a name mapping from PyArrow schema and assigns fresh IDs if it does not have one. This is different from existing _CreateMapping visitor which is a pyiceberg Schema visitor.
Use a separate visitor _ConvertToIcebergWithFreshIds which assigns fresh IDs based on the order of the fields' appearance in the pyarrow schema.

When we are entertaining different ideas to reduce code duplication in the new visitor, we need to keep in mind that the task of assigning fresh IDs works best in a pre-order traversal order. This is how _SetFreshIDs works now. All the existing schema visitors discussed above that construct the NameMapping or pyiceberg Schema are done in post-order traversal order.

To add some more context. As also mentioned in the earlier conversation, I don't think assigning fresh IDs is safe: https://github.com/apache/iceberg-python/pull/219#discussion_r1457510803
On the Java side, this is also being deprecated: https://github.com/apache/iceberg/pull/9324/

Thank you for adding the context @Fokko :)
Just so that we make sure new readers aren’t confused, do you think it’s fair to say that we are talking about ‘assigning fresh IDs’ in two separate ways?

Auto assigning fresh IDs in column order when reading iceberg table files
Assigning fresh IDs for the purpose of new Iceberg table creation based on an arrow table that does not have field_ids

The discussions so far, and the PR above, have alluded to the fact that (1) above is dangerous and will not be supported in Python and Java. (2) however is necessary for applications to use PyIceberg in a similar way that Spark is being used. Spark Dataframes currently can be used to create new iceberg tables without field_id metadata.

What do you think of the following approach:

I think the problem here is that we don't have an API like in Spark where we can nicely hide things. I'm tempted to allow creating a table from a PyArrow table create_table_from_table(df: pa.Table), but that mixes in PyArrow into the main API, but refrains us from exposing these things to the user (which isn't super user friendly in general).

This would require:

We can add this to the Catalog, where we can generalize this for all the catalogs.
Can create a name mapping from a pa.Table, then we can use this name-mapping to assign new IDs on it. I think the outcome will be the same as the pre-order visitor, but we don't do it by position, but by name. We'll reuse the name-mapping that you already added 🙌

That sounds good @Fokko
I think having a _CreateMappingFromPyArrowSchma preorder visitor does a good job of separating out the two concerns above.

I think the outcome will be the same as the pre-order visitor, but we don’t do it by position, but by name.

I think this bit about not doing it by position is catching me a bit off guard because I’m not convinced that we can assign ids without relying on the position when generating the name mapping. Just to make sure we are on the same page, this new Visitor will:

Map field_ids from PyArrow Schema if the field_id exists
Have a Boolean flag to _assign_fresh_ids by ignoring existing field_ids (or an automatic fallback to assign ids if field_ids don’t exist) and assign field ids by position

And then, we will use the name mapping generated from the pyarrow schema to assign field ids by name and create a new Iceberg Schema.
Does that approach sound consistent with your current thought?

Thanks for summarizing the approaches and explanation on the concerns.

I’m not convinced that we can assign ids without relying on the position when generating the name mapping.

Same question as @syun64. My understanding is the _CreateMappingFromPyArrowSchma will be very similar to assign_fresh_schema_ids which incremently assigns new ids by position as we visit the given schema.
I have another related question. If we

create a name-mapping from pa.Table
use the name-mapping to generate a new iceberg schema
use the new iceberg schema to create the table.

what do we do with the name-mapping created in step 1 after the table is created? Do we just discard it or put it in schema.name-mapping.default? If the later, I think we need either to update the new_table_metadata to not assign fresh ids when a name-mapping present or update the _SetFreshIds to respect name-mapping if given. I would appreciate any thoughts on this matter!

what do we do with the name-mapping created in step 1 after the table is created? Do we just discard it or put it in schema.name-mapping.default? If the later, I think we need either to update the new_table_metadata to not assign fresh ids when a name-mapping present or update the _SetFreshIds to respect name-mapping if given. I would appreciate any thoughts on this matter!

Great question @HonahX my understanding is that the act of putting in a name mapping into schema.name-mapping.default isn't done automatically by any operation, and requires the user to actually insert the name mapping json as a table property into the iceberg table.
I think regardless of whether we create this visitor to create a name mapping (which in turn will be used to create an iceberg schema), or an iceberg schema directly, it will need have to have the ability to incrementally assign a new id by position. Because we are trying to create a new iceberg schema based on an arrow schema that does not have the field_id metadata.
Imagine we are trying to grab a 100 column parquet file from a vendor and create an Iceberg table based on it, and it doens't have PARQUET:FIELD_ID metadata on its columns. Currently, there's no way to create this iceberg table and ingest this data without manually coding and labelling each and every column using the Iceberg schema types to create an Iceberg schema.

Alright, I went to the source and talked with @danielcweeks and @rdblue. It looks like we made things more complicated than actually needed.
So when reading and writing Parquet, we need to make sure that the IDs are aligned properly. When we are working with runtime data (pa.Table's) then we match everything up based on names.
I also discussed with Dan about adding Arrow types to the create_table statement, and he liked the idea, where I was a bit reluctant. But thinking of it, I think it makes sense since it will allow us to create Iceberg tables from a dataframe:
catalog = load_catalog()
catalog.create_table('some.table', df=df)

And then:
# It will wire up the schema by name
tbl.overwrite(df)

# Should be quite easy with union by name:
tbl.append(df, merge_schema=True)

That makes sense @Fokko .
Just to make sure we are on the same page, does the following approach align with your thoughts?
We are proposing to update the create_table API to:
    def create_table(
        self,
        identifier: Union[str, Identifier],
        schema: Union[Schema, pa.sSchema],
        location: Optional[str] = None,
        partition_spec: PartitionSpec = UNPARTITIONED_PARTITION_SPEC,
        sort_order: SortOrder = UNSORTED_SORT_ORDER,
        properties: Properties = EMPTY_DICT,
    ) -> Table:
    ...
    if isinstance(schema, pa.Schema):
        schema = pre_order_visit_pyarrow(schema, _ConvertToIcebergWithFreshIds())
    ...
    # existing code

We will call the function like:
table: pa.Table
catalog = load_catalog()
catalog.create_table('some.table', schema=table.schema)

And use the previously proposed Visitor: https://github.com/syun64/iceberg-python/blob/preorder-fresh-schema/pyiceberg/io/pyarrow.py#L994 since new_table_metadata has to take field_ided Iceberg Schema as the input?

@syun64 Yes that sounds like a reasonable proposal to me. On thing to mention. We would also like to use PyIceberg without Arrow, and we can do this by making the type annotation lazy:
    def create_table(
        self,
        identifier: Union[str, Identifier],
        schema: Union[Schema, "pa.Schema"],
        location: Optional[str] = None,
        partition_spec: PartitionSpec = UNPARTITIONED_PARTITION_SPEC,
        sort_order: SortOrder = UNSORTED_SORT_ORDER,
        properties: Properties = EMPTY_DICT,
    ) -> Table:

Oh! That's very neat. Thank you for the suggestion :)


small but essential wording fixed

There were some significant translation updates in "newlayout" branch, please help us keep German translation up to date, here is what have changed compared to develop branch: https://www.evernote.com/shard/s9/sh/2d935ab8-5b6b-40c3-aff2-012c16dda03f/16fe31e2c152562f


Virtual module cannot express "export function x"

Current format only allows export var x = function equivalent.
In order to support export function x, we need to add an extra stage on initialization.
initialize(env, context) {
    function x() {}
    env.x = x
    // this runs when VirtualModuleRecord.[[InitializeEnvironment]]
    return () => {
        // this runs when VirtualModuleRecord.[[ExecuteModule]]
    }
}

The problem with 2 separate hooks they're not in the same lexical context.
const a = module {
    export function a()
    a()
}

Two separate hooks are not friendly to down-level compiling.
const a = {
    initialize(env) {
        function a() {}
        env.a = a
    },
    execute(env) {
        a() // Oops!
    }
}

By this form, it can naturally inherit the lexical context.
initialize(env, context) {
    function a() {}
    env.a = a
    // this runs when VirtualModuleRecord.[[InitializeEnvironment]]
    return () => {
        // this runs when VirtualModuleRecord.[[ExecuteModule]]
        a() // Fine!
    }
}

Would it make sense to have separate protocols for exec and init+exec?
I’m inclined to rename the existing initialize method (back) to execute given the distinctions revealed in this issue.

can't a transpiler just introduce a new unique variable? babel does that all over the place.

@devsnek To have separate initialize/execute methods? It doesn't work if they are called more than once, because they would use the same variable.


Retries argument not in use? - "ERROR: giving up after 0 retries"

Noticed this when trying to download This American Life episodes.
Although the help manual says that the default is 10, I've noticed that it errors out as "ERROR: giving up after 0 retries". And when I explicitly specify the retries arg, it still says 0.
$ youtube-dl --no-mtime --retries 9 --verbose "http://www.thisamericanlife.org/radio-archives/episode/542/wait-do-you-have-the-map"
[debug] System config: []
[debug] User config: [u'--no-mtime']
[debug] Command-line args: [u'--no-mtime', u'--retries', u'9', u'--verbose', u'http://www.thisamericanlife.org/radio-archives/episode/542/wait-do-you-have-the-map']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.08.09
[debug] Python version 2.7.5 - Darwin-13.4.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.6.2, ffprobe 2.6.2, rtmpdump 2.4
[debug] Proxy map: {}
[ThisAmericanLife] 542: Downloading webpage
[debug] Invoking downloader on u'http://stream.thisamericanlife.org/542/stream/542_64k.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 358
[download] Destination: 542 - Wait - Do You Have The Map-542.m4a
[download]  88.3% of ~31.39MiB at 58.72KiB/s ETA 01:21ERROR: giving up after 0 retries
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 60, in real_download
    data = self.ydl.urlopen(request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1860, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 448, in error
    return self._call_chain(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 531, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 504: Gateway Timeout 50001

This issue has been fixed and will be available in the next version. Thanks for the report.


feat(brillig_gen): Foreign call vectors [DO NOT MERGE]

Description
This is the initial PR for brillig vectors.
Problem*

Resolves
Summary*

Documentation

[ ] This PR requires documentation updates when merged.

[ ] I will submit a noir-lang/docs PR.

[ ] I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

[ ] I have tested the changes locally.
[ ] I have formatted the changes with Prettier and/or cargo fmt on default settings.

Taking this over as Maxim is out, closing this and moving other to point to master


Contracting snippets at the end of a file causes tabout and bugs the editor

Snippets like {"^>"→"⟳"}, aka contracting snippets cause Tab to act on the browser interface (and tab outside the editor) instead of eating it, which makes the editor pane go crazy (into some weird insert-mode, tuning off saving the document once bugged).
Currently investigating further...

Maybe it happens when cursor ends up outside the file, but app.vault.modify() works fine with that when I use Templater.
RangeError: Invalid change range 94 to 96 (in doc of length 95)
    at e (app.js:1:272982)
    at e (app.js:1:272725)
    at Function.t.of (app.js:1:273231)
    at SnippetManager.expandSnippets (plugin:obsidian-latex-suite:7783:47)
    at LatexSuitePlugin.runSnippets (plugin:obsidian-latex-suite:8177:43)
    at LatexSuitePlugin.handleKeydown (plugin:obsidian-latex-suite:8101:26)
    at Object.LatexSuitePlugin.onKeydown (plugin:obsidian-latex-suite:8086:28)
    at e.runCustomHandlers (app.js:1:376149)
    at HTMLDivElement.<anonymous> (app.js:1:374890)
ro @ app.js:1
e.runCustomHandlers @ app.js:1
(anonymous) @ app.js:1

Hi! Thanks for the report. I don't notice any issues with the snippet
{trigger: "^>", replacement: "⟳", options: "A"}

However, after removing the "auto" option so that the snippet has to be triggered with Tab, I find that pressing Tab to trigger the snippet does cause you to tab out of the editor, which is very strange. What do you mean by "contracting snippets"?
I'll look into the issue and your proposed solution when I have time!

I never use automatic snippets )
Feel like Tab is better than Ctrl+z

Fixed in 1.6.2, thanks for providing the solution!


Added missing strokeMiterLimit to SVG attributes

@pspeter3 @vsiao @RyanCavanaugh @jbrantly can anyone review this PR?

Seems legit to me

+1 from me

Can we confirm miterLimit vs miterlimit ? I don't see it in this list https://github.com/facebook/react/blob/ba81b60ad8e93b747be42a03b797065932c49c96/src/renderers/dom/shared/SVGDOMPropertyConfig.js#L55

@RyanCavanaugh Despite not being in that list, it's miterlimit based on the convention.

All DOM properties and attributes (including event handlers) should be camelCased to be consistent with standard JavaScript style.

And the actual SVG attribute is stroke-miterlimit.
I had the same thought before I +1'd so I looked it up :grin:

thanks all!


ImportError: cannot import name 'Mapping' from 'collections' (C:\Python310\lib\collections_init_.py)

Traceback (most recent call last):
  File "D:\CSE\Programs\Selenium\run.py", line 8, in <module>
    from PyInquirer import prompt, print_json
  File "C:\Users\soiko\.virtualenvs\Selenium-nB22m_OD\lib\site-packages\PyInquirer\__init__.py", line 6, in <module>
    from prompt_toolkit.token import Token
  File "C:\Users\soiko\.virtualenvs\Selenium-nB22m_OD\lib\site-packages\prompt_toolkit\__init__.py", line 16, in <module>
    from .interface import CommandLineInterface
  File "C:\Users\soiko\.virtualenvs\Selenium-nB22m_OD\lib\site-packages\prompt_toolkit\interface.py", line 19, in <module>
    from .application import Application, AbortAction
  File "C:\Users\soiko\.virtualenvs\Selenium-nB22m_OD\lib\site-packages\prompt_toolkit\application.py", line 8, in <module>
    from .key_binding.bindings.basic import load_basic_bindings
  File "C:\Users\soiko\.virtualenvs\Selenium-nB22m_OD\lib\site-packages\prompt_toolkit\key_binding\bindings\basic.py", line 9, in <module>
    from prompt_toolkit.renderer import HeightIsUnknownError
  File "C:\Users\soiko\.virtualenvs\Selenium-nB22m_OD\lib\site-packages\prompt_toolkit\renderer.py", line 11, in <module>
    from prompt_toolkit.styles import Style
  File "C:\Users\soiko\.virtualenvs\Selenium-nB22m_OD\lib\site-packages\prompt_toolkit\styles\__init__.py", line 8, in <module>
    from .from_dict import *
  File "C:\Users\soiko\.virtualenvs\Selenium-nB22m_OD\lib\site-packages\prompt_toolkit\styles\from_dict.py", line 9, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (C:\Python310\lib\collections\__init__.py)

Getting the same error

Traceback (most recent call last):
File "C:\Users\sulta\Desktop\mon\cli-test2.py", line 2, in
from PyInquirer import prompt, print_json
File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInquirer_init_.py", line 6, in
from prompt_toolkit.token import Token
File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit_init_.py", line 16, in
from .interface import CommandLineInterface
File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit\interface.py", line 19, in
from .application import Application, AbortAction
File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit\application.py", line 8, in
from .key_binding.bindings.basic import load_basic_bindings
File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit\key_binding\bindings\basic.py", line 9, in
from prompt_toolkit.renderer import HeightIsUnknownError
File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit\renderer.py", line 11, in
from prompt_toolkit.styles import Style
File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit\styles_init_.py", line 8, in
from .from_dict import *
File "C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\site-packages\prompt_toolkit\styles\from_dict.py", line 9, in
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (C:\Users\sulta\AppData\Local\Programs\Python\Python310\lib\collections_init_.py)

Getting the same error
Traceback (most recent call last):
File "d:\python-proj\test.py", line 2, in
from PyInquirer import prompt
File "D:\python\lib\site-packages\PyInquirer_init_.py", line 6, in
from prompt_toolkit.token import Token
File "D:\python\lib\site-packages\prompt_toolkit_init_.py", line 16, in
from .interface import CommandLineInterface
File "D:\python\lib\site-packages\prompt_toolkit\interface.py", line 19, in
from .application import Application, AbortAction
File "D:\python\lib\site-packages\prompt_toolkit\application.py", line 8, in
from .key_binding.bindings.basic import load_basic_bindings
File "D:\python\lib\site-packages\prompt_toolkit\key_binding\bindings\basic.py", line 9, in
from prompt_toolkit.renderer import HeightIsUnknownError
File "D:\python\lib\site-packages\prompt_toolkit\renderer.py", line 11, in
from prompt_toolkit.styles import Style
File "D:\python\lib\site-packages\prompt_toolkit\styles_init_.py", line 8, in
from .from_dict import *
File "D:\python\lib\site-packages\prompt_toolkit\styles\from_dict.py", line 9, in
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (D:\python\lib\collections_init_.py)

Temp. solution is to downgrade your python version to the correct one.

For Python 3.10.5, change line in file: ...\.venv\Lib\site-packages\prompt_toolkit\styles\from_dict.py
from:
from collections import Mapping to from collections.abc import Mapping.

Such modifications are meaningless, and it is impossible to manually modify each node during automated deployment

I completely agree with @minidarkmimi
It is not elegant or feasible in some cases to update site-packages and change the installed code to make it all work.
The latest commit on the Repo works and just needs to be updated on PyPi.
Workaround: Install from Github directly instead of PyPi.
In my case I added this directly in setup.py as a requirement for my own library.
'pyInquirer @ git+https://github.com/CITGuru/PyInquirer.git#7637373429bec66788650cda8091b7a6f12929ee'

Is there a release for this inbound yet? I just installed recently and still have the issue.

Bumping this. I am waiting for this fix as well.


Make scrutinizer pass

I can't tell what's going wrong. If you check the history of my circleci pull request you'll see it did pass once... but goodness knows why.
It appears to be failing to consolidate the results of the various steps.

@g105b I've lost the plot.  Is it passing on scrutinizer now?  I can't tell what's going on any more!

Suggest closing this - the scrutinizer checks are passing as-of PR #19, though I have no idea what's changed.

Looking at it now, it's a really odd one. We may have found a bug with scrutinizer here, but seeing as it's passing now there's no need to stress about it.


feat: test harness

We need a proper test harness setup.

I think with #30 and #69 this can be considered done!


[Question] v210 support

Hi,
Seems like this question has not been asked yet, I'd like to know if zimg supports V210 buffer packing format as inpu and if there is some related example code somewhere that could demonstrate this.
Regards

The API only accepts planar inputs. You can convert packed to planar on-the-fly to avoid a frame copy (see: api_example.cpp for a RGB example).


Feature: password expiration

At this time when you are not sure if some company had leaked user information is recommended to change the password after some time. Is there a possibility to add a password expiration feater?
In the file with a password will be the timestamp of the file change. If you use the file to invoke a password gopass looks at the timestamp and says if is after expiration. I know - there is a possibility to use the time of change file on the FS. But it can be changed during the copying process of the file.
It will be nice if gopass will replace the password but I think, it's not necessary. And better is to do it manually.

gopass audit will already emit a warning about old passwords: https://github.com/gopasspw/gopass/blob/master/internal/audit/audit.go#L183
Not exactly what you want, but it goes somewhere in the right direction.
Also luckily for this we don't even need custom metadata since we usually can use the git history.
Beyond that I don't see how this could be made much more useful. Sure, you could add some more flexiblity but that comes at a pretty high maintenance cost. So I'd rather suggest to use gopass audit.

@dominikschulz Thank you for your answer. I tried gopass audit and it works how I imagine. That's great. I have a few questions about it:

Is there a possibility to set the time of expiration in the command line? Now is hard set to 90 days.
How does work filter? In the gopass repository, I have also binary files and would like to skip them. I.e. according to a name with grep.
Can I run the audit process just for checking the age of passwords?

No, but I think we could add support for that.
It's path prefix. What you want isn't easily possible. Not sure if this is something I'd like to add.
No, but I think we could add support for that, too.


By default, require that the iss uses HTTPS

Bump @Vaibhavdixit02

Oops sorry, I had your PRs open in the browser but forgot to give the reviews!


Add TLS client certificate to SERVER_PARAMS

related to #324
Attempt to extract a client certificate from the request and add it to server params as SSL_CLIENT_CERT (as per apache).
Allows Middleware to get at the client cert, which I need in my instance for mutual TLS based auth.
Needs verify_peer and capture_peer_cert to be enabled as ssl options e.g.
$socket = new React\Socket\SecureServer(     $socket,     $loop,     [         'local_cert' => $localCert,         'local_pk' => $localKey,         'allow_self_signed' => true,         'verify_peer' => true,         'capture_peer_cert' => true,     ] );

@clue Happy to keep things up to the projects standards.
I've just realised while starting to update the tests that I'm accessing the stream property of the React\Socket\Connection object, which is marked as @internal.
Would its use here be counted as a valid or invalid internal use of the property? If this is an invalid access I'm not sure what changes to suggest to expose the stream in a way that suits the project.

Any updates on this feature?
@philrennie The @internal attributes discourages usages of the reference outside of the package. Usage of the stream property inside react/http is therefore permitted.

@clue

Additionally, the openssl_x509_export() function is not available on all platforms, so this should be checked first.

The function is always available when the OpenSSL extension is loaded. And the OpenSSL extension must be loaded in order to use TLS (stream_socket_enable_crypto calls to ext-openssl). I'd argue that no check is needed.

Strangely enough the project that required this went dormant just after I asked, and has just come back round again last week.
I'm now trying to add some supporting tests for this, although for starters I'm having trouble getting parts of the existing test suite to run on my machine. Once I've gotten things running and the tests expanded I'll update the PR.

I'm now trying to add some supporting tests for this, although for starters I'm having trouble getting parts of the existing test suite to run on my machine. Once I've gotten things running and the tests expanded I'll update the PR.

If there is anyway we can help with that let us know here or on Gitter

I've tried this code out, and there is an error with
$sslOptions = stream_context_get_options($conn->stream);
inside the parseRequest function because $conn hasn't been passed in.
What is the correct way of accessing $conn from inside parseRequest?

The proposed solution just adds the peer_certificate to $serverParams
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----

When Apache adds SSL Options to $_SERVER, rather than the client certificate, it posts all data of the certificate
[SSL_TLS_SNI], [SSL_SERVER_S_DN_CN], [SSL_SERVER_I_DN_C], [SSL_SERVER_I_DN_O],
[SSL_SERVER_I_DN_CN], [SSL_CLIENT_S_DN_C], [SSL_CLIENT_S_DN_ST], [SSL_CLIENT_S_DN_L],
[SSL_CLIENT_S_DN_O], [SSL_CLIENT_S_DN_OU], [SSL_CLIENT_S_DN_CN], [SSL_CLIENT_S_DN_Email],
[SSL_CLIENT_I_DN_C], [SSL_CLIENT_I_DN_ST], [SSL_CLIENT_I_DN_L], [SSL_CLIENT_I_DN_O],
[SSL_CLIENT_I_DN_OU], [SSL_CLIENT_I_DN_CN], [SSL_CLIENT_I_DN_Email], [SSL_SERVER_SAN_DNS_0],
[SSL_VERSION_INTERFACE], [SSL_VERSION_LIBRARY], [SSL_PROTOCOL], [SSL_SECURE_RENEG],
[SSL_COMPRESS_METHOD], [SSL_CIPHER], [SSL_CIPHER_EXPORT], [SSL_CIPHER_USEKEYSIZE],
[SSL_CIPHER_ALGKEYSIZE], [SSL_CLIENT_VERIFY], [SSL_CLIENT_M_VERSION], [SSL_CLIENT_M_SERIAL],
[SSL_CLIENT_V_START], [SSL_CLIENT_V_END], [SSL_CLIENT_V_REMAIN], [SSL_CLIENT_S_DN], [SSL_CLIENT_I_DN],
[SSL_CLIENT_A_KEY], [SSL_CLIENT_A_SIG], [SSL_CLIENT_CERT_RFC4523_CEA], [SSL_SERVER_M_VERSION],
[SSL_SERVER_M_SERIAL], [SSL_SERVER_V_START], [SSL_SERVER_V_END], [SSL_SERVER_S_DN],
[SSL_SERVER_I_DN], [SSL_SERVER_A_KEY], [SSL_SERVER_A_SIG], [SSL_SESSION_ID], [SSL_SESSION_RESUMED]

The certificate data can be accessed with $cert_array = (openssl_x509_parse($cert)); and added to $serverParams
So there's the choice of just having the certificate or the certificate's data in an array.  What is the better approach?

It seems like this pull request is open for quite a while now and didn't receive any updates since. Last comment is over a year old and I want to avoid pull requests laying around for too long without any further communication, so I'd suggest we close this for now. If this topic is still relevant and needs some further investigation, we can always reopen it in the future and take another look 👍
@clue, @WyriHaximus what do you think?

I've recently been using nginx instead of apache for some projects, and the client ssl certificate is passed through a header rather than server variables.  For that reason, I don't think a tls client certificates should be handled by this library.  It should be handled separately.
eg, in nginx (setup as a proxy) I add the ssl client certifcate to a header:
 proxy_set_header X-SSL-CERT $ssl_client_escaped_cert;

so I can then access the certificate from reactphp:
$data['ssl_cert'] = urldecode($request->getHeaderLine('X-SSL-CERT'));

I've recently been using nginx instead of apache for some projects, and the client ssl certificate is passed through a header rather than server variables. For that reason, I don't think a tls client certificates should be handled by this library. It should be handled separately.
eg, in nginx (setup as a proxy) I add the ssl client certifcate to a header:
 proxy_set_header X-SSL-CERT $ssl_client_escaped_cert;

so I can then access the certificate from reactphp:
$data['ssl_cert'] = urldecode($request->getHeaderLine('X-SSL-CERT'));

@michaelphipps Using a reverse proxy in front for TLS termination is definitely a good idea and I agree using HTTP headers to transport this information should cover this for most use cases. :+1:

It seems like this pull request is open for quite a while now and didn't receive any updates since. Last comment is over a year old and I want to avoid pull requests laying around for too long without any further communication, so I'd suggest we close this for now. If this topic is still relevant and needs some further investigation, we can always reopen it in the future and take another look +1
@clue, @WyriHaximus what do you think?

@SimonFrings Agreed! I think this is an interesting feature and I'd love to look into this again in the future, but I agree it's unfortunate this hasn't received any input in a while and should be closed for now.
Please come back with more details if this is still relevant and we can always reopen this! :+1:


[backport] Fix PrintHook fails if grad is None

Backport of #5333

jenkins, test this please.

Jenkins CI test (for commit 21009c5bd37dd3c1ef1451f1543aafdb692fa411, target branch v4) succeeded!

LGTM!


RawKeyboardListener not working

The onKey function is never triggered.
Flutter Channel beta, v0.8.2
FocusNode focusNode = FocusNode();
TextEditingController controller = TextEditingController();

build function:
RawKeyboardListener(
  focusNode: focusNode,
  onKey: (key) {
    print('Test $key');
  },
  child: TextField(
    focusNode: focusNode,
    controller: controller,
  ),
);

Should be the same constellation as in Flutter RawKeyboardListener listening twice?, but for me it's never triggered.

Might be worth trying the new dev channel. I'm not aware of related changes though.

I just tried on  channel beta v0.11.9 and it still doesn't work.
I noticed when keyboard is hidden the event is triggered twice as in Flutter RawKeyboardListener listening twice?, but when keyboard is shown the event is never triggered.

Is there any update on this issue?

Please upvote it initial comment to raise priority.

`✓] Flutter (Channel master, v1.1.5-pre.38, on Mac OS X 10.13.6 17G3025, locale en-AR)
• Flutter version 1.1.5-pre.38 at /Users/riterrani/flutter
• Framework revision b9f9e384cb (2 days ago), 2019-01-01 11:47:29 -0500
• Engine revision b1a9a6e794
• Dart version 2.1.1 (build 2.1.1-dev.0.1 88e6fe0f67)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/riterrani/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/riterrani/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
• ios-deploy 1.9.4
• CocoaPods version 1.5.2
[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 31.1.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[✓] Connected device (1 available)
• Mi A2 • 2c1ef95 • android-arm64 • Android 8.1.0 (API 27)
• No issues found!
`

Please try again with the latest stable build, and reopen this if not fixed. RawKeyboardListener was changed quite a bit by #27627, and it definitely works with backspace key now.  See the example in LogicalKeyboardKey, or the raw_keyboard manual test for usage.

I'm now on Channel stable, v1.2.1 and it's still not working for me 😞
Prints are never shown..
onKey: (RawKeyEvent event) {
  print('GOT AN EVENT! $event');
  if (event.logicalKey == LogicalKeyboardKey.backspace) {
    print('Pressed the "backspace" key!');
  }
}

flutter doctor -v
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.3 18D109, locale de-CH)
    • Flutter version 1.2.1 at /Users/defuns/Development/Tools/flutter
    • Framework revision 8661d8aecd (4 weeks ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/defuns/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/defuns/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/defuns/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 33.3.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] VS Code (version 1.32.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.24.0

[✓] Connected device (1 available)
    • Philippe • 00008020-000A615C11E2002E • ios • iOS 12.1.4

• No issues found!

Reopening to investigate further

Reopening to investigate further

@YAPPDEF, can you give me a more complete example of how it is failing for you?
The code in the comment above does print keycode 67 (which is backspace) when I hit backspace.
Note that the RawKeyboardListener is only intended for physical keyboard events, like those on a desktop, or a phone with a bluetooth keyboard attached, not for events from a soft keyboard.

@gspencergoog ok, then it's my fault with the LocicalKeyboardKey. I'm not using a physical keyboard.
My situation: I'm testing on a iOS device (real). I want to get notified, whenever a user presses a key (keyboard on the device). Currently it only matters if he presses the backspace.
I'd expect that any keyboard activity is printed with the above statement (not the phsyical ones 😛). For my case, nothing is triggered/printed when I wrap my Textfield with a RawKeyboardListener.
Code snippet example:
RawKeyboardListener(
  focusNode: focusNodes[i],
  onKey: (RawKeyEvent event) => print('GOT AN EVENT! $event'),
  child: TextField(
    key: Key('PinInput_$i'),
    controller: controllers[i],
    focusNode: focusNodes[i],
    ...
  ),
);

I just checked the documentation about RawKeyboardListener. Sorry that I didn't read that in the first place. I was just happy to finally find something to listen to keyboard events.
So it means there is NO possibility to listen to keyboard events on a soft keyboard on the device?
I also checked Stackoverflow, but there are only solutions for checking if the keyboard is present or not.
Can you please help me how I can achieve this without having to build a custom keyboard?
I mean there must be a possibility to react to keyboard events?

Sorry, if there were a mechanism for this, we would have included it in connecting up the keyboard events.
Soft keyboards are really not keyboards at all: they're input method editors: they edit a string, and then return the string to the application.  Since backspace is an editing control character, it's not going to appear in a string coming from a soft keyboard, and since they use touch events to perform the editing, there aren't any "key" events to be had.
You might also take a look at this stack overflow answer about Android key events.

Yes, it really is..
We want to build a pin-widget. But without the possibility to check for backspace events it's really inconvenient to use it.
Would it be possible to return the onChange event as well even if the value is the same as before (nothing was entered and then back was pressed). Then we could listen to those events and compare the previous value.
It also could be an additional property to also get changes like that?

I'm facing this issue and have tried all possible tricks but none including this (Why this plugin get high rate?). But none of them working. Any latest update so far?

Hello, can this work for detecting the physical power button press on the phone? I need to detect a double click of the physical power button.

No, this won't detect the power button: it's for events coming from hardware keyboards, and the power button doesn't produce a key event.

How to do it then? I need to detect double click of power button even when the app is in background.

The power button on my phone is used for taking pictures and screen shots of the phone, so then it must be able to be detected in software.

zoechi's example code is not running now. :(
Error message is,
: failed assertion: line 706 pos 12: 'child != this': Tried to make a child into a parent of itself
After some googling,
This error already is reported to the issue #37353
Anybody know workaround for it?
:-(

when i use the RawKeyboardListener on release mode, it has no effects,,when run in ios, it never perform whatever debug or run

@JiweiMaster That's because Flutter doesn't yet support hardware keyboard events on iOS. Please "Thumbs up" https://github.com/flutter/flutter/issues/31945 if this is something important to you.

@JiweiMaster That's because Flutter doesn't yet support hardware keyboard events on iOS. Please "Thumbs up" #31945 if this is something important to you.

it doesnt work on release mode on android either, its working on debug mode though...

@JiweiMaster That's because Flutter doesn't yet support hardware keyboard events on iOS. Please "Thumbs up" #31945 if this is something important to you.

it doesnt work on release mode on android either, its working on debug mode though...

I am seeing the same. Works in debug mode on Chromebook, but when I distribute the app via the Store the Key events don't get triggered. This is really a showstopper for my app on Chromebooks...

@JiweiMaster That's because Flutter doesn't yet support hardware keyboard events on iOS. Please "Thumbs up" #31945 if this is something important to you.

it doesnt work on release mode on android either, its working on debug mode though...

I am seeing the same. Works in debug mode on Chromebook, but when I distribute the app via the Store the Key events don't get triggered. This is really a showstopper for my app on Chromebooks...

got it working with keyid, just print each key and map it like the example below...
`  bool _onKeyPressGridView(FocusNode node, RawKeyEvent event) {
String keypressed = event.logicalKey.debugName;
int keyCode = event.logicalKey.keyId;
if(event is RawKeyDownEvent) {

  if(keypressed == "Select" || keyCode ==<PHONE_NUMBER>){
  }

}
}`


Removing custom tokens, direct deposits

Am I missing something obvious or is there no way to remove a custom token once has been added?
I.e. right now I have Cosmos Token and Cardano Token under BNB Smart Chain but I don't see a way to remove them.
Furthermore, said tokens do not have their own address in my wallet and I guess I cannot make a direct deposit of ATOM or ADA.
Does that mean they actually remain as BNBs but "look" like Cosmos and Cardano?
(I realise this is not strictly an enkrypt question)

@emanuele3d Talk to Cardano Support on the Cardano Live Support so that your issue can be looked into.

Given that two very separate tokes (ATOM and ADA) have the same problem, wouldn't this an enkrypt issue?

have you contacted the live support?

Cardano and Cosmos not currently supported in Enkrypt, however we have plans to add them in the near future
We will add remove custom token feature as well

Uciekam m do pracy wybaczcie już spóźniony jestem

Thank you


Bug report: selfcontrol

(Remember to run brew update; brew cleanup; brew cask cleanup before reporting your issue. It usually fixes things!)
Description of issue
Can't install 'selfcontrol' cask.
Output of brew cask <command> --verbose
Error: Cask 'selfcontrol' definition is invalid: Bad header line: parse failed```

### Output of `brew doctor`

Warning: You have external commands with conflicting names.
Found command brew-cask in following places:
/usr/local/bin/brew-cask
/usr/local/Library/Taps/caskroom/homebrew-cask/cmd/brew-cask.rb```
Output of brew cask doctor
==> OS X Release:
10.11
==> OS X Release with Patchlevel:
10.11.2
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p645
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
Homebrew 0.9.5 (git revision 1e066; last commit 2016-01-12)
==> Homebrew Executable Path:
/usr/local/bin/brew
==> Homebrew Cellar Path:
/usr/local/Cellar
==> Homebrew Repository Path:
/usr/local
==> Homebrew Origin:
https://github.com/Homebrew/homebrew.git
==> Homebrew-cask Version:
0.58.0
==> Homebrew-cask Install Location:
/usr/local/Cellar/brew-cask/0.58.0
==> Homebrew-cask Staging Location:
/opt/homebrew-cask/Caskroom
==> Homebrew-cask Cached Downloads:
/Library/Caches/Homebrew
/Library/Caches/Homebrew/Casks
0 files
0.00 megs
==> Homebrew-cask Default Tap Path:
/usr/local/Library/Taps/caskroom/homebrew-cask
==> Homebrew-cask Alternate Cask Taps:
<NONE>
==> Homebrew-cask Default Tap Cask Count:
2940
==> Contents of $LOAD_PATH:
/usr/local/Cellar/brew-cask/0.58.0/rubylib
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin15
/Library/Ruby/Site/2.0.0/universal-darwin15
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15
==> Contents of $RUBYLIB Environment Variable:
<NONE>
==> Contents of $RUBYOPT Environment Variable:
<NONE>
==> Contents of $RUBYPATH Environment Variable:
<NONE>
==> Contents of $RBENV_VERSION Environment Variable:
<NONE>
==> Contents of $CHRUBY_VERSION Environment Variable:
<NONE>
==> Contents of $GEM_HOME Environment Variable:
<NONE>
==> Contents of $GEM_PATH Environment Variable:
<NONE>
==> Contents of $BUNDLE_PATH Environment Variable:
<NONE>
==> Contents of $PATH Environment Variable:
PATH="/Users/steve/Dropbox/bin:/usr/texbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/Library/Taps/caskroom/homebrew-cask/cmd:/usr/local/Library/ENV/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/bin/bash"
==> Contents of Locale Environment Variables:
LANG="en_US.UTF-8"
==> Running As Privileged User:
No

This error is not a bug, it's caused by an update to how homebrew-cask works. Details can be found here.
To fix the issue, please run:
brew uninstall --force brew-cask; brew update

If you are still having problems, open an issue with the appropriate template


Metadata values disappearing when xpath is used in multiple areas, but only displayed once

With the following setup, if I select A and click 'save and continue', the value is no longer selected.
While intuitively this should work, there is a warning in the admin console when referencing the same metadata target from different pages.  See if there is a way to fix this, or if it's 'just the way oEQ works'.
Page 1
  Radio Button Group 1
    A - A
    B - B
Page 2 (with a scriptlet of `return false;`)
  Radio Button Group 2
    B - B
    C - C
    D - D

Expected behavior
The value A should stay selected.
Environment

OpenEquella Version: 2020.1.0-Alpha
OS: Linux
Browser Firefox

@cbeach47 Nelson has unsuccessfully tried to replicate this in versions earlier than 2020.1 (we don't have access yet).

Hi @cathfitz , 2020.1.0-RC should be available within the next 24 hrs, however, I didn't confirm on a earlier version.  I'll put that on my list to see if I confirm Nelson's finding.

After further research, it breaks best practice to reuse metadata paths across pages, so while it may work in some cases, it's not recommended.


Build integrations builder image

Publish an image for building custom integration python wheels.

@seqsense/cloud_backend please take a look


Choose another app isn't working.

Description
When I try to open any media file using any other app (to select vlc or any other), it doesn't open up the preferences tab at all.

Steps To Reproduce

Right-click on any media file.
Select the OPEN WITH option.
Select CHOOSE ANOTHER APP.

Steps to fix
It should open up a list of a supported apps to select from. For e.g., the screenshot below.

Files Version
<IP_ADDRESS>
Windows Version
Windows 11 22H2 22621.755
Relevant Assets/Logs

You will need to upload the logs files directly to GitHub. You can get them in files settings > about > open log folder.

debug.log
debug_fulltrust.log
I got two logs, check, please.

This is specific to older builds of Windows and should be working properly on the newest version of Windows 11.

Not working bro, my windows 11 is 22621.819.

Good day everyone,
I'm too am having the same problem with "Choose Another App" not working.
To correct the issue I downloaded the windows 11 image and reinstalled it (pre 22H2) (keeping all apps and settings).  When windows 11 came up, "Choose Another App" worked fine.
I then ran system security updates, restarted and again all worked fine.
*However. when I re-plied 22H2 sadly the problem returned.   My windows ver is 10.0.22621 Build 22621.   Thank you in advance to anyone who can shed some light on this.  : )
TJ

Had the same problem with "Choose Another App" for MKV files. Didn't test other types of media files. Not reproducible with Excel, doc, or other type of files.
Had to go to settings and chose the default apps to change app.
Windows 11
Version 10.0.22621
Build 22621

I have same problem I bought new PC with Win 11 Home with latest updates and its not working at all with any files. I cant even change it in settings or anywhere else. Not even in Properties. HOW TO SOLVE IT??

Do you have another program that can open it the file?

Yes sir. For example for video files I have also VLC player and MPC-HC player. Im trying to google solution whole day and I cant find anything..

Does it work in Windows File Explorer?

No it doesnt work.

Then it will be a Windows issue and not related to Files. No idea what could be the issue.

Yes I know its Windows problem but I dont know how to solve it..


Error: Command failed: convert-im6.q16hdri: width or height exceeds limit

Thanks for this wonderful and easy to use library.
I get the error below when trying to merge 35 images vertically:
Error: Command failed: convert-im6.q16hdri: width or height exceeds limit
Each image is exactly 510px x 510px.
Ubuntu Linux. Node 22. Core i7 with 40GB ram.

Thanks.
I found the solution here: https://stackoverflow.com/questions/77578848/imagemagick-throws-width-or-height-exceeds-when-converting-svg-to-png-with-ver


feat: add a hotkey for toggling captions: c

Adds a c hotkey to toggle captions.
This uses method delegation to the MediaCaptionsButton's handleClick method because there's a lot of code there.
Needs a quick addition to docs still, but also, due to the recent media-gestures-receiver change, the player doesn't get focus when click on the video element and thus keyboard shortcuts don't work there. Though, might want a fix for that separately from this.

Opened an issue for the issue: https://github.com/muxinc/media-chrome/issues/309


RFE: Expose the isolate wireless option in luci

At present, Luci doesn't seem to show an option to set the configuration setting "isolate" for wireless networks. For example, when setting up a guest wireless network, it's often helpful to prevent devices on that network from communicating with each other. Such an option is available in /etc/config/wireless, but doesn't seem to be exposed in luci.

@jonathanunderwood I think this is something many people have wanted to see in the Luci interface for some time. Have you looked into this enough to determine if there are any technical or implementation caveats?

The "isolate" option has been added with #1140, it's part of trunk & current release 17.01.

Wow, Excellent. Many thanks for the work on this.

@dibdot Could you please double-check?
I can see that this same patch has not been applied to the lede-17.01 branch, and the "isolate" option is still missing under the hwtype == "mac80211" UI definitions.
Hopefully just an oversight? Can this low-risk change be back-ported then?

Apologize, it was too early in the morning ... it's only implemented for atheros/broadcom in 17.01 and not for mac80211. So please take a current snapshot or wait for the next stable release 18.x which will be probably branched in april/may.

Ah, no problem, I just got excited thinking this was done! Would you object to my testing the change on lede-17.01 and making a back-port PR?  Thanks...


Exclude Utility Meter Sensors

Checklist

[X] I have filled out the template to the best of my ability.
[X] This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
[X] This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.
I've created a Powercalc custom group in the GUI and selected an area.
All non-powercalc energy sensors are included in the calculation, including all  Utility Meters for tracking daily consumption. The Utility Meter sensors must not be included. It leads to multiple tracking of the energy.
Describe the solution you'd like
Perfect would be an automatic exclusion based on the integration type of the energy sensor. I can't imagine a case where this should be included.
Alternative would be an Integration filter.
Describe alternatives you've considered

I've tried to use the wildcard filter to exclude entities with daily, weekly, etc. Unfortunately the replacements in the pattern are making this very hard (* becomes .*) to write a proper negative look ahead regex
Setting the area of the Utility Meter Sensor to a different one. Also does not work, because the area of the assigned device is checked as fallback.

Additional context
none

Thank you for raising this issue.
Fixed with #2793, will be in upcoming release.

Thanks for the quick fix!
Unfortunately that is not solving it completely:
a) I have multiple Shellys in an area. I've used Powercalc to add Virtual Power Sensors for all Shellys to track their consumption with the option to create daily utility meters enabled. Those are still included after the fix.
b) I have some old TP Link HS110 smart power plugs with metering. The TP Link integration creates sensors for daily and monthly tracking. Those are also included in the area sum. I tried to disable the entities, but they are still included.
While I think a) is solvable in a generic way, b) is a very generic problem and depending on the individual setup.
Maybe ignoring disabled entities would make sense anyway, but if I would have to implement this, I would most likely aim for exclusions in the filter and a label filter, so that I could say, exclude sensors mit label "powercalc_exclude".
Maybe you have a better idea.

It doesn't make sense to add disabled entities when using include, so I have fixed that now: #2803
I will have a look at a) next and also add the label filter (think it's a good idea to have flexibility that way to control the exclusion of individual sensors)

a) should be fixed with #2804
Label support implemented with #2805
See updated docs how to use: https://docs.powercalc.nl/sensor-types/group/include-entities/.
Unfortunately HACS does not support installing master branch anymore.
You can download ZIP using this url: https://github.com/bramstroker/homeassistant-powercalc/archive/refs/heads/master.zip
And then replace custom_components/powercalc with the sub directory custom_components/powercalc of the ZIP.
Restart, and it will make you run on the latest version containing all the improvements.
Please let me know how it goes?

@stefankleff Where you able to test already?

I've installed it and the first impression is awesome. Thank you!
Due to Christmas, I don't have time to have a detailed look right now.

I've installed it and the first impression is awesome. Thank you! Due to Christmas, I don't have time to have a detailed look right now.

Perfect, let me know how it goes.
And wish you nice holidays.


[AMR Heatmap] Add realtime metadata update

Description
Updates the heatmap in realtime when sample metadata is edited in the SampleDetailsMode sidebar.
Tests

No server side code changed
For client side, go to Discovery View, select some samples and make an AMR heatmap. Click on a sample name to open up the sample details sidebar. Edit a metadata field and watch the magic happen.

Lifted the state from AMRHeatmapVis to AMRHeatmapView to solve the problem.