sockaddr_storage shouldn't have internal padding bytes

A common use-case of sockaddr_storage is to store a socket address in a sockaddr_storage, inspect the ss_family field and the socket address length, and then cast it to the correct socket address type (for example sockaddr_in). For example, this is what the nix crate currently does using a union: https://github.com/nix-rust/nix/blob/fbebb21dd8df447a1408795b4b5706d9ca6c55df/src/sys/socket/addr.rs#L1537-L1540
The rust libc library defines sockaddr_storage as the following on Linux:
pub struct sockaddr_storage {
    pub ss_family: sa_family_t,
    __ss_align: ::size_t,
    #[cfg(target_pointer_width = "32")]
    __ss_pad2: [u8; 128 - 2 * 4],
    #[cfg(target_pointer_width = "64")]
    __ss_pad2: [u8; 128 - 2 * 8],
}

On Linux x86-64, this results in the following representation:
type: `unix::linux_like::sockaddr_storage`: 128 bytes, alignment: 8 bytes
    field `.ss_family`: 2 bytes
    padding: 6 bytes
    field `.__ss_align`: 8 bytes, alignment: 8 bytes
    field `.__ss_pad2`: 112 bytes

From what I understand, the 6 padding bytes in sockaddr_storage should cause a cast from memory initialized as a sockaddr_storage to another type like sockaddr_in to invoke UB since these padding bytes are considered to be uninitialized memory. For example these padding bytes of sockaddr_storage overlap with the sockaddr_in.sin_port field, so reading the sin_port field after casting from a sockaddr_storage would be UB. And in the nix case, the ss: libc::sockaddr_storage = mem::zeroed() may also not zero these 6 padding bytes, possibly leading to UB when it's later read as a different socket address type if those padding bytes weren't overwritten during the ptr::copy.
On recent glibc versions (such as 2.31 on Ubuntu 20.04), they define sockaddr_storage as:
#define __ss_aligntype  unsigned long int
#define _SS_PADSIZE \
  (_SS_SIZE - __SOCKADDR_COMMON_SIZE - sizeof (__ss_aligntype))

struct sockaddr_storage
  {
    __SOCKADDR_COMMON (ss_);    /* Address family, etc.  */
    char __ss_padding[_SS_PADSIZE];
    __ss_aligntype __ss_align;  /* Force desired alignment.  */
  };

Since they have the padding/alignment fields in the opposite order from rust's libc definition (have the char array field first), there are no padding bytes:
printf("sockaddr_storage.ss_family: (offset) %ld, (size) %ld\n",
       (void *)&addr.ss_family - (void *)&addr,
       sizeof(addr.ss_family));
printf("sockaddr_storage.__ss_padding: (offset) %ld, (size) %ld\n",
       (void *)&addr.__ss_padding - (void *)&addr,
       sizeof(addr.__ss_padding));
printf("sockaddr_storage.__ss_align: (offset) %ld, (size) %ld\n",
       (void *)&addr.__ss_align - (void *)&addr,
       sizeof(addr.__ss_align));
printf("sockaddr_storage: (size) %ld\n", sizeof(addr));

sockaddr_storage.ss_family:	(offset) 0,	(size) 2
sockaddr_storage.__ss_padding:	(offset) 2,	(size) 118
sockaddr_storage.__ss_align:	(offset) 120,	(size) 8
sockaddr_storage: (size) 128

The order of these fields was changed in this 2016 glibc patch: "Make padding in struct sockaddr_storage explicit [BZ #20111]"<EMAIL_ADDRESS>

Since the __ss_align and __ss_pad2 fields are private, it should be no problem to change them to make all padding bytes explicit.  Would you submit a PR for that?

Closing since #3010 fixes this on Linux and Fuchsia. If anyone finds other platforms with this issue it can be reopened, but I'm not familiar enough with other platforms to know if it is or not.


citation?

Thanks for uploading the project! If I want to cite your work, how should I do it? Should I reference this Github project or do you have some document/report/paper to be cited?

Hi,
You can simply cite our ACL paper: [Lin et al., 2016] Yankai Lin, Shiqi
Shen, Zhiyuan Liu, Huanbo Luan, and Maosong Sun. Neural Relation Extraction
with Selective Attention over Instances. In Proceedings of ACL.
Thanks for your support.
Best regards,
Zhiyuan
On Wed, Apr 19, 2017 at 8:52 PM, andriy-nikolov<EMAIL_ADDRESS>wrote:

Thanks for uploading the project! If I want to cite your work, how should
I do it? Should I reference this Github project or do you have some
document/report/paper to be cited?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/thunlp/TensorFlow-NRE/issues/11, or mute the thread
https://github.com/notifications/unsubscribe-auth/AB_uoNy3qsMywxRw1eau8B29CXeUoA1Hks5rxgOegaJpZM4NBo2c
.


has no exported member using @angularcli1.6.5

Versions
<!--
Angular CLI: 1.6.5
Node: 9.5.0
OS: linux x64
Angular: 5.2.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.5
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.5
@schematics/angular: 0.1.17
typescript: 2.5.3
webpack: 3.10.0

Faced the following issues:
ERROR in src/app/home/home.component.ts(5,10): error TS2305: Module '"/home/kashif/projects/angularprojects/kidpull/kidjoTvApp/src/app/shared/services/RefreshWeb/index"' has no exported member 'RefreshWebService'.
src/app/shared/entities/index.ts(8,15): error TS2307: Cannot find module './Addfav'.
src/app/shared/entities/index.ts(10,15): error TS2307: Cannot find module './RefreshWeb'.
src/app/shared/services/RefreshWeb/index.ts(1,15): error TS2307: Cannot find module './RefreshWeb.service'.
src/app/shared/services/RefreshWeb/refreshweb.service.ts(6,10): error TS2305: Module '"/home/kashif/projects/angularprojects/kidpull/kidjoTvApp/src/app/shared/entities/index"' has no exported member 'Refresh'.
src/app/shared/services/RestService/rest-connector.service.ts(5,32): error TS2307: Cannot find module '../blockui/index'.
src/app/shared/services/RestService/rest-connector.service.ts(6,25): error TS2305: Module '"/home/kashif/projects/angularprojects/kidpull/kidjoTvApp/src/app/shared/entities/index"' has no exported member 'Refresh'.
src/app/shared/services/favoritesService/favorites.service.ts(4,10): error TS2305: Module '"/home/kashif/projects/angularprojects/kidpull/kidjoTvApp/src/app/shared/entities/index"' has no exported member 'AddFav'.
src/app/shared/shared.module.ts(4,32): error TS2307: Cannot find module './services/blockui/index'.
src/app/shared/shared.module.ts(6,10): error TS2305: Module '"/home/kashif/projects/angularprojects/kidpull/kidjoTvApp/src/app/shared/services/RefreshWeb/index"' has no exported member 'RefreshWebService'.
src/app/video-selection/video-selection.component.ts(7,10): error TS2305: Module '"/home/kashif/projects/angularprojects/kidpull/kidjoTvApp/src/app/shared/entities/index"' has no exported member 'AddFav'.

ng s or npm start not working

Unfortunately there's not a whole lot we can do at this point, please provide some more information regarding your application, and the steps it takes to get to this error.

Same problem here since last beta (6.0.0 beta 6). Example:
node_modules/@angular/flex-layout/typings/media-query/server-match-media.d.ts(2,10): error TS2305: Module '"c:/myproject/node_modules/rxjs/BehaviorSubject"' has no exported member 'BehaviorSubject'.
node_modules/@angular/flex-layout/typings/media-query/server-match-media.d.ts(5,10): error TS2305: Module '"c:/myproject/node_modules/rxjs/Observable"' has no exported member 'Observable'.

Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.


Asking about terms in MACE RUN

Before you open an issue, please make sure you have tried the following steps:

