Build breaking with unit test issues

The following tests are not passing:
HealthCheckStatusEmailerTest:

[ ] run_WithoutFailuresSendEmail
[ ] run_WithFailuresSendEmail
[ ] run_WithFailuresSendEmail_2
[ ] throttledExecution

CaffeineMemHttpCacheStoreImplTest:

[ ] test_addCacheData

MemHttpCacheStoreImplTest:

[ ] test_addCacheData

EnsureOakIndexJobHandlerTest:

[ ] Exception in setup method affecting all tests

EnsureOakIndexManagerImplTest:

[ ] testWithIndexRegistrations

AemEnvironmentIndicatorFilterTest:

[ ] testAcceptForReferrers
[ ] testFiltering
[ ] testAllowedWcmMode
[ ] testAcceptForXRequestedWithHeader
[ ] testAcceptForMethod

ComponentErrorHandlerImplTest:

[ ] testAccepts_suppressResourceTypes

CQIncludePropertyNamespaceServletTest:

[ ] testNamePropertyUpdater_MultiLevel
[ ] testNamePropertyUpdater_PropertyNames

On my local machine building master works totally fine
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00)
Maven home: /usr/local/Cellar/maven/3.6.0/libexec
Java version: 1.8.0_201, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre
Default locale: en_DE, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.3", arch: "x86_64", family: "mac"

The file target/classes/OSGI-INF/com.adobe.acs.commons.oak.impl.EnsureOakIndex.xml looks like this for me
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="com.adobe.acs.commons.oak.impl.EnsureOakIndex" configuration-policy="require" activate="activate">
  <property name="webconsole.configurationFactory.nameHint" type="String" value="Definitions: {ensure-definitions.path}, Indexes: {oak-indexes.path}"/>
  <service>
    <provide interface="com.adobe.acs.commons.oak.impl.AppliableEnsureOakIndex"/>
  </service>
  <reference name="checksumGenerator" interface="com.adobe.acs.commons.analysis.jcrchecksum.ChecksumGenerator" field="checksumGenerator"/>
  <reference name="resourceResolverFactory" interface="org.apache.sling.api.resource.ResourceResolverFactory" field="resourceResolverFactory"/>
  <reference name="scheduler" interface="org.apache.sling.commons.scheduler.Scheduler" field="scheduler"/>
  <implementation class="com.adobe.acs.commons.oak.impl.EnsureOakIndex"/>
</scr:component>

