Dynamically change advertisement data

Hello, I'm trying to make a kitchen top weighing scale wireless capable and I successfully connected the salvaged body with load cells to HX711 based sensor which I have connected to an ESP32 devkit. Now since the amount and frequency of the data is too low I decided to include the data into advertising packet itself so that I can get the data without connecting to the BLE server.
The sketch I've attached below successfully changes the manufacturer data field in the advertisement packet for 2-3 times and then the data stays the same and doesn't get updated. As BLE client I'm using this sketch with slight modifications such as continuous scanning (using loop) and printing the manufacturer data field of the advertisement data packet. Can anybody help me identify what's wrong with the sketch?
#include "HX711.h"
#include "soc/rtc.h"
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
#include <BLEAdvertising.h>

float f = 20000;
float weight = 0;
BLEAdvertisementData pAdvertisementData;
BLEAdvertising *pAdvertising;

HX711 scale;

void setup() {
  Serial.begin(115200);
  delay(1000);
  rtc_clk_cpu_freq_set(RTC_CPU_FREQ_80M);
  Serial.println("HX711 Demo");

  Serial.println("Initializing the scale");
  // parameter "gain" is ommited; the default value 128 is used by the library
  // HX711.DOUT  - pin #A1
  // HX711.PD_SCK - pin #A0
  scale.begin(4, 5);

  scale.set_scale(f);
  scale.tare();

  Serial.println("Starting Arduino BLE Client application...");
  BLEDevice::init("ESP32-scale");
  BLEServer *pServer = BLEDevice::createServer();
  pAdvertising = pServer->getAdvertising();
  pAdvertising->start();

  Serial.println("Readings:");
}

void loop() {

    Serial.print("one reading:\t");
    Serial.print(scale.get_units(), 1);
    Serial.print("\t| average:\t");
    weight = scale.get_units(10);
    Serial.println(weight);

    String s = String(weight);
    char str[10];
    s.toCharArray(str, 10);
    Serial.println(str);
    pAdvertising->stop();
    pAdvertisementData.setManufacturerData(str);
    pAdvertising->setAdvertisementData(pAdvertisementData);
    pAdvertising->start();
}

Having same issue, but in my case i need change (or remove) exact AdvertisementData. Now if I setting to ScanResponseData changed BLEAdvertisementData (with another major and minor values) - I'm getting multiple advertises. Thank you for your participation!

Awesome, I was searching for a non connected solution for send some sensor data, Cool..! thanks @rammak for your code link, Hope I could make my solution on top of it.!

hey @jazzzzzzz  were you able to use the code for what you wanted, i tried the code but still end up send predefined data in the String str[12] = {"Hello" , "Darkness"..........}.
what i want to do is send a simple count =1 which increase in the loop using count++,  i convert the count to a string which i then convert to hex using the function in the code but it did not advertise the count...
let me know if you want the version of my code, i will be glad to share..
thanks...

hey @jazzzzzzz were you able to use the code for what you wanted, i tried the code but still end up send predefined data in the String str[12] = {"Hello" , "Darkness"..........}.
what i want to do is send a simple count =1 which increase in the loop using count++, i convert the count to a string which i then convert to hex using the function in the code but it did not advertise the count...
let me know if you want the version of my code, i will be glad to share..
thanks...
Below code sends the counter value continuously, Dont know if this is what you need

`#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
BLEAdvertisementData advert;
BLEAdvertising *pAdvertising;
int i = 0;
//manufacturer code (0x02E5 for Espressif)
int man_code = 0x02E5;
//function takes String and adds manufacturer code at the beginning
void setManData(String c, int c_size, BLEAdvertisementData &adv, int m_code) {
String s;
char b2 = (char)(m_code >> 8);
m_code <<= 8;
char b1 = (char)(m_code >> 8);
s.concat(b1);
s.concat(b2);
s.concat(c);
adv.setManufacturerData(s.c_str());
}
void setup() {
Serial.begin(115200);
Serial.println("Starting BLE work!");
BLEDevice::init("MyESP32");
BLEServer *pServer = BLEDevice::createServer();
pAdvertising = pServer->getAdvertising();
advert.setName("ESP32-new");
pAdvertising->setAdvertisementData(advert);
pAdvertising->start();
}
void loop() {
i++;
String a = String(i);
BLEAdvertisementData scan_response;
setManData(a, a.length() , scan_response, man_code);
pAdvertising->stop();
pAdvertising->setScanResponseData(scan_response);
pAdvertising->start();
delay(2000);
}`

hey @jazzzzzzz were you able to use the code for what you wanted, i tried the code but still end up send predefined data in the String str[12] = {"Hello" , "Darkness"..........}.
what i want to do is send a simple count =1 which increase in the loop using count++, i convert the count to a string which i then convert to hex using the function in the code but it did not advertise the count...
let me know if you want the version of my code, i will be glad to share..
thanks...

Below code sends the counter value continuously. I have tested it, counter value is receiving in nRF Connect app. I hope this is what you need
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>

BLEAdvertisementData advert;
BLEAdvertising *pAdvertising;

int i = 0;

//manufacturer code (0x02E5 for Espressif)
int man_code = 0x02E5;

//function takes String and adds manufacturer code at the beginning
void setManData(String c, int c_size, BLEAdvertisementData &adv, int m_code) {

  String s;
  char b2 = (char)(m_code >> 8);
  m_code <<= 8;
  char b1 = (char)(m_code >> 8);
  s.concat(b1);
  s.concat(b2);
  s.concat(c);
  adv.setManufacturerData(s.c_str());

}

void setup() {
  Serial.begin(115200);
  Serial.println("Starting BLE work!");

  BLEDevice::init("MyESP32");
  BLEServer *pServer = BLEDevice::createServer();

  pAdvertising = pServer->getAdvertising();
  advert.setName("ESP32-new");
  pAdvertising->setAdvertisementData(advert);
  pAdvertising->start();
}

void loop() {
  i++;
  String a = String(i);

  BLEAdvertisementData scan_response;
  setManData(a, a.length() , scan_response, man_code);

  pAdvertising->stop();
  pAdvertising->setScanResponseData(scan_response);
  pAdvertising->start();

  delay(2000);
}

Thanks Man, Works wonderfully..

I know this issue is a bit stale. But I was looking to do this very thing and ended up writing a simple library to allow me to update the advertising data without updating the scan response or start/stopping the stack. Feel free to use if it suits your purpose 😃 https://github.com/ericbarch/BLECast

This was a really helpful thread, thanks all

hey @jazzzzzzz were you able to use the code for what you wanted, i tried the code but still end up send predefined data in the String str[12] = {"Hello" , "Darkness"..........}.
what i want to do is send a simple count =1 which increase in the loop using count++, i convert the count to a string which i then convert to hex using the function in the code but it did not advertise the count...
let me know if you want the version of my code, i will be glad to share..
thanks...

Below code sends the counter value continuously. I have tested it, counter value is receiving in nRF Connect app. I hope this is what you need
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>

BLEAdvertisementData advert;
BLEAdvertising *pAdvertising;

int i = 0;

//manufacturer code (0x02E5 for Espressif)
int man_code = 0x02E5;

//function takes String and adds manufacturer code at the beginning
void setManData(String c, int c_size, BLEAdvertisementData &adv, int m_code) {

  String s;
  char b2 = (char)(m_code >> 8);
  m_code <<= 8;
  char b1 = (char)(m_code >> 8);
  s.concat(b1);
  s.concat(b2);
  s.concat(c);
  adv.setManufacturerData(s.c_str());

}

void setup() {
  Serial.begin(115200);
  Serial.println("Starting BLE work!");

  BLEDevice::init("MyESP32");
  BLEServer *pServer = BLEDevice::createServer();

  pAdvertising = pServer->getAdvertising();
  advert.setName("ESP32-new");
  pAdvertising->setAdvertisementData(advert);
  pAdvertising->start();
}

void loop() {
  i++;
  String a = String(i);

  BLEAdvertisementData scan_response;
  setManData(a, a.length() , scan_response, man_code);

  pAdvertising->stop();
  pAdvertising->setScanResponseData(scan_response);
  pAdvertising->start();

  delay(2000);
}

Thankz a trillion because this script here solved two case/issues in my code
I didn't know I need to have two variables of BLEAdvertisementData, one to set a Name and the other to repeatedly update the manufacturerData values
Thanks Again mate


Force resize for all edges in rootston

Test plan: try to force resize from the four quaters of a window. Should resize from the corresponding edge.
Fixes #342

LGTM, thanks!


More node test cleanup (templates).

Automated message from Dropbox CLA bot
@showell, it looks like you've already signed the Dropbox CLA. Thanks!

Merged, thanks @showell!


Session Approval pop up does not work in sample requester app

I've been trying to run the sample app (Auth -> Requester) and am stuck on this issue for a while now. I run the app, click the 'sign in' button, click 'DeepLink', choose the MetaMask app, get redirected and sign in.
The problem is that I do not get the pop up for session approval after that. There is no prompt to approve or reject a session.
SDK Version

Client: Kotlin
Version 23

I think the issue maybe that the redirect parameter isn't correct? I've just written what was given in the docs.
Device

Device: Samsung
OS: Android 12
Browser: chrome
Version Chrome 107

Ah, thanks.


Broken libc-test

The test ../../3rdparty/musl/libc-test/src/functional/tls_align.c is currently broken since the sixth program header of the elf object is of type TLS. Application raises OE_UNSUPPORTED at host/loadelf.c:169.

@mikbras -- This broke 18 days back with the elf changes.

@anitagov Have you looked at this? Do you know if this is fixed now?

We've assigned this to you, @anitagov , can you give us a status update on it when you get a chance to take a look? :)

Enabling this test back with my PR #1508  as it seems to be passing with the latest libc version.

Fixed with PR #1508 and hence closing


Add support for dnsPolicy to the Helm chart

Running the csr-approver with dnsPolicy: Default should works fine and removes the dependency to CoreDNS. It's a nice catch on initial cluster bootstrapping.
I also bump the helm chart version in prepare for a next release. Please note, that the v prefix of a helm chart version is not officially supported, since it requires to be a SemVer value.

Thank you for the PR, looks good to me. I'm just waiting for the CI to pass and will merge the PR then.
Thanks for the hint regarding the v prefix on the Helm chart version, I was not aware of that! I will create a follow up issue regarding that.
ps. Can you please tell me what editor plugin you use for Helm charts? 😃

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
158

Relevant Lines:
206

💛  - Coveralls


(docs) Deprecate implicit symlink creation.

Puppet allows users to create symlinks without explicitly specifying the
link attribute. Note that this behavior is deprecated as of Puppet
4.3.0.
See also puppet-docs PR 571.

:+1:

Not sure what's up with appveyor. I'd just ignore it for this PR.


Temporarily remove HTTP proxy

Waiting for backend changes to be merged.

Backend patch: https://github.com/openshift/assisted-test-infra/pull/78


chore(*): next

Codecov Report

Merging #69 (3e7f199) into master (e2d6cfc) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##           master      #69      +/-   ##
==========================================
- Coverage   88.61%   88.59%   -0.03%
==========================================
  Files           9        7       -2
  Lines         123      114       -9
  Branches       13       13
==========================================
- Hits          109      101       -8
+ Misses         11       10       -1
  Partials        3        3