Make sure your environment is the same with (https://mace.readthedocs.io/en/latest/installation/env_requirement.html).
Have you ever read the document for your usage?
Check if your issue appears in HOW-TO-DEBUG or FAQ.
The form below must be filled.

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
NDK version(e.g., 15c):
GCC version(if compiling for host, e.g., 5.4.0):
MACE version (Use the command: git describe --long --tags):
Python version(2.7):
Bazel version (e.g., 0.13.0):

Describe the problem
I would like to ask about the terms in this screen shoot.

What is total init latency and the difference between create init latency and create mace engine latency
2.what is warm up latency and time in 1st warm up latency
3.what is average latency ? is it the average of inference time for run the model?
4.what is time in the capability(CPU) in that screenshoot show time 29.017

To Reproduce
Steps to reproduce the problem:
1. cd /path/to/mace
2. python tools/converter.py run --config_file=/path/to/your/model_deployment_file

total init latency and create mace engine latency are basically the same thing, except a trivial retrying mechanism for total init latency if creating mace engine failed.
They are the same thing, which is the first inference time to run the model.
Yes. Generally, run_avg should be faster than warmup as some overhead, e.g., some memory allocation, etc., is bypassed after the first run. Maybe the model was run too many rounds continuously that heated the device too much, or it was racing resources with other applications.
The capability time is the inference time of a small model (created in mace_run.cc) to get a grasp of device capability.

hei thankyou for ansnwer but i got different problem.
when i ran tools/bazel-build-standalone-lib.sh i found problem
could u reply this issue https://github.com/XiaoMi/mace/issues/610?
thankyou!! @lee-bin

@ramawidrap  See comment in https://github.com/XiaoMi/mace/issues/610#issuecomment-601582068.


[service discovery] marathon: Expose containerPort as __meta label for marathon_sd_config

https://github.com/prometheus/prometheus/issues/4310
Signed-off-by: fuling<EMAIL_ADDRESS>

This seems redundant, it's already in the address.

This seems redundant, it's already in the address.

#4310 This issue is not closed yet

This seems redundant, it's already in the address.

I went to complete other issues, the list of prometheus issues is too long, and more contributors are needed


boards/arm: unify boot partition size for nRF boards

The DTS for nRF53 and nRF91 boards has been modified to cut the size
of boot partition from 64KiB to 48KiB, making it the same size as for
nRF52.
Resolves #25664
Signed-off-by: Dominik Ermel<EMAIL_ADDRESS>

Thanks for this PR @de-nordic,
Although the patch seems straightforward, I think we should add an RFC until we've understood all the consequences of this change (I recall at least @hakonfam had some concerns).

^^ old PR which had the same objective https://github.com/zephyrproject-rtos/zephyr/pull/22228

Please remove scratch partitions from all boards and share leftover memory space among image partitions.

This is for single image DFU? There are features that use scratch partition, right?

no, this is about usage of swap using move algorithm which allows to resign from scratch partition.

I check that the on of the bigger mcuboot configuration (USB CDC-ACM recovery + logging via serial) consumes 62936 B.

no, this is about usage of swap using move algorithm which allows to resign from scratch partition.

Ok, so  #22228 is going to be merged soon and I can then remove the scratch references from here.

I refreshed #22228 as well.

I check that the on of the bigger mcuboot configuration (USB CDC-ACM recovery + logging via serial) consumes 62936 B.

This is important finding.  Can you discuss it here: https://github.com/zephyrproject-rtos/zephyr/issues/25664

^^ old PR which had the same objective #22228

Similar, the #22228 does not alter size of boot partitions for nRF boards.

@de-nordic I would rather suggest to have such big boot partition on bigger devices which this pr aimed. I made note on the issue.

@nvlsianpu and @de-nordic can we agree on a path forward for this release?

@nvlsianpu Thanks for approving this.


fails when executing catkin_make on RPi Zerp

Hi,
Any idea what am I missing?
catkin_make -DCATKIN_WHITELIST_PACKAGES="class_loader"
Base path: /home/pi/ros_catkin_ws
Source space: /home/pi/ros_catkin_ws/src
Build space: /home/pi/ros_catkin_ws/build
Devel space: /home/pi/ros_catkin_ws/devel
Install space: /home/pi/ros_catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/pi/ros_catkin_ws/build"
####
####
#### Running command: "make -j1 -l1" in "/home/pi/ros_catkin_ws/build"
####
[ 20%] Building CXX object class_loader/CMakeFiles/class_loader.dir/src/class_loader.cpp.o
In file included from /home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader.hpp:46:0,
                 from /home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp:30:
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp: In function ‘void class_loader::impl::registerPlugin(const string&, const string&)’:
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:181:45: error: there are no arguments to ‘CONSOLE_BRIDGE_logDebug’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logDebug’ must be available [-fpermissive]
     getCurrentlyLoadingLibraryName().c_str());
                                             ^
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:181:45: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:199:79: error: there are no arguments to ‘CONSOLE_BRIDGE_logDebug’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logDebug’ must be available [-fpermissive]
       "Please refactor your code to isolate plugins into their own libraries.");
                                                                               ^
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:222:25: error: there are no arguments to ‘CONSOLE_BRIDGE_logWarn’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logWarn’ must be available [-fpermissive]
       class_name.c_str());
                         ^
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:230:62: error: there are no arguments to ‘CONSOLE_BRIDGE_logDebug’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logDebug’ must be available [-fpermissive]
     class_name.c_str(), reinterpret_cast<void *>(new_factory));
                                                              ^
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp: In function ‘Base* class_loader::impl::createInstance(const string&, class_loader::ClassLoader*)’:
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:250:95: error: there are no arguments to ‘CONSOLE_BRIDGE_logError’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logError’ must be available [-fpermissive]
       "class_loader.impl: No metaobject exists for class type %s.", derived_class_name.c_str());
                                                                                ^
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:270:44: error: there are no arguments to ‘CONSOLE_BRIDGE_logDebug’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logDebug’ must be available [-fpermissive]
         "possible to shutdown the library!");
                                            ^
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:281:56: error: there are no arguments to ‘CONSOLE_BRIDGE_logDebug’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logDebug’ must be available [-fpermissive]
     (typeid(obj).name()), reinterpret_cast<void *>(obj));
                                                        ^
In file included from /home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp:30:0:
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader.hpp: In member function ‘void class_loader::ClassLoader::onPluginDeletion(Base*)’:
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader.hpp:245:36: error: there are no arguments to ‘CONSOLE_BRIDGE_logDebug’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logDebug’ must be available [-fpermissive]
       reinterpret_cast<void *>(obj));
                                    ^
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader.hpp:262:35: error: there are no arguments to ‘CONSOLE_BRIDGE_logWarn’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logWarn’ must be available [-fpermissive]
           getLibraryPath().c_str());
                                   ^
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader.hpp: In member function ‘Base* class_loader::ClassLoader::createRawInstance(const string&, bool)’:
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader.hpp:295:7: error: there are no arguments to ‘CONSOLE_BRIDGE_logInform’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logInform’ must be available [-fpermissive]
       );
       ^
/home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp: In constructor ‘class_loader::ClassLoader::ClassLoader(const string&, bool)’:
/home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp:72:31: error: ‘CONSOLE_BRIDGE_logDebug’ was not declared in this scope
     this, library_path.c_str());
                               ^
/home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp: In destructor ‘virtual class_loader::ClassLoader::~ClassLoader()’:
/home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp:82:65: error: ‘CONSOLE_BRIDGE_logDebug’ was not declared in this scope
     "Destroying class loader, unloading associated library...\n");
                                                                 ^
/home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp: In member function ‘int class_loader::ClassLoader::unloadLibraryInternal(bool)’:
/home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp:122:70: error: ‘CONSOLE_BRIDGE_logWarn’ was not declared in this scope
       "destroying the ClassLoader. The library will NOT be unloaded.");
                                                                      ^
class_loader/CMakeFiles/class_loader.dir/build.make:62: recipe for target 'class_loader/CMakeFiles/class_loader.dir/src/class_loader.cpp.o' failed
make[2]: *** [class_loader/CMakeFiles/class_loader.dir/src/class_loader.cpp.o] Error 1
CMakeFiles/Makefile2:736: recipe for target 'class_loader/CMakeFiles/class_loader.dir/all' failed
make[1]: *** [class_loader/CMakeFiles/class_loader.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Please provide more information such as what operating system you are using and what version of the code you are trying to compile?
By the look of it you have an old version of console_bridge (likely using raspbian 8 Jessie)? If so you should use the indigo-devel branch of class_loader.
ROS Melodic targets only Debian Stretch and Ubuntu Bionic so the melodic-devel branch is not expected to compile on older versions of these operating systems.

closing as I think the question has been answered. Please feel free to comment here if you still face the issue and the ticket can be reopened


An Apex error occurred: System.LimitException: Apex CPU time limit exceeded

I am using a DLRS job in a Process Builder. As of late I have been getting a lot of flow application error reports. These flows are scheduled to run 1 minute after the creation date. I am using a formula field for the scheduled field. Do you know why I would be getting a time limit exceeded error?
Thanks,
Tami

This is a really general error and hard to pin point due it being consumed by all code in the request not just packaged code (like the SOQL governor for example). Furthermore its non-deterministic, meaning sometimes it works, sometimes not, depends typically on the load on the service sometimes. If your getting more often than not, i'd say your closer to the tolerance used, which can be +10-15 seconds (in my experience) over the 10 seconds (interactive) or 60 second (in background) limit.
This is what the docs say about this...
"CPU time is calculated for all executions on the Salesforce application servers occurring in one Apex transaction. CPU time is calculated for the executing Apex code, and for any processes that are called from this code, such as package code and workflows. CPU time is private for a transaction and is isolated from other transactions. Operations that don’t consume application server CPU time aren’t counted toward CPU time. For example, the portion of execution time spent in the database for DML, SOQL, and SOSL isn’t counted, nor is waiting time for Apex callouts."
If you can capture a debug log (while Dev Console is open), then try to use the Developer Console Profiler to discover where the most time is being spent. Otherwise you can try to review the raw text of the debug logs and see where large jumps in the time index in the log are made.
Hope this helps!

@tamilust Please let me know if you want to continue to discuss, meanwhile i'll close this issue out. You can still add comments to it and i will still see them. Thanks.


Fix: Better handling of paths to correctly manage windows paths from Arr

Still testing, don't merge

Actually fixed now. This change will allow daps to recognise and parse windows paths correctly

I'll merge this when I get a chance to look it all over. Prolly gonna be this weekend when I actually get to it.
I assume this has also been tested on a Linux machine as well to make sure no bugs were introduced?

Yes it has, and it just uses a regex match to recognise a Windows drive path which will never be the case on Linux

Any updates on this please?


Expose more of Oxigraph as rdflib plugins

rdflib allows to register plugins for I/O and SPARQL processing. It might be nice to expose oxigraph features using it to allow rdflib users to opt-in to use some oxigraph implementations instead of the rdflib ones.

@Tpt , how can we collaborate on this?
I will be re-implementing OxigraphStore implementation , which we use in neat.


Publish npm package

react-native-screenshot-detector isn't available on npm, so $ npm install react-native-screenshot-detector --save doesn't seem to work. There is a way to add it to package.json as "react-native-screenshot-detector": "git://github.com:blendlabs/react-native-screenshot-detector.git", but installing a package would be more convenient and robust (in terms of further updates).

https://www.npmjs.com/package/react-native-screenshot-detector
Done! Thank you for your interest, I meant to do this for a while and appreciate you pushing me to get it done.


using sub-templates for merging global config with endpoint specific config

Environment info:

KrakenD version: 2.1.3

Describe what are you trying to do:
I want to use flexible config such that I have one settings file (viz., global.json) which contains settings that are common/default across endpoints. More importantly, I want to create a separate file for every endpoint (e.g. users.json, accounts.json, etc), which maintains information specific to that endpoint. I don't want the endpoint specific file to be  a template, since that will lead to repetition of code. Instead I want a single sub-template that I can invoke for every endpoint. To be able to do this I need to be able to pass 2 json setting files (viz., global.json and users.json or global.json and accounts.json) to each invocation of the sub-template. This means I need to construct a json containing these 2 jsons. But, I'm new to Go and Go templates and don't know how to do this. go template documentation says there is a js function which " Returns the escaped JavaScript equivalent of the textual representation of its arguments." but it's not clear what that means nor is there any example code for it.
Your documentation for sub-templates says, " This context variable could be an object."
So, how does one create that object?
Your configuration file:
Here's my sample configuration files, which ofcourse does not work (since I've put some pseudo code for your convenience).
krakend.tmpl:
{
  "$schema": "https://www.krakend.io/schema/v3.json",
  "version": 3,
  "name": "nesos-apigw",
  "plugin": {
    "pattern": ".so",
    "folder": "/opt/krakend/plugins/"
  },
  "extra_config": {
    "telemetry/logging": {
      "level": "DEBUG",
      "prefix": "[KRAKEND]",
      "syslog": false,
      "stdout": true,
      "format": "default"
    }
  },
  "sequential_start": true,
  "timeout": "3000ms",
  "cache_ttl": "300s",
  "output_encoding": "no-op",
  "encoding": "no-op",

  "endpoints": [
     {{ with $context :=  "a json containing .global and .users from settings" }}
     {{template "Resource" $context }} {{end}},
     {{ with $context :=  "a json containing .global and .accounts from settings" }}
     {{template "Resource" $context }} {{end}}
  ]
}

resource.tmpl:
{{define "Resource"}}

{{$g := .global}}
{{$r := .resource}}