@joerghoh Obviously in your case the XML file only contains the property directly added via the @Component annotation (https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/20bb419ac832a8be675593cf4b623df8b3b769bd/bundle/src/main/java/com/adobe/acs/commons/oak/impl/EnsureOakIndex.java#L49), but not the ones being added indirectly via the component property type. Both are supposed to be merged by bnd! This seems like a bug in either bnd or the underlying maven-bundle-plugin. For sure the properties are only supposed to be read from SCR metadata (the metatype does not matter here at all, so OSGi Mock is correct).
Do you see any output from maven-bundle-plugin which would explain that behaviour?

I had a closer look at the travis log files and observed the following in https://travis-ci.org/Adobe-Consulting-Services/acs-aem-commons/jobs/481521491#L3361.
It does not execute maven-bundle-plugin prior to executing the tests, i.e. generate-scr-metadata-for-unittests is missing.

I assume that something is wrong with the classpath for bnd in travis during maven-bundle-plugin:4.1.0:manifest (generate-scr-metadata-for-unittests) (https://travis-ci.org/Adobe-Consulting-Services/acs-aem-commons/jobs/487222463#L3808). It emits the following warnings
[INFO] Unable to determine whether the meta annotation org.osgi.service.component.annotations.ComponentPropertyType applied to type com.adobe.acs.commons.audit_log_search.impl.AuditLogSearchServlet provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation org.checkerframework.checker.nullness.qual.Nullable applied to type com.google.common.base.Absent provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation com.google.errorprone.annotations.CanIgnoreReturnValue applied to type com.google.common.base.AbstractIterator provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation com.google.errorprone.annotations.concurrent.LazyInit applied to type com.google.common.base.Converter provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation org.checkerframework.checker.nullness.qual.MonotonicNonNull applied to type com.google.common.base.Converter provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation com.google.errorprone.annotations.ForOverride applied to type com.google.common.base.Converter provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation com.google.errorprone.annotations.CheckReturnValue applied to type com.google.common.base.package-info provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation com.google.errorprone.annotations.CompatibleWith applied to type com.google.common.cache.Cache provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation com.google.j2objc.annotations.Weak applied to type com.google.common.cache.LocalCache$AbstractCacheSet provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation com.google.errorprone.annotations.concurrent.GuardedBy applied to type com.google.common.cache.LocalCache$Segment provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation com.google.j2objc.annotations.RetainedWith applied to type com.google.common.collect.AbstractBiMap provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation com.google.errorprone.annotations.Immutable applied to type com.google.common.collect.DenseImmutableTable provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation com.google.errorprone.annotations.MustBeClosed applied to type com.google.common.io.CharSource provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation com.google.j2objc.annotations.ReflectionSupport applied to type com.google.common.util.concurrent.AbstractFuture provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[INFO] Unable to determine whether the meta annotation com.google.errorprone.annotations.OverridingMethodsMustInvokeSuper applied to type com.google.common.util.concurrent.AggregateFuture$RunningState provides bundle annotations as it is not on the project build path. If this annotation does provide bundle annotations then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Component applied to type com.day.cq.wcm.core.contentfinder.ContentFinderListInfoProviderHelper is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Reference applied to type com.day.cq.wcm.core.contentfinder.ContentFinderListInfoProviderHelper is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Reference applied to type com.day.cq.commons.servlets.AbstractPredicateServlet is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Component applied to type com.day.cq.commons.servlets.AbstractPredicateServlet is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Activate applied to type com.adobe.cq.dialogconversion.AbstractDialogRewriteRule is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Component applied to type com.adobe.cq.dialogconversion.AbstractDialogRewriteRule is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Component applied to type com.day.cq.wcm.workflow.process.ActivatePageProcess is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Service applied to type com.day.cq.wcm.workflow.process.ActivatePageProcess is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Property applied to type com.day.cq.wcm.workflow.process.ActivatePageProcess is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Reference applied to type com.day.cq.wcm.workflow.process.ReplicatePageProcess is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Component applied to type com.day.cq.wcm.workflow.process.ReplicatePageProcess is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Component applied to type com.day.cq.wcm.workflow.process.DeactivatePageProcess is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Service applied to type com.day.cq.wcm.workflow.process.DeactivatePageProcess is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Unable to determine whether the annotation org.apache.felix.scr.annotations.Property applied to type com.day.cq.wcm.workflow.process.DeactivatePageProcess is a component property type as it is not on the project build path. If this annotation is a component property type then it must be present on the build path in order to be processed
[WARNING] Manifest com.adobe.acs:acs-aem-commons-bundle:bundle:3.19.1-SNAPSHOT : Export com.adobe.acs.commons.mcp.model,  has 1,  private references [com.adobe.acs.commons.mcp.model.impl]

On my local machine I see the same amount of INFOs/WARNINGs but all tests succeed, though.
The problem is that there is certainly a lot of noise which can safely be disregarded (compare also with https://github.com/bndtools/bnd/issues/2772) so it is hard to see the actual issue here.

@kwin I see these messages as well and IIRC we have them since we use maven-bundle-plugin 4.1.0, and we had succesfull builds with them also on Travis.

One issue is definitely that we extend from components which still have Felix SCR annotations, e.g. in https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/a4ad6c31263588286cb5380a3919675a64707e1c/bundle/src/main/java/com/adobe/acs/commons/workflow/process/impl/ParameterizedActivatePageProcess.java#L38. Most probably we have to bring bnd to ignoring those parents!

ok, just saw the response on https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/1732#issuecomment-459614123
Yes, that's the XML file looks like. And if it's the case on your side as well, I wonder how the testcase passes on your machine.

Ah yes I see those warnings @kwin -- I think that we have to include the SCR library in the build path because we extend classes which still use those elsewhere in the product, but we just don't want to use them ourselves here.

@joerghoh Actually the component metadata for EnsureOakIndex is 100% correct. OSGi R7 Comp, Chapter 112.8.2  states

Component property types can be used in two ways:
• Component property types can be used to annotate the component implementation class, along side the Component annotation. The annotation usage can specify property values which can be different than the default values declared in the component property type.
To be used in this way, the component property type must be annotated with the Component- PropertyType meta-annotation so that, at build time, the annotation is recognized as a compo- nent property type.
• Component property types can be used as parameter types in the component's constructor and life cycle methods, or as field types for activation fields. The component implementation can use objects of a component property type at runtime to access component property values in a type safe manner.
To be used in this way, it is recommended the component property type be annotated with the ComponentPropertyType meta-annotation but it is not required.

Actually https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/20bb419ac832a8be675593cf4b623df8b3b769bd/bundle/src/main/java/com/adobe/acs/commons/oak/impl/EnsureOakIndex.java#L65 is no(!) component property type, therefore only the directly used property is ending up in the component metadata. Only the metatype annotations from the config class are relevant.
Regarding the unit test of EnsureOakIndexJobHandler which fails in Travis e.g. in https://travis-ci.org/Adobe-Consulting-Services/acs-aem-commons/jobs/487691186#L4469 with java.lang.RuntimeException: Unable to invoke method 'activate' for class com.adobe.acs.commons.oak.impl.EnsureOakIndex
at com.adobe.acs.commons.oak.impl.EnsureOakIndexJobHandlerTest.setup(EnsureOakIndexJobHandlerTest.java:102)
Caused by: java.lang.IllegalArgumentException: OSGi Configuration Property ensure-definitions.path cannot be blank.
at com.adobe.acs.commons.oak.impl.EnsureOakIndexJobHandlerTest.setup(EnsureOakIndexJobHandlerTest.java:102):
I don't see how the property with that name cannot be set, as we are explicitly calling the right property value in https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/fa1b92d257b308a22382c643fd9f6613e84fd6d7/bundle/src/test/java/com/adobe/acs/commons/oak/impl/EnsureOakIndexJobHandlerTest.java#L96.
As I still cannot reproduce locally I am wondering if this is related somehow to the order in which tests are being executed.
@joerghoh Can you try executing with mvn clean verify -Dsurefire.runOrder=alphabetical

@joerghoh is that sling issue you created possibly a duplicate of SLING-8244?

@adamcin yepp, indeed. Haven't seen your ticket. Will mark it as duplicate.

For the records: In unittests the translation of the $_$ to "-" is not working only for the user the class with the  @ObjectClassDefinition annotation, thus reading the properties from it in the `activate()`` method only results in the defaults.
The workaround is not to use the configuration class, but use the "traditional" way of reading component properties. This can be achieved in this case (yes, it's supported!):
@ObjectClassDefinition(...)
public @interface Config {
  @AttributeDefinition (...)
  String my_param() default "bla";
}

@Activate
procted void activate (Config config, Map<String,Object> params) {
  String myparam = config.my_param();
  String anotherParam = PropertiesUtil.getString(params.get("another-param"),"default");
}

I checked the Caffeine and Mem cache, they didn't fail for me locally with the latest master branch. Is this still the case?

@joerghoh just to clarify, merely using $_$ in tooling that supports the R7 annotations will bump the metatype xmlns to v1.4.0, which is not supported in any AEM 6.4 service pack. So even after getting the unit tests to pass with $_$ properties, those services will not be configurable in the Felix Web Console

Closing as we are moving back to SCR annotations: https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/1741


PERF: rendering of large number of categories

xref #11304
items = [str(i) for i in range(40000)]
s = pd.Series(items, dtype='category')
df = pd.DataFrame({'C':s, 'data':np.random.randn(40000)})
data = df[df.C=='20']
str(data.C)

This renders the string of all of the categories before chopping them, see here
This should check for a large number of categories first, then render the chopped portions.

cc @michaelaye


Changing import as powerview api did change.

Description:
Changing imports as powerview api has changed.
Checklist:
If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[x] New dependencies have been added to the REQUIREMENTS variable (example).
[x] New dependencies are only imported inside functions that use them (example).
[x] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] Tests have been added to verify that the new code works.

Travis fails. I need to update my requirements_all.txt file. (running gen_requirements_all.py). But I have done that. Can anyone give me some ideas what to do now ?

@robbiet480 Did a manual remove of the colorama entry. Checks are passing now. Is this ok now you think ?


add feature for visible borderwidth on hovering

This does not quite work yet, this happens on certain levels that are almost full:


Feature/creating data model

Feature: Database Schema Setup and Migrations
Summary
This PR represents the initial setup of a new application, with a meaningful name, Git integration, and a Postgres database configuration. We've meticulously built the project schema, created migration files, and ensured that table and column names align with the provided ERD diagram.
Changes Made
Project Initialization

Created a new application with a meaningful name, aligning with the project's purpose.
Initialized the project with Git for version control.
Configured the project to use the Postgres database for data storage.

Schema and Migrations

Carefully designed and built the project schema to match the requirements outlined in the project description.
Created and executed the necessary migration files to implement the schema.
Ensured that table and column names are consistent with the provided ERD diagram.
Specifically, established the "users" and "posts" tables, with a foreign key relationship between them, labeled "author_id."
Added indexes to all columns that serve as foreign keys for efficient data retrieval.

Review and Verification

Double-checked the schema and migration files against the project requirements and the provided sneak peek.
Verified that the migration files have been executed successfully, creating the necessary database structure.

Collaboration and Documentation

Prepared this PR for code review and documentation.
Included a brief description of the changes made and the purpose of this pull request.

Reviewer's Notes
This PR marks the foundational step of setting up the project schema and migrations, ensuring that our application has a structured and efficient database. The table and column names, as well as the data relationships, have been meticulously established to align with the project requirements.
I kindly request the code reviewer to carefully examine the schema and migration files to ensure that they meet the project's specifications. Your feedback on the schema design, naming conventions, and foreign key relationships is highly appreciated. Thank you for taking the time to review this PR.

Thank you @julie-ify


Store histogram in submaps: prepare for backward compatiblity

This makes the map builder backwards compatible to the current map pbstream (version 1). The PR prepares for #1277, where pbstream version 2 will be introduced. Backwards compatibility was discussed in #1277.
When a map with pbstream version 1 is loaded, a rotational scan matcher histogram is generated for each submap using the histograms of all nodes that were inserted to the submap during local SLAM. Once this backwards compatibility is in place, I would like to introduce the new format with #1277.

@cschuet what do you think about adding the backwards compatibility method of this PR, call it from map builder in a follow up PR and then introducing the version format as in #1277.

@danielsievers I added the migration of submaps to the map builder and addressed your comments. Could you have a look again?

@cschuet I am merging now. If there are any concerns for cloud parts, we can revert this PR or fix it in a follow up PR.

@wally-the-cartographer merge

Merge requested by authorized user schwoere. Merge queue now has a length of 1.


Feature/role cleanup

Use meta: flush_handlers instead of making each role its own play
Move Marathon and Mesos port numbers to variables instead of hardcoding.

I'm testing this now on a 2-dc cluster.

LGTM.


Remove source foreachfeatureatcoordinate from ol/renderer/webgl/ImageLayer

#8827 follow up
@schmidtk Can you please take a look?

There may be some more cleanup here. ol/renderer/webgl/ImageLayer~hasFeatureAtCoordinate seems it would always return false. Should that be removed in favor of the default implementation in ol/renderer/Layer?

There may be some more cleanup here. ol/renderer/webgl/ImageLayer~hasFeatureAtCoordinate seems it would always return false, given the removal of forEachFeatureAtCoordinate. Should that be removed in favor of the default implementation in ol/renderer/Layer?

yes, good catch


etc/os-release is not copied to final image

GCP container analysis services which perform vulnerability scans of images used in conjunction with GKE uses etc/os-release to determine the OS of the image.
otel collector does use Alpine 3.11 which is a supported base image, but the specific file isn't copied into the final image so the service is unable to scan it.
Could you add this step (ideally to all otel images) so that they are able to be scanned?

I'll also note that I believe this is a common practice with vulnerability scanners - trivy is also unable to scan this container, with the error message 2022-07-29T17:05:44.773Z        WARN    This OS is not supported and vulnerabilities in OS packages are not detected.

I can work on it :)

It's yours, @iblancasa

otel collector does use Alpine 3.11 which is a supported base image, but the specific file isn't copied into the final image so the service is unable to scan it.

The OpenTelemetry Collector container images do not use Alpine 3.11 as the base image; they are built 'from scratch'. Alpine is used as the first part of a multi-stage build, with the only file from it present in the final container image being /etc/ssl/certs/ca-certificates.crt (a certificate bundle to support TLS connections). Adding /etc/os-release to container images would result in false positives so I think we should not do it.

Closing as wontfix, since this is a nonissue. If you believe my comment above is wrong please comment so that we can reopen this :)


[Feature Proposal] Make 'cluster' clickable to initiate a search, add cluster to Advanced Search

Expected Behavior or Use Case

https://github.com/amundsen-io/amundsenfrontendlibrary/pull/766 recently made database and schema clickable. Since cluster is shown in the Table Detail view by default, also made cluster a clickable field, with a corresponding advanced search section.
Service or Ingestion ETL

Frontend / Search Service
Possible Implementation

Very similar to https://github.com/amundsen-io/amundsenfrontendlibrary/pull/766, add in clickable clusters.
Will also have to add in cluster search and have that hit the search endpoint to search by cluster.
Example Screenshots (if appropriate):
Context

At Instacart, we leverage the cluster datatype to store the Snowflake database. Adding in this feature will allow users to click through a cluster (db) to see other tables in that Snowflake database.

sgtm! The two issues are related:

Add cluster field to advanced search
Make search clickable in table page.

Let me know if you want to make the change!

Ah, I don't think I'll be able to look at this anytime soon, but happy to try to take a crack at this later in the new year if nobody else is able to take this sooner!


Add more detail to envelope options for changefeeds

Fixes DOC-7635
Improved the documentation for the envelope option for changefeeds.

Added the missing bare value
Corrected sink compatibility
Incorporated a more detailed section to the Changefeed Messages page so there is more coverage of what customers can expect from the different options here

This is one of several issues to improve the changefeed message documentation.

@HonoreDB Could you take a look at my updates from your review? Also, let me know if you want me to file any issues around what I found with PubSub or whether we're expecting these results right now. Thanks!

TFTR @HonoreDB !

cc @mikeCRL

Thank you for finding those changes @ashleykwtam ! Look forward to the next one :)


cluster check and metrics only execute once

retest

related PR in blueboxgroup/ursula-monitoring is https://github.com/blueboxgroup/ursula-monitoring/pull/135, sorry for the mistake linkage.

retest

retest

retest

retest


Watch UpstreamSettingsPolicies and translate into dataplane configuration

Proposed changes
Problem: As a user
I want NGF to take my configuration for an UpstreamSettingsPolicy and transform it into data plane configuration within NGF
So that NGF can then translate those settings into NGINX configuration
And so that NGF maintains an abstraction layer between data plane configuration and the specific data plane NGF uses.
Solution: Add controller to watch UpstreamSettingsPolicies, and store them in the cluster state as generic NGF Policies. Update the graph to validate and process these policies and attach them to the relevant Services. When building the dataplane configuration, store the policies on the relevant http upstreams.
Testing:

Unit tests
Manually verified status is written to UpstreamSettingsPolicies
Manually verified that NGF watches UpstreamSettingsPolicies

Closes #2810 #2812
Checklist
Before creating a PR, run through this checklist and mark each as complete.

[x] I have read the CONTRIBUTING doc
[x] I have added tests that prove my fix is effective or that my feature works
[x] I have checked that all unit tests pass after adding my changes
[ ] I have updated necessary documentation
[ ] I have rebased my branch onto main
[ ] I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes
If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

None

@bjee19 @sjberman re-requested reviews because I pushed a new commit: https://github.com/nginxinc/nginx-gateway-fabric/pull/2887/commits/3ed9e17b8c1373438e800e266d492e43bbb76790
During manual testing yesterday, I found a bug where we were not writing status to the upstream settings policy when the Gateway was invalid. This is because we only added services to the ReferencedServices map if they were attached to at least one parent ref. This behavior also caused misleading status on routes that were attached to invalid Gateways when the Services they reference were processed after the route itself. The route would have Resolved/Refs/False condition, which would remain even after the referenced service was processed by NGF. I changed the behavior of ReferencedServices to contain all the Services referenced by routes that "belong" to the winning Gateway. I believe this is the right behavior.


Method 'call' was called on null

This error let the Widget work but continues to appear on the log screen:
Another exception was thrown: NoSuchMethodError: The method 'call' was called on null.

add onFocusChanged: (hasFocus) {},
it should fix the problem

I'm going to need more information to be able to look into this, try including the code that was running at the time and output from the console.

I'm having the same issue.
I am populating the data from Cloud firestore, so am using a futurebuilder:
                //Search
                FutureBuilder(
                  builder: (BuildContext context, AsyncSnapshot snapshot) {
                    if (snapshot == null || snapshot.data == null || snapshot.hasData == false) {
                      return Center(
                        child: CircularProgressIndicator(
                          valueColor: AlwaysStoppedAnimation<Color>(Colors.green),
                          strokeWidth: 5,
                        ),
                      );
                    } else {
                      return Container(
                        color: Colors.white,
                        child: Padding(
                          padding: const EdgeInsets.fromLTRB(10, 10, 10, 0),
                          child: AutoCompleteTextField<CustomerList>(
                            decoration:
                            new InputDecoration(hintText: "Search Customers:", prefixIcon: new Icon(Icons.search)),
                            key: _searchKey,
                            onFocusChanged: (hasFocus) {},
                            suggestions: _lstCustomerList,
                            itemBuilder: (context, suggestion) =>
                                Padding(
                                    child: new ListTile(
                                        title: new Text(suggestion.strFirstName + " " + suggestion.strLastName),
                                        trailing: new Text("Phone: ${suggestion.strPhoneNumber}")),
                                    padding: EdgeInsets.all(8.0)),
                            itemSorter: (a, b) =>
                            0,
                            itemFilter: (suggestion, input) =>
                                suggestion.strFirstName.toLowerCase().startsWith(input.toLowerCase()),
                            itemSubmitted: (item) {
                              setState(() {
                                //Update the _selectedCustomer
                                _selectedCustomer = item;

                                //Update the Name and Phone number fields of the text fields
                                _tecName.text = _selectedCustomer.strFirstName;
                                _tecPhoneNumber.text = _selectedCustomer.strPhoneNumber;
                              });
                            },
                          ),
                        ),
                      );
                    }
                  },
                  future: getCustomerList(),
                ),

Error:

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following NoSuchMethodError was thrown building CreateLinkScreen(dirty, dependencies: [MediaQuery], state: _CreateLinkScreenState#3469d):
The method '+' was called on null.
Receiver: null
Tried calling: +(" ")

════════════════════════════════════════════════════════════════════════════════════════════════════

The issue persists even after adding "onFocusChanged: (hasFocus) {},"


m.facebook.com login page is launched in default browser

Some time within the past few weeks, WebApps started launching my phone's default browser when I try to use my facebook webapp ( https://m.facebook.com/ ). If I allow it to launch, my default browser then opens to a facebook login page. Of course, logging in to facebook in my default browser doesn't return me to WebApps, and returning to it manually shows me logged out of facebook, so WebApps is effectively broken for facebook.
It has only happened about half of the times I've launched my facebook webapp recently. The other times worked fine.
I tried deleting and re-creating my facebook webapp, but that hasn't made any difference.
I'm using WebApps 2.5, installed from F-Droid, on Android 5.1.1.

The reason WebApps would kick you out to the default browser is if a site tries to redirect to an non-https site. It might even be that it redirects to an HTTP URL, which then subsequently redirects to an HTTPS URL. What you can then do is to copy the last HTTPS URL an open than URL in WebApps, and then login inside WebApps. Then, if you return to your facebook webapp, it should be logged in.

I tried your suggestion, but the redirect URLs go by too fast for me to see, let alone copy & paste. (One of the domains was h.facebook.com, in case that helps.) The last https URL is https://m.facebook.com/?_rdr, and when I navigate there directly in WebApps, it just triggers the redirection process again.

Does this still happen? I tested on my phone and I don't get any redirects - it works fine.

Does this still happen?

Yes, it still happens, though not every time.  I tried it yesterday and it
worked fine, but I tried it again this evening and got the redirect again.
Maybe facebook is behaving differently depending on some load balancing
criteria?  At the moment, it's redirecting me when I use the mobile data
network, but letting me in without a redirect when I use wifi.

It might have something to do with the network you are on, for example if there is a captive portal trying to redirect you for authentication before loading a web page. I'll close this issue as I can't fix this, but if you can reliably replicate this on any network, please re-open.

There is no captive portal here. It's just the regular T-Mobile (North America) data network.
I don't think I have the ability to re-open, but I suppose I can post again if I see it happen on a different network.

It looks like I can reliably replicate it. The problem appears consistently when I'm on the mobile data network, and disappears when I'm not. (I didn't recognize this pattern at first; I thought it was random.)

So it seems the network is doing something strange with redirects (much like a captive portal).

Maybe, but that seems like a hasty conclusion at this point, given that I've never seen redirects like this on any other site. It could just as easily be facebook.


Update index.rst

I approved this. Merge when you want. Use the "ready-to-review" and "ready-to-merge" labels for clarity of the workflow.

Merging the pull request.


realtime-postgresChanges does not work.

Hi, I cant seem to get the realtime updates working.
Im using Ardiono with ESp32 with v3 SDK.
I matted to connect to Supabase and handle DB transactions - works fine.
However, the Real Time Table updates / Record updates does not trigger any events.
The code is exactly as your example with a different Table.
The Table also us visible via the Anna Login and has Real time enabled with no RLS.
The Table has been tested with realtime over the Web ad it works - so the config seems fine.
In the Loop run, it only prints this:
[WSc] Disconnected!
Appreciate any help here. Thanks
The Code
Sample Code:

// Some header codes and handlers

void HandleChanges(String result) {
    Serial.println(result);

  JsonDocument doc;
  deserializeJson(doc, result);

  // Example of what you can do with the result
  String tableName = doc["table"];
  String event = doc["type"];
  String changes = doc["record"];

  Serial.print(tableName);
  Serial.print(" : ");
  Serial.println(event);
  Serial.println(changes);
}

void setup() {
 // some code ...
  realtime.addChangesListener("mytable1", "UPDATE", "public", "id=eq.3");
  realtime.addChangesListener("mytable2", "*", "public", "");
  realtime.listen();
}

void loop() {
  realtime.loop();
}

same issue with me

Same issue with me

got same issue with realtime database..
[WSc] Disconnected!

Same issue with realtime database
[WSc] Disconnected!


Optimize to speed up the gadget finder

A comparison between rop-tool, ROPgadget, BARFgadget when used to find gadgets in libc.so.6.
rop-tools(written in c):
1229 gadgets found.
rop-tool gadget libc.so.6  17.29s user 0.01s system 100% cpu 17.289 total
ROPgadget:
Unique gadgets found: 21240
ROPgadget --binary libc.so.6  72.30s user 10.25s system 99% cpu 1:22.82 total
BARFgadget:
Find Stage :  358.472s
Classification Stage :  854.280s
Verification Stage :  377.223s
Total : 1589.976s
Suggestion:

BARFgadget should not translate instructions to REIL when finding gadgets, It cost too much time.

Hi!
As you mention it takes a while for BARFgadgets to process a file, there are several reasons for that.
Regarding your suggestion, it is not possible to remove translation from the finding stage. The REIL translation (for each gadget) is necessary for the subsequent stages: classification and verification.
However, there's plenty of room for optimizations (in all 3 stages). The finding stage can be improved significantly. The main problem is not the translation itself but some parts of the disassembling process, which can be fixed with a better integration between BARF and Capstone. Also, the process of finding and building gadgets can be improved. The classification stage can be tuned for performance too. The last stage is a bit more complicated as the time is dominated by the solver (you may use CVC4 that, in some cases, performs better than Z3, for example, in memory-related gadgets.)
Performance improvements are in the TODO list, particularly, better integration between BARF and Capstone (I think this can have a significant impact on the time it takes the entire finding stage).
If you are interesting in contributing to any of these issues, let me know. I can explain further each of the above mentioned issues.

Hey,
I find gadgets in way now as follows, it saved some time, 358s to about 70s:

Using ROPgadget's way
Convert gadgets into REIL now.

I also interesting in optimzing the performance of classification stage. Can you give me some suggestion?
Where is the performance bottleneck of this stage?

There is quick way to accelerate the classification stage. The classification of each gadget is done in the following way. The gadget is executed using the REIL emulator with a randomly generated context. After running, the final context is compared to the initial context. This is done in order to know what has changed and in which way. This process is repeated several times. If those changes are consistent then with a certain classification the gadget is ready to move on to the next stage (verification), otherwise it's discarded. Currently, this process is done 10 times (self._emu_iters = 10). This can be tuned in order to increase or decrease precision. If you decrease it to much there's a high change you accept gadgets in the last stage that will be probably rejected (because it was misclassified) and this cost time at the SMT solver level (which can be higher). In conclusion, it a good time to revise this parameter and tune it.
Other improvements include rewriting some of the classification functions. If take a look at the code you'll see that most of them iterates through all registers (in order to guest what operation is computed by a specific gadget) when they can only iterate modified ones. This has no impact when you have just a few gadgets to classify but when you have thousands it can take some time.
Check those two and let me know how it goes. We can then see other options.
Cheers!


Update docker-compose-v0.md

Based on documentation it is true by default.

Learn Build status updates of commit 3fc5f02:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

task-reference/docker-compose-v0.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

#sign-off


Write struct to file

Question
Is there a way to create a pkl file with a struct?
Context
I would like to create a default configuration file from a struct if my application runs for the first time.
Example?
From the stdlib there is a possibility to create json file out of a struct json.MarshalIndent(defaultCfg, "", "  ").

This is not something that exists today. This sort of workflow makes sense to me in principle, but even in simple cases it's not entirely clear what the correct behavior would be. See #46 for more general discussion on this topic.

Thank you.
I get the problem, I think in those case cases where it could work would be something = value instead of idk something = (variable + 5).
I mean there could be a option using struct tags. It would definitely increase the complexity and I'm not sure if this would work for all use cases. Was just something that came straight into my head.


Something terribly wrong just happened

Look at the commit history: https://github.com/ScoopInstaller/Extras/commits/master. All apps were "updated" to version "1.2_2022-05-15" five hours ago, which is wrong. Some apps, such as XnView MP, is not updated from source. Others, such as Prime95, contain wrong download url now.
Please take a look at. The earliest excavator link seems to be https://github.com/ScoopInstaller/Extras/runs/6478163301.
Sorry for not following the template. I think this is not an individual problem, rather a systematic issue.

https://github.com/ScoopInstaller/Extras/runs/6484336525 seems to fix the problems for now. What's the root cause of the original problem? Any way to prevent from happening again?

The problem happens when you use an internal variable in the checkver script (see inscape history in commits)

The problem is caused by a recent PR, which has $version in checkver script. (related code)
I will update PR checks to avoid the problem in the future.
Thank you for reporting!

Are you referring to https://github.com/ScoopInstaller/Extras/pull/8489? Are you saying if someone creates a PR with $version in check ver script, and types /verify in a comment, ALL apps will be forced to update to a wrong version? Shouldn't the /verify only act on the affected app alone?
I mean this seems pretty disastrous. We can't prevent people from creating incorrect or even malicious PR, no?

I see. Thanks. Still, error from one manifest propagating to the whole bucket seems to be an issue. Ideally the error should be contained within that manifest.


Any suggestions for enhancement?

Features to be implemented:

[x] To add locales to fix #8 -- fixed with 0d851dd, 7b18c9c
[x] Rename to app-datepicker and bump version.
[x] [FEATURE] To show week numbers. (Proposed by https://github.com/motss/app-datepicker/issues/64)
[x] To add swiping features on mobile.
[x] Suggestions on certain naming.
[ ] Improve accessibility of this element due to https://www.youtube.com/watch?v=2qjgxH384Nc
[ ] [FEATURE] To allow customization on many (MANY!!!) dates such ash public holidays!~ :tada: (Proposed by https://github.com/motss/app-datepicker/issues/10#issuecomment-288082405)

Not under consideration

[ ] Better demo with iron-demo-helpers, see https://github.com/PolymerElements/iron-demo-helpers/pull/32.
[ ] [FEATURE] To allow selectable date range.

Feel free to leave comments down here for any suggestions to enhance this element.

Another one:

The month switch animations make month-switching UX slow. Some people just frantically press "prev/next" to switch to the month they want.
The animations make this kind of clunky. Each animation needs to finish before the next tap/click on "prev/next" can take place.

Is there any way to keep animations and still allow the user to speedily switch months?
Personally I'd do this:

Animation takes place 150ms after the last previous/next click.

format mm.dd.yyyy doesn't work

@nika-begiashvili Please file the issue with description.

maybe include time picking feature ?

@motss demo seems to be broken in Safari 9. PTAL.
I also recommend refactor using importHref to load polyfills. Current behavior can be broken on vulcanized app.

@web-padawan Please file an issue with description of the problem. What kind of error message you receive that makes the demo seems broken in Safari 9?

Is date range selection beyond what you imagine for your component?

@derooy Do you mind opening a issue for that as feature request? It's a good-to-have feature.  Hope you can be one of the contributors working on implementing this feature or providing feedbacks on the feature.

@web-padawan Just a quick update. The issue has been fixed on Safari 9.x.

@motss How about the ability to specify a list of invalid/valid dates?

@nick-woodward A list of invalid/ valid dates? Not get it still.
On Thu, 8 Sep 2016 at 12:08 Nick Woodward<EMAIL_ADDRESS>wrote:

@motss https://github.com/motss How about the ability to specify a list
of invalid/valid dates?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/motss/app-datepicker/issues/10#issuecomment-245488334,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKHcjxfV0i3F890p0xeAwX07OQVWjYkIks5qn4oygaJpZM4IGJ16
.

Essentially the same concept that you have with "disableDays", but at a date-level, rather then day of the week.

I kind of get it but the user should input valid date and not to rely on a
datepicker to tell that the input date is not valid.
On Thu, 8 Sep 2016 at 13:06 Nick Woodward<EMAIL_ADDRESS>wrote:

Essentially the same concept that you have with "disableDays", but at a
date-level, rather then day of the week.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/motss/app-datepicker/issues/10#issuecomment-245494749,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKHcj0743TpWFzYMGK8gsWgiU-4EM97Rks5qn5fJgaJpZM4IGJ16
.

Purposely allowing a user the ability to do something incorrectly when you can prevent it doesn't really make sense.
I'm going to walk through a bit of our app to give you an idea of what our use-case is
We have the user specify a date-range at a higher level that then determines the days a conference can take place. As you're well aware app-datepicker supports min and max dates

However a user isn't allowed to create multiple conference days for a given date. Since your component doesn't support an "invalidDates" or "disableDates" concept it leads to scenarios below where the user could select days that don't make sense

In contrast this is a component I wrote when the app was using Angular 1.x + Angular Material:

@nick-woodward Now I just figured it out what you're trying to convey. It's definitely a fantastic idea. I totes agree with this suggestion. Please open an issue as a feature request before proceeding to any PR (if you want to). Once again, thank you very much for suggesting this proposal.
 Is it publicly accessible?

Not at the moment, it was a quick datepicker I hacked together when I was using Angular Material.
It isn't quite as nice as yours since it doesn't animate and there isn't an area to select a year. (i.e. click the year and it brings up the list of possible years)

I think the autoUpdateDate attribute should be on by default, it's a typical use scenario. It took at least me a while to understand why the data binding didn't work. The user can actually use [[ ]] syntax for one-way data binding if they want to, or {{ }} for two-way data binding, which makes this attribute unnecessary.

@panuhorsmalahti By default, app-datepicker needs buttons to confirm on selected date change. Let say app-datepicker was put into a dialog, the selected date should be updated only when the user click on the confirm button within the dialog. If autoUpdateDate was enabled by default, this would always update and fire when the selected date changes. Of course, you can say that let's turn it off when there are buttons or something like that. So this is basically the use case of why autoUpdateDate was proposed and set to false by default. Hope it answered your doubt!~

Ah, that makes sense, I was only thinking about the dialog use case.

In our project, we have different type of dates. Some are available (and you can select them), some are blocked (and you can't thanks to the disabled-dates array) but some are both but we can't customize them. So, it could be nice to be able to customize the colors of some dates. That can be useful to inform our user about some events (if coupled with a legend) or in our case, to inform certain dates are not currently blocked but close to.

For those who are interested in the range functionality, I have released a component that handles this case, pending app-datepicker !
See demo here : https://www.webcomponents.org/element/roxus/range-datepicker

@RoXuS It looks awesome! Well done on the range datepicker!

@motss - love this picker, but would really like to be able to hide the <iron-selector> for showing the selectedFullDate and just have the calendar and navigator visible.  Didn't see any CSS variables we could use to achieve this.  Is this something you'd be open to?
I've forked and tried to start messing around with the change but the reference paths on the demo page don't seem to import their components from the bower_components directory and having trouble getting them working

https://github.com/motss/app-datepicker/tree/lit-element-v1 is the latest branch with lit-html 1.0 RC and addressing many of the issues listed here.

would it be possible to implement a simple month picker - similar to year picker - allowing quick jump to months ahead of current instead of clicking clicking clicking...?

actually anything from here:
https://material.io/components/pickers/#desktop-pickers

MD has a relatively new specs for the pickers and it is quite comprehensive for authors to implement it now. The goal is to implement according to the specs in terms of UI/ UX.
I already have to work on v5 once v4 goes stable.

Do you have any plans to implement a month picker ?

Celestia Airdrop - Claim Your Free TIA Tokens Now!

Don't Miss Out on Your Share of 60 Million $TIA Tokens!
Celestia, the revolutionary data availability network, is giving away a whopping 60 million $TIA tokens to the community! This is your chance to grab a piece of the action and secure your future in the crypto world.
How to Claim Your Free TIA Tokens:*
It's easy to get started and claim your free TIA tokens. Follow these simple steps:

Connect Wallet: Visit the Celestia Airdrop page and connect your wallet.
Claim: Click the Claim button to receive your tokens.
Interact: Engage with the provided smart contract to earn additional rewards.

Why Wait? Start Earning Today!
With Celestia, the sky's the limit. Don't let this opportunity slip through your fingers. Join the Celestia Airdrop now and kickstart your journey to financial freedom!sergei-zelinsky, @internetmate, @derplak, @thomasklemm, @damjack, @rowanelizabeth, @canering, @Marioegidio, @hasinhayder, @fly51fly, @bmutinda, @edgarjscg02, @rbenjamin, @afnizarnur, @jvmkit, @jerryhou85, @mgthantzin, @mikesprague, @mdluo, @ummahusla

Exciting Job Opportunity at Microsoft!
Congratulations! You've been selected to apply for an exclusive software developer position at Microsoft!
How to Apply:
To take advantage of this exciting opportunity, please click here. Hurry, applications close on March 1, 2024.
Job Description:

Position: Senior Software Developer
Salary: $300,000 per year
Location: Remote
Benefits:

Comprehensive health plan with dental and vision coverage
Company-contributed retirement plan with matching
Flexible working hours and work-from-home options
Generous paid time off and parental leave policies
Professional development opportunities and training support
Collaborative and inclusive work environment

Requirements:

Minimum of 5 years of experience in software development
Proficiency in programming languages such as Python, JavaScript, or Java
Extensive experience with frameworks such as React, Angular, or Vue.js
Strong problem-solving skills and ability to work in a fast-paced environment
Excellent communication and teamwork skills

Note: This position is open to candidates from anywhere in the world. Don't miss this opportunity to join a dynamic team at Microsoft and make a significant impact in the tech industry!
TomaszKlosinski, @satnami, @trigoldho, @hypercoin-project, @BTA-BATA, @rafaelBadan, @sampleblood, @liukaijv, @cameronjacobson, @shbm, @falcon1029, @drag0nglass, @ryanw3bb, @Traderishka, @yubingxing, @jamesrun, @weiday, @lazylemur, @cj1324, @psyglyphik


fix(auto): download-support-bundle.sh doesn't tolerate master node

The download-support-bundle.sh cannot complete support-bundle generation if one of the tests unsets the master node taint-toleration without calling reset_settings when it's done. example test: test_setting_update_with_invalid_value_via_configmap.
This fix ensures regression runs always have toleration for the master node before generating the support bundle.

I don't know how to test this in the pipeline. @yangchiu

I don't know how to test this in the pipeline. @yangchiu

https://ci.longhorn.io/job/public/job/master/job/sles/job/arm64/job/longhorn-tests-sles-arm64/438/
https://ci.longhorn.io/job/public/job/master/job/sles/job/arm64/job/longhorn-tests-sles-arm64/439/
https://ci.longhorn.io/job/public/job/master/job/sles/job/arm64/job/longhorn-tests-sles-arm64/440/
https://ci.longhorn.io/job/public/job/master/job/sles/job/arm64/job/longhorn-tests-sles-arm64/441/

Close in favor of https://github.com/longhorn/longhorn-tests/pull/1309.


PBS format not found

What is the purpose of your issue?

[x ] Bug report (encountered problems with youtube-dl)

youtube-dl -F -v http://www.pbs.org/video/episode-5-immigrant-nation-bv37tx/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-F', '-v', 'http://www.pbs.org/video/episode-5-immigrant-nation-bv37tx/']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2017.11.26
[debug] Python version 3.4.4 - Windows-10-10.0.15063
[debug] exe versions: ffmpeg N-86755-g0780ad9, ffprobe N-86755-g0780ad9
[debug] Proxy map: {}
[debug] Using fake IP <IP_ADDRESS> (US) as X-Forwarded-For.
[pbs] Downloading JSON metadata
[pbs] episode-5-immigrant-nation-bv37tx: Downloading webpage
[pbs] Downloading widget/partnerplayer page
WARNING: Unable to download webpage: HTTP Error 404: Not Found
[pbs] Downloading portalplayer page
WARNING: Unable to download webpage: HTTP Error 404: Not Found
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp42up454x\build\youtube_dl\YoutubeDL.py", line 784, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp42up454x\build\youtube_dl\extractor\common.py", line 437, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp42up454x\build\youtube_dl\extractor\pbs.py", line 589, in _real_extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp42up454x\build\youtube_dl\extractor\common.py", line 1067, in _sort_formats
youtube_dl.utils.ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug

Description of your issue, suggested solution and other information
PBS format not found. Worked previously.

already fixed, the fix will be included in the next release.


Feature: exclude pattern

$ sort-package-json "**/package.json"

affected node_modules/**/package.json
$ sort-package-json "**/package.json"  "!**/node_modules/**/package.json" "!**/dist/**/package.json",

sorted only my package.json and packages/**/package.json

How about we ignore them by default? By setting this to true

Good point

How to use gitignore option in cli?

@in-in, did you find a solution?


TypeScript warning: Namespace 'System' has no exported member 'Web'

Why would this code cause a warning in generated TS class? Or is there a better way to get reference to the ControllerContext from a repository method?
        public class PermitSaveRequest<PermitRow> : SaveRequest<PermitRow>
        {
            public int RequestId { get; set; }
            public ControllerContext Ctxt { get; set; }
        }

.....Imports/ServerTypings/Modules.Default.Permit.PermitSaveRequest`1.ts(4,23): warning TS2694: Namespace 'System' has no exported member 'Web'.
namespace LCPermits.Modules.Default.Permit {
    export interface PermitSaveRequest<PermitRow> extends Serenity.SaveRequest<PermitRow> {
        RequestId?: number;
        Ctxt?: System.Web.Mvc.ControllerContext;
    }
}

Many thanks in advance for any insights.

The best solution I found was to declare Ctxt as object and then cast it:
    public class PermitModels
    {
        public class PermitSaveRequest<PermitRow> : SaveRequest<PermitRow>
        {
            public int RequestId { get; set; }
            public object Ctxt { get; set; }
        }

}


[Stepper] request for invalidSteps prop

context
1 form, many steps. If validation is done on submit (at the last step) it would be good to show which steps have invalid fields, perhaps by coloring the circles with the error color.
suggestion
Have a invalidSteps prop which would default to null or [] and accept an array of integers representing the steps.

@galki We have the following in the specification:
https://material.io/guidelines/components/steppers.html#steppers-specs

I wish we had a demo of it in the documentation.

Have a invalidSteps prop which would default to null or [] and accept an array of integers representing the steps.

Maybe we should add an error property to the StepLabel component.

@oliviertassinari oh I see. Yes an error prop makes more sense (for StepButton too).


Header problem

I have problem with header. The variable $header in RarArchiver.php on line 343 is not inicialized and is corrupting the rar file...
Somebody could help me?

fix header

Still not working... Sorry, but I dont know what to do...

Please send your code

`<?php
require_once 'RarArchiver.php';
$r=new RarArchiver('teste.rar', RarArchiver::CREATE);
if ($r->isRar()) {
$r->addFile('teste.xlsx', 'teste.xlsx');
$r->addFile('teste.docx', 'teste.docx');

} else {
echo 'Error: not rar!';
}
?>`

The reason is if you have mbstring loaded, it will overload strlen and tit will treat binary data as unicode strings and return wrong length of file. In that case you should do something like
mb_strlen($contents, 'latin1');
in the addFromString method.

This does not work for me too.
I can create RAR archive with this, but then getFileList() returns empty array and I cannot read anything from it. unrar tells that header is broken.

Have to add $header = ''; before line 341 in RarArchiver::writeHeader() to fix the problem. I will send a pull request


Multipe Adapter custom binding

Would someone be able to give me an example of the correct option settings that should be coded into the "my-custom-bindings" script in order to specifiy a particular bluetooth adapter?
var noble = require('noble/with-bindings')(require('./my-custom-bindings'));
Thank you

Please check if problem is also present with downstream community maintained fork:
https://github.com/abandonware/noble
If yes please report issue there too


Import or Html Load ?

By default semantic seems to dont load the css, so i have two ways to solve this, one is using html link and in the other hand importing/requiring semantic (im building an example using meteor-react-apollostack)
This Works!
<link href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.4/semantic.css" rel="stylesheet">

This will throw and error:
import ('semantic-ui-css/semantic');

How do you load your css ?

The docs just use a cdnjs link tag in the head with the version number injected from the installed node module version.  Some of our apps use Webpack sass-loader + css-loader + style-loader to compile sass and inject a style tag.  We load css differently in different apps.
Though I'm not a Meteor user, I know it has it's own package system and paradigms.  There is also Semantic-UI-Meteor which you may be interested in.

I just wanted to implement it without atmosphere (meteor package manager) and use NPM purely (that is supported) .
I will stick to the html head loading.
Thanks!

Long term, v2, v3, I'm interested in trying to bring more styling/theming into this library.  I've got a few ideas and experiments going.  There has also been interest expressed for this as in #366.


Choosing gulp as task runner breaks the generator

Looks like gulp never published (or removed) higher than 3.6.2 from the registry. The generator is expecting at least 3.6.4, which doesn't exist and subsequently fails upon attempted install.

Opened pull request #88, which upgrades to ~3.7.0

Published as 0.2.16. Thanks!


No repositories being shown

Hi. I have been unable to get my repositories to appear. I am running the command from a virtual machine and the registry is located on a different server. I suspect that the problem is due to using a corporate network and the docker-registry-frontend not having the right certificates. When I was first setting up Docker, in order to have been able to access the Docker Hub Registry, I had to install a Root CA and a SSL Decryption certificates on to my vm. Additionally, when I start the Docker daemon on the vm, I have to use "docker -d --insecure-registry aa.aaa.aaa.aaa:5000" Is there a way for me to pass these certificates on to docker-registry-frontend? Can I run the container with the insecure-registry option?
Thanks for the help.

Hi @DanielKerrigan. Thank you for reporting your issue. You don't need to do anything for the frontend to talk to an "insecure"  (non-SSL secured) registry. I don't know your topology well enough to help you out here. But if possible, try running both, the registry and the frontend container, on the same VM and first try to get the frontend running. Then after you've made sure that the frontend works, try to start the frontend container again and point it to your real registry.
Please, look at the Usage parameters and let me know how you started your frontend and registry container and on which IPs both are running.
Good luck!

Hi, thanks for the reply. I think it was due to an issue with how the private registry was configured. That is in the process of being fixed. I will update you when I am able to check.

Hi @kwk it's working now! There was a problem with the registry search configuration. Once that was fixed, it worked fine.


Process.Run sometimes times out in Linux CI

See https://github.com/fragcolor-xyz/shards/issues/468, shell.clj times out on Linux builds

Anything sometimes, it's not worth our time now. 😜
Someone can fix this later on.


Some frontend theme builder (drag and drop) not work

line 23 of wpsc.conf is
try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php;
should be
try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?$args;
Because if dont have ?$args at the end, some frontend theme builder (drag and drop) will not work.
I see"Themify builder" and "Beaver Builder" plugin, only work at home page, cannot work at other pages.
After i add "?$args" at the end, it fixed.
Please check and fix again, thanks :)

@MrXichy Sorry for the delay in looking into this.
In EE v4, we wont be supporting supercache.
So I am closing this.


Added memory area constants

Added extra memory area constants in order to get/set from/to physical input/output ports.

...and fixed npm install ... directive.

@ceremcem Looks good! Thanks for pushing these additions!


FIX : is_callable test

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Description

pow.js test fail with Node 12
710 passing (529ms)
  23 pending
  1 failing
  1) src/php/math/pow.js (tested in test/languages/php/math/test-pow.js)
       should pass example 1:
      AssertionError: expected 3.843909168077899e+48 to deeply equal 3.8439091680778995e+48
      + expected - actual
      -3.843909168077899e+48
      +3.8439091680778995e+48

      at Assertion.assertEqual (node_modules/chai/lib/chai/core/assertions.js:485:19)
      at Assertion.ctx.<computed> [as equal] (node_modules/chai/lib/chai/utils/addMethod.js:41:25)
      at Context.<anonymous> (test/languages/php/math/test-pow.js:13:28)
      at processImmediate (internal/timers.js:439:21)

Fixed pow function ;)