Flag
Coverage Δ

adapters.nestjs
88.59% <100.00%> (-0.03%)
:arrow_down:

core
88.59% <100.00%> (-0.03%)
:arrow_down:

jest
88.59% <100.00%> (-0.03%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

packages/adapters/nestjs/src/reflector.service.ts
85.00% <100.00%> (-1.37%)
:arrow_down:

packages/core/src/services/dependencies-mocker.ts
100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes


Feature 1372 series_analysis

Please review the warning message I added and make sure it would make sense to a user.

"cat_thresh" should be specified in the fcst dictionary, not within each fcst.field array entry!  ....is good
"cat_thresh" should be specified in the top level of fcst dictionary, not within each fcst.field array entry! .... may be better

Approved.  I'm not comfortable doing the merge without some hand holding for the first time, so please merge pull request on my behalf.


EOL Centos 7 - Could not resolve host: mirrorlist.centos.org; Unknown error

Hey,
CentOS Linux 7 is end of life, is there plans to change the docker image?
Currently, it is not possible to use yum as a before script
[root@ba377b0f7d8b /]# yum update
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"

 One of the configured repositories failed (Unknown),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable <repoid>
        or
            subscription-manager repos --disable=<repoid>

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64

Ok, I believe I've found the answer:
https://github.com/pypa/manylinux/issues/1641

docker images pypamanylinux2014_x86_64 are fixed. Will close issue.
if anyone has similar problems just delete the old image from the cache or use the --no-cache option.


Set start state

Description
The Ankaios API already contains the start state but is has not been implemented yet.
Goals

It should be possible to set the start state via the API from a workload and then new start state should be used on subsequent startups of Ankaios.
Create a concept of how the startup set is read and propagated into the system at startup.

Tasks

tbd.

Currently a workload is already able to write the startup state in a file which can then be used by the server at startup. There is no advantage of having an API and thus I close this issue.


fix example in debugger visualizer walkthrough

This pr fixes the documentation issue reported in #8187

@Laniusexcubitor : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@mpeyrotc,
Can you review the proposed changes?
IMPORTANT: When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Docs Build status updates of commit c262b0d:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/debugger/walkthrough-writing-a-visualizer-in-csharp.md
:white_check_mark:Succeeded

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

Docs Build status updates of commit c262b0d:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/debugger/walkthrough-writing-a-visualizer-in-csharp.md
:white_check_mark:Succeeded

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

#sign-off

Docs Build status updates of commit c262b0d:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/debugger/walkthrough-writing-a-visualizer-in-csharp.md
:white_check_mark:Succeeded

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


Startup fails (on kubernetes)

I'm getting the following error when running it on Kubernetes. The config looks correct to me, anyone has an idea how to check this further?
Creating custom redis-commander config.
Configuration:
    {
    "sidebarWidth":250,
    "locked":false,
    "CLIHeight":50,
    "CLIOpen":false,
    "default_connections": [
        {
            "label":"redis",
            "host":"redis",
            "port":"6379",
            "password":"",
            "dbIndex":0
        }
        ]
    }
node ./bin/redis-commander --redis-port tcp://<IP_ADDRESS>:6379
No Save: false
listening on  <IP_ADDRESS> : 8081
net.js:1032
      throw new errors.RangeError('ERR_SOCKET_BAD_PORT', port);
      ^

RangeError [ERR_SOCKET_BAD_PORT]: Port should be > 0 and < 65536. Received NaN.
    at lookupAndConnect (net.js:1032:13)
    at Socket.connect (net.js:1001:5)
    at Object.connect (net.js:124:35)
    at /redis-commander/node_modules/ioredis/lib/connectors/connector.js:44:20
    at process._tickCallback (internal/process/next_tick.js:176:11)

The config for it:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: redis-commander
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: airflow
        tier: redis-commander
    spec:
      restartPolicy: Always
      containers:
      - name: redis
        image: rediscommander/redis-commander:latest
        ports:
        - name: redis-commander
          containerPort: 8081
        env:
        - name: REDIS_HOSTS
          value: redis:redis:6379

I looked into it the best I could and was not able to reproduce. However, you gave us enough context that I can tell you what's going on and hopefully help you hack a solution.
TLDR:
Try adding this to your k8s spec (explicitly setting REDIS_PORT to empty string). If you only have a single redis instance running you can maybe get away with REDIS_PORT=6379 but setting that explicitly will break other things I believe. I wrote the original entrypoint.sh and redis commander was not compatible with both configuration files and command line args (to my knowledge) so I just generated the config with env vars to give flexibility. Someone else has altered it since and there are a lot of caveats I don't think they considered.
        env:
        - name: REDIS_HOSTS
           value: redis:redis:6379
        - name: REDIS_PORT
           value: ""

This is the minimal equivalent to what you're doing which works fine:

docker run -it -e REDIS_HOSTS=redis:redis:6379 rediscommander/redis-commander:latest

I also ran the exact config you supplied and it worked fine.

The key to your mystery is that your logs show node ./bin/redis-commander --redis-port tcp://<IP_ADDRESS>:6379. This is the only line in the entrypoint.sh script that is able to cause that behavior, given you clearly don't have overrides in your k8s spec (that would screw with the entrypoint).
My command (try running this):

$:- kubectl exec -it "$(kubectl get po -l app=airflow -l tier=redis-commander -o jsonpath='{.items[0].metadata.name}')" -- sh -c "env | grep REDIS_"

My output:

REDIS_HOSTS=redis:redis:6379
What I think your output is going to show:
REDIS_HOSTS=redis:redis:6379
REDIS_PORT=tcp://<IP_ADDRESS>:6379

And to try the theory backwards to prove that would case the behavior...
My command:

$: docker run -it -e REDIS_HOSTS=redis:redis:6379 -e REDIS_PORT=tcp://<IP_ADDRESS>:6379 rediscommander/redis-commander:latest
Output:

Creating custom redis-commander config.
Configuration:
    {
    "sidebarWidth":250,
    "locked":false,
    "CLIHeight":50,
    "CLIOpen":false,
    "default_connections": [
        {
            "label":"redis",
            "host":"redis",
            "port":"6379",
            "password":"",
            "dbIndex":0
        }
        ]
    }
node ./bin/redis-commander --redis-port tcp://<IP_ADDRESS>:6379
No Save: false
listening on  <IP_ADDRESS> : 8081
setUpConnection Redis error RangeError [ERR_SOCKET_BAD_PORT]: Port should be > 0 and < 65536. Received NaN.
    at lookupAndConnect (net.js:1032:13)
    at Socket.connect (net.js:1001:5)
    at Object.connect (net.js:124:35)
    at /redis-commander/node_modules/ioredis/lib/connectors/connector.js:47:22
    at process._tickCallback (internal/process/next_tick.js:176:11)

Hi, sorry for the late reply, yes, that was the reason. Kubernetes sets by default environment variables for all defined ports and services, e.g. a service of name "redis" will generate in all pods in that namespace "REDIS_PORT" with the full IP and port as a variable. Can only be override with the pod definition. I specified REDIS_PORT as you suggested and it worked. Was just a clash in testing anyway as in production there will be a prefix, e.g. "prod-airflow-redis" on the service, but good to know.
Thanks for the reply and details.

Hi, ran into the same problem, your solution of adding empty string for port worked. Maybe you could update official docs? What k8s version are you running? Mine is 1.10

I can confirm this. I had a different problem deploying into OpenShift but the resolution was the same.
I was setting the following env vars: REDIS_HOST, REDIS_PORT.
i was getting an error along the lines of "could not write to /redis-commander/.redis-commander" due to entrypoint.sh: writeDefaultConfigBeginning function.
The workaround was to delete those env vars and define REDiS_HOSTS=myproject:redis:6379
I know the issue is closed, but wanted to document this in case anyone else encounters this with OpenShift.
This was in Minishift 1.27 with oc 3.11 and K8S 1.11.
minishift v1.27.0+707887e
oc v3.11.0+0cbc58b
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://<IP_ADDRESS>:8443
kubernetes v1.11.0+d4cacc0

@kimcwhirter this is strange as setting REDIS_HOSTS var does write this config file too with the same code. The entry-point.sh calls function parseRedisHosts which - in turn - calls writeDefaultConfigBeginning...
We only use the REDIS_HOST/REDIS_PORT/... env vars without REDIS_HOSTS inside a kubernetes cluster without any problems...
But thanks for sharing this.

This is what I am seeing in the log for the OpenShift pod.
If seems the root cause is some missing permissions management in the
Dockerfile - but am not sure.
/redis-commander/docker/entrypoint.sh: line 124: can't create
/redis-commander/.redis-commander: Permission denied
Creating custom redis-commander config.
/redis-commander/docker/entrypoint.sh: line 124: can't create
/redis-commander/.redis-commander: Permission denied
/redis-commander/docker/entrypoint.sh: line 124: can't create
/redis-commander/.redis-commander: Permission denied
/redis-commander/docker/entrypoint.sh: line 131: can't create
/redis-commander/.redis-commander: Permission denied
/redis-commander/docker/entrypoint.sh: line 131: can't create
/redis-commander/.redis-commander: Permission denied
cat: can't open '/redis-commander/.redis-commander': No such file or
directory
Creating custom redis-commander config.
Configuration:
node ./bin/redis-commander --redis-port tcp://<IP_ADDRESS>:6379
--redis-password 5C4nL558mO2piFhO
{ Error: ENOENT: no such file or directory, open
'/redis-commander/.redis-commander'
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/redis-commander/.redis-commander' }
No config found or was invalid.
Using default configuration.
No Save: false
setUpConnection Redis error RangeError: "port" option should be >= 0 and <
65536: NaN
at lookupAndConnect (net.js:1052:13)
at Socket.connect (net.js:1025:5)
at Object.connect (net.js:117:35)
at /redis-commander/node_modules/ioredis/lib/connectors/connector.js:47:22
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickCallback (internal/process/next_tick.js:181:9)
Connection closed. Attempting to Reconnect...
listening on <IP_ADDRESS> : 8081
Problem saving config.
{ Error: EACCES: permission denied, open
'/redis-commander/.redis-commander'
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/redis-commander/.redis-commander' }
On Tue, Nov 20, 2018 at 3:13 AM sseide<EMAIL_ADDRESS>wrote:

@kimcwhirter this is strange as setting REDIS_HOSTS var does write this
config file too with the same code. The entry-point.sh calls function
parseRedisHosts which - in turn - calls writeDefaultConfigBeginning...
We only use the REDIS_HOST/REDIS_PORT/... env vars without REDIS_HOSTS
inside a kubernetes cluster without any problems...
But thanks for sharing this.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/joeferner/redis-commander/issues/267#issuecomment-440236856,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABRU7ld2y2WARlcWmpdHIHk46q2CHjwiks5uw-PVgaJpZM4Upuym
.

Regarding permissions in Dockerfile:
https://github.com/joeferner/redis-commander/blob/c6ad89a5c9af694ae3e91355a2e7b7c06821875b/Dockerfile#L24-L25
The HOME var is set before to the /redis-commander directory, therefore all files within and the directory itself is owned by the user running redis-commander (USER command at line 32) below.
The docker image itself should be fine. Are there some special restrictions regarding OpenShift on writing to the image? Maybe something like the --read-only flag to docker run? (https://docs.docker.com/engine/reference/commandline/run/)
Current behaviour of redis-commander depends on writing the file if its not present (default build) or the REDIS_HOSTS env var is set.
Other possibility to work around may be injecting the .redis-commander config file from Openshift with all connection configured inside the default_connections List and not setting the ENV vars et all...

Addon: a sample config file can be found at docker/redis-commader.json

I had been using the latest version in Aug / Sep and it was working fine
using the REDIS_HOST / REDIS_PORT env vars in OpenShift.
It is not working now.
So something changed in the redis-commander code since then to break it in
OpenShift.
FYI I have tried it in both 3.9 and 3.11 with the same result.
At least with the REDIS_HOSTS env var it will start - the config is wrong
so it does not function - falls back to default config. But with the
individual env vars it will not even start.
Steps to reproduce:
pre) install MiniShift 1.27 -
https://github.com/minishift/minishift/releases

Create redis instance using defaults - I am using this template:
https://github.com/klmcwhirter/Huntwords.PuzzleBoard.Cache.Manager/blob/master/etc/redis/redis-persistent-template.json

Add to project: Deploy Image: docker.io/rediscomander/redis-commander
Set env var REDIS_HOSTS myproject:redis:6379

Hope that helps.
-k
On Wed, Nov 21, 2018 at 1:50 AM sseide<EMAIL_ADDRESS>wrote:

Addon: a sample config file can be found at docker/redis-commader.json
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/joeferner/redis-commander/issues/267#issuecomment-440602231,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABRU7p5WA7whveRam6_5o0XNXwahN92Mks5uxSIBgaJpZM4Upuym
.

Sorry - its an Openshift problem. Openshift ignores the USER command from the Dockerfile (or similiar). You either has to find out how this can be configured inside Openshift or create your own image.
Running the image through docker or plain kubernetes and attaching to the running image with "docker exec -it"  or similiar:
uid=100(redis) gid=65533
~ $ pwd
/redis-commander
~ $ touch .test
~ $ ls -la
total 184
drwxr-sr-x    1 redis    65533           63 Nov 22 14:15 .
drwxr-xr-x    1 root     root            29 Nov 22 14:13 ..
-rw-------    1 redis    65533           33 Nov 22 14:15 .ash_history
drwx--S---    3 root     65533           25 Nov 22 12:33 .config
drwxr-sr-x    5 redis    65533           86 Nov 22 12:33 .npm
-rw-r--r--    1 redis    65533          290 Nov 22 14:13 .redis-commander
-rw-r--r--    1 redis    root           233 Jul 24 14:50 .redis_commander
-rw-r--r--    1 redis    65533            0 Nov 22 14:15 .test
-rw-r--r--    1 redis    root          1083 Jul 24 14:50 LICENSE
drwxr-xr-x    1 redis    root            32 Nov 13 13:56 bin
drwxr-xr-x    1 redis    root            95 Nov 22 12:32 docker
-rw-r--r--    1 redis    root           488 Jul 24 14:50 ecosystem.config.js
drwxr-xr-x    1 redis    root            49 Nov 13 13:56 lib
drwxr-sr-x  334 root     65533        12288 Nov 22 12:33 node_modules
-rw-r--r--    1 redis    root        147162 Nov 22 12:33 package-lock.json
-rw-r--r--    1 redis    root          1342 Nov 13 13:56 package.json
drwxr-xr-x    1 redis    root            33 Sep 11 14:00 web
~ $

Running the same image inside minishift and doing an "docker exec -it":
uid=1000170000 gid=0(root) groups=1000170000
/redis-commander $ pwd
/redis-commander
/redis-commander $ touch .test
touch: .test: Permission denied
/redis-commander $ ls -la
total 176
drwxr-sr-x    1 redis    65533          211 Nov 21 15:01 .
drwxr-xr-x    1 root     root            17 Nov 22 14:10 ..
drwx--S---    3 root     65533           25 Nov 21 15:01 .config
drwxr-sr-x    5 redis    65533           86 Nov 21 15:01 .npm
-rw-r--r--    1 redis    root           233 Nov 21 15:00 .redis_commander
-rw-r--r--    1 redis    root          1083 Nov 21 15:00 LICENSE
drwxr-xr-x    1 redis    root            32 Nov 21 15:00 bin
drwxr-xr-x    1 redis    root            95 Nov 21 15:00 docker
-rw-r--r--    1 redis    root           488 Nov 21 15:00 ecosystem.config.js
drwxr-xr-x    1 redis    root            49 Nov 21 15:00 lib
drwxr-sr-x  334 root     65533        12288 Nov 21 15:01 node_modules
-rw-r--r--    1 redis    root        147162 Nov 21 15:01 package-lock.json
-rw-r--r--    1 redis    root          1342 Nov 21 15:00 package.json
drwxr-xr-x    1 redis    root            33 Nov 21 15:00 web
/redis-commander $

As you see inside minishift the user has another id (not 100 anymore) and therefor no rights to write to the folder.
It may have worked with images from before 19 june 2018. Up to this date the app inside the container was running as "root", which is from a security point of view a no-go. With that commit  it was changed inside Dockerfile to "USER redis". And (not using Openshift) this user has rights to create files inside its own home.
Another possibility may be to move the evaluation of REDIS_HOSTS var inside the node app without creating a config file first...

regarding Openshift problem - one may say so - some other not... :-)
At least it is mentioned under "OpenShift Container Platform-Specific Guidelines"
Afair the app does no user to id lookup, therefor the passwd specific parts may be omited.
Only root group for home directory and numeric USER id should be needed (as i read it).
For numeric user id it should be testet if an env var is possible too (create user, get id of newly created user and store it inside an env var and use that for the USER statement to not fail if (for whatever reason) the id of newly create users change during build process.
When you change the Dockerfile - maybe you can do some extra steps to increase security:
only HOME dir itself (/redis-commander) needs to be writable for the user to create config file, node_modules / web / lib / ... folder and so on can belong to root to not allow some changes during runtime from inside the app.
Any PR fixing problems is welcome i think...


Plans to implement BoxPlot?

Hi I wonder if there are any plans to add BoxPlot wrapper? If not, I could take a run at an implementation and do a PR thanks

I'm very busy for a few more weeks.
You could add that easily and contribute it.


unused args [infra2_width,...

Hi,
I'm trying to replicate your experiment.
When running: roslaunch mvp_grasping wrist_realsense.launch
I got "unused args [infra2_width,..." error which seems to be fixed by commenting those argument from wrist_realsense.lunch file. Please correct me if I'm wrong.
Now roslaunch mvp_grasping wrist_realsense.launch seems to run services but at the end I get following:

09/01 15:27:46,757 WARNING [140586694735616] (ds5-timestamp.cpp:76) UVC metadata payloads not available. Please refer to the installation chapter for details.
Waiting for service /camera/realsense2_camera_manager/set_parameters...
09/01 15:28:38,078 WARNING [140586550888192] (types.cpp:49) Out of frame resources!
09/01 15:28:38,078 ERROR [140586550888192] (synthetic-stream.cpp:47) Exception was thrown during user processing callback!

Do you get similar message in your side? The camera (D435) seems to be working with realsense_viewer
P.s.
I'm new to ROS so any extra instruction will be more than welcome. Meanwhile I will proceed with running other parts :)
Cheers,

It looks like intel changed the parameters in the Realsense launch file between different versions -- you are completely correct to simply comment out those parameters.  Are you able to submit a pull request with the fixed launch file?
I don't get those warnings, but I do get some other warnings. At the end of the day, I think as long as the data is coming through then it's fine.

I will submit a pull request once I mange to run whole system :)


Use dedicated window to access container shell

Until now the container shell is accessed by executing %shell in a cell. After this, all commands will be executed as a bash command in the container until %exit is executed.
This comes with the drawback of not having a "shell feeling" and the commands polluting the notebook's cell.

This commit implements a frontend button that opens a shell-like instance of the Notebook based on this tutorial and this example extension. This is still not the desired solution.
In another attempt, I will use the interactive flag of a docker run command.

This comit implements a better version of the shell.
It uses signals to consistently enter the initial code to access the docker container's shell.


Arc type error

When setting an arc object to type "Normal" and then exporting the config, the arc type value is exported as "1" (symmetrical).
It should be "0".

I have some major changes coming. The Arc and other widgets had a full redesign. I wil update te online version this week. Also you can then test your design directly on your device with an MQTT jsonl command.

Awesome to hear! Looking forward to testing the new changes.


Update javacc to 7.0.11

Updates net.java.dev.javacc:javacc from 7.0.10 to 7.0.11.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

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

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequest = { frequency = "@monthly" },
  dependency = { groupId = "net.java.dev.javacc", artifactId = "javacc" }
}]

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

Superseded by #41.


fix(style) - improve accordion expanded status

Fixes https://github.com/international-labour-organization/designsystem/issues/843
Notes :-

Refactor styles of accordion expanded status

[x] 'Closed Hover' state: light blue background was removed
[x] 'Open Default' state: light blue background was added; text and icon should now be ILO blue
[x] 'Open Hover' state: text and icon should now be dark blue

Demo :-
https://github.com/international-labour-organization/designsystem/assets/32934169/c71976b6-d142-48c0-8d12-dff5f8497e6c

hey @inesdgomes can you review this: https://deploy-preview-1036--ilo-ui-twig-develop.netlify.app/?path=/docs/components-content-accordion--default


jps: Watch corerex.com

jps requests the watch of the watch_keyword corerex\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

corerex\.com has been seen in 0 true positives, 0 false positives, and 0 NAAs.

Approved by Jeff Schaller in Charcoal HQ


Add query to meta_knowledge_graph to retrieve "possible" nodes/edges

Perhaps instead of relying on KPs to provide what they can return, query the MKG endpoint to see what they can return.

possibly add 'biolink-model version' to the MKG endpoint schema.
possibly use biolink-model to validate associations

example MKG endpoint:
https://icees.renci.org:16342/meta_knowledge_graph

We are now proposing a field in the smartapi spec that would point to test triples in the kps repo.
The metakg supplies the data model but no examples.
One future possibility would be to put examples in the metakg with the schema.
This did however inspire two additional testing scenarios:
We will test to first see if there is a metakg for each KP (which there currently is not in all cases).
We can also use the metakg to ensure that sample data has been provided for all triple types.

Tim's comments are a duplication of Issue #14. PR #27 resolves the test_data_location mechanism for getting sample data.


Turn JSON schema descriptions into doc metadata

When generating a record contract, JSON schema description fields should be turned into doc metadata in Nickel.

#13 addresses this for record contract generation. Ideally we should also handle top-level definitions, even if the documentation metadata might not be accessible yet.

With #16 we're emitting documentation metadata whenever we see a description field.


Error with extension on Magento 2.1

I'm trying to use your extension on Magento 2.1 and when I run bin/magento setup:di:compile I get the following error
Incorrect dependency in class MageMojo\Cron\Controller\Adminhtml\Settings\Index in /home/tuckersf/public_html/app/code/MageMojo/Cron/Controller/Adminhtml/Settings/Index.php
\Magento\Framework\Message\ManagerInterface already exists in context object
Total Errors Count: 1
Please provide a fix as soon as possible.

@Ctucker9233  Try clearing clearing the folder generated/* first before compiling.

@gnuzealot I ran rm -rf var/di var/generation var/cache/* var/page_cache/* pub/static/frontend/* before running the upgrade and compile commands

@Ctucker9233 what was the full version number? I'll try to reproduce it here.

Version of Magento is 2.1.11. Is that what you meant by full version number?

@Ctucker9233 Please try it now, should be fixed with https://github.com/magemojo/m2-ce-cron/commit/5be6233b8df8432d6d4bc6e73f4c18112b85e617

It works perfectly now. Thank you.

Excellent, closing the issue.


feat (manager) : components & pages added

Components Added:

Chart Component :

Deployment Week
Total Deployment

Settings Component :

API Key
Delete Spa
Manage Spa

Web-Property Component :

Activity Stream
Spa Property
Web Property

Utils:

API Request

Pages Added:

Index Page (Route - /properties)
Web Property Page ( Route - /properties/{web-property-name} )
Spa Proeprty Page ( Route - /properties/{web-property-name}/spa/{spa-name} )
Web Property Settings Page ( Route - /properties/{web-property-name}/settings )

Thanks @arkaprovob


Lab 7 - unable to generate the Entities.cs file with the Early Bound Generator from Daryl LaBar

This is new ,a month ago this was working properly. It is not possible to generate the Entities.cs, however the Optionsets.cs are working.
Generating the Entities.cs fails with the following error message:
You are running V1 of the XTB Early Bound Generator.  If you Please consider upgrading to V2, which is much faster and has many more features!
You are using an older, slower version of the the Early Bound Generator.  Please consider installing the Early Bound Generator V2 from the XrmToolBox plugin store!
CRM Authentication Type Detected: OnlineFederation
Tracking Entities Generation Event.
Executing for Entities
Executing "C:\Users\Admin\AppData\Roaming\MscrmTools\XrmToolBox\Plugins\DLaB.EarlyBoundGenerator\crmsvcutil.exe" /url:"https://orge5ef9d31.api.crm4.dynamics.com" /namespace:"CrmEarlyBound" /SuppressGeneratedCodeAttribute /out:"C:\Users\Admin\AppData\Roaming\MscrmTools\XrmToolBox\Settings\EBG\Entities.cs" /servicecontextname:"CrmServiceContext" /codecustomization:"DLaB.CrmSvcUtilExtensions.Entity.CustomizeCodeDomService,DLaB.CrmSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.Entity.CustomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmSvcUtilExtensions.Entity.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /namingservice:"DLaB.CrmSvcUtilExtensions.NamingService,DLaB.CrmSvcUtilExtensions" /metadataproviderservice:"DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService,DLaB.CrmSvcUtilExtensions"<EMAIL_ADDRESS>/password:"******************"
CrmSvcUtil : CRM Service Utility [Version <IP_ADDRESS>]
c 2020 Microsoft Corporation. All rights reserved
Begin Reading Metadata
Begin Reading Metadata from Server
Completed Reading Metadata from Server - 00:00:37.2126201
Completed Reading Metadata 00:00:41.0757670
Begin Writing File
Ensuring Context File is Accessible
Writing file Entities.cs to C:\Users\Admin\AppData\Local\Temp\tmpDFF7.tmp
Processing 141 OptionSets
Wrote 0 OptionSets
Processing 723 Entities
Wrote 7 Entities
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add)    at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer)    at DLaB.CrmSvcUtilExtensions.Entity.MultiOptionSetAttributeUpdater.<>c.<CustomizeCodeDom>b__0_1(EntityMetadata v)    at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer`1 comparer)
at DLaB.CrmSvcUtilExtensions.Entity.MultiOptionSetAttributeUpdater.CustomizeCodeDom(CodeCompileUnit codeUnit, IServiceProvider services)
at DLaB.CrmSvcUtilExtensions.Entity.CustomizeCodeDomService.CustomizeCodeDom(CodeCompileUnit codeUnit, IServiceProvider services)
at Microsoft.Crm.Services.Utility.CodeGenerationService.WriteFile(String outputFile, String language, CodeNamespace codenamespace, ServiceProvider serviceProvider)
at Microsoft.Crm.Services.Utility.CodeGenerationService.Microsoft.Crm.Services.Utility.ICodeGenerationService.Write(IOrganizationMetadata organizationMetadata, String language, String outputFile, String outputNamespace, IServiceProvider services)
at DLaB.CrmSvcUtilExtensions.BaseCustomCodeGenerationService.WriteInternal(IOrganizationMetadata organizationMetadata, String language, String outputFile, String targetNamespace, IServiceProvider services)
at DLaB.CrmSvcUtilExtensions.BaseCustomCodeGenerationService.Write(IOrganizationMetadata organizationMetadata, String language, String outputFile, String outputNamespace, IServiceProvider services)
Completed Writing File 00:00:01.0929330
Output file was not updated or not found!  C:\Users\Admin\AppData\Roaming\MscrmTools\XrmToolBox\Settings\EBG\Entities.cs
Creation Complete!

The lab was updated a few weeks ago by PR #142 to remove early bound and use of the Early Bound Generator
If you are still seeing this in your lab environment, contact the ALH to update their lab steps

The lab was updated a few weeks ago by PR #142 to remove early bound and use of the Early Bound Generator If you are still seeing this in your lab environment, contact the ALH to update their lab steps

Thanks Julian, I see that goDeploy has not updated anything, also from my previous batch of issues.

I have raiseds a ticket with them to make the updates
GDS-8041

Received update from GoDeploy
"The content team have made the necessary changes to Lab 7 of PL-400. The 2nd task within the lab has been made redundant and therefore has been removed. The rest of the lab reflects what is seen on GitHub."


local notation replaces previous notation, rather than overloads

Is this the intended behavior?
import data.nat data.set
open set

variables a b : set nat

check a ∩ b  -- ok

infix `∩` := nat.add

check a ∩ b  -- ok

local infix `∩` := nat.add

check a ∩ b  -- error

Yes, that is indeed the intended behavior: https://github.com/leanprover/lean/issues/554#issuecomment-95010837 (item 4)
I think that will also be what I usually want.

Thanks! But it might not always be what we want. For example, I can imagine that sometimes it would be useful to use * for some binary operation locally, but also still use * for multiplication on the natural numbers. This is minor, though, since for local notation, we can always choose a different symbol if necessary.
The current behavior gives a way of turning off overloads, which is nice. For example, suppose in a file we are overloading * for nat and int, and it is causing problems. Then we can open a section and specify that * is the multiplication on nat.
The current behavior and workaround are fine, so I'll close this issue.

For example, I can imagine that sometimes it would be useful to use * for some binary operation locally, but also still use * for multiplication on the natural numbers. This is minor, though, since for local notation, we can always choose a different symbol if necessary.

We can still use #nat for temporarily retrieving the nat notation


Add extended data validation library support for method parameters

There's currently some basic data validation for methods, but it only supports type validation (i.e., verify parameter is dict, int, str, etc.). It would be nice if users could utilize an external library like Cerberus to validate the data inside the extension rather than unpacking all of the variables inside of the view itself.
I could probably get the feature implemented myself and submit a pull request, but as I said in the last issue report I opened, there aren't any contributing guidelines so I'm not sure what the next step of that would be.

Hello,
Very cool this project that would help a lot.
Would be some changes that break old code, then I will look for the next version.
Thank you.


Implementing Trip Report with attribute formating

Hi Anton,
I have started creating the remaining reports. I started it with the Trips report. Along with this, I have also started customizing attributes such as distance, speed, and duration, etc. on the basis of user preference. Therefore, please review the code and suggest improvements in it.
Thanks

Hi Anton,
I have included your suggestions. Along with this, I have also created all the remaining reports except charts. Please review the code and suggest improvements.
Thanks.

Hi Anton,
I have included your suggestions and removed the DailySummary Report page and done minor code fixes.

Merged, thank you so much for working on this.


when I do hot restart multiple times simultaneouly it give textspan  error or any other error of RenderFlex etc can you fix it fast. Also when I use GetX package it does not hot restart fast It takes too much time and I have to close tab and restart VS code and run flutter run command

duplicate of https://github.com/flutter/flutter/issues/75630

Closing this as it is a duplicated as @iapicca mentioned above.


Consider moving to Silex

The flat-file PHP style samples are good in the fact they are simple, but we may be able to have something even more elegant if we incorporate silex and then have each sample be just a callback function for the sample. Then the samples could all be run at once while still maintaining readability. See the python-docs-samples for reference.
However, it still may be cleaner to keep them as-is, so we'll just have to see as we create new samples what the best method is.

we have decided to use silex for all web-based samples


Event Request Table 5065 – Interaction Log Entry - SetCanceledCheckmark

Hello,
based on my phone call with jared hall last week, here is a better definition for this function. I also added an description of the event(s) needed.
Additionally i developed the events by my own. Take a look at the C/AL  object i'va added.
Here you can see the exact publishers, parameters, function name etc.
My Code is documented like:
// A/ Event Request
OnBeforeSomething...
// E/ Event Request
Requested Event in CU 5052 - Function "ProcessDeliverySorter"

OnBeforeSetCanceledCheckmark(Rec,CanceledCheckmark,RemoveUniqueAttachment,Handled);

If I understand correctly the requested event should look like:
SetCanceledCheckmark(CanceledCheckmark : Boolean;RemoveUniqueAttachment : Boolean)
OnBeforeSetCanceledCheckmark(Rec,CanceledCheckmark,RemoveUniqueAttachment,IsHandled);
IF IsHandled THEN
  EXIT;

IF Canceled AND NOT CanceledCheckmark THEN BEGIN

Its declaration:
LOCAL [IntegrationEvent] OnBeforeSetCanceledCheckmark(VAR InteractionLogEntry : Record "Interaction Log Entry";CanceledCheckmark : Boolean;RemoveUniqueAttachment : Boolean;VAR IsHandled : Boolean)
Put explicitly if you want to set property IncludeSender to true.
Please follow this approach and we will be adding new events fast and correct.


hylafaxplus: fix build

Motivation for this change
Recent libtiff bump broke the build
Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Relase notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

cc @Yarny0

Thanks for the quick fix, @ajs124 !

Tested successfully, with an iaxmodem (inside virtualbox): sending and receiving faxes works fine.
Not tested with real hardware modem, but I guess libtiff problems would show up irrespective of the modem.
I can't find a patch by another distribution that could be used in place of the patch file.  So this is the best we can do.

I approve this pull request and recommend merging it.


/quests top requires a value when wiki suggests this is optional

What is your Quests version / build number (do not say "latest")?
3.5.8 (dev updated version)
Describe the problem and how to replicate it. Any console errors to post using Pastebin.com?
As stated in the title, the /quests top command requires a numerical value such as /quests top 10 when typed. The wiki doesn't mention a value being required, so I believe this to be a bug. Apologies if I should have posted this as a feature request instead, but it would be great to just be able to type /quests top and have it bring up a list of the top 10 players without having to specify a value. Thanks for your time!
If applicable, can you provide an example quest from quests.yml using Pastebin.com?

Comment for clarity: We are on 3.5.8-b581

The usage in the Wiki is wrong. However, I will look into making a number optional.

http://ci.ac3-servers.eu/job/Quests/590/


Order package node's toplevel node list so that import stmts are the first in the list

Description:
$subject. Currently we add to the middle of the toplevel node list when we visit import statements.
Steps to reproduce:
Affected Versions:
OS, DB, other environment details and versions:
Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

Could you please add what are the limitations with current design?

This issue marked as "Deferred" and will be revisited in the future when resources are available.


Add 'from' account name to 'Sign' wails popup

Context:
For Account name some work has been done by Pierre S on it in the backend, to allow showing account names in the signature popup. It will allow users to easily verify from which wallet they are signing a message or an operation.
Need:
Keep the address as well, but add the account name when applicable.

@LucasF243 are there designs for this ? / should we do a quick sync to align (i feel like full designs are not necessary) :)
cc @longgamma-massa

check comment here: https://github.com/massalabs/station-massa-wallet/issues/380#issuecomment-1803628956


Riding Damage cannot be filtered out

Describe the bug
When selecting the damage types to track, there is no "Riding Damage" to uncheck. I've seen it in the UI description given in this github as a listed damage type though. So I assume that you can turn it off.
Screenshots

Fixed in 798fe55.


tests/e2e: add test for secure gRPC origination

Description:
Adds an e2e test for secure (over TLS) gRPC origination
that is routable using TCP routes. Unlike the insecure
gRPC origination test, this test needs to use TCP routes
vs HTTP routes because the requests are encrypted within
the client app, thereby making HTTP based routing void
due to the TCP payload being encrypted.
Signed-off-by: Shashank Ram<EMAIL_ADDRESS>
Affected area:

New Functionality      [ ]
Documentation          [ ]
Install                [ ]
Control Plane          [ ]
CLI Tool               [ ]
Certificate Management [ ]
Networking             [ ]
Metrics                [ ]
SMI Policy             [ ]
Security               [ ]
Tests                  [X]
CI System              [ ]
Performance            [ ]
Other                  [ ]

Please answer the following questions with yes/no.

Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?
No

Codecov Report

Merging #2741 (99adb2b) into main (36b9159) will increase coverage by 0.20%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2741      +/-   ##
==========================================
+ Coverage   63.96%   64.17%   +0.20%
==========================================
  Files         151      151
  Lines        6755     6755
==========================================
+ Hits         4321     4335      +14
+ Misses       2419     2405      -14
  Partials       15       15

Flag
Coverage Δ

unittests
64.17% <ø> (+0.20%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/configurator/validating_webhook.go
80.00% <0.00%> (+9.65%)
: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 36b9159...99adb2b. Read the comment docs.


Feature request - only read specific sections of ini file

Hi. First thank you for providing shini it is working fine.
I would like to request a new feature, because if we have a long ini file it takes a long time to read, and we often only need to read a specific section of the ini file.
So could you add the possibility to only read the variables in a specified section?
Thanks

Absolutely - if this project is seeing this much attention, I'll happily spend the time trying to optimise it!
As soon as possible, I'll investigate general optimisations (to increase the speed overall) and, as you suggest, a specific enhancement to deal with only the section in question.

Thank you very much.
We have included your "Shini" script in our small free audio player for Raspberry - the piCorePlayer: https://sites.google.com/site/picoreplayer/home

That's really cool :-)  May I ask for an example copy of the INI file you're parsing, and an example of the operation(s) you're performing on it?
I've made some fairly aggressive changes for bash >= version 3 and zsh (I'm not clear on the version compatibility for zsh), which has pushed the performance to almost 7x faster (in my tests).
Regarding processing a specific section, am I understanding correctly that you'd like to be able to specify 'shini_parse ... "SOMEBLOCK"` so it only parses the content of that specific section?

I've included PHP's shipped php.ini as a performance test, and included test.sh which accepts a single argument for the specific INI section to parse.  (It simply skips everything else.)  Not specifying the argument parses the entire file as normal.
The overall performance increase is very significant with the earlier changes:
Before
time bash test_perf.sh
real    0m16.372s

After
time bash test_perf.sh
real    0m0.789s

(Note, zsh seems to have the edge on performance in the current implementation.)
Including specifying the section, further gains can be made:
time bash ./test_perf.sh > /dev/null
real    0m0.838s

time bash ./test_perf.sh PHP > /dev/null
real    0m0.396s

time bash ./test_perf.sh opcache > /dev/null
real    0m0.309s

time bash ./test_perf.sh curl > /dev/null
real    0m0.282s

This is great :-)
Here is our script that among many things also use shini to read a lot of audio DAC.conf files in order to make us able to use the variables in the DACs
`#!/bin/sh
Version: 3.20 2017-03-12
Added check for /tmp/dropdown.cfg in pcp_sound_card_dropdown. SBP.
Added shini conf parser. SBP.
Suppress already mounted message during do_rebootstuff newconfig process. PH.
Version: 3.11 2017-01-20
Fixed the issue with shairport not working when using USB cards. SBP.
Version: 3.10 2016-12-11
Original. SBP.
pcp_debug_log "$0 - Running pcp-soundcard-functions..."
DACLOCATION="/usr/local/etc/pcp/cards"     # <=== Should be in pcp-functions? GE.
#The below line is for development only.
#DACLOCATION="/home/tc/www/cgi-bin/cards"
############
. /usr/local/bin/shini.sh
#========================================================================================
Check if we use the special Audio kernel or not. As we load special overlays if using Audio kernel
#----------------------------------------------------------------------------------------
pcp_AudioKernel_status() {
sudo  uname -a | grep pcpAudioCore > /dev/null 2>&1 && KERNELVERSION=Audiokernel || KERNELVERSION=Officialkernel
}
pcp_AudioKernel_status
#========================================================================================
Disable/re_enable analog audio
#----------------------------------------------------------------------------------------
pcp_disable_analog() {
sudo sed -i 's/^dtparam=audio=on/#dtparam=audio=on/g' $CONFIGTXT
sudo sed -i 's/^audio_pwm_mode=2/#audio_pwm_mode=2/g' $CONFIGTXT
}
pcp_re_enable_analog() {
pcp_disable_analog
sudo sed -i "/dtparam=audio=on/c\dtparam=audio=on" $CONFIGTXT
sudo sed -i "/audio_pwm_mode=2/c\audio_pwm_mode=2" $CONFIGTXT
}
#========================================================================================
Remove Audio dtoverlays
#----------------------------------------------------------------------------------------
pcp_disable_i2s() {
pcp_re_enable_analog
# unset DTOVERLAY both the old one that is removed on chooseoutput.cgi and the one from config.cfg to clear all traces of audio dtoverlays
shini_parse ${DACLOCATION}/${ORIG_AUDIO}.conf
[ x"" != x"${DTOVERLAY}" ] && sed -i '/dtoverlay='"$DTOVERLAY"'/d' $CONFIGTXT
	shini_parse ${DACLOCATION}/${AUDIO}.conf
	[ x"" != x"${DTOVERLAY}" ] && sed -i '/dtoverlay='"$DTOVERLAY"'/d' $CONFIGTXT

}
#========================================================================================
Add Audio dtoverlays
#----------------------------------------------------------------------------------------
pcp_enable_i2s() {
pcp_re_enable_analog
pcp_selected_soundcontrol
[ x"$SPARAMS1" != x"" ] && PAR1=','"$SPARAMS1"'' || PAR1="$SPARAMS1"
[ x"$SPARAMS2" != x"" ] && PAR2=','"$SPARAMS2"'' || PAR2="$SPARAMS2"
[ x"$SPARAMS3" != x"" ] && PAR3=','"$SPARAMS3"'' || PAR3="$SPARAMS3"
[ x"$SPARAMS4" != x"" ] && PAR4=','"$SPARAMS4"'' || PAR4="$SPARAMS4"
[ x"$SPARAMS5" != x"" ] && PAR5=','"$SPARAMS5"'' || PAR5="$SPARAMS5"
[ x"$DTOVERLAY" != x"" ] && sudo echo dtoverlay=$DTOVERLAY$PAR1$PAR2$PAR3$PAR4$PAR5  >> $CONFIGTXT

}
#========================================================================================
Enable/disable HDMI settings in config.txt
#----------------------------------------------------------------------------------------
pcp_disable_HDMI() {
sed -i '/hdmi_drive=2/d' $CONFIGTXT
sed -i '/hdmi_force_hotplug=1/d' $CONFIGTXT
sed -i '/hdmi_force_edid_audio=1/d' $CONFIGTXT
}
pcp_enable_HDMI() {
pcp_disable_i2s
sudo echo hdmi_drive=2 >> $CONFIGTXT
sudo echo hdmi_force_hotplug=1 >> $CONFIGTXT
sudo echo hdmi_force_edid_audio=1 >> $CONFIGTXT
sudo amixer cset numid=3 2 >/dev/null 2>&1
}
#========================================================================================
Section that controls loading of DAC overlays
#----------------------------------------------------------------------------------------
pcp_read_chosen_audio() {
# if noumount, disk is probably already mounted....supress output
[ "$1" == "noumount" ] && pcp_mount_mmcblk0p1 > /dev/null 2>&1 || pcp_mount_mmcblk0p1
pcp_disable_HDMI
pcp_disable_i2s
pcp_enable_i2s
# This is to allow no unmount of mmcblk0p1 during booting with newconfig.cfg
[ "$1" != "noumount" ] && pcp_umount_mmcblk0p1
}
#========================================================================================
Control of sound card routines:
- Needs to be populated for each type of soundcard.
- Some are without filter options.
- USB cards will probably never be supported this way as they are so different.
#----------------------------------------------------------------------------------------
HELP - To find the controls:
- amixer -c 0 scontrols
- aplay -l
#----------------------------------------------------------------------------------------
pcp_generic_card_control() {
case "$GENERIC_CARD" in
TI51XX)
amixer -c $CARD scontrols | grep -q 'DSP Program' && DSPfound="yes" || DSPfound="no"
if [ "$DSPfound" = "yes" ]; then
DSP="DSP Program,0"
FILTER1="Low latency IIR with de-emphasis"
FILTER2="FIR interpolation with de-emphasis"
FILTER3="High attenuation with de-emphasis"
FILTER4="Fixed process flow"
FILTER5="Ringing-less low latency FIR"
fi
ACTUAL_VOL=$(amixer -c $CARD sget $SSET | grep "Right: Playback" | awk '{ print $5 }' | tr -d "[]%")
ACTUAL_DB=$(amixer -c $CARD sget $SSET | grep "Right: Playback" | awk '{ print $6 }' | tr -d "[]")
ACTUAL_FILTER=$(amixer -c $CARD sget 'DSP Program,0' | grep "Item0:" | awk '{ print $2 }' | tr -d "'")
		case "$DSPFILTER" in
			FILTER1) FILTER="$FILTER1" ;;
			FILTER2) FILTER="$FILTER2" ;;
			FILTER3) FILTER="$FILTER3" ;;
			FILTER4) FILTER="$FILTER4" ;;
			FILTER5) FILTER="$FILTER5" ;;
		esac

		# Logic to make checked radiobuttons - needs to clear it otherwise we have two FILTERS_CHECK checked.
		FILTER1_CHECK=""
		FILTER2_CHECK=""
		FILTER3_CHECK=""
		FILTER4_CHECK=""
		FILTER5_CHECK=""

		case "$ACTUAL_FILTER" in
			Low) FILTER1_CHECK="checked" ;;
			FIR) FILTER2_CHECK="checked" ;;
			High) FILTER3_CHECK="checked" ;;
			Fixed) FILTER4_CHECK="checked" ;;
			Ringing-less) FILTER5_CHECK="checked" ;;
		esac
	;;

	HIFIBERRY_AMP)
		ACTUAL_VOL=$(amixer -c $CARD sget $SSET | grep "Mono:" | awk '{ print $3 }' | tr -d "[]%")
	;;

	ONBOARD)
		ACTUAL_VOL=$(amixer -c $CARD sget $SSET | grep "Mono: Playback" | awk '{ print $4 }' | tr -d "[]%")
		ACTUAL_DB=$(amixer -c $CARD sget $SSET | grep "Mono: Playback" | awk '{ print $5 }' | tr -d "[]")
	;;

ES9023)
CARD="ALSA"
SSET="PCM"
ACTUAL_VOL=$(amixer -c $CARD sget $SSET | grep "Mono: Playback" | awk '{ print $4 }' | tr -d "[]%")
ACTUAL_DB=$(amixer -c $CARD sget $SSET | grep "Mono: Playback" | awk '{ print $5 }' | tr -d "[]")
TEXT="Choosing 384k will enable 352k and 384k sample rates. Selecting bclk_ratio_int_div will use bclk_ratio=50 for 16/24bps and bclk_ratio=100 for 32bps media when sample rate is a multiple of 8kHz and less than 192kHz. Which causes the selection of the 19M2 OSC as the parent for the PCM clock with an integer divider, rather than PLLD with fractional divider and MASH noise shaping."
PARAMS1="384k"
PARAMS2="bclk_ratio_int_div"
;;
esac

}
#========================================================================================
This will get us all available AUDIO DACs
#----------------------------------------------------------------------------------------
AUDIO_OPTIONS_EXTRA=$(ls "$DACLOCATION" | grep ".conf" | awk -F'.conf' '{ print $1 }')
#========================================================================================
Section that populate sound card drop-down list on Squeezelite.cgi
#----------------------------------------------------------------------------------------
pcp_sound_card_dropdown() {
pcp_blank_audio_conf
. $CONFIGCFG
if [ -e /tmp/dropdown.cfg ]; then
sudo sed -i 's/:selected:/:notselected:/' /tmp/dropdown.cfg
sudo sed -i "/${AUDIO}:/s/:notselected:/:selected:/" /tmp/dropdown.cfg
else
	CONF_AUDIO="$AUDIO"
	pcp_blank_audio_conf
	for i in $AUDIO_OPTIONS_EXTRA; do
		AUDIO=$i
		pcp_soundcontrol
		CHECKED="notselected"
		[ "$AUDIO" = "$CONF_AUDIO" ] && CHECKED="selected"
		if [ x"$LISTNAME" != x ]; then
		sudo echo "${AUDIO}:${CHECKED}:${LISTNAME}:${RPI_MODEL}" >> /tmp/dropdown.cfg
		fi
	done
fi

}
#========================================================================================
This will get us available options from the DAC
#----------------------------------------------------------------------------------------
old_pcp_soundcontrol() {
pcp_blank_audio_conf
echo "$AUDIO_OPTIONS_EXTRA" | grep -q "$AUDIO" && . "$DACLOCATION"/"$AUDIO".conf
}
Declare a handler for parsed variables.  This is required.
__shini_parsed() {
printf "  %s_%s='%s'\n" "$1" "$2" "$3"
eval \ $1_$2='"$3"'

if [ "$KERNELVERSION" = "Audiokernel" ]; then
	if [ "$1" = "PCPAUDIOCORE" ]; then

printf "  %s_%s='%s'\n" "$1" "$2" "$3"
		eval \ $2='"$3"'
	fi
fi

if [ "$KERNELVERSION" = "Officialkernel" ]; then
	if [ "$1" = "PCPCORE" ]; then

printf "  %s_%s='%s'\n" "$1" "$2" "$3"
		eval \ $2='"$3"'
	fi
fi

if [ "$1" = "COMMON" ]; then

printf "  %s_%s='%s'\n" "$1" "$2" "$3"
	eval \ $2='"$3"'
fi

}
pcp_soundcontrol() {
# Parse
shini_parse ${DACLOCATION}/${AUDIO}.conf
}
#========================================================================================
This will get us available options from the selected DAC
#----------------------------------------------------------------------------------------
pcp_selected_soundcontrol() {
pcp_blank_audio_conf
. "$CONFIGCFG"
shini_parse ${DACLOCATION}/${AUDIO}.conf
}
pcp_blank_audio_conf() {
# Remove left-over from previous audio DAC
CARD=""
OUTPUT=""
ALSA_PARAMS=""
GENERIC_CARD=""
CONTROL_PAGE=""
LISTNAME=""
DTOVERLAY=""
SSET=""
PARAMS1=""
PARAMS2=""
PARAMS3=""
PARAMS4=""
PARAMS5=""
RPI_MODEL=""
I=1
while true; do
eval TEST="${TEXT${I}}"
if [ x"$TEST" != x ]; then
eval TEXT${I}=""
I=$((I+1))
else
break
fi
done
}
And here is a sample DAC.conf file: hifi_DAC.conf:[COMMON]
CARD="sndrpihifiberry"
LISTNAME="HiFiBerry DAC+ Light"
OUTPUT="hw:CARD=sndrpihifiberry"
ALSA_PARAMS="80:4::1"
RPI_MODEL="HAT_ALL"
[PCPAUDIOCORE]
GENERIC_CARD="ES9023"
DTOVERLAY="hifiberry-dacpluslight-es9023-audio"
TEXT1="384k will enable 352k and 384k sample rates."
TEXT2="bclk_ratio_int_div will use bclk_ratio=50 for 16/24bps and bclk_ratio=100 for 32bps media when sample rate is a multiple of 8kHz and less than 192kHz. Which causes the selection of the 19M2 OSC as the parent for the PCM clock with an integer divider, rather than PLLD with fractional divider and MASH noise shaping."
PARAMS1=""
PARAMS2="384k"
PARAMS3="bclk_ratio_int_div"
CONTROL_PAGE="soundcard_control.cgi"
[PCPCORE]
DTOVERLAY="hifiberry-dac"
CONTROL_PAGE=""
`
Please note that we are using ash   #!/bin/sh as we are building on piCore which is using busybox

Yes we would like to be able to only parse a specific part of the ini file  (for other parts of our player) - so your additions are highly appreciated.

Sorry - but the new shini script do  wont run on our system.
This function stalls it all:
shini_regex_replace()
{
    if [ "${BASH_VERSINFO}" -ge 3 ] || [ -n "$ZSH_VERSION" ]; then
        [[ "$1" =~ $2 ]] && shini_retval=${BASH_REMATCH[1]} || shini_retval="$1"
        return 0
    fi

    shini_retval="$(printf '%s' "$1" | sed -E "s/$2/\1/")"  # If you have isses on older systems,
    # it may be the non-newer POSIX compliant sed.
    # -E should be enabling extended regex mode portably.
}

If I change it to this it runs, but ..:
shini_regex_replace()
{
#    if [ "${BASH_VERSINFO}" -ge 3 ] || [ -n "$ZSH_VERSION" ]; then
#        [[ "$1" =~ $2 ]] && shini_retval=${BASH_REMATCH[1]} || shini_retval="$1"
#        return 0
#    fi

    shini_retval="$(printf '%s' "$1" | sed -E "s/$2/\1/")"  # If you have isses on older systems,
    # it may be the non-newer POSIX compliant sed.
    # -E should be enabling extended regex mode portably.
}

Ah, I've not tested t under ash.  Which version specifically are you using?  I'll see if I can fix the incompatibility.

Ok.  Could you let me know you shell version?  (Specifically the shell version the script is being ran under.)
Sent from my iPhone

On 6 May 2017, at 13:43, amtssp<EMAIL_ADDRESS>wrote:
Sorry - but the new shini script do wont run on our system.
This function stalls it all:
shini_regex_replace()
{
if [ "${BASH_VERSINFO}" -ge 3 ] || [ -n "$ZSH_VERSION" ]; then
[[ "$1" =~ $2 ]] && shini_retval=${BASH_REMATCH[1]} || shini_retval="$1"
return 0
fi
shini_retval="$(printf '%s' "$1" | sed -E "s/$2/\1/")"  # If you have isses on older systems,
# it may be the non-newer POSIX compliant sed.
# -E should be enabling extended regex mode portably.

}
If I change it to this it runs, but ..:
shini_regex_replace()
{
if [ "${BASH_VERSINFO}" -ge 3 ] || [ -n "$ZSH_VERSION" ]; then
[[ "$1" =~ $2 ]] && shini_retval=${BASH_REMATCH[1]} || shini_retval="$1"
return 0
fi
shini_retval="$(printf '%s' "$1" | sed -E "s/$2/\1/")"  # If you have isses on older systems,
# it may be the non-newer POSIX compliant sed.
# -E should be enabling extended regex mode portably.

}
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Sorry for the delay.
Is this what you were asking for?
tc@piCorePlayer:~$ ash --help
BusyBox v1.24.2 (2016-09-08 12:09:43 UTC) multi-call binary.

Hi. Thanks for the changes now shini parse the file fine using busybox ash. It is still very slow (on a Raspberry pi Zerro Wireless) here is the result:
tc@piCorePlayer:~/www/cgi-bin$ time ash ./test_perf.sh > /dev/null
Command exited with non-zero status 1
real    2m 1.38s
user    0m 25.24s
sys     0m 52.27s

Do you think that you can improve the speed on ash as well? I noticed this discussion here:
[http://stackoverflow.com/questions/21010882/how-to-match-regexp-with-ash]
I don't know if the last answer on that page will improve speed?

No problem, I realised there was a bug breaking the "fallback" functionality (which as you rightly notice, is extremely slow even on the best of hardware), which I've patched.
I too had read that article, but haven't had time to confirm it works yet.  I'll give it a whirl this weekend and let you know.  (I'm able to test locally against dash, which I believe is a fork of ash - and certainly seems to exhibit the same behaviour as you're seeing.)
I'll let you know ASAP.  Thanks for your patience... :-)

Hi there. Is there anything I can do to help you in the process of making shini faster using busybox or ash?

I've had an extensive think about the problem and tried to debug where the duration is being spent.
I suspected - and I believe have now proved beyond doubt - that the slowness comes from calling grep and sed (which I'm using as a fallback for non bash/zsh, which both have regex match and replacement built in.  ksh has regex matching, but is relying on sed for replacements.)
Thus the performance is significantly faster in zsh and bash, slower in ksh and abysmal in anything else.
I'm not that familiar with ash, so if you can think of any way to do what I'm achieving with those grep and sed calls in a more "builtin" manner, that'd help more than a lot.
I've spent some time trying to use named pipes, so there's only one grep/sed process spawned at the start for each of the regexes used - but as you can imagine it's super hacky (you need around 22 named pipes and 11 children processes to get anywhere close).
Otherwise I'm afraid I'm out of ideas, except to suggest switching to another library which you could call via anything else you have available (Python/PHP) or knock something up in C.  (I'm happy to give that a go if you're willing to compile+ship it with your project.  Bit of an ache though!)
There might be some further micro-optimisations around the order of execution etc, but I don't think it'll make enough of a difference for as long as grep/sed are being used.
FYI - these are the performance gains by using builtins from other shells.  Note it is still sped up by searching a specific section rather than the entire file - but still awfully slow in dash:
$ wc -l tests/php.ini
1917 tests/php.ini

$ time zsh ./test_perf.sh > /dev/null
real    0m0.595s

$ time bash ./test_perf.sh > /dev/null
real    0m0.838s

$ time ksh ./test_perf.sh > /dev/null
real    0m2.901s

$ time zsh ./test_perf.sh opcache > /dev/null
real    0m0.237s

$ time bash ./test_perf.sh opcache > /dev/null
real    0m0.313s

$ time ksh ./test_perf.sh opcache > /dev/null
real    0m0.543s

$ time dash test_perf.sh > /dev/null
real	0m17.930s

$ time dash test_perf.sh opcache > /dev/null
real	0m5.839s

Thanks for trying.
I noticed this on the busybox web page: https://www.busybox.net/BusyBox.html
expr

    expr EXPRESSION

    Print the value of EXPRESSION to stdout

    EXPRESSION may be:

            ARG1 | ARG2     ARG1 if it is neither null nor 0, otherwise ARG2
            ARG1 & ARG2     ARG1 if neither argument is null or 0, otherwise 0
            ARG1 < ARG2     1 if ARG1 is less than ARG2, else 0. Similarly:
            ARG1 <= ARG2
            ARG1 = ARG2
            ARG1 != ARG2
            ARG1 >= ARG2
            ARG1 > ARG2
            ARG1 + ARG2     Sum of ARG1 and ARG2. Similarly:
            ARG1 - ARG2
            ARG1 * ARG2
            ARG1 / ARG2
            ARG1 % ARG2
            STRING : REGEXP         Anchored pattern match of REGEXP in STRING
            match STRING REGEXP     Same as STRING : REGEXP
            substr STRING POS LENGTH Substring of STRING, POS counted from 1
            index STRING CHARS      Index in STRING where any CHARS is found, or 0
            length STRING           Length of STRING
            quote TOKEN             Interpret TOKEN as a string, even if
                                    it is a keyword like 'match' or an
                                    operator like '/'
            (EXPRESSION)            Value of EXPRESSION

    Beware that many operators need to be escaped or quoted for shells. Comparisons are arithmetic if both ARGs are numbers, else lexicographical. Pattern matches return the string matched between \( and \) or null; if \( and \) are not used, they return the number of characters matched or 0.

So can the expr command be useful?

OK, with the greatest emphasis - please don't get overly excited because I've not extensively tested this (and haven't yet found a way to get myself easy access to a busybox install!)
But, if I've correctly implemented what you found, these are the new speeds on dash/ash (verses the 17s before):
$ time dash test.sh
test.sh: 145: test.sh: cannot open tests/nonexistent.ini: No such file
real	0m0.707s

$ time bash test.sh
./shini.sh: line 81: tests/nonexistent.ini: No such file or directory
real	0m0.187s

I'll commit and push the (experimental) change to a separate branch and post details here momentarily.

https://github.com/wallyhall/shini/compare/expr-experimental
Simple change, I had tried expr before but obviously wasn't doing it right.  The documentation you referenced appears to work correctly in dash at least - so here's to hoping!

tc@piCorePlayer:~/www/cgi-bin$ time ash ./test_perf.sh > /dev/null
./test_perf.sh: ./shini.sh: line 59: syntax error: bad substitution
Command exited with non-zero status 2
real    0m 0.02s
user    0m 0.01s
sys     0m 0.00s

If I comment that section again like this:
shini_regex_replace()
{
#    if [ -n "$BASH_VERSINFO" ] && [ "${BASH_VERSINFO}" -ge 3 ] || \
#       [ -n "$ZSH_VERSION" ]; then
#        [[ "$1" =~ $2 ]] && shini_retval=${BASH_REMATCH[1]} || shini_retval="$1"
#        return 0
#    fi

    shini_retval="$(printf '%s' "$1" | sed -E "s/$2/\1/")"  # If you have isses on older systems,
    # it may be the non-newer POSIX compliant sed.
    # -E should be enabling extended regex mode portably.
}

I get these results - so still a speed improvement compared to before but there is still room for improvement:
tc@piCorePlayer:~/www/cgi-bin$ time ash ./test_perf.sh > /dev/null
Command exited with non-zero status 1
real    1m 43.32s
user    0m 15.56s
sys     0m 32.17s

So this section needs
If I test this section I get this error:
tc@piCorePlayer:~/www/cgi-bin$ expr 'abc123' : '^abc[0-9]*'
expr: warning: '^abc[0-9]*': using '^' as the first character
of a basic regular expression is not portable; it is ignored
6

I managed to get the time down to if I changed the script to this (t I think I then force it to use your new method?
shini_regex_match()
{
    # $KSH_VERSION (I'm told) only exists on ksh 93 and above, which supports regex matching.
    if [ -n "$BASH_VERSINFO" ] && [ "$BASH_VERSINFO" -ge 3 ] || \
       [ -n "$ZSH_VERSION" ] || \
       [ -n "$KSH_VERSION" ]; then
        [[ "$1" =~ $2 ]] && return 0 || return 1
    fi

    # ash/dash, and possibly others
#    if [ "$EXPR_REGEX" -eq 0 ]; then
        expr "$1" : "$2" > /dev/null 2>&1
        return $?
#    fi

    printf '%s' "$1" | grep -qe "$2"
    return $?
}

shini_regex_replace()
{
#    if [ -n "$BASH_VERSINFO" ] && [ "${BASH_VERSINFO}" -ge 3 ] || \
#       [ -n "$ZSH_VERSION" ]; then
#        [[ "$1" =~ $2 ]] && shini_retval=${BASH_REMATCH[1]} || shini_retval="$1"
#        return 0
#fi

shini_retval="$1"
#    shini_retval="$(printf '%s' "$1" | sed -E "s/$2/\1/")"  # If you have isses on older systems,
    # it may be the non-newer POSIX compliant sed.
    # -E should be enabling extended regex mode portably.
}

tc@piCorePlayer:~/www/cgi-bin$ time ash ./test_perf.sh > /dev/null
Command exited with non-zero status 1
real    1m 27.95s
user    0m 15.64s
sys     0m 33.83s

Regarding this issue:
shini_retval=${BASH_REMATCH[1]}

You are correct.  It appears dash behaves differently, allowing the [1] syntax.  busybox's ash refuses to process the script at all with it there.  I'll have to figure a way around that.
I think when you "force" it to use the expr mode, all you've done (at least, testing on this busybox VM image I found!) is remove the if condition.  So you're seeing a ~15s increase in performance just because there's no if statement.
I'm guessing the rasberrypi hardware (is that what you're running the test on?) is just woefully less powerful than the busybox VM I have (which completes in 3.8s).
The test_perf.sh script is running against a fairly large INI file (1917 lines), what kind of performance do you get if you replace /tests/php.ini with a smaller example (like the one you'll be using for your project)?
Assuming the if condition is running that slowly, you'll get further performance gains by completely stripping down that first function:
shini_regex_match()
{
        expr "$1" : "$2" > /dev/null 2>&1
        return $?
}

Thanks for working on this - it is good you found a busybox environtment.
I noticed that if I added a debug notice like this:
shini_regex_replace()
{
#    if [ -n "$BASH_VERSINFO" ] && [ "${BASH_VERSINFO}" -ge 3 ] || \
#       [ -n "$ZSH_VERSION" ]; then
#        [[ "$1" =~ $2 ]] && shini_retval=${BASH_REMATCH[1]} || shini_retval="$1"
#        return 0
#fi

echo "we are here 3"
    shini_retval="$(printf '%s' "$1" | sed -E "s/$2/\1/")"  # If you have isses on older systems,
    # it may be the non-newer POSIX compliant sed.
    # -E should be enabling extended regex mode portably.
}

The the terminal shows that this function get called two or three times for each variable?
tc@piCorePlayer:~/www/cgi-bin$ time ash ./test_perf.sh
..
..
..
[opcache] opcache.validate_permission = 0
we are here 3
we are here 3
[opcache] opcache.validate_root = 0
we are here 3
we are here 3
we are here 3
[curl] curl.cainfo =
we are here 3
we are here 3
we are here 3
[openssl] openssl.cafile =
we are here 3
we are here 3
[openssl] openssl.capath =
Command exited with non-zero status 1

Hi
Did you find time to look at this issue:
`Regarding this issue:
shini_retval=${BASH_REMATCH[1]}
You are correct. It appears dash behaves differently, allowing the [1] syntax. busybox's ash refuses to process the script at all with it there. I'll have to figure a way around that.`


Check UPnP options

UPnP options are removed from the service menu at the moment. Check for the v1.6 again for the best way to integrate it - maybe make it part of the DynamicDNS service.

With aiming to to TOR by default with v1.7 ... this makes sense to checkout there.

@rootzoll closing for now


Unable to connect with Viomi S9

As always, thanks for your great work.
I tried taking advantage of the latest Viomi S9 capabilities added in the last plugin version, but I'm having difficulties with it.
My Viomi is set up with a static IP (MAC address-based assignment from my router), it's online, it's taking commands from the Mi Home App, and I can ping the IP normally from command line and getting a response. The device is using firmware 1.6.5_2254 and is set up in the DE server, and the plugin version of the app is 43. I restarted Homebridge with the -D switch and the deep debug option enabled and this is what I got:
[3/11/2021, 6:33:18 μ.μ.] [miot] [Viomi S9] Got device configuration, initializing device with name: Viomi S9
[3/11/2021, 6:33:18 μ.μ.] [miot] [Viomi S9] Device info file does not exist yet!
[3/11/2021, 6:33:18 μ.μ.] [miot] [Viomi S9] Device model unknown! Starting discovery!

[...]

[3/11/2021, 6:33:20 μ.μ.] [miot] [Viomi S9] Error: Could not connect to device, handshake timeout
[3/11/2021, 6:33:20 μ.μ.] [miot] [Viomi S9] Could not connect to the device! Retrying in 42 seconds!

And the handshake timeout error occurs again every 42 seconds after that.
Am I doing something wrong? Should I define the device model manually and try again?
Again, thanks for all your efforts.

The handshake timeout might indicate the token is wrong, also you could try to reset your device.

A reset allowed the device to connect, thanks. Mopping, consumables life expectancy, per-room cleaning are not available, however. Is that normal?

Mopping and per room cleaning is available, you just need to configure that yourself using the actionButtons property. You can have a look here https://github.com/merdok/homebridge-miot/blob/main/lib/modules/robotcleaner/devices/viomi.vacuum.v18.js#L261 or check the homebridge log to see all available actions which you can enable and use.
consumables life expectancy is right now only displayed in the log since there is no homekit ui control to do reasonable...

I managed to map the mopping function to a switch, thank you so much. I can't find how to perform per-room cleaning, as the log does not mention something, but I'm covered for now. Thank you :)


Add Minesweeper Flutter Project

I will add a minesweeper flutter project
Link : https://github.com/HeveshL/flutter-dinosaur

Incorrect link.


Is 1.11 support on its way?

Hey, just a quick question:
will you support 1.11.1 soon?
In 1.11.1 i get an error whenever i "control from here" with a telescope.
"Object reference not set to an instance of an object"
I added player.log as you request.
Player.log
And KSP.log, just in case.
KSP.log
I know the mod doesn't support 1.11.1 yet, but i thought if you plan on supporting it this info might be useful.
I just wanna end this by saying i love this mod and appreciate the work you do!
Greetings, Parpar78
P.S.: if any more info is required, just ask.

I see lots of those errors in your log. but none of them are errors being caused by this mod.


install profiling libraries

This can make life easier if you end up wanting to do profiling. But I could see why it might not be wanted in a base image.

Maybe not in haskell:7.8. It could make for an interesting second image though. haskell:7.8-prof with some additional libraries pre-installed perhaps. I'll look into this a bit.

+1 for a -prof version.

This may not be needed if you use stack. Closing since it hasn't been merged yet


Fixed typo

@etienne-martin Thanks for your PR, Readme has been updated and this is no longer needed.


Pagination?

Hi! First of all, great project!
Second, how do I paginate? The package returns just 30 results, how do I request more? Thanks!

You can use the offset option that should just go over the next page of results.


Include git-daemon health in node status

If for whatever reason the git-daemon fails to start, we get error logs, but the user might not be aware. We should add some kind of status of the deamon when the user calls rad node.

Imported.


New collations are not be supported

What problem does this PR solve?
https://github.com/pingcap/tispark/issues/2236
What is changed and how it works?
Set new_collations_enabled_on_first_bootstrap = false  for IT
Add Limitations in readMe

@xuanyu66 @zhangyangyu @birdstorm PTAL

/run-all-tests

/run-all-tests

/run-all-tests

/run-all-tests

/run-all-tests

/run-all-tests

/run-all-tests

/run-all-tests tikv=v5.3.0 tidb=v5.3.0 pd=v5.3.0

/merge

/merge

/cherrypick release-2.4

/cherrypick release-2.5


Improve BitIterator

Motivation
BitIterator is used a lot in the calculation. However, each iteration will perform multiplying and  subtraction to do modulo.
This PR eliminates the usage of multiplication via bit-wise AND operation. It's a micro optimization, though.
(n % 64) == (n & 63)
Test Plan

Tests already exist.
Related PRs

None

Hi @rapiz1, and thanks for your contribution.
Is there a benchmark that confirms whether this results in a measurable improvement? I'm wondering if the compiler isn't already optimizing this operation this way automatically :thinking:.

Is there a benchmark that confirms whether this results in a measurable improvement?

I've made a little benchmark and run it on my machine. Unfortunately it's not a measurable on my machine. But I think it's indeed fast because I've checked out the assembly code.

I'm wondering if the compiler isn't already optimizing this operation this way automatically thinking.

I'm pretty sure that the compiler doesn't optimize for this. I use godbolt to what does this snippet compile to. Here's the snippet with the disassembly result.
After the optimization:
        mov     rax, qword ptr [rdi + 8]
        and     rax, 64
        mov     qword ptr [rsp + 24], rax

Before the optimization, the corresponding assembly code is long and includes a multiplication and a subtraction. You can check out it using the link I provide above.
I think it's clear that the machine code after the optimization is more efficient, judging from the disassembly output and the fact that and is way more fast than mul.

Note that in your godbolt snippet you didn't compile with optimizations, like you would via cargo build --release; I checked both variants with the appropriate flag and saw no difference in the resulting ASM: godbolt.

@ljedrz You're right! I forgot to add the flag for godbolt 😱. Close now


Leetcode Problem 2139

minimum-moves-to-reach-target-score

It's showing excluded on Hacktoberfest website

This repository has been permanently excluded from Hacktoberfest 2022. This means that any pull requests (PRs) made to this repository will not be counted towards your contributions for Hacktoberfest 2022.
Please contribute to valuable repositories instead of sending pull requests (PRs) to repositories that are there to defeat the whole purpose of Hacktoberfest 2022.
Any repeated, continuous exclusions will automatically ban your account from participating in Hacktoberfest 2022.


Correct branches for GitFlow workflow created - includes master, develop, and release branches

Has been updated, but want to review with group on procedures.


DOC: missing backticks

All in title, this create parsing errors/incorrect docs.
[skip ci]
I guess technically dims should be in double backticks, as they don't refer to function parameters. I can make the change as well if you wish.

Could you run $ git submodule update --init and force-push please?

... and yes, dims should have double backticks it seems.

Could you run $ git submodule update --init and force-push please?

Damn, sorry.

Done and squashed.


#2762 Step2 Drafts/Filing + NR Integration Updates.

Issue #: /bcgov/entity#2762
Description of changes:

Includes data from step 2 into our filing body.
Includes parsing data for step 2 from draft filings.
Adjusts some legal api methods to adapt to some back end changes to the endpoints.
Updates the unit tests to include the updated data set.
Adjusts some string manipulation with the Namex NR Number handling.
Removes hardcoded NR data from App.
Assigns the EntityType as BCOMP until a time when Namex provides a Type.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the bcrs-entities-create-ui license (Apache 2.0).

I approve.
Up to you whether to resolve enums here or in a future PR.
Would be nice to resolve the API_URL key issue in this PR.

I think i'd like to resolve this here! So hold off the merge for now :) thanks!

Looks good to me.


Added insert() in vector

Hey, I restored the original sample code and added an option to see sample code in 'insert.md'


TypeError: 'bool' object has no attribute 'getitem'

Probably Missing something but a little guidance would be appreciated....
[14:31:35] Attempting login to Pokemon Go.
[14:31:38] Login to Pokemon Go successful.
Traceback (most recent call last):
File "C:\pokebot\PokemonGo-Bot\pokecli.py", line 224, in
main()
File "C:\pokebot\PokemonGo-Bot\pokecli.py", line 210, in main
bot.start()
File "C:\pokebot\PokemonGo-Bot\pokemongo_bot_init_.py", line 31, in start
self.setup_api()
File "C:\pokebot\PokemonGo-Bot\pokemongo_bot_init.py", line 269, in _setup_api
player = response_dict['responses']['GET_PLAYER']['player_data']
TypeError: 'bool' object has no attribute 'getitem'
OS:
Windows 10

Traceback (most recent call last):   File "pokecli.py", line 220, in <module>     main()   File "pokecli.py", line 206, in main     bot.start()   File "/home/alvaro/Pokemon/PokemonGo-Bot.git/pokemongo_bot/__init__.py", line 31, in start     self._setup_api()   File "/home/alvaro/Pokemon/PokemonGo-Bot.git/pokemongo_bot/__init__.py", line 151, in _setup_api     player = response_dict['responses']['GET_PLAYER']['player_data'] KeyError: 'player_data'

6a9e74c91b9f5234f74c0cb09ec2568f1f37f01f

This is a issue probably caused by the Pokémon Go servers. It only appears when the servers are not reachable for some reason.

@TheOssi can make it retry ?

run a simple bash script. while true; do ./pokecli.py; done

i've make it work by using a screen session
more information about screen and how to use screen here (rackaid.com)
but for the basics :
screen -S mysessionname to create a new screen session
Do your business (including clone the repo ,setup it, and launch it) and use CTRL-A-D to exit the screen session
Now from here do the same with a different name for all the bot you want to launch
If you want to get back you your session, use screen -r mysessionname or screen -r with no argument to show up a list of your active session

not exactly on topic, but tmux would be a better alternative to screen.

@Snorflake can you develop ?

indeed I can
On Wed, 27 Jul 2016, 9:10 PM mehdi-S<EMAIL_ADDRESS>wrote:

@Snorflake https://github.com/Snorflake can you develop ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/PokemonGoF/PokemonGo-Bot/issues/915#issuecomment-235579725,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIC5JxxDYeQ6EzMLHso9Bym5e_ew6zmHks5qZ1jEgaJpZM4JUyES
.

?

Just got the same error, after a few minutes running the latest 'master'
[2016-07-27 20:05:57] [#] PokeStop on cooldown. Time left: 4.61 minutes
[2016-07-27 20:05:59] [#] Found fort d950340f722c4111936a83d7282a3037.16 at distance 0.20km
[2016-07-27 20:05:59] [#] Need to move closer to Pokestop
[2016-07-27 20:05:59] [#] Walking from (52.296738, 5.250926) to (52.295504, 5.245426) for approx. 1.60 minutes
[2016-07-27 20:06:56] [#] Something rustles nearby!
[2016-07-27 20:06:57] [#] A Wild Rattata appeared! [CP 183] [Potential 0.44]
[2016-07-27 20:06:57] [#] IV [Stamina/Attack/Defense] = [8/10/2]
Traceback (most recent call last):
  File "pokecli.py", line 220, in <module>
    main()
  File "pokecli.py", line 211, in main
    bot.take_step()
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/__init__.py", line 36, in take_step
    self.stepper.take_step()
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/stepper.py", line 62, in take_step
    self._work_at_position(position[0], position[1], position[2], True)
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/stepper.py", line 139, in _work_at_position
    self.bot.work_on_cell(cell, position, pokemon_only)
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/__init__.py", line 93, in work_on_cell
    worker.work()
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/cell_workers/move_to_fort_worker.py", line 30, in work
    self.stepper._walk_to(self.config.walk, *position)
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/stepper.py", line 88, in _walk_to
    alt, False)
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/stepper.py", line 139, in _work_at_position
    self.bot.work_on_cell(cell, position, pokemon_only)
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/__init__.py", line 63, in work_on_cell
    if self.catch_pokemon(pokemon) == PokemonCatchWorker.NO_POKEBALLS:
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/__init__.py", line 190, in catch_pokemon
    return_value = worker.work()
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/cell_workers/pokemon_catch_worker.py", line 74, in work
    balls_stock = self.bot.pokeball_inventory()
  File "/home/ubuntu/PokemonGo-Bot/pokemongo_bot/__init__.py", line 234, in pokeball_inventory
    inventory_dict = inventory_req['responses']['GET_INVENTORY'][
TypeError: 'bool' object has no attribute '__getitem__'

same as @RolfKoenders here

server problem

I don't believe this is a server problem--I literally just logged off on my mobile device and tried running the bot but same error.

@sangwon04 So what's the problem?

I have the save issue and we are not alone: http://downdetector.com/status/pokemon-go

@hklcf I was able to resolve the issue--there was a zombie cmd process that I had to kill.

Please upgrade to the latest dev branch by running this command:
git reset --hard
git pull -f

Then run this command:
pip install --upgrade -r requirements.txt
If issue persists, open a new issue.
/closed


Add work api design doc

/assign @pmorie

@qiujian16 @pmorie
Just posted two suggestions about the API, I would like to hear your views.

@RainbowMango I think my preference would be to merge this PR without a lot of mutation, since it is capturing what previously was in the google doc, and make changes in follow-on PRs. I think it is important to get the work done so far reflected in the main branch (note to self, we should rename this in keeping with the use of inclusive language) to demonstrate the work done so far. How does that sound?

That makes sense. We can iterate it later.
/lgtm
/approve


APEXMALHAR-2230 simplify the kafka input operator test

OK, this change doesn't fix the intermittent error directly, but it simplifies the test to make it easier to debug in the future

@brightchen Can you verify my change
@tweise FYI