{{range $i, $m := $r.methods}}
{{if $i}},{{end}}
{
    "endpoint": {{if $m.front}}"{{$m.front}}"{{else}}"{{$m.front}}"{{end}},
    "method": "{{$m.verb}}",
    {{if $m.timeout}}"timeout": "{{$m.timeout}}",{{end}}
    {{if $m.query_params}}"input_query_strings": {{marshal $m.query_params}},{{end}}
    "extra_config": {{if $m.extra}}{{marshal $m.extra}}{{else}}{{marshal $g.extra}}{{end}},
    "input_headers": {{if $m.headers}}{{marshal $m.headers}}{{else}}{{marshal $g.headers}}{{end}},
    "backend" : [
        {
            "url_pattern": {{if $m.back}}"{{$m.back}}"{{else}}"{{$r.back}}"{{end}},
            "host": ["{{$r.host}}"]
        }
    ]
}
{{end}}
{{end}}

global.json:

{
    "extra": {
        "plugin/req-resp-modifier": {
            "name": [
                "req-modifier"
            ]
        },
        "auth/validator": {
            "operation_debug": true,
            "alg": "ES256",
            "jwk_url": "http://authserver:8080/jwk",
            "disable_jwk_security": true,
            "cache": true,
            "cache_duration": 10,
            "propagate_claims": [
                [
                    "email",
                    "X-UserEmail"
                ]
            ]
        }
    },
    "many_config": {
        "qos/ratelimit/router": {
          "max_rate": 50
        },
        "plugin/req-resp-modifier": {
            "name": [
                "req-modifier"
            ]
        },
        "auth/validator": {
            "operation_debug": true,
            "alg": "ES256",
            "jwk_url": "http://authserver:8080/jwk",
            "disable_jwk_security": true,
            "cache": true,
            "cache_duration": 10,
            "propagate_claims": [
                [
                    "email",
                    "X-UserEmail"
                ]
            ]
        }
    },
    "headers": [
        "Content-Type",
        "Authorization",
        "X-UserEmail"
    ],
    "headers_get": [
        "Authorization",
        "X-UserEmail"
    ],
    "host_admin": ["http://adminserver:8080"]
}

users:json:
{
    "front": "/v1/users",
    "back": "users",
    "host": "http://adminserver:8080",
    "methods": [
        {
            "verb": "POST",
            "timeout": "20000ms"
        },
        {
            "front": "/v1/users/{id}",
            "verb": "GET",
            "back": "/users/{id}"
        },
        {
            "front": "/v1/users/{id}",
            "verb": "PUT",
            "back": "/users/{id}"
        },
        {
            "front": "/v1/users/{id}",
            "verb": "DELETE",
            "back": "/users/{id}"
        },
        {
            "verb": "GET",
            "query_params": [
                "pagesz",
                "offset",
                "sortby"
            ]
        }
    ]
}

accounts.json:
{
    "front": "/v1/accounts",
    "back": "accounts",
    "host": "http://adminserver:8080",
    "methods": [
        {
            "verb": "POST",
            "timeout": "20000ms"
        }
    ]
}

Hello,
You might find interesting having a look at the Sprig documentation to achieve such things. For instance,  you request of creating a dictionary with the contents of two different files can be easily achieved like this:
"endpoints": [
     {{template "Resource" (dict "global" .global "users" .users) }}
  ]

Also, you don't need to do a define on each template. You can simply include it with {{ template "resource.tmpl" ...}
Hope this helps

Thanks @alombarte . That worked like a charm.
BTW, is there any reason that you recommend using {{template "resource.tmpl" ...} instead of {{define "Resource" }}?


Change JSON-RPC libraries?

I'm trying to use Test RPC in conjunction with my gulp-ethertest tool, but it looks like jsonrpclib is pretty easily brought to its knees by simple test cases. In particular, jsonrpclib seems to have a request-prioritization problem that leads to early requests for filter logs to be drowned out by block filter watchers. In a private testing environment, requests would ideally be handled in a more-or-less-FIFO order. (Which is to be expected in a multi-threaded server, of course, but parallel request processing is really not a positive in this case.)
Alternatively, introducing an optional delay between mining blocks might help.

Hmm. This is a good question. Are you using batch JSON RPC requests (i.e., one request, array of payloads), or are your requests individually sent in parallel?
If using batch requests, the JSON RPC spec says that implementations are free to run the requests in parallel. If you're sending them individually, you might consider waiting for the first one to complete before sending the next (as you'd likely need to do with geth anyway). Would need an example to make a better recommendation, however.

Link to spec: http://www.jsonrpc.org/specification#batch

I'm just using web3. I haven't yet checked to see if geth is similarly impeded.

Can you point me to the code in your app that's having the issue? I noticed it was on /r/ethereum recently. A github link would be great.

Sure. I'll clean it up a little first, as I don't want to reveal what I'm working on yet, and then I'll link you to it.

Ah, makes sense. Thanks.