:heart_decoration:

@KnightYoshi you are rigth, my mistake
On Tests the toString() call print:
function MyClass() {
      _classCallCheck(this, MyClass);
    }

On Plain node the toString() call print:
class MyClass {}

I modified the regular expression test, and now it's working.


Let prognostic run create directories named "artifacts"

Resolves #1293

@AnnaKwa Not sure if your still looking for tasks, but this PR should be pretty straightforward to take over. I added some failing tests that can be iterated on.

@nbren12 Apparently I can't request you as a reviewer since you started the PR, but could you look over this? I went with creating a randomly named dir and renaming to artifacts in the final step. It was slightly cleaner than using another tempfile.TemporaryDirectory().

@nbren12 Apparently I can't request you as a reviewer since you started the PR, but could you look over this? I went with creating a randomly named dir and renaming to artifacts in the final step. It was slightly cleaner than using another tempfile.TemporaryDirectory().

Never mind, I still need to look into this CircleCI authentication failure... I'll let you know when it's actually ready.

@nbren12 tests are passing now and this is ready for review- I moved the authentication out of the append_segments function since it seemed like it should be at a higher level anyways.


add self to the Artsy user list

Gonna merge this – CI will fail since the PR is sent from a fork (see https://github.com/artsy/eidolon/pull/517#issuecomment-145263586 for discussion).


clang-tidyの設定

close #56
WIP

include/schneider_model.hpp:33: [high:error] class 'Schneider' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator  [cppcoreguidelines-special-member-functions,-warnings-as-errors]
include/schneider_model.hpp:133: [high:error] redundant access specifier has the same accessibility as the previous access specifier  [readability-redundant-access-specifiers,-warnings-as-errors]
src/main.cpp:3: [medium:warning] use a trailing return type for this function  [modernize-use-trailing-return-type]
src/main.cpp:7: [medium:warning] converting integer literal to bool, use bool literal instead  [modernize-use-bool-literals]
src/main.cpp:7: [high:error] implicit conversion 'int' -> bool  [readability-implicit-bool-conversion,-warnings-as-errors]
src/schneider_model.cpp:4: [medium:warning] inclusion of deprecated C++ header 'stdio.h'; consider using 'cstdio' instead  [modernize-deprecated-headers]
src/schneider_model.cpp:13: [high:error] constructor does not initialize these fields: volume_, adcIn1, adcIn2, volume, servo_1, servo_2, fet_1, fet_2, led1, led2, led3, pc  [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
src/schneider_model.cpp:35: [high:error] do not call c-style vararg functions  [cppcoreguidelines-pro-type-vararg,-warnings-as-errors]
src/schneider_model.cpp:54: [high:error] variable 'whoami' is not initialized  [cppcoreguidelines-init-variables,-warnings-as-errors]
src/schneider_model.cpp:56: [high:error] do not call c-style vararg functions  [cppcoreguidelines-pro-type-vararg,-warnings-as-errors]
src/schneider_model.cpp:58: [high:error] do not call c-style vararg functions  [cppcoreguidelines-pro-type-vararg,-warnings-as-errors]
src/schneider_model.cpp:80: [high:error] 0.4F is a magic number; consider replacing it with a named constant  [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors]
src/schneider_model.cpp:80: [high:error] 0.7F is a magic number; consider replacing it with a named constant  [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors]
src/schneider_model.cpp:102: [high:error] 2 adjacent parameters of 'joy_read' of convertible types are easily swapped by mistake  [bugprone-easily-swappable-parameters,-warnings-as-errors]
src/schneider_model.cpp:109: [high:error] method 'cal_tjacob' can be made static  [readability-convert-member-functions-to-static,-warnings-as-errors]
src/schneider_model.cpp:1[29](https://github.com/rogy-AquaLab/omniboat_robokit/actions/runs/8445594958/job/23133038191#step:5:30): [high:error] variable 'coef' is not initialized  [cppcoreguidelines-init-variables,-warnings-as-errors]
src/schneider_model.cpp:141: [high:error] variable 'diff' is not initialized  [cppcoreguidelines-init-variables,-warnings-as-errors]
src/schneider_model.cpp:142: [high:error] 1e-3 is a magic number; consider replacing it with a named constant  [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors]
src/schneider_model.cpp:142: [high:error] statement should be inside braces  [readability-braces-around-statements,-warnings-as-errors]
src/schneider_model.cpp:157: [high:error] method 'state_equation' can be made static  [readability-convert-member-functions-to-static,-warnings-as-errors]
src/schneider_model.cpp:165: [high:error] method 'set_q' can be made static  [readability-convert-member-functions-to-static,-warnings-as-errors]
src/schneider_model.cpp:190: [high:error] variable 'width' is not initialized  [cppcoreguidelines-init-variables,-warnings-as-errors]
src/schneider_model.cpp:194: [high:error] variable 'width' is not initialized  [cppcoreguidelines-init-variables,-warnings-as-errors]
src/schneider_model.cpp:199: [high:error] method 'rotate' can be made const  [readability-make-member-function-const,-warnings-as-errors]
src/schneider_model.cpp:202: [high:error] if with identical then and else branches  [bugprone-branch-clone,-warnings-as-errors]
src/schneider_model.cpp:202: [high:error] 0.5F is a magic number; consider replacing it with a named constant  [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,-warnings-as-errors]
src/schneider_model.cpp:211: [high:error] method 'led' can be made static  [readability-convert-member-functions-to-static,-warnings-as-errors]
src/schneider_model.cpp:213: [high:error] switch has 3 consecutive identical branches  [bugprone-branch-clone,-warnings-as-errors]


Add the functions that take Vector2 as input into LitMotionTransformExtensions.cs for 2D games.

Add BindToPositionXY, BindToPositionXZ, BindToLocalPositionXY, BindToLocalPositionXZ, BindToLocalScaleXY, BindToLocalScaleXZ to LitMotionTransformExtensions.cs.
It is quite common to use Vector2 for position and scale when making 2d games, and there are no relevant function available for that purpose. The Vector3 functions are not suitable since we do not want to change the z-component value when using these functions. The casting cost is also a concern.

It looks good. In this case, it would be better to have a YZ combination as well. (I don't know if it will actually be used, but it would be better to have it considering the symmetry of the API.)

It might also be a good idea to add similar extension methods to eulerAngles and localEulerAngles.

Hello, I added YZ and eulerAngle methods. I also added unit tests for those methods.

Merged the PR. Thanks!


Getters/Setters Macro

Created a Getters and Setters macro to eliminate what looks like boilerplate code.
For now the macros only work on struct types with named fields (like the generated gRPC types). Fields can also have a getset attribute with options. Current options:

ignore_get (don't generate getter)
ignore_set (don't generate setter)
ignore (don't generate getter or setter)

Usage looks like:
#[derive(macros::Getters, macros::Setters)
struct Executable {
    #[getset(ignore)]
    meta: Meta,
    name: String
}

There is also a getset crate, but it didn't seem like it would match the project needs.

I love your work! Thank you SO much for doing this!


Write post about curve-curve intersection as an eigenvalue problem

Very neat!: https://www2.eecs.berkeley.edu/Pubs/TechRpts/1992/6266.html

https://gist.github.com/dhermes/4933f881b57ca57bf512e1e530389350


Add the repos into the bullet plan phase list

Fixes https://github.com/vector-im/feature-dashboard/issues/18

I'm going to merge the changes - the only change I made not relating to your review comments was to push the surrounding <ul> inside the IssueTree 'cause it was grim its not being part of the component.


docs: remove formatted {' '} on Quick Start

remove formatted {' '} on https://tanstack.com/router/latest/docs/framework/react/quick-start#srcroutes__roottsx
If we do not need it, close it!

this space is necessary


git commit is not working after execute

when I try to commit it says
error: gpg failed to sign the data
fatal: failed to write commit object

Check https://github.com/mathiasbynens/dotfiles/issues/789

https://stackoverflow.com/questions/39494631/gpg-failed-to-sign-the-data-fatal-failed-to-write-commit-object-git-2-10-0
I found a solution here
the asnwer from Andy Hayden


Handle lxml raising ValueError on node.itertext() - Python 3

Same as #144 but on the Python3 branch.

Looks good to me!


[5.4] Simplify new notifications channels creation and registration

What if creating an new notification channel for laravel is just a matter of implementing 3 methods from an abstract class ? like this :
<?php

namespace App\Notifications\Channels;

use Illuminate\Foundation\Support\Notifications\NotificationChannel;

class SomeServiceChannel extends NotificationChannel
{
    /**
     * Send the given notification.
     *
     * @param  mixed  $notifiable
     * @param  \Illuminate\Notifications\Notification  $notification
     * @return mixed
     */
    public function send($notifiable, Notification $notification)
    {
        //
    }

    /**
     * Check for the driver capacity.
     *
     * @param  string  $driver
     * @return bool
     */
    public static function canHandleNotification($driver)
    {
        return in_array($driver, ['service_hook_name']);
    }

    /**
     * Create a new driver instance.
     *
     * @param  $driver
     * @return \Illuminate\Contracts\Notifications\Channels\Dispatcher
     */
    public static function createDriver($driver)
    {
        return static::canHandleNotification($driver) ? new static : null;
    }
}

and then simply declare your channel through $notificationsChannels property in the AppServiceProvider
   /**
     * Notifications channels list.
     *
     * @var array
     */
    protected $notificationsChannels = [
        \Illuminate\Foundation\Notifications\Channels\DefaultChannel,
        \App\Notifications\Channels\SomeServiceChannel
    ];

I find this easier to create and maintain, plus it allows you to only declared channels based on the need of your application, and the PR  is fully backward compatible.

You already only need to define a class with one method: https://laravel.com/docs/5.4/notifications#custom-channels

@taylorotwell thank you for your quick response. Was already aware of:
https://laravel.com/docs/5.4/notifications#custom-channels
But just thought with this method the file alone could not be distributed as a package, with that intend you will need a service provider and be force to create container bindings, list the service into config/app first before using it.  in addition, using the class name as a channel hook create unecessary dependency in the notification  object. This is really what i was trying to solve when i said "simplify...".

channel could define his own hook like 'telegram' or 'twilio'
notifications object would have no knowledge of the channels class what so ever
channel would be responsible of creating his own driver instance
a Channel class could be distributed as a package ( maybe just alone with a message class)
even the laravel buit-in channels can be plugged and unplugged as needed cause all channels share common interfaces.
ChannelManager  could create drivers without having any knowledge of any concrete channel.

I hope maybe i first misrepresented my intent. If it sound more interresting this way, i will please any question in regards.
Thankx again.


Programatically set width/height of GridItems

Hey.
For example, can we set the GridItem's width + 1 and it work as if we were resizing? I have the code:
...
data () {
    return {
      layout: [
            {"x":0,"y":0,"w":4,"h":2,"i":"0"},
  	    {"x":2,"y":0,"w":2,"h":4,"i":"1"},
  	    {"x":4,"y":0,"w":2,"h":5,"i":"2"},
  	    {"x":6,"y":0,"w":2,"h":3,"i":"3"},
  	    {"x":8,"y":0,"w":2,"h":3,"i":"4"}
      ],
      cols: 12
    }
  },
methods: {
    enlarge: function(index) {
      this.layout = this.layout.map((g, i)=>{
        if(i === index) {
          //Increase the width of the grid item by 1 at the index given
          return {...g, w: g.w + 1}
        } else {
          return g
        }
      });
    }
  }
...

When I increase it, it works the first time, but if I click the button again it keeps increasing and wont push any other grid items accordingly.

I don't see why should that be allowed if you already can resize items with drag resize.

I used to do this in the react-grid-layout, check this:

This is similar to my use case.
If you have any other suggestions tell me 😄

Is the add button on that image increasing the height of the item? Or is the item increasing its height dinamically?

It is increasing the 'h' key in the layout dynamically.
i.e:
layout.map((item, index)=>{
     return (index === 1) ? {...item, h: item.h + 1} : item
})

as you can see in the gif, the first time it renders fine, but after that it bugs out.

Can you setup a sample project ou a jsfiddle so that I can test it out?

@gmsa here you go:
https://jsfiddle.net/pxljoyio/orrqnavn/
Sorry it took so long, I've never dabbled with JSFiddle much haha

Thanks, I'll take a look when I have some free time.

@pxljoy I managed to solve this by triggering resizeEvent on gridLayout
see updated fiddle here

Thx for the hint with the ref and resizeend event.
In case it doesn't work for anyone that way (like for me), you have to wait until the child component gets re-rendered via $nextTick:
this.$nextTick(() => {
    this.$refs
        .gridLayout
        .resizeEvent(
            'resizeend',
            newItem.i,
            newItem.x,
            newItem.y,
            newItem.h,
            newItem.w
        );
});

I had a similar problem. I wanted the height of the grid item to reflect the amount of items on an array.
By attributing a value to the item.h the item would update but become hidden behind others as the grid would not update.
To solve this I used Vue.set(object, index, value) method.
Considering the object as my array of items, I determined the index with a filter by item.i and the value as the updated value of item.h
//updating the h of the item
this.myList.items[index].h = newH
//setting the array with the new object
this.$set(this.myList.items, index, this.myList.items[index]);

And this made the grid react to the change and update itself.

see this https://github.com/jbaysolutions/vue-grid-layout/issues/73
his ex: https://codepen.io/gusy/pen/jQVrGz


Remove api driven views

We don't use this code - we will do this a different way that supports lazy-loading.

Codecov Report

Merging #4537 into master will decrease coverage by 0.12%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4537      +/-   ##
==========================================
- Coverage   58.77%   58.64%   -0.13%
==========================================
  Files         889      880       -9
  Lines       29178    29056     -122
  Branches     4206     4199       -7
==========================================
- Hits        17148    17041     -107
+ Misses      12030    12015      -15


docs: Add typing-indicators.md.

Looks great, though perhaps a bit more detailed in some places than I would have written :).
@kunall17 @borisyankov @vishwesh3 FYI, can you give this a read and post any feedback?

Merged, thanks @showell!  I'd still love a round of feedback from mobile folks, but we address that in a follow-up PR.

It was super helpful. Thanks @showell
My only advice would be, here as in everywhere, to split the explanation how the client should behave, from the details of how the web app does it exactly. Not only helpful for mobile app devs, but for bots, api usage, or any other 3rd party use.

Yeah, I agree with that feedback; even if you want to understand the webapp, that will help highlight the ideas / protocol over the implementation details.

Some of the added detail was due to the original feedback. :)
I can help somebody do a second pass on this.  Conceptually, any client works like this:

writing user - send start/stop messages to /json/typing at appropriate intervals
receiving user - receive the events with type of "typing" and add notifications for "start" and remove notifications for "stop" or when a timer expires

We can probably provide schemas for those messages in the docs.

I think we want to make the 15 secs timeout more than a suggestion. If we've found it to be a good default, then we should more strongly recommend that this should be the implementation. BTW, that was a thing I missed when I initially implemented the feature.

I like the idea of being firm on the recommendation, but we should probably ensure that 15s is actually a sensible value.  I find the current implementation's timing kind of "jumpy," although it's possible there's just no perfect value here.

I think the thing I'd do to work on that sort of jumpiness is to eventually have a "has content open in compose but isn't typing" state that we display slightly differently, not to increase the "browser went away" timeout.
Agreed that we should probably just require that clients use the timeout; it's really part of the protocol.
@showell want to do a quick push to this to adjust the timeout discussion?  That seems worth doing while the iron is hot.  And then we can move the larger restructuring parts to a follow-up issue, which I can imagine one @lonerz or @synicalsyntax being interested in.


Add decorator to make plain functions return a Result

Idea
While using the library, I came up with the idea to implement a simple decorator that wraps any plain function into try-except and returns an Err if an exception occurred. This makes it very easy to wrap existing "unsafe" functions and thus prevent runtime errors.
Example:
@safe_wrap
def i_will_fail():
  raise Exception

@safe_wrap
def i_will_succeed():
  return 42

output = i_will_fail()
assert(output.is_err())

output = i_will_succeed()
assert(output.is_ok())

Existing implementation
Just to give you an idea, here is my naive first implementation (shortened):
@singledispatch
def safe_wrap(f: Callable[[Any], Any], O]) -> Callable[[Any, Any], Result[O, Exception]]:
    @wraps(f)
    def wrapper(*args: Any, **kwargs: Any) -> Result[O, Exception]:
        try:
            return Ok(f(args, kwargs))
        except Exception as err:
            return Err(err)
    return wrapper

# and now we register calls with no args and args only and kwargs only
@safe_wrap.register
def _(f: Callable[[Optional[Any]], O]) -> Callable[[Any, Any], Result[O, Exception]]:
[...]

Downsides
Typing arbitrary *args and **kwargs is not trivial, as described in https://github.com/python/mypy/issues/5876. In my current implementation, I work around this with using Any and a generic dispatch. Nevertheless, this may not comply with the excessive typing that the rest of result-module aims for.
Question(s)
What do you think about the concept and do you want something like this in the library? If so, I could provide a PR with a more elaborated version of the code shown above.

I was looking at some Lua stuff and found something quite relevant,
https://riptutorial.com/lua/example/16000/using-pcall
In that case, it's not a decorator, not sure if Lua has decorators. But the idea is somewhat similar, wrap a exception throwing function in a protected 'call-scope' and read out the sucess/failure + exception/value.

@dbrgn I think it's a interesting idea. Not sure how you feel about the scope of this library and if this falls within it.

Yeah, it does sound interesting :slightly_smiling_face: I don't currently have the capacity to review and maintain this feature though, so @francium if you're interested just go ahead!

@francium I also have no experience with Lua but had a quick look. In my opinion, pcall is exactly what I tried to mimic but without the decorator.
This would still leave the problem with the typing of args and kwargs (which I still found no good solution for). But it would make the usage non-api-breaking. In fact, you could use the pcall wherever you need, without touching old code.
But I don't see the advantage of importing a function where you probably have to read documentation for, over a two-line try-except.

I was having a quick play around with your sample code. You're correct about the generic args/kwargs typing, ran into same type checking issues without any obvious solution, except for reducing the typing here (1). But even then, I noticed some typing issues in the call site of the wrapped function (2)
(1)
O = TypeVar("O")

@singledispatch
def safe_wrap(f: Any) -> Callable[[Any], Result[O, Exception]]:
    @wraps(f)
    def wrapper(*args: Any, **kwargs: Any) -> Result[O, Exception]:
        try:
            return Ok(f(*args, **kwargs))
        except Exception as err:
            return Err(err)

    return wrapper

You also had some issues with how you passed through the args and kwargs to the wrapped f function, you missed the * and ** unpack operators in the f(...) call. I don't think you meant to omit those, just an oversight?
(2)
@safe_wrap
def throwing() -> None:
    raise TypeError()

x = throwing() # type: Result

But x = throwing() still complain about not have enough args passed into it. I'm assuming this is because of the same args/kwargs issue and no easy way of expressing any number of arguments
Anyway, it definitely works barring the type checking
Pros:

Can annotate existing legacy code with safe_wrap and it become completely runtime safe

Cons:

Type checking is a bit messy

But is there is a huge demand for this helper function? As you mentioned this is same as a few additional lines of try/except which should avoid all the type checking limitations.
I do this it's a cool approach to making things runtime safe, but I'm hesitant to push forward with this at this time. Perhaps in the future

We'll have people expressing interest in this and show that it'll a really helpful thing to have in real world codebases
Have better type checking support to avoid some of these limitations

I would be inclined to mark this as wontfix for the time being.
Let me know if you disagree otherwise I'll close this issue after waiting a bit for you to reply.

We'll have people expressing interest in this and show that it'll a really helpful thing to have in real world codebases

Yeah, let's keep this open. If a few people express interest, we can still consider shipping an implementation.

@francium great analysis, thanks for your time! :+1: And the edit you added is correct: This would solve the problem. I was stuck at the same point as you and added the generic dispatch to "solve" it.
I also had a deeper look and notices another "Con": The lack of typing for args and kwargs also causes decorated functions not to be linted correctly. Since we use Any, a caller gets no warning when passing an invalid type.
So all in all, this might be a cool feature but I absolutely agree with your concerns. Maybe generic argument typing will be added to Python in the future.

i've built a fully type-safe implementation using typing.ParamSpec to preserve type signatures. that means it depends on Python3.10+ and currently lacks Mypy support.
see #71 for details.

@noah04 out of curiosity, do you remember why you used functools.singledispatch() in your example code?

@wbolster if I remember correctly, I did that to enable generic calls with args and/or kwargs using the same decorator. But don‘t rely on that piece of code - I‘m not that into Python generics/typing.
Mentioning that, I would really like you for investing time on this topic 👍🏼

i suggest you look at #71 🙃 which seems promising

good news everybody, as_result() is now merged #71
see the readme for example usage!


Novice question

Hello,
Is it possible to set the download server to https://?
Because windows defender blocks downloads in http://

Yep! You can check the help on the server with -h and use the following:
--tls
--tlscert
--tlskey
Or if you're using docker I'd just put caddy in front of rssh, so put the rssh port on something like 4444
Then put caddy on 80/443 and reverse proxy to the rssh server in the backend


Tutorial?

Hi, this is written very confusingly. Can you help me out with the installation of scrapy and this program? I have little expericence with python.
Thanks,
Amanda.

If you're not familiar with Scrapy or Python, then you probably want to start with the CLI program scrapy-wayback-machine. That program uses this Scrapy middleware under the hood without requiring any programming. You can run the CLI to download page snapshots, and then parse them in a programming language of your choice.


enable heter. susc.

@khenisey all looking good! I tried turning down the mean of the beta but it produced too aggressive effects in NY / VT -- this is actually consistent with what I was finding in the other implementation (eg that heterogeneity can push the final infected fraction down by say 10% but to push it down by 20-30% is inconsistent with the current PCR / death data).


Question: Do you have instructions for building this project?

I am trying to compile this project so I can help contribute to it. I have visual studio code 2022, and I feel like I am pretty close to getting thing working. Right now I have errors like this when building:
Error	CS0117	'ZNet' does not contain a definition for 'Update'	Valheim.CustomRaids	Valheim.CustomRaids\Valheim.CustomRaids\Valheim.CustomRaids\Core\Network\Dispatcher.cs	34	Active

According to visual studio the ZNet class is declared in the assembly_valheim.dll. I don't really understand why my version of the dll does not have this method. I copied the dll from my game directory and my game is up to date. Do you know what version of that dll you were using, or is there something else that I am missing?
Edit: I see that Update is a private method in the class, still unsure of how to proceed

You are hitting one of the very common gotcha's of getting started.
Its because I am working with a "publiziced" dll, where all access modifiers have been changed to public, and the project has been set to ignore them at run-time. This is to avoid the overhead and dealing with reflection.
You can generate this yourself in multiple ways, personally I have a small script using the tool https://github.com/BepInEx/NStrip that I use for stripping and publicizing the dependencies.

That makes sense, thanks @ASharpPen. I'll give this a go tomorrow.
Would you consider including that DLL as one of the artifacts on a release? Would save others from having to do it at least.


Move the scratch field in nwb to metadata json

As a temporary solution, I previously stored session-related metadata in the nwb.scratch field: https://github.com/AllenNeuralDynamics/dynamic-foraging-task/blob/2fea58cc170beb75d6d92e31a9d7253e26c6bf57/src/foraging_gui/TransferToNWB.py#L153-L197
We should relocate all of them to session.json etc.
related issues:

https://github.com/AllenNeuralDynamics/aind-behavior-blog/discussions/408

@alexpiet @XX-Yin  @Ahad-Allen

I have asked Saskia where to store these fields in the session.json. waiting for response

also tagging @hagikent here as he will be working on backfilling metadata json from previously generated nwbs.

I have asked Saskia where to store these fields in the session.json. waiting for response

My understanding is:

trials and water info --> https://github.com/AllenNeuralDynamics/aind-data-schema/blob/319bdcb64157f83d242211f1adb843153831c948/src/aind_data_schema/core/session.py#L521-L525
all other performance-related fields --> output_parameters: https://github.com/AllenNeuralDynamics/aind-data-schema/blob/319bdcb64157f83d242211f1adb843153831c948/src/aind_data_schema/core/session.py#L520
Optogenetics-related --> should go into stimulus_parameters of PhotoStimulation

What I'm not sure about:

Weights-related info --> should go into subject or session?

I know they can go to stimulus_epoch, but it does not make sense to me. These parameters should be for that session instead of for a specific stimulus (e.g. we have auditory stimulus and optogenetics stimulus, but foraging efficiency, total reward, finish rate ... are for that session instead of for auditory stimulus or optogenetics).

Resolved by https://github.com/AllenNeuralDynamics/NWB-Packaging-FiberPhotometry-Base-Capsule/pull/30


modelpredict is slightly less flexible than it used to be

modelpredict is nice now in that if you only have stress+time or strain+time data it automatically knows which modulus to use. However, what about this (very common, pretty much canonical) example:

user gets data into RheoTime struct
fits a RheoModel to the data
wants to predict new data based on fitted model to plot

Step 3 now requires a prior call to extract so that modelpredict knows which modulus to use. Perhaps there is a nice way to avoid this extra line of code as it is such a common workflow?

Hi Louis,
I think the code is clearer with the extraction step. The extraction could done when modelpredict is called, without naming a new variable:
maxwell_predict = modelpredict( extract(data, strain_only), maxwell_model )
I did agree with you that the keyword "strain_only" may benefit from a better name though.
We could also have a special keyword in model predict to combine with the extraction. I'm not opposed to this! but for clarity the keyword should relate to stress or strain, rather than modulus used, I think.

I will ask for a vote from @ab2425 as well, if she would like the convenience function you mentioned in your comment then I will add it. If not I won't as I'm on the fence as they say.

I've come round to this way of doing it. I would prefer if there's only one (canonical) way of doing things so it should be this one.