Okay, so this should demonstrate the problem: https://github.com/ryepdx/welcometothejungle
It will eventually return the results expected when you run "gulp test", but it'll take much longer than it should. Additionally, if you comment out the "watchLogEvents: false" line (#100) in gulpfile.js, it'll run one contract's tests and then just stop. This doesn't happen with geth, which makes me suspect it's a problem with Test RPC.
I surmised that the problem appeared to be jsonrpclib by putting debug output lines in LogFilter.getChanges to see when the event filters got requested first, and in node_modules/web3/lib/web3/httpprovider.js to see when the request for the event filters first went out and when that particular request (as tagged by the JSON-RPC request's id property) finally was responded to by Test RPC. From that I was able to tell that the request for the event logs went out almost immediately and that the event logs were returned just as quickly from the LogFilter object, but then the JSON-RPC response ended up taking a very long time to come back. So while I can't point to where in jsonrpclib the problem is, I have a very strong suspicion that is is in jsonrpclib.

I was able to rewrite my testing tool to use only one watcher each for every event type and cut down on the number of transaction receipt requests it was making. Seems to have resolved the issue for me, at least for the time being.

Sorry I wasn't able to take a look at this - got really backed up this week. Let me know if you'd still like me know if you run into anymore trouble.

No worries. I think it's a mixed bag, honestly. Reality is that over-chatty
dapps should fail, because they'll end up failing in the wild. But on the
other hand, it does detract from pure "contract logic only" tests.
On Thu, Aug 27, 2015 at 2:47 PM, Tim Coulter<EMAIL_ADDRESS>wrote:

Sorry I wasn't able to take a look at this - got really backed up this
week. Let me know if you'd still like me know if you run into anymore
trouble.
—
Reply to this email directly or view it on GitHub
https://github.com/ConsenSys/eth-testrpc/issues/17#issuecomment-135565030
.


2024-08 Updates

Sorry, this got created in the wrong repo due to GitHub's long-standing bug with creating PRs in forked repos.


GitHub action : Add linux CI with docker container

There are some work in progress to provide custom docker image with pre-compiled environnement with ortools and sirius compilation.
Docker images must be integrated in some GitHub action.
This is for now impossible without some change in code for sirius_solver link.
We must add sirius_solver in target_link_directories for src_helpers.
But in this case we add sirius as a dependency.

A docker image is now used.
sirius_solver is added in target_link_directories for src_helpers IF sirius_solver is available.
This is a quick fix but this won't be needed after some work on rte ortools branch for sirius_solver dependencies when using sirius.


Fixed design doc broken link

What type of PR is this?

Uncomment only one  /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind new feature
/kind bug fix
/kind cleanup
/kind revert change
/kind design
/kind documentation
/kind enhancement

/kind documentation
What this PR does / why we need it:
Fixed design doc broken link
Which issue(s) this PR fixes:

Fixes #
Test Report Added?:

Uncomment only one  /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind TESTED
/kind NOT-TESTED
/kind TESTED

Test Report:

Special notes for your reviewer:
Signed-off-by: Amit Roushan<EMAIL_ADDRESS>

LGTM


Separate mainBrowser in parts.

I tried to separate mainBrowser.js in many files to have a better perform, however, How could access MVC/Views/index.cshtml to dynamize this line in chunks:

For exemple:

You can use a tag helper with a wildcard, it will include all the files that match. Make sure you empty the folder as this will include all the files that match.


ActionMAX East

Source
https://www.tvpassport.com/tv-listings/stations/actionmax-eastern/1377
Channels
ActionMaxEast.us
Notes
Adding to TVPassport please ? It was added to another links already.

Hello. Can you adding them to tvpassport please ? I added them yesterday and still wait for them to show up on my tv schedule. Thanks. ^_^


Move periods inside quotation marks in why-are-my-commits-linked-to-the-wrong-user#commits-are-linked-to-another-user

Code of Conduct

[X] I have read and agree to the GitHub Docs project's Code of Conduct

What article on docs.github.com is affected?
https://docs.github.com/en/pull-requests/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user#commits-are-linked-to-another-user
This issue is intended for newcomers to the OS Docs repo! 💛
If you are veteran of the OS Docs repo and are looking for issues to work on, take a look at our help wanted section ✨
What part(s) of the article would you like to see updated?

To change the email address in your local Git configuration, follow the steps in "Setting your commit email address".

Add the email address from step 2 to your account settings by following the steps in "Adding an email address to your GitHub account".

Move periods inside quotation marks to maintain consistency with other docs (and style guide)
Additional information
No response

Hi @nguyenalex836! I created a PR for this issue in https://github.com/github/docs/pull/35366. This is my first contribution to GitHub Docs, super happy to help! 😄


ENH: optimize._chandrupatla: add array API support

Reference issue
gh-7242
What does this implement/fix?
This adds array API support to scipy.optimize._chandrupatla and paves the way toward adding array API support to the other elementwise iterative methods (e.g. _differentiate, _tanhsinh, _nsum, _chandrupatla_minimize, and the bracket finders). I'll propose making the rootfinder, minimizer, and bracket finders public shortly.
Additional information
The performance of this function compared to the existing bracketing rootfinders is worst when function evaluations are inexpensive, so I compared the performance between

brentq
_chandrupatla (NumPy)
_chandrupatla (PyTorch, CPU)
_chandrupatla (CuPy)

when finding the root of xp.cos(x) - p for many values of p. The bracket is always $[0, \pi]$. brentq's default absolute x-tolerance is 2e-12, so I set _chandrupatla to 1e-12 to be more than fair, and I confirmed that both solvers meet their respective tolerance. _chandrupatla finds the roots in a single vectorized call whereas brentq loops with a list comprehension.

# import time
# import numpy as np
# import cupy as cp
# import torch
# import matplotlib.pyplot as plt
#
# rng = np.random.default_rng(1638083107694713882823079058616272161)
# from scipy import optimize
# from scipy.optimize._chandrupatla import _chandrupatla
#
# xp = torch
# n = 10
# n = int(n)
# a = xp.asarray(0)
# b = xp.asarray(np.pi)
# ps = xp.asarray(rng.random(size=n) * 2 - 1, dtype=xp.float64)
#
# def f(x, p):
#     return xp.cos(x) - p
#
# tic = time.perf_counter()
# res = _chandrupatla(f, a, b, args=(ps,), xatol=1e-12)
# toc = time.perf_counter()

import time
import numpy as np
import cupy as cp
import torch
import matplotlib.pyplot as plt

rng = np.random.default_rng(1638083107694713882823079058616272161)
from scipy import optimize
from scipy.optimize._chandrupatla import _chandrupatla

ns = np.logspace(0, 6, 30)

times = {np: [], cp: [], torch: [],  'brentq':[]}

for xp in [np, cp, torch, 'brentq']:
    brentq = False
    if xp == 'brentq':
        xp = np
        brentq = True

    for n in ns:
        n = int(n)
        a = xp.asarray(0)
        b = xp.asarray(np.pi)
        ps = xp.asarray(rng.random(size=n) * 2 - 1, dtype=xp.float64)

        def f(x, p):
            return xp.cos(x) - p

        if brentq:
            tic = time.perf_counter()
            ref = [optimize.brentq(f, a, b, args=(p,)) for p in ps]
            toc = time.perf_counter()
            times['brentq'].append(toc - tic)
            np.testing.assert_allclose(ref, np.arccos(ps), atol=2e-12)
            continue

        tic = time.perf_counter()
        res = _chandrupatla(f, a, b, args=(ps,), xatol=1e-12)
        toc = time.perf_counter()
        times[xp].append(toc - tic)
        np.testing.assert_allclose(cp.asnumpy(res.x), np.arccos(cp.asnumpy(ps)), atol=1e-12)

plt.loglog(ns, times[np], label='np')
plt.loglog(ns, times[cp], label='cp')
plt.loglog(ns, times[torch], label='torch')
plt.loglog(ns, times['brentq'], label='brentq')
plt.xlabel('number of roots')
plt.ylabel('execution time (s)')
plt.title('Root of `xp.cos(x) - p`')
plt.legend()
plt.show()

The function has a lot of overhead due to bells and whistles (e.g. input validation with nice error messages, rich result object, callback function support, etc.). But for solving a lot of equations, the overhead of function calls eventually becomes problematic for brentq.
In this case, you could probably get better performance with cython_optimize, but for more expensive functions with overhead, like finding the argus(1) distribution ppf (https://github.com/scipy/scipy/pull/17719#issuecomment-1547778146), the advantage is much more pronounced.

import time
import numpy as np
import cupy as cp
import torch
import matplotlib.pyplot as plt

rng = np.random.default_rng(1638083107694713882823079058616272161)
from scipy import optimize, stats
from scipy.optimize._chandrupatla import _chandrupatla

ns = np.logspace(0, 4, 30)

times = {np: [], cp: [], torch: [], 'brentq':[]}

for xp in [np, 'brentq']:
    brentq = False
    if xp == 'brentq':
        xp = np
        brentq = True

    for n in ns:
        n = int(n)
        a = 0.001
        b = 0.999
        ps = np.linspace(0.005, 0.995, n)

        dist = stats.argus(1)
        def f(x, p):
            return dist.cdf(x) - p

        if brentq:
            tic = time.perf_counter()
            ref = [optimize.brentq(f, a, b, args=(p,)) for p in ps]
            toc = time.perf_counter()
            times['brentq'].append(toc - tic)
            continue

        tic = time.perf_counter()
        res = _chandrupatla(f, a, b, args=(ps,), xatol=1e-12)
        toc = time.perf_counter()
        times[xp].append(toc - tic)

plt.loglog(ns, times[np], label='np')
# plt.loglog(ns, times[cp], label='cp')
plt.loglog(ns, times['brentq'], label='brentq')
plt.xlabel('number of probabilities')
plt.ylabel('execution time (s)')
plt.title('Root of `argus(1).cdf(x) - p`')
plt.legend()
plt.show()

newton is definitely faster than this function, but it should be - the algorithm converges faster. (The advantage of bracketing methods is that convergence is guaranteed if the bracket is valid.) We can add that as another method with the same framework.
The tests are quite strict; I'm ironing out a few failures with alternative backends. Done if CI looks good.
The function currently uses fancy indexing assignment. I can investigate working around that for strict array API support later.

Ok! Remaining failures seem unrelated - a package install conflict and slow tests, hopefully one of which is a temporary glitch.

Ark you have conflicts now


ValueError: Error when checking model input: [text_classifier]

ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 2 array(s), but instead got the following list of 1 arrays

Notebook

It looks like you forgot to supply preprocess_mode='bert' argument to texts_from_csv.  BERT is a pretrained model and requires the data to be preprocessed in a specific way.  BERT expects two input arrays (not just the standard one), which is the reason for the error.  Try changing the line to this:

(x_train, y_train), (x_test, y_test), preproc = text.texts_from_csv(PATH+'train.csv',
                      'text',
                      label_columns = classes,
                       preprocess_mode='bert',   # HERE'S THE MISSING PARAMETER
                      val_filepath=None, # if None, 10% of data will be used for validation
                      max_features=MAX_WORDS, maxlen=MAXLEN,
                      ngram_range=1)

For the next release, we can include a dataset check in ktrain that ensures the data is formatted correctly for BERT and outputs a more informative error message.

Thank you, worked. Please Add in the tutorial this part of the code.


info: Support Updated at, Updated by, Shortcuts

Is your feature request related to a problem? Please describe
scoop info supports these properties
❯ scoop info coolermaster-masterplus

Name        : coolermaster-masterplus
Description : Cooler Master device control software
Version     : 1.9.4
Bucket      : dank-scoop
Website     : https://masterplus.coolermaster.com
License     : Proprietary
Updated at  : 2024-01-02 3:31:13 AM
Updated by  : github-actions[bot]
Shortcuts   : Master Plus

❯ sfsu info coolermaster-masterplus
Name        : coolermaster-masterplus
Description : Cooler Master device control software
Version     : 1.9.4
Bucket      : dank-scoop
Website     : https://masterplus.coolermaster.com/
License     : Proprietary
Installed   : No

Describe the solution you'd like
These properties added

Shortcuts shouldn't be too hard.
The issues I have with Updated at/by at the moment are these rely on git integration, which I don't really have yet.
Once #447 is merged I can work on those.

Update: shortcuts have been added in #534.

Added in #538


Deploy website via gh-pages branch rather than /docs

Motivation
GItHub pages allows for deployment of static files served either from a /docs directory or from a special gh-pages branch. I believe that deploying via a gh-pages directory is more efficient than a /docs directory as it allows us to not need to check in the built static output to version control, as well as avoids issues such as #30.
Desired solution
Repository and deployment configured to leverage gh-pages branch rather than /docs output dir.
Considered alternatives
Continue to deploy via /docs.
Additional context
Deploying from gh-pages would have helped avoid issues like #30.

I don't see any immediate issues with using a new repo for the deployments as you've suggested. When discussing with @flyinprogrammer he detailed a few benefit to that strategy as well:

Seperate ref logs for vcs related to source commits and deployment commits
Enables the rsocket.github.io domain should we need it someday

Is my understanding correct that having a repository named rsocket.github.io would automatically expose the site at that domain (using the contents of the rsocket.github.io repository)?

I think you're right, I think hosting it in rsocket.github.io would trash our SEO.
Funny enough the DNS CNAME for www.rsocket.io points to rsocket.github.io, which then gets redirected to our site rsocket.io
dig +short www.rsocket.io
rsocket.github.io.
<IP_ADDRESS>

curl --HEAD www.rsocket.io
HTTP/1.1 301 Moved Permanently
Server: GitHub.com
Content-Type: text/html
Location: https://rsocket.io/

which is working as intended: https://docs.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain
My vote is we just use https://github.com/rsocket/rsocket-website/pull/47 to move to gh-pages and stop painting bike sheds :kissing:

My vote is we just use #47 to move to gh-pages and stop painting bike sheds 😗

+1

Closed by #47


scale on Query Dialog is broken

range scale is stuck

fixed scale. Problem was that the dataset distance was not being calculated correctly


Local tracing span builder

This is neat.
Positives:

We get local semantics.  I think we could implement a TracerScope from cats.mtl.Local, even if IOLocal is really the most compelling one.
wrapResource lets us span acquire/use/release together.  This has been difficult to accomplish with local semantics.  Natchez can't do it.
I can't break Stream like I did on #105.

Tradeoffs:

wrapResource doesn't return a Resource, but an Aux type with resource-like methods.  The end API still looks nice, but it may be unwieldy in deeper resource stacks?
Because it doesn't return a Resource, it's not obvious how to span a Stream.  The breakage from #105 was fixed beacuse it doesn't compile.  I think Stream would need special support like Resource.

My intuition is that we should only need two span types: one for MonadCancelThrow, where flatMap happens outside release, and one for Stream/Resource like things, where flatMap happens inside release.

And here's "the skunk test".  Only one change, but it means the bar for noop is raised from Applicative to MonadCancelThrow.  But it doesn't bring back #85, so I don't think that's a huge problem.

This isn't perfect, but if we're committed to cats.mtl.Local semantics as the basis, this is the best thing we've got right now.

Work in progress of natchez-http4s-otel: https://github.com/rossabaker/natchez-http4s-otel/pull/1.  Translating EntryPoint and Kernel are the major sticking points.

I merged the upstream and updated some ScalaDocs.

Sounds good. I want to clean up my mess in SpanBuilderImpl from https://github.com/typelevel/otel4s/pull/86.


Custom effect might be delayed if the main thread is busy

Open http://jsbin.com/jubomerahe/1/edit in chrome, the box will shift very quickly to the left when starting to slide to the right, after it has slid down.
Removing the setTimeout code fixes the problem.
The shift is caused by the fact that the custom effect's next sibling's first frame is rendered before the custom effect is played.
Not using native animation also seems to fix the problem.
Not sure it's a problem in the native code or the effect polyfill doesn't play nice with the native code.

I seems to have accidentally changed the test case and now it breaks, please wait until it's fixed.

Yes. This is unfortunately unavoidable, even in the native implementation.

even in the native implementation

Do you mean it's unavoidable only if native animation is implemented but not native custom effect? After reading the source, I guess it's because of the execution order of raf and native animation sampling?
Will this still be the case if both native animation and native custom effect are implemented?

Absolutely. Fundamentally, the main thread is just that - a single thread. Custom effects (whether polyfilled or native) are serviced on the thread, so if it is busy, they'll be delayed.

Thanks for the explanation.
Now I start to realize toggling classes in custom effects might not be a good idea after all.

But with that said. Couldn't the compositor thread wait for the main thread to finish before it renders the first frame of the next sibling effect?
Or the rendering order of custom effects and keyframe effects in the same sampling loop is undefined?

No, that destroys cross-animation timing guarantees.

What's cross-animation timing guarantees?

All animations run on a global timeline, and are anchored by a start time. Animations need to 'line up' on this timeline - whether they're related by groups or not. The timeline can't change just because the main thread becomes busy.

Ah, that makes sense.
Your description creates this mental model in my mind, and I wonder if it is correct: if a custom effect and a keyframe effect is played in sequence, and the timeline is advanced that the keyframe effect starts to play, but the main thread is busy, so the custom effect hasn't done, the compositor thread renders the keyframe effect at each sampling, but it doesn't care if main thread is busy or not. So from that point on, the animation is overall smooth but is spread with some glitches rendered by the delayed custom effect?

That's correct, yup.
One refinement: the rendered output of the custom effect will arrive at the same time as any other main thread animations - all main thread actions will always be in sync.
These might be a frame or two behind any compositor animations, but never in front, and as long as the main thread doesn't jank then everything is synchronized.
So you can choose guaranteed smoothness (compositor animations only), richness (main thread animations + custom effects), or a hybrid that looks correct as long as you keep your main thread actions slim.

I think I have a better understanding of how web-animations work now. Thank you very much. :)
Just a quick question, by "doesn't jank", do you mean the main thread finishes before the next sampling happens?

I think this is probably browser specific. In Chrome, it means the main thread finishes before the commit deadline is exceeded.

If it helps here's a demo of main thread vs compositor thread animations and how jank affects them: http://jsfiddle.net/0c1nm29n/

@alancutter
Thanks for the demo. Very succinctly and clearly demonstrated jank, and I realized even if I animate margin left with web animations, it happens on the main thread.
I actually heard the term jank before on google io videos. I know it means animations fall out of 60/30 fps threshold, but was looking for a more precise definition. But I guess this knowledge won't be that important? Probably the techniques to identify the jank frame and optimize animated properties are more important? (reading helps on chrome dev tools right now :)
@shans
Is "commit deadline" a moment that happens periodically which renders things on the screen? Does it happen some time after each sampling? If it isn't a trivia question, please ignore it, I don't feel like taking more of your time. You already answered a lot of my questions (which I'm very grateful). :)

I actually heard the term jank before on google io videos. I know it means animations fall out of 60/30 fps threshold, but was looking for a more precise definition. But I guess this knowledge won't be that important? Probably the techniques to identify the jank frame and optimize animated properties are more important? (reading helps on chrome dev tools right now :)

See http://jankfree.org/

@dstockwell, thanks. Just discovered it on the dev tools docs.


docs: improve "splitting build, compile and execute code" recipe

Follow up from #662. As per your advice that it would be better if all the examples shown in this recipe worked without unintentional errors, I've added a minimal Database interface as seen in other places throughout the documentation.
I was very tempted to leave a note about instantiating the Kysely instance with an any as a generic type parameter, but ultimately opted against, since it might be conflicting with later examples on this page which make use of InferResult.
Cheers!

Thank you!


Udate the grove logrotate config to include the custom_ats_2.log

What does this PR do?
Adds the /opt/trafficserver/var/log/trafficserver/custom_ats_2.log to the grove.logrotate config file to insure that the file is properly rotated.
Fixes #(issue_number)
Which TC components are affected by this PR?

[ ] Documentation
[X] Grove
[ ] Traffic Analytics
[ ] Traffic Monitor
[ ] Traffic Ops
[ ] Traffic Ops ORT
[ ] Traffic Portal
[ ] Traffic Router
[ ] Traffic Stats
[ ] Traffic Vault
[ ] Other _________

What is the best way to verify this PR?
On a grove edge the /opt/trafficserver/var/log/trafficserver/custom_ats_2.log should get rotated after it reaches 1G in size and only 5 rotated files are kept.
Check all that apply

[ ] This PR includes tests
[ ] This PR includes documentation updates
[ ] This PR includes an update to CHANGELOG.md
[ ] This PR includes all required license headers
[ ] This PR includes a database migration (ensure that migration sequence is correct)
[ ] This PR fixes a serious security flaw. Read more: www.apache.org/security

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/2912/
Test PASSed.


Ubuntu 20.04 and ROS Noetic -> ImportError: No module named yaml

Hi, I'm working on Ubuntu 20.04 and ROS Noetic. I want to install tello_driver but I get the following error message:
SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.16.0
 * /tello/tello_driver_node/camera_calibration: /home/user/roswor...
 * /tello/tello_driver_node/connect_timeout_sec: 10.0
 * /tello/tello_driver_node/local_cmd_client_port: 8890
 * /tello/tello_driver_node/local_vid_server_port: 6038
 * /tello/tello_driver_node/stream_h264_video: True
 * /tello/tello_driver_node/tello_cmd_server_port: 8889
 * /tello/tello_driver_node/tello_ip: <IP_ADDRESS>

NODES
  /tello/
    image_compressed (image_transport/republish)
    tello_driver_node (tello_driver/tello_driver_node)

ROS_MASTER_URI=http://localhost:11311

process[tello/tello_driver_node-1]: started with pid [68052]
WARNING: Package name "turtle_controllers_A2B" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
process[tello/image_compressed-2]: started with pid [68053]
Traceback (most recent call last):
  File "/home/user/rosworskpaces/urubu/src/tello_driver/nodes/tello_driver_node", line 2, in <module>
    import rospy
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/__init__.py", line 47, in <module>
    from std_msgs.msg import Header
  File "/opt/ros/noetic/lib/python3/dist-packages/std_msgs/msg/__init__.py", line 1, in <module>
    from ._Bool import *
  File "/opt/ros/noetic/lib/python3/dist-packages/std_msgs/msg/_Bool.py", line 6, in <module>
    import genpy
  File "/opt/ros/noetic/lib/python3/dist-packages/genpy/__init__.py", line 34, in <module>
    from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
  File "/opt/ros/noetic/lib/python3/dist-packages/genpy/message.py", line 50, in <module>
    import yaml
ImportError: No module named yaml
[tello/tello_driver_node-1] process has died [pid 68052, exit code 1, cmd /home/user/rosworskpaces/urubu/src/tello_driver/nodes/tello_driver_node __name:=tello_driver_node __log:=/home/user/.ros/log/68f837dc-3646-11ee-bd15-894ccdf7d5d8/tello-tello_driver_node-1.log].
log file: /home/user/.ros/log/68f837dc-3646-11ee-bd15-894ccdf7d5d8/tello-tello_driver_node-1*.log

I tried install the yaml using pip3 install pyyaml, pip install pyaml but the issue persists.
user@drone:~$ pip3 install pyyaml
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (5.3.1)

Does anyone know what the problem could be? Any help would be amazing. Thanks!

Have you changed "#!/usr/bin/env python2" to #!/usr/bin/env python3 at the top of your tello_driver_node?


[FEAT] Provide alternative execution methods for application

Is your feature request related to a problem? Please describe.
Docker is potentially a paid service depending how it is used within an organization. Because of this, some customers may not allow Docker to be run in their environments. Additionally, customers may not have appropriate skillsets to run docker within their environments.
Describe the solution you'd like
Provide alternate execution methods (such as an .exe) to run Journeys application within customer environments should primary method of Docker not be supported.
Describe alternatives you've considered
Alternatively, providing a publicly hosted site for customers to use without the need to install or run application locally.

I agree that this should be treated as a high importance request

Internal tracking id MBIPMP-19510


Some module acts twice sometimes

Some module acts twice sometimes

It seems server environmental problem.
keeping eye on it.

It happens when running node.js script with forever module

changed forever to screen module


Alt modifiers don't do anything on an AZERTY keyboard

For example typing ~ is altn, but this displays the letter as if no modifier had been pressed. For numbers it doesn't show the correct modified character as well. Some letters show the letter as if it'd been pressed with shift, others as if it was typed without any modifier.
AZERTY keyboard as a reference:

This was tested with v0.5.0 on OS X 10.11.5 with keyboard set to French (Numerical)

This is a duplicate of #29

Not completely I think. Yours was entering the unicode  codepoints, but my issue is that it doesn't update at all, whether option is pressed or not, am I correct @jaimeeee

@Haroenv both, I can't work with Alt either

Aha, so your issue is more broad

I think it is related to hterm : https://github.com/macton/hterm#how-do-i-enter-accented-characters
term_.prefs_.set('alt-sends-what', 'browser-key') is set there : https://github.com/zeit/hyperterm/blob/master/app/lib/components/term.js#L38
But hterm documentation says :

Note that composed characters (those that require multiple keystrokes) are not currently supported by this mode.

Chromium's hterm is used (with hterm-umdjs) but this is probably the same issue : https://github.com/chromium/hterm/blob/master/js/hterm_keyboard.js#L389

I agree with @jaimeeee. This is a duplicate.


Parameters / Email is not save

It's not save

Those parameter are not used for console mailer type.
This form has been rewrite to a better user experience


Unclear instructions in "Manipulate Arrays With unshift"

Challenge Manipulate Arrays With unshift has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
Instructions are to "Add ["Paul",35] to the beginning of the myArray variable using unshift()."
Test requires that ["John", 23] is shifted off the array first but this is not in the instructions.
Instructions could be clearer
My code:
// Example
var ourArray = ["Stimpson", "J", "cat"];
ourArray.shift(); // ourArray now equals ["J", "cat"]
ourArray.unshift("Happy");
// ourArray now equals ["Happy", "J", "cat"]

// Setup
var myArray = [["John", 23], ["dog", 3]];
myArray.shift();
myArray.unshift(['Paul',35]);

// Only change code below this line.

The comments in the editor say to // Only change code below this line. Following those rules will automatically remove the ["John", 23] from the array because of the myArray.shift() command. The instructions for the challenge can then be followed naturally and use the .unshift() method to add ["Paul", 35] to the beginning. Closing as not a bug issue. Happy coding!

actually its pretty unclear why is it that on one excersize it says to start your code where the only possible place would be would be where it states //change code below this line //!!
and on other exercises it wants you to to do the exact opposite. back an fourth. for a very very simple concept. more like manipulating the users of Arrays.


add padding settings

User can now adjust vertical and horizontal padding
Default is 20

@puddi @M-Porter

be sure to make a release, too!


[Hunts/Bingo] Parsing error

/Hunts and /bingo
show the pokemon species as "pixelmon.species" instead of "Species"

use the command /hunts

scroll over pixelsprite
read the species line
See error
repeat for /bingo

All servers

This issue also extends to the chat alert for hatching pokemon:

This is a PixelmonMod bug, @Khrisstias will forward it onto them :)

It's a stinky MP only bug. Has been forwarded to the devs :)


change hash32 to hash20 in sync pkg

Overview / Motivation
the hash length of ids was changed for tx, atxs and blocks
but sync pkg still uses 32 bytes
The Task
change Item interface to use hash20
Implementation Notes
TODO: Add links to relevant resources, specs, related issues, etc...
Contribution Guidelines
Important: Issue assignment to developers will be by the order of their application and proficiency level according to the tasks complexity. We will not assign tasks to developers who haven't introduced themselves on our Gitter dev channel

Introduce yourself on go-spacemesh dev chat channel - ask our team any question you may have about this task
Fork branch develop to your own repo and work in your repo
You must document all methods, enums and types with godoc comments
You must write go unit tests for all types and methods when submitting a component, and integration tests if you submit a feature
When ready for code review, submit a PR from your repo back to branch develop
Attach relevant issue to PR

ok so it will wait for that change probably


PodioBadRequestError when creating a item via API [Invoice APP]

Hi
I am creating a items into apps via API, I am able to create a item to 3 apps(Client, lineitem, and claim) but I am not able to create a item on Invoice APP, I am getting "PodioBadRequestError" error each time while I am doing same as I did on other apps.
I am using a PHP library.
Here is a part of script that I am using
$newInvoice = array('fields'=>array(
					'date-created' => '2018-07-23',
					'third-party' => '5',
					'due-date' => '2018-07-28'
                  ));

    Podio::setup($clientID, $clientSECRET);
    Podio::authenticate_with_app($invoiceAPPID, $invoiceAPPToken);
    Podio::set_debug(true);
    $invoice = PodioItem::create($invoiceAPPID, $newInvoice);

Can you please have a look into my request and guide me where I am doing wrong.
Thanks

You should ask these kinds of questions on StackOverflow tagged podio.
But if you get a PodioBadRequestError, the response will have a description of why it is a bad request. Check out the podio.log file created (Since you set debug to true).


Update php-http-client dependency

Hello @thinkingserious,Thank you for the PR! We will be reviewing this PR soon, in the mean                                              time, if you have not, please be sure to                                                                                sign our CLA so that we can merge your changes. Thanks again!                                             Team DX


Development travis

Codecov Report

Merging #97 into development will decrease coverage by 0.15%.
The diff coverage is n/a.

@@               Coverage Diff               @@
##           development      #97      +/-   ##
===============================================
- Coverage        25.68%   25.52%   -0.16%
===============================================
  Files               54       54
  Lines             5272     5304      +32
===============================================
  Hits              1354     1354
- Misses            3792     3824      +32
  Partials           126      126

Impacted Files
Coverage Δ

apps/core0/subsys/containers/container.go
0% <0%> (ø)
:arrow_up:

apps/core0/subsys/containers/filesystem.go
0% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d18020d...1463726. Read the comment docs.


TypeScript error when using flexDirection or flexWrap

Describe the bug

See reproduction here
Using flexDirection or flexWrap causes a TypeScript error:
import { styleVariants } from '@vanilla-extract/css';

const brokenExampleVariants = {
  primary: {
    flexDirection: 'row',
    flexWrap: 'noWrap',
  },
  secondary: {
    flexDirection: 'column',
    flexWrap: 'noWrap',
  },
};

export const brokenExampleVariant = styleVariants(
  brokenExampleVariants,
  (variant) => ({
    flexDirection: variant.flexDirection,
    flexWrap: variant.flexWrap,
  }),
);

No overload matches this call.
  Overload 1 of 2, '(styleMap: Record<string | number, StyleRule>, debugId?: string | undefined): Record<string | number, string>', gave the following error.
    Argument of type '{ primary: { flexDirection: string; flexWrap: string; }; secondary: { flexDirection: string; flexWrap: string; }; }' is not assignable to parameter of type 'Record<string | number, StyleRule>'.
      Property 'primary' is incompatible with index signature.
        Type '{ flexDirection: string; flexWrap: string; }' is not assignable to type 'StyleRule'.
          Type '{ flexDirection: string; flexWrap: string; }' is not assignable to type 'StyleWithSelectors'.
            Types of property 'flexDirection' are incompatible.
              Type 'string' is not assignable to type 'CSSVarFunction | FlexDirection | (FlexDirection | undefined)[] | (CSSVarFunction | FlexDirection | undefined)[] | undefined'.

Link to reproduction

Link

Hey bud, the issue here is that your brokenExampleVariants type isn't being inferred strictly enough. The values are being inferred as string which isn't a valid flexWrap property. Adding as const to the end will ensure the exact type is inferred instead.
After doing this you will still get a type error, but this time it should be more informative. The issue being that noWrap should instead be nowrap. Hope that helps.

Thanks @mattcompiles!


[Bug] Time filters are not injected into referenced virtual datasets

{{ from,_dttm }}, {{ to_dttm }}or{{ time_grain }} filters within a virtual dataset are not effective if this dataset is referenced (selected from) by another virtual dataset.
How to reproduce the bug

Create a virtual dataset which applies some push-down filtering by means of {{ from,_dttm }}, {{ to_dttm }} or {{ time_grain }}
Create another virtual dataset which selects from the previously created dataset.
Create a chart based on the second dataset and place it on a dashboard.
Add a time range and/or a time grain filter to the dashboard and apply it.

Expected results

The filter indicator reflects that the time range/grain filters are being applied to the chart on our dashboard.
The time filters are injected into the chart's query, deeply into the nested/referenced dataset.

Actual results

Good: The filter indicator reflects that the time range/grain filters are being applied to the chart on our dashboard.
Bad: The time filters are not injected into the nested/referenced dataset.

Screenshots
MWE:
Dataset 1:
SELECT
  '{{ from_dttm or "no_value_injected" }}' as from_dttm_of_nested_dataset

Dataset 2:
SELECT
  current_timestamp as main_dttm_column
  , '{{ from_dttm or "no_value_injected" }}' as from_dttm_of_main_dataset
  , from_dttm_of_nested_dataset
from {{ dataset(590) }} -- adjust this ID to the one of Dataset 1 above

Result:

The executed query shows that {{ from_dttm }} did not get injected into the nested dataset:
/* {"app": "superset", "user_name": "undefined"} */

SELECT main_dttm_column AS main_dttm_column, from_dttm_of_main_dataset AS from_dttm_of_main_dataset, from_dttm_of_nested_dataset AS from_dttm_of_nested_dataset
FROM (SELECT
  current_timestamp as main_dttm_column
  , '2023-12-05T00:00:00' as from_dttm_of_main_dataset
  , from_dttm_of_nested_dataset
from (
SELECT from_dttm_of_nested_dataset AS from_dttm_of_nested_dataset
FROM (SELECT
  'no_value_injected' as from_dttm_of_nested_dataset) AS virtual_table
) AS dataset_590) AS virtual_table
WHERE main_dttm_column >= TO_TIMESTAMP('2023-12-05 00:00:00.000000', 'YYYY-MM-DD HH24:MI:SS.US')
 LIMIT 1000;

Environment
(please complete the following information):

browser type and version:
superset version: 3.0.2
python version: python --version
node.js version: node -v
any feature flags active:

Checklist
Make sure to follow these steps before submitting your issue - thank you!

[x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
[x] I have reproduced the issue with at least the latest released version of superset.
[x] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context
It should be noted that other filter_values() _do~ get injected into nested/referenced datasets correctly. For these we only have the issue that the filter indicator doesn't reflect it properly: #26194.

Is this still happening in 3.1/4.0 (our currently supported versions)?
CC @villebro in case you have any insight here.


Fix  options.upsertKeys.map problem in updater

https://github.com/sequelize/sequelize/blob/b0d4f06ea8a089a569f18f53b5958aa0cf82e671/src/dialects/abstract/query-generator.js#L194 which takes care of unique constrains in sequelize, has options.upsertKeys.map(attr => this.quoteIdentifier(attr)).
Howerer, https://github.com/UniversityOfHelsinkiCS/oodikone/blob/2104aed5653869b002f3cb3d26f260157bd28e5f/updater/sis-updater-worker/src/db/models/courseProvider.js#L9 has unique key "composite" which is string and (ofc) fails when it's being mapped.
Seems like this has been introduced in sequelize6. Figure out what to fix in our models.

Closing this for now, since we reverted updater back to 10. Check this again when upgrading to node 16


Support NCCL

According to @mrogowski, NCCL improves UCC performance on GPUs.

@conda-forge-admin, please rerender


Error on Linux

With Swift 3.1.1 on Ubuntu, I get the following error:

swift test
Compile Swift Module 'ShellOut' (1 sources)
/var/lib/jenkins/workspace/ShellOut SPM Linux/Sources/ShellOut.swift:96:60: error: cannot assign to property: 'readabilityHandler' is a get-only property
outputPipe.fileHandleForReading.readabilityHandler = stdoutHandler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/var/lib/jenkins/workspace/ShellOut SPM Linux/Sources/ShellOut.swift:100:59: error: cannot assign to property: 'readabilityHandler' is a get-only property
errorPipe.fileHandleForReading.readabilityHandler = stderrHandler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/var/lib/jenkins/workspace/ShellOut SPM Linux/Sources/ShellOut.swift:108:60: error: cannot assign to property: 'readabilityHandler' is a get-only property
outputPipe.fileHandleForReading.readabilityHandler = nil
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/var/lib/jenkins/workspace/ShellOut SPM Linux/Sources/ShellOut.swift:109:59: error: cannot assign to property: 'readabilityHandler' is a get-only property
errorPipe.fileHandleForReading.readabilityHandler = nil
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
:0: error: build had 1 command failures

Thanks for reporting this @niklassaers! I created this PR that should fix the problem 😄 https://github.com/JohnSundell/ShellOut/pull/7

@niklassaers It seems like we have some more problems on Linux, all the tests are failing 😅 But if you use the latest released version instead of master, you at least shouldn't have that build error. With WWDC and new Xcode/Swift version to upgrade to, I won't have time to look into the test failures right now. Feel free to take a look if you want, otherwise I'll take care of it within the next few weeks 🙂

Hi @JohnSundell . Do you know if there's a way around to this readabilityHandler problem on Linux? I know using a NotificationCenter for when data is available to read is an option.

@georgealegre Interesting. Can you tell me more about this approach?

I have the same issue trying to run a program and reading its output as soon as it's available. It's running on a server thanks to the Kitura framework and the idea is to use websockets to broadcast the output. Using readibiltyHandler works for me on Mac but on Ubuntu I have the same issue as you.
I've read on a bunch of SO posts about using notifications and reacting to those notifications but I can't get it to work. The function that should be receiving those notifications is never called. I assume it's an issue with threads but there isn't much info out there.
You can read about the solution I'm talking about here: StackOverflow
Maybe you can get it to work and share some insight with me in the process.
BTW, thanks for your amazing blog posts. I read them every week.

@JohnSundell I've found the implementation of FileHandle for Foundation on Linux and it seems these things are still not implemented - FileHandle. Seems we have to wait a while. Using notifications won't work either since waitInBackgroundAndNotify() is also not implemented .

Thanks for looking into this @georgealegre 👍 Seems like we'll need to revert back to the old technique used before https://github.com/JohnSundell/ShellOut/pull/3/files on Linux. It's also a requirement for using the new version of ShellOut for Marathon, since it also supports Linux - so I'll try to look into this ASAP.

I've now worked around the error and merged my PR: https://github.com/JohnSundell/ShellOut/pull/7. ShellOut again works on Linux 🎉 Think this is good enough to close this issue for now, and we can revisit this again once the Swift standard library on Linux has caught up with its macOS equivalent in this regard 🙂 What do you think @georgealegre & @niklassaers?

Seems ok. I'm not sure what your plans are with ShellOut. From the code I've read, it seems like it isn't meant for using input and output streams without closing the pipes or reading asynchronously. I'm not sure if I'm explaining myself correctly. For example, ShellOut wouldn't be able to run $ tail -f somefile since the STDOUT file would never be closed until the process is terminated. I'm even more screwed with my project 'cause the process I'm launching prompts the user for input while it's running.

I would actually love for ShellOut to be able to hand continous/async output, but there's a separate issue for it here: https://github.com/JohnSundell/ShellOut/issues/11. Closing this one for now 😄 Thanks for all your input on this 👍


Updated the latest nuget library version.

The latest version of "Microsoft.EntityFrameworkCore.Tools" Nuget library is 1.0.0-preview1-final.
https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Tools/1.0.0-preview1-final

Hi @tanaka-takayoshi, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, DNFBOT;

Thanks, good catch. We missed this one.


queries without limits returning next token

curl localhost:8980/v2/accounts/XIU7HGGAJ3QOTATPDSIIHPFVKMICXKHMOR2FJKHTVLII4FAOA3CYZQDLG4/transactions?after-time=2020-06-03T10:00:00-05:00 | json_pp

Improvement
It'd be nicer and more efficient if the server detected that it finished short of its limit (whether default or specified) and didn't send a next token when it can know that there's nothing after that next token.
In the current state, adding the next token to the query produces an empty result, which is a pretty clear sign of being done, but yeah it could be better.


Could not find com.uphyca:stetho_realm:2.1.0

Could not determine the dependencies of task ':app:compilePoarDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':app:poarDebugCompileClasspath'.
Could not find com.uphyca:stetho_realm:2.1.0.
Required by:
project :app

Possible solution:

Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

My Configuration:
app/gradle
debugImplementation 'com.facebook.stetho:stetho:1.5.0'
debugImplementation 'com.uphyca:stetho_realm:2.1.0'
project gradle
maven {
url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo'
}

Same issue with Android, Gradle and stetho_realm:2.2.2. (ಥ﹏ಥ)
Could not determine the dependencies of task ':app:transformClassesAndResourcesWithR8ForRelease'.
> Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.
   > Could not find com.uphyca:stetho_realm:2.2.2.

Any updates?

We have found a workaround for our use case (stetho and realm):
We got the stetho_realm-2.2.2.jar  from cached jars and linked it manually.
app/build.gradle:
Don't forget to also link your folder with the jar file (we have it in app/libs/):
dependencies {     ...     implementation fileTree(dir: 'libs', include: ['*.jar'])     // Stetho     implementation "com.facebook.stetho:stetho:$stetho_version"     // DELETE this line: implementation "com.uphyca:stetho_realm:$stetho_realm_version"     // stetho-realm is imported via .jar file in app/libs     ...    }

Any update team me too facing the same


Feature Request: Tasks should be filterable on the completed state

A common scenario (if not the most common) when gathering tasks using dataview is likely to be able to pull all tasks that remain incomplete. It would be ideal to be able to do something like the following to filter out tasks that aren't complete:
task from ""
where !task.complete
sort file.day desc

This has been on my TODO list forever since it's conceptually simple, my task query implementation is just a hack. Will improve.

This would be awesome. Is there a workaround in the meantime?

This would be a great addition! Hope to see it implemented soon.

I have good news and bad news. The good news is this is now possible; the bad news is you need to write a tiny bit of javascript for it:
```dataviewjs
dv.taskList(dv.pages("#projects").file.tasks.where(t => !t.completed));

Thank you!
Is it possible to list it in modified order?

Is it possible to sort the tasks based on file name?

You mean for tasks that are appearing in a file? Like give me all from "Project X"?
`
const targetPage = "Project X"

dv.taskList(
    dv.array(
        dv.page(targetPage).file.tasks
    ).where(t => !t.completed)
)

`
You just need to 'cast' it as a dataview array.

Thanks for the prompt reply! @danielhauck Sorry for not being clear about what I am trying to achieve. Now I will elaborate it as follows.
First, I may query all tasks from files within a folder with something like:
dv.taskList(dv.pages('"Daily note"')
	.file.tasks
	.where(t => !t.completed)
	)

This lists all uncompleted tasks from files within the folder Daily note. However, I am not sure how are the task files sorted. Therefore, I would like the tasks to be sorted based on the file name where they come from, e.g. Note A, Note B, Note C, etc. Each of such a note/file consists of a series of uncompleted tasks.
I tried the following options (without knowing if the syntax is correct or not :-(, however), but neither of them worked for me.
dv.taskList(dv.pages('"120-Daily note"')
	.file.tasks
	.where(t => !t.completed)
	.sort(p => p.file.name, 'asc')
	)

dv.taskList(dv.pages('"120-Daily note"')
	.file.tasks
	.where(t => !t.completed)
	.sort(t => t.file.name, 'asc')
	)

Of course, it would be great if the tasks from individual files/notes can also be somehow sorted, e.g., based on task description.
I also tried your code, and it gives the following error message:
const targetPage = "Daily note"

dv.taskList(
    dv.array(
        dv.page(targetPage).file.tasks
    ).where(t => !t.completed)
)

Evaluation Error: TypeError: Cannot read property 'file' of undefined
    at eval (eval at <anonymous> (eval at <anonymous> (app://obsidian.md/app.js:1:1212458)), <anonymous>:5:28)
    at DataviewInlineApi.eval (eval at <anonymous> (app://obsidian.md/app.js:1:1212458), <anonymous>:12129:33)
    at evalInContext (eval at <anonymous> (app://obsidian.md/app.js:1:1212458), <anonymous>:12129:49)
    at DataviewJSRenderer.eval (eval at <anonymous> (app://obsidian.md/app.js:1:1212458), <anonymous>:12591:17)
    at Generator.next (<anonymous>)
    at eval (eval at <anonymous> (app://obsidian.md/app.js:1:1212458), <anonymous>:26:71)
    at new Promise (<anonymous>)
    at __awaiter (eval at <anonymous> (app://obsidian.md/app.js:1:1212458), <anonymous>:22:12)
    at DataviewJSRenderer.render (eval at <anonymous> (app://obsidian.md/app.js:1:1212458), <anonymous>:12583:16)
    at DataviewJSRenderer.eval (eval at <anonymous> (app://obsidian.md/app.js:1:1212458), <anonymous>:12578:28)

Ah, this is a short-coming of the dv.taskList() implementation; I need to add some configuration to be able to decide how you sort tasks and files. @wenlzhang Would you mind filing an issue with the contents of your comment for tracking?

That's great news! Looking forward to that! @blacksmithgu This feature request can be found in the following issue:
https://github.com/blacksmithgu/obsidian-dataview/issues/407

Is there a way that instead of telling it to look at a file with dv.pages I can have it look at all the files in a folder?

You still use dv.pages, just providing the path to the folder: dv.pages('"path/to/folder/"').

Ah, I was just using dv.pages("x/y/z") instead of dv.pages('"x/y/z"').

Yay, tasks can now be filtered on completed!
TASK WHERE !completed

You can also do a fair bit other stuff with them, like using the text property (which contains their text), or subtasks (which contains a list of subtasks), and so on!

Thanks for @sheeley for implementing this functionality.

Does this functionality extend to DataView table queries? I'm trying to count all completed tasks onto a table as a proof of concept. I later want to count completed completed tasks per folder. For some reason I can't get any tasks to query. Here's my code.

The task list and table depend upon different implementations internally. I could see this being interesting.
@blacksmithgu think there should be a task table?

@blongty @sheeley The correct move here is to (1) allow FROM statements to select tasks instead of files, and (2) implement task renderering support so that they work automatically in both list views and table views.
This is something @sheeley can look into in the short-medium term if he has time / interest.

@blacksmithgu happy to. Thoughts on the syntax?

task table foo, bar from ...
table foo, bar as task from
table foo, bar from tasks

And for the functionality, would you expect a single task per row? Or would it be possible to render a task per cell? I could see value in the latter.

For the syntax, I'm thinking TABLE foo, bar FROM TASKS <source query>; this particular syntax is mainly because we can extend it easily to support sections and other metadata (FROM SECTIONS ...).
I think the default would be one task per row, allowing "task lists" via a GROUP BY.

Does this functionality extend to DataView Table queries? I'm trying to count all completed tasks onto a table as a proof of concept. I later want to count completed completed tasks per folder. For some reason I can't get any tasks to query.
Here's my query
TABLE length(rows) as "Count Completed Tasks"
FROM "Test"
WHERE completed
Flatten file.tasks
GROUP BY file.folder

Running it barebones and just trying to query completed tasks without fancy groupings doesn't yield any results either. Running the query as a Task rather than a Table works, however.
This is how my notes are set up, in their own folders as follows.

Did you find a way to count the tasks?  I am trying to do the same thing in a standard dataview query where I want to report the number of open tasks and potentially exclude results returned from pages that have no tasks.

this also worked for me:
TASK
WHERE task != completed

task where !completed works as well


DO NOT MERGE! Proof of concept.

DO NOT MERGE! This is proof of concept. The problem is I still can't figure out how to throw a specific error, even from the core code. Any help appreciated.

Adds a new object to Grav\Common\Utils called AcceptHeader. License is embedded in the file.
Significantly alters Grav\Common\Twig\Twig::processSite() as follows:

If a format is set either by page header or extension, it is honoured—no failsafe.
Otherwise, the Accept header is analyzed and processed in preference order.

The mime type */* is recognized as matching html. This should be failsafe enough for modern user agents.

If a matching template is found somewhere in the search path, great. Move on.
Otherwise, throw an error (ideally a proper 406 Not Acceptable).

Right now it only supports html, json, yaml, and csv templates. Not sure if there are more that we should add.

My tests so far show this approach does work. The only think it's not doing yet is throwing the correct error. Even though I get an error message, the response code is still 200 OK, which is not in fact OK.
Thanks for putting up with my recent code binges. I'm not a PHP native. Hopefully my coding style doesn't offend you 😃
Related to issue #1067

Of course I blew something up 😧 I'll see if I can figure out what the Travis reports mean.

I think a lot of that code could be simplified if you use the mime method Grav offers (see here)

Also for security reasons we should prevent yaml requests to go through. We don't want this to be exploited and potentially get access to config files, data files, password files and the likes.

How so? The new code happens when $format isn't specified. The mime method seems to go from extension to mime type, but what I need to do is go from mime type to extension.

Does .htaccess not already block direct requests for YAML files? Again, the content negotiation would only happen if there was no file extension specified in the URL. We already have the Page as Data plugin, for example.

Sure. I could look at moving that logic over there. I'll do that in the next commit.

I just realized I failed to set the Content-Type header, too. Next commit.

Moved that logic into Grav.php and set the templateFormat so the correct Content-Type header is sent.

To throw a specific error, use throw new \RuntimeException('Page Not Found', 404); for example.

That doesn't work. If you look at the current commit, if no output is generated, I do indeed throw a RuntimeException with a 406 code, but all I get is an error message dump onto a blank page with a response code of 200 OK.

I might be wrong but it doesn't look like the q parameter for priority is doing anything. It gets set to 1.0 but on multi Accept headers it's always 1.0. I see the logic in the sorter for taking q into account but I fail to see where this is ever going to be set differently than 1.0.

The spec explains. The agent provides q values. The code assigns a default q value of 1.0 if none is provided. Test it with the following header, for example:
application/json;q=0.5, text/html;q=0.75, application/xml

The correct order would be

application/xml
text/html
application/json

I see, I missed the part where you assign the original q back with floatval if it was passed in.

Hey @Perlkonig I changed a bit your code, just to simplify it. I also removed some extra stuff you had that I don't think we need. The culled is just extra checks and loops we don't really need and doesn't really cause any issue. The sort will also take care of it grouping them at the same level. At the end of the day, you get what you need.
I removed extra details in your result array, now it's flat and only has 3 entries: mime, priority (q), index. Anything else wasn't used anyway.
I could just push these but I'm going to share them here first so you can see what I'm doing 😉
<?php
/**
 * Parses the `Accept` header and produces an array of acceptable
 * MIME types in preference order. If $cull is true, then only the
 * first instance of each MIME type is returned (you only care about
 * the types themselves and not the parameters).
 *
 *
 * @return mixed
 */
public static function parseAccept() {
    $result = [];

    // Break at commas
    $header = explode(',', $_SERVER['HTTP_ACCEPT']);

    // Look at each entry and isolate paramaters
    $result = array_map(function($entry) use ($index) {
        list($mime, $priority) = explode(';', $entry . ';q=1.0');
        $priority = explode('=', $priority)[1];

        return [
            'mime' => $mime,
            'q' => $priority,
            'index' => $index++
        ];
    }, $header);

    // Sort result
    usort($result, array(self, "sortAccept"));

    return $result;
}

/**
 * Sorts the array generated by `parseAccept` into preference order based on the spec.
 *   - q value
 *   - specificity
 *     - use of wildcards
 *     - number of parameters
 *   - order of appearance
 *
 * NOTE: Inequalities are reversed because we want the first element in the resulting
 *       array to be the one with highest priority (descending order).
 *
 * @return mixed
 */
private static function sortAccept($a, $b) {
    if ($a['q'] !== $b['q']) {
        return $a['q'] > $b['q'] ? -1 : 1;
    }

    $aAny = strpos($a['mime'], '*');
    $bAny = strpos($b['mime'], '*');

    if ($aAny !== $bAny) {
        return $aAny > $bAny ? -1 : 1;
    }

    return $a['index'] > $b['index'] ? -1 : 1;
}

As you can see is much simplified but does the same thing.

TLDR: Thanks for this! I'm totally fine with pushing this to the branch.

Thanks for cleaning things up. I'm not a PHP native, so my style is not ideal, I know.
I did the "cull" thing because if multiple of the same mime type does exist with different parameters, then the actual content negotiation will retry the same template multiple times. Not sure what's cheaper: the cull loop or the failure of the render() command. Probably the latter because multiple types shouldn't frequently appear.
I agree that most of the parameters aren't needed. I just wanted my first pass to be as inclusive as possible. I should note, though, that according to the spec and the way my sort worked, mime types aren't necessarily grouped. See last example in the spec, for instance. But again, Grav doesn't need the other parameters, so we could skip the specificity sort for now.

What's the status of this PR? Is it something that is still being worked on?

Closing because it's old, and there's obviously no real interest. I'm going to replicate the throwing errors problem and submit that as an issue first. If that gets resolved (or is already resolved), then I'll submit a new PR against the current code base.


Can we add a "module" option to AccessRule?

And a "matchModule" check, to provide a way to apply rule to all controllers in module.
Use case: I`ve created a behavior that is configured in app config and uses a AccessFilter inside. it provides access filtering across the whole app. "module" option is lacking.
Something like that
protected function matchModule($controller)
    {
        return empty($this->modules)
            || $controller->module instanceof Application
            || in_array($controller->module->uniqueId, $this->modules, true);

    }

Thanks

https://github.com/yiisoft/yii2/pull/5025#issuecomment-263095769 - should be implemented as partial matching on controller imo.


symlink support

since i want to be able to distinguish between standard folder and link, i'm using the -o variant of the icon
here, it is clear that bin and lib are links

i don't know how to test the _MSC_VER path, because, on windows, the os file manager is called, so no file browser issue will ever arise there and all the work here does not touch that
in theory should work as before but get the new icon, in whatever case that path is called
closes #334

You can test this out on Windows by changing this line to if(FALSE)
https://github.com/skylersaleh/SkyEmu/blob/dev/CMakeLists.txt#L97

turns out windows part is broken in master due to string encoding issues, this is broken probably since when you started using tinydir
so i would say that using native file browser is the best choice for the time being
since the only addition for windows is !!(dir->_f.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT); and the only change this will make is the folder icon, the change is harmless

I'll merge this for Linux. But, what kind of string encoding issues were you seeing on Windows?

tinydir takes a wchar * it seems, skyemu uses char *, i got garbled string in tinydir function
if i change tinydir to char *, i can read the string but not sure this is a valid fix


Update subscriptions.md

Added Minecraft Safebrowsing (unofficial) 🛡⛏ to the subscriptions page, I've added it to the "Others" section since I though it would fit their the most.

I don't think it fits the "Others" category - which contains a list of blocklists and a personal blacklist. I think it would be better to create a new category for this.
Btw: Nice work!

How about just "Games" or "Gaming"?

How about just "Games" or "Gaming"?

I think this is a good idea.
It's general enough and likely to be expanded later with new blacklists.

@legendary-creeper If you agree that it is appropriate to place your subscription under the "Games" or "Gaming" category (or another new category), please update your pull request accordingly.


database stays empty and no messages

i am trying to get this working but so far i have the bot running the docker container running
when the server is online i get this info
2024-03-08 11:56:15 server-1  | Found: /usr/src/app/db/db.json
2024-03-08 11:56:16 server-1  | Updating...
2024-03-08 11:57:16 server-1  | Updating...
2024-03-08 11:58:16 server-1  | Updating...
2024-03-08 11:59:16 server-1  | Updating...
this is in the container but i dont see info in the db.json and nothing happens on discord
if i put the server ofline i get the following in the container
2024-03-08 12:04:49 server-1  | Updating...
2024-03-08 12:05:49 server-1  | Updating...
2024-03-08 12:05:59 server-1  | TypeError: fetch failed
2024-03-08 12:05:59 server-1  |     at node:internal/deps/undici/undici:12345:11
2024-03-08 12:05:59 server-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
2024-03-08 12:05:59 server-1  |   cause: ConnectTimeoutError: Connect Timeout Error
2024-03-08 12:05:59 server-1  |       at onConnectTimeout (/usr/src/app/node_modules/undici/lib/core/connect.js:186:24)
2024-03-08 12:05:59 server-1  |       at /usr/src/app/node_modules/undici/lib/core/connect.js:133:46
2024-03-08 12:05:59 server-1  |       at Immediate._onImmediate (/usr/src/app/node_modules/undici/lib/core/connect.js:174:9)
2024-03-08 12:05:59 server-1  |       at process.processImmediate (node:internal/timers:478:21) {
2024-03-08 12:05:59 server-1  |     code: 'UND_ERR_CONNECT_TIMEOUT'
2024-03-08 12:05:59 server-1  |   }
2024-03-08 12:05:59 server-1  | }
so that assumes when the server is online it makes a connection but also now nothing happoens on discord
am i missing somthing that i dont get info?

I am sorry you have been unable to get it working.
The bot's logs will show 'Sending message to: ...' when it attempts to send a message to a Discord channel. Errors are expected in the log if the server is turned off (unreachable), as opposed to running in the 'OFFLINE' state. Is the bot's activity status shown correctly as the state changes, i.e. 'Playing unknown' if unreachable, 'Playing offline' if OFFLINE and 'Playing online: 0/4' if ONLINE? Be mindful of the polling interval when checking this.
The db.json is only required when the bot restarts. It should still send messages, even if it cannot write to that file. If the bot is not detecting any changes it will not update the file, so the first thing to check is that your URLs in the .env.local file (FS22_BOT_URL_CAREER_SAVEGAME and FS22_BOT_URL_SERVER_STATS) are correct, and the host/container is not prevented from accessing them (e.g. using curl, checking firewall rules, etc.).
If you have specified a server or channel name (FS22_BOT_DISCORD_SERVER_NAME and/or FS22_BOT_DISCORD_CHANNEL_NAME) in the .env.local file, make sure it is spelled correctly. Be careful to check that any special characters are correct. If you see 'Sending message to: ...' in the logs, but nothing appears in Discord, check the bot's permissions in the Discord server.
If the bot is detecting changes (attempting to send messages) but the db.json is not being written, it is likely the container does not have permission to write to the file on the host. You must ensure the container user has the appropriate permission to do that.


Meaningless parameter description

Can we get into the habit of providing more descriptive and helpful parameter description? Parameter description which just scrambles the words is useless:
parentResourcePath
String
parentResourcePath Resource identity.
[Enter feedback here]

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: f2eca981-bd82-9e6b-6ab5-4cf1569799fb
Version Independent ID: 4ec5df2e-7bc2-3af8-7177-7ba6d80688cd
Content: IGenericResources.GetAsync(String, String, String, String, String, String, CancellationToken) Method (Microsoft.Azure.Management.ResourceManager.Fluent) - Azure for .NET Developers
Content Source: xml/Microsoft.Azure.Management.ResourceManager.Fluent/IGenericResources.xml
Service: azure-resource-manager
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

Thank you for your feedback.  Tagging and routing to the team member best able to assist.

The reference doc is autogenerated , will check docs team if they can improve it