If user not logged in, getRoles() returns roles.

If I pass invalid credentials to $auth->login() and then immediately attempt to get the userID
$auth->GetUserId(), it returns nothing. Then when I call $auth->getRoles(), it returns the role for the only user in my users table.
Is this expected behavior?
Code:
$auth = new \Delight\Auth\Auth($db);
$userId = null;
$msg = '';

try {
    $auth->login($_REQUEST['email'], $_REQUEST['password']);
    $userId = $auth->getUserId();
}
catch (\Delight\Auth\InvalidEmailException $e) {
    $msg .= 'wrong email address';
}
catch (\Delight\Auth\InvalidPasswordException $e) {
    $msg .= 'wrong password';
}
catch (\Delight\Auth\EmailNotVerifiedException $e) {
    $msg .= 'email not verified';
}
catch (\Delight\Auth\TooManyRequestsException $e) {
    $msg .= 'too many requests';
}

try {
    $auth->admin()->addRoleForUserById($userId, \Delight\Auth\Role::ADMIN);
}
catch (\Delight\Auth\UnknownIdException $e) {
    $msg .= 'unknown user ID';
}

$authorized = $auth->hasRole(\Delight\Auth\Role::ADMIN);

echo "<!-- " ."\r\n";
echo "User: ". $userId ."\r\n";
echo "Roles:" . print_r($auth->getRoles(),true) ."\r\n";
echo  "Authorized: ". ($authorized?"Authorized":"Not Authorized" ."\r\n";
echo $msg ."\r\n";
echo " -->" ."\r\n";

Results:
<!--
User:
Roles:Array
(
    [1] => ADMIN
)

Authorized:Authorized
wrong email address
unknown user ID
-->

Hey again!
Well first of all, if you pass invalid credentials to $auth->login($_REQUEST['email'], $_REQUEST['password']); your $userId = $auth->getUserId(); won't get called, so in your case the value of $userID remains null - So be careful with that next try/catch block, you'll be calling addRoleForUserById($userId, \Delight\Auth\Role::ADMIN); with $userID as NULL
Regarding why $auth->getRoles() is producing the ADMIN role, this I believe would be as a result of you previously assigning the role to the currently logged in user before you attempted to pass invalid login information to $auth->login(), and I can only assume that you haven't performed the $auth->logout() operation in-between. Thus, there is a user still logged into your session, and that role is stored within the session data. So, create a logout script that you can run to logout the user and clear any remaining session data, and let me know if there is a different result.
Be aware also that, from the ReadMe,

Changes to a user’s set of roles take effect in the local session immediately, as expected. In other sessions (e.g. on other devices), the changes may need up to five minutes to take effect, though.

Hope it helps!

Gotcha, I forgot that it is using sessions and I need to logout the current user. You are right about getting the userID, too. Guess I need to learn to walk before trying to fly.

All good! :))

@frankieeedeee Really appreciate your help – thank you very much!
@MB34 It was good to ask this, because such things affect other developers, who will later find this thread very helpful, more often than one might think. By the way, this library working with sessions is why you can also move parts of your code to other files. You don’t have to execute all that code after every login and the user will remain logged in while browsing between different files.


color changed from blue to white

issue: #438
Close #438
Video/Screenshots (mandatory)

Additional context (Mandatory )
I have updated the footer color from blue to white, which now appears more consistent and improves readability.
Are you contributing under any Open-source programme?
gssoc 2024

@apu52  kindely check my PR

@apu52  I have thoroughly reviewed the code in the testimonial section and found no issues. Accordingly, please approve and merge my pull request. Additionally, assign me to the second issue, #472. Thank you.

@apu52 and if you want me to make PR on some other branch then i can change that from main to updated or new

@apu52 and if you want me to make PR on some other branch then i can change that from main to updated or new

yes. I will always suggest that to make all of your changes in new branch(in the forked repo) instead of the MAIN branch & make a new PR . So I am closing this PR , just make a new PR on a new branch & submit it

@apu52 I have thoroughly reviewed the code in the testimonial section and found no issues. Accordingly, please approve and merge my pull request. Additionally, assign me to the second issue, #472. Thank you.

mentors will soon took review all of your issues


Feature jsdoc

I modify each file inside the following directories:
-src/app/core
-src/app/view
-src/app/manufacturing
HOWEVER, I did not modify files inside folder inside them, example: render2D, render3D, etc.
I add with the module jsdocs the documentation. It's not 100% full since I didn't know the type of each argument.

@sudo-Erno So one of the things you did was delete the files and added uploaded them, this is a problem because I can't see the exact changes you have made. What you should do is clone the feature-jsdoc branch onto your computer and edit the files and commit the changes. This way when I  look at the changes you made, I will know what line-by-line changes are. Message me on the slack if you have more questions.


[WIP]Refactor vit using transformer.py in mmcv

Hi,
This pr refactored vision transformer using base classes in mmcv. As some necessary changes were made  in transformer.py mmcv, so all the unitests failed. And we'll fix ASAP.
Best regards
whcao

Close this PR since there is a new coming one for ViT.

And my suggestion is that we create a totally new PR for refactoring ViT since the current commits are messy and have lots of distracting information.


fix for the renamed fehbh, rename it in install.sh too

I was installing your dot and got an error, seen that you renamed a file yesterday and fixed it. It works perfectly right now.


Start Blueprint: link discovery, forwarding verification and loop detection

Currently, Kytos/topology utilizes LLDP for detecting new links in the topology by sending packets out of all switch ports (can be configured) at a certain interval. Once the link is detected, the Link object is created. If a previously detected link stops receiving updates, no further actions are taken. Also, there is no action when a loop is detected.
The idea is to write a blueprint to better describe the expected behavior for Kytos in terms of link discovery, forwarding verification, and loop detection. Some points to consider:

Forwarding Verification should be different from Link Discovery
Forwarding verification can be done using different approaches: periodic packets out from Kytos, BFD (Bi-direction Forwarding Detection), L2 trace requested from a user, etc.
Once the forwarding verification process fails, the Kytos should create an Unpaired event, so Kytos Napps can react and eventually reprovision services using that Link
Loop detection process should provide means to "ack" interfaces with a loop detected since it can be created on purpose by the Network Operator
Loop detection should detect a loop on a single port and between two ports in the same switch. What about customer ports?
Forwarding verification should alert when the packet was received in a different switch than what was expected.

Talking with Jeronimo, he mentioned that for the Forward Verification process, if the interface has a detected loop, it should not be considered UP/Paired.


Preview fails with Cannot read property 'incrementalOptions' of undefined

Bug Report
Description
Executing log4brains preview fails with Fatal Cannot read property 'incrementalOptions' of undefined message
Steps to Reproduce
The full log can be seen below, but it is quite easy:

Install log4brains as by instructions from ReadMe
Execute log4brains init
Execute log4brains preview

Expected Behavior
Seeing the preview
Context
I cannot see a preview of the ADRs
Environment

Log4brains version: 1.0.0-beta.13

Node.js version: 12.18.0

OS and its version: Windows 10.0.19044 N/A Build 19044

Hi!
Is it a fresh install or are you upgrading from an older version of log4brains?
If this is the case, can you try:
npm uninstall -g log4brains
rm -rf "$(npm root -g)/log4brains"
npm install -g log4brains

@thomvaill I was indeed updating from version 1.0.0-beta.12. The clean installation resolved the issue! Thanks so much!
The tool is really impressive. Amazing work.

@thomvaill Thanks, also works for me!

Cool! At least we have a workaround.
But I still don't know why we have this issue when upgrading... Does someone have an idea?


feat: add blas/base/dtrsv

Progresses #2039.
Description

What is the purpose of this pull request?

This RFC proposes to add a routine to solve one of the systems of equations A*x = b or A^T*x = b as defined in BLAS Level 2 routines. Specifically adding @stdlib/blas/base/dtrsv is proposed.
Related Issues

Does this pull request have any related issues?

This pull request:

progresses #2039.

Questions

Any questions for reviewers of this pull request?

No.
Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.
Checklist

Please ensure the following tasks are completed before submitting this pull request.

[x] Read, understood, and followed the contributing guidelines.

@stdlib-js/reviewers

@aman-095 Would you mind porting any relevant changes from https://github.com/stdlib-js/stdlib/pull/2752 to this PR? Thanks!

...and also, if you could add a small note, as in https://github.com/stdlib-js/stdlib/commit/de0e5b93922db9358bd20d5b337cd32e69b8cdac.


Nova 4

Hi,
Please add support for Nova 4.
Regards

Hi there, is there any update on this? You provide a set of very useful additions to Nova which Nova 4 doesn't have (such as your JSON field).

+1

Looking for support on Nova 4 as well, any plans? Last release was 3 years ago..

+1

+1

Would love this on nova 4

Still no option for this for Nova 4?

+1

+1

+1

+1


lokomotive: Add entry for 0.6

Changes

This commit adds an entry for 0.6.
Point the 0.5 to v0.5.0.
Fix the indentation of YAML.

Testing done
None, I am not sure how test locally.
NOTE: Will be merged after the release is done for lokomotive https://github.com/kinvolk/lokomotive/pull/1292

@iaguis is this the right way to do it?

@iaguis is this the right way to do it?

Yes. If you want to keep the version 5 docs available this is the way to do that.
The latest version alias will be pointing to the first entry in that list, so it's also good.

Yes. If you want to keep the version 5 docs available this is the way to do that.
The latest version alias will be pointing to the first entry in that list, so it's also good.

Yes. If you want to keep the version 5 docs available this is the way to do that.

v0.5.0 doesn't have docs, We want to have v0.6.0 and then current master, I wrote a suggestion.

Yes. If you want to keep the version 5 docs available this is the way to do that.

v0.5.0 doesn't have docs, We want to have v0.6.0 and then current master, I wrote a suggestion.

This was superseded by #11.

This was superseded by #11.


feat: hide things on airgap

Description

hide start from template and google recaptcha for button widget.

Hide certain features on airgap instance

Fixes #22006

if no issue exists, please create an issue and ask the maintainers about this first

Media

A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video

Type of change

Please delete options that are not relevant.

New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Manual

Checklist:
Dev activity

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] PR is being merged under a feature flag

QA activity:

[ ] Test plan has been approved by relevant developers
[ ] Test plan has been peer reviewed by QA
[ ] Cypress test cases have been added and approved by either SDET or manual QA
[ ] Organized project review call with relevant stakeholders after Round 1/2 of QA
[ ] Added Test Plan Approved label after reveiwing all Cypress test

@berzerkeer The google recaptcha is hidden but start from template button is not hidden

@berzerkeer The google recaptcha is hidden but start from template button is not hidden

Are we talking about this header card in this screenshot, this PR hides that. Are you seeing this one ?

@berzerkeer No the start template is not displayed on the card sorry the text you have mentioned above was little confusing


Does the CLI have a sync functionapp triggers command?

The powershell cli has this:
https://github.com/davidebbo/AzureWebsitesSamples/blob/aba32e3a8fe60bc50044b1a5f316ff22661359f8/PowerShell/HelperFunctions.ps1#L362-L367
Which I'm wondering if its the same as this api call or not:
https://docs.microsoft.com/en-us/cli/azure/functionapp/deployment/source?view=azure-cli-latest#az_functionapp_deployment_source_sync
I'm working around an issue where a deployment can fail to sync the triggers for functionapps. I'm using the azure cli not the powershell cli so I'm trying to find a temporary workaround by just updating the triggers manually after the deploy without having to go into the portal every time.

They are different

https://github.com/davidebbo/AzureWebsitesSamples/blob/aba32e3a8fe60bc50044b1a5f316ff22661359f8/PowerShell/HelperFunctions.ps1#L362-L367

But if this works, then you can use az resource invoke-action which is the counterpart of the POSH SyncFunctionAppTriggers command in CLI
I am going to keep this issue open for adding strong typed commands

I'm not sure I understand, I am not seeing an invoke-action sub command:
$ az resource invoke
az resource: error: argument subcommand: invalid choice: invoke
usage: az resource [-h] {create,delete,show,list,tag,move,update,link} ...

it is az resource invoke-action, not az resource invoke
(env) C:\SDK\azure-cli>az resource invoke-action -h

Command
    az resource invoke-action: Invoke an action on the resource.
        A list of possible actions corresponding to a resource can be found at
        https://docs.microsoft.com/en-us/rest/api/. All POST requests are actions that can be
        invoked and are specified at the end of the URI path. For instance, to stop a VM, the
        request URI is https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{r
        esourceGroup}/providers/Microsoft.Compute/virtualMachines/{vm}/powerOff?api-
        version={apiVersion} and the corresponding action is `powerOff`. This can be found at
        https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-stop.

Arguments
    --action [Required]: The action that will be invoked on the specified resource.
    --api-version      : The api version of the resource (omit for latest).
    --ids              : One or more resource IDs (space delimited). If provided, no other "Resource
                         Id" arguments should be specified.
    --name -n          : The resource name. (Ex: myC).
    --namespace        : Provider namespace (Ex: 'Microsoft.Provider').
    --parent           : The parent path (Ex: 'resA/myA/resB/myB').
    --request-body     : JSON encoded parameter arguments for the action that will be passed along
                         in the post request body. Use @{file} to load from a file.
    --resource-group -g: Name of resource group. You can configure the default group using `az
                         configure --defaults group=<name>`.
    --resource-type    : The resource type (Ex: 'resC'). Can also accept namespace/type format (Ex:
                         'Microsoft.Provider/resC').

I'm sorry somehow that code snippet I pasted was clipped :(
But, great thanks, I see there is a way and there must just be some kind of versioning issue on my machine even though I believe I have the latest version.
I am running Bash on Windows:
$ sudo apt-get upgrade
$ which az
/usr/bin/az
$ az resource invoke-action -h
az resource: error: argument subcommand: invalid choice: invoke-action
usage: az resource [-h] {create,delete,show,list,tag,move,update,link} ...
$ az -v
azure-cli (2.0.18)

acr (2.0.12)
acs (2.0.16)
appservice (0.1.17)
backup (1.0.1)
batch (3.1.4)
billing (0.1.5)
cdn (0.0.9)
cloud (2.0.8)
cognitiveservices (0.1.8)
command-modules-nspkg (2.0.1)
component (2.0.7)
configure (2.0.11)
consumption (0.1.5)
container (0.1.11)
core (2.0.17)
cosmosdb (0.1.13)
dla (0.0.12)
dls (0.0.14)
eventgrid (0.1.4)
extension (0.0.3)
feedback (2.0.6)
find (0.2.7)
interactive (0.3.10)
iot (0.1.12)
keyvault (2.0.11)
lab (0.0.11)
monitor (0.0.10)
network (2.0.15)
nspkg (3.0.1)
profile (2.0.13)
rdbms (0.0.7)
redis (0.2.9)
resource (2.0.15)
role (2.0.12)
servicefabric (0.0.4)
sql (2.0.12)
storage (2.0.16)
vm (2.0.15)

Python location '/opt/az/bin/python3'
Extensions directory '/home/justin/.azure/cliextensions'

Python (Linux) 3.6.1 (default, Sep 23 2017, 00:13:17)
[GCC 4.8.4]

Legal docs and information: aka.ms/AzureCliLegal

@justinmchase, sorry for the delay. The command was author'd 3 weeks ago, any chance you can use newer CLI, particularly to have appservice module to be 0.1.18?

Thanks! I'll give it a try. I'm assuming its just a version thing and I should be able to figure the rest out from there.


[AMORO-3009] Treat read and write cost as the same when evaluating optimizing

Why are the changes needed?

Close #3009 .
Brief change log

Treat read and write cost as the same when evaluating optimizing

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[x] Run test locally before making a pull request

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable)

@zhoujinsong could you please have a look this when you're free.

@zhoujinsong thanks for the review and merging!


just a question, what is the function that outputs the answer

refer to name. In Question_Handler, what is the function that actually outputs the answer to console?

It's here: https://github.com/Exaphis/HackQ-Trivia/blob/1888f0d59fda08b8d643e63d358eb05f808bef9a/hackq_trivia/question_handler.py#L66
search_methods_to_use is a list of functions, containing __method1 and __method2 by default. Each method logs some text and then returns the answer, which is logged as well.

Thanks.


Add Description for Query Metrics

The description for "Query Package Metrics" and "Query Package Version Metrics" currently shows the "GetBadge" description in docs.

https://docs.microsoft.com/en-us/rest/api/azure/devops/artifacts/artifact  details?view=azure-devops-rest-6.1

@charlesbetros thank you for your contribution, unfortunately we do not accept PRs since these files are generated from comments in our source code and would get overriden. I will however ping the owner of these APIs to add appropriate description. Thanks.


Idempotent test for bootstrapping system via XMLRPC API

todo:

[x] figure out non-working assert

[x] parametrize the port

[x] ~extract the sle-minion real value query somewhere so that it can be reused from my code too~ not needed

[x] negative tests

[ ] backport to 31

@MalloZup Please take a look at this.

@hustodemon a part of the line above, i think we should add some 2-3 negative tests, that we assert a failure,  to see how the new xmlrpc handle this.
take inspiration from here:
https://github.com/SUSE/spacewalk-testsuite-base/blob/1bc821bdd3b12ea2443341600e02d5178cd57858/features/core_min_bootstrap.feature#L126

I addressed your comments in separate patches. Please re-review when you get a minute.

Thanks a lot for review, I'll merge in a while and backport it.

Cherry-picked to master and manager31.


ScanFilterOptions filter returned devices on WinUI

ScanFilterOptions do not appear to work on WinUI.
For example on Android I am able to set this filter to only return Samsung devices:
ScanFilterOptions = new() { ManufacturerDataFilters = [new(0x0075)] }
Or this filter to return only a specific Service UUID
ScanFilterOptions = new() { ServiceUuids = [GetUuid(0xe000)] }
Or this to filter on a device name
ScanFilterOptions = new() { DeviceNames = ["motoAppAratus"] }
This leaves applying a DeviceFilter instead which does work.

Note: There is often little we can do without a minimal reproducible sample of the issue, so please provide that in a standalone git repository and link it here.

Steps to reproduce

Create a scan with any of the above filters

Observe it works with Android but not on WinUI

Expected behavior
ScanFilterOptions filter returned devices on WinUI
Actual behavior
Expected behavior
ScanFilterOptions do not filter returned devices on WinUI
Crashlog
No crashes
Configuration
Version of the Plugin:
v3.0.0
Platform:
Not working .NET8 Win10.0.19041.0
Working on .NET8 Android 12/13 target 34
Device: IBM X1 carbon 1, Samsung A11, Samsung A51

Hi @axa88,
I'm the friendly issue checker.
Thanks for using the issue template :star2:
I appreciate it very much. I'm sure, the maintainers of this repository will answer, soon.

ScanFilterOptions do not appear to work on WinUI.

Yes, as documented ...
https://github.com/dotnet-bluetooth-le/dotnet-bluetooth-le/blob/112a1eaf4bde674842626abdcd4247d583a0e221/Source/Plugin.BLE/Shared/ScanFilterOptions.cs#L72-L76

For example on Android I am able to set this filter to only return Samsung devices: ScanFilterOptions = new() { ManufacturerDataFilters = [new(0x0075)] }

https://github.com/dotnet-bluetooth-le/dotnet-bluetooth-le/blob/112a1eaf4bde674842626abdcd4247d583a0e221/Source/Plugin.BLE/Shared/ScanFilterOptions.cs#L93-L96

Or this filter to return only a specific Service UUID ScanFilterOptions = new() { ServiceUuids = [GetUuid(0xe000)] }

https://github.com/dotnet-bluetooth-le/dotnet-bluetooth-le/blob/112a1eaf4bde674842626abdcd4247d583a0e221/Source/Plugin.BLE/Shared/ScanFilterOptions.cs#L78-L81

Or this to filter on a device name ScanFilterOptions = new() { DeviceNames = ["motoAppAratus"] }

https://github.com/dotnet-bluetooth-le/dotnet-bluetooth-le/blob/112a1eaf4bde674842626abdcd4247d583a0e221/Source/Plugin.BLE/Shared/ScanFilterOptions.cs#L98-L101
Reminder: The only difference between a bug and a feature is documentation. So what you're reporting here is actually a feature 😜
(Sure, would be good to implement these scan filtering options on Windows as well. I don't know if the Windows BLE APIs allow that. Pointers welcome ...)


Proper validation errors and browsable api

This fixes issue #19.
We now have beautiful "browsable error messages" (patent pending?).

In addition, I changed from APIView to GenericAPIView which enables great swagger support:

Just a query: When would do you plan to create a release for the changes reflected in this PR?

I'm planning to release it today as version 1.0.0alpha1

Thanks @anx-ckreuzberger . Looking forward to use the latest release. :)


[TritonCTS] Stability fixes

This PR has no effect on the current OpenROAD-flow. It only fixes segFaults and unconnected buffers/nets that happen in some combinations of input parameters.
This includes fixes for Issue #389 and for when TritonCTS was inserting unconnected buffers (no global placement) and nets (no sink found).

The problem with unconnected buffers was already solved in a previous PR, but, with the new additions, I decided to check "upstream nets" too (nets connected to the input of clock buffers). This makes sure all nets from TritonCTS have at least 1 input and 1 output pin.

I have added the number of nets fixed as a report. All designs on OpenROAD-flow seem to run with no problems.

This also contains the fixes from PR #395, so I'll close that for now.


We should add unit-tests for api-client based spi classes

spi tests that are based on the api-client can provide an HttpTransportFactory with a mock HttpTransport.
For more info see this.

I'm no longer working on this repo :p
Reopening the issue for the team to triage.


Correction for raw affiliation Ecole Polytechnique de Montreal, University of Montreal, 2900, boul. Edouard-Montpetit, Campus de l'Universite de Montreal, 2500, chemin de Polytechnique, Montreal (Quebec) H3T 1J4, Canada; Sainte-Justine Hospital Research Center, 3175, Chemin de la Cote-Sainte-Catherine, Montreal (Quebec) H3T 1C5, Canada

Correction needed for raw affiliation Ecole Polytechnique de Montreal, University of Montreal, 2900, boul. Edouard-Montpetit, Campus de l'Universite de Montreal, 2500, chemin de Polytechnique, Montreal (Quebec) H3T 1J4, Canada; Sainte-Justine Hospital Research Center, 3175, Chemin de la Cote-Sainte-Catherine, Montreal (Quebec) H3T 1C5, Canada
raw_affiliation_name: Ecole Polytechnique de Montreal, University of Montreal, 2900, boul. Edouard-Montpetit, Campus de l'Universite de Montreal, 2500, chemin de Polytechnique, Montreal (Quebec) H3T 1J4, Canada; Sainte-Justine Hospital Research Center, 3175, Chemin de la Cote-Sainte-Catherine, Montreal (Quebec) H3T 1C5, Canada
new_rors: 01gv74p78;05f8d4e86
previous_rors: 01gv74p78;05f8d4e86;0161xgx34
works_examples: W2073632792
contact: 2e4fbcdd4f4d5f3f619adab92ca272ae:0b3b95ca7915992be0dd64 @ polymtl.ca

This issue was accepted and ingested by the OpenAlex team on 2024-11-01. The new affiliations should be visible within the next 7 days.


net: DialTCP produces "connection refused" error on Linux but not on Windows

What version of Go are you using (go version)?

$ go version
go version go1.14.2 windows/amd64

Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\\AppData\Local\go-build
set GOENV=C:\Users\\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\\AppData\Local\Temp\go-build045746270=/tmp/go-build -gno-record-gcc-switches

What did you do?

To reproduce requires two application running and connecting to each other through TCP. So I've made a tiny repo that also includes the powershell build script.
dial-vs-listen
What did you expect to see?
I built the same go code for both Windows and Linux but at runtime the applications produced different results. Specifically with how TCP connections are dialed on each platform.
What did you see instead?
On Windows, when I run the two executables clientA.exe and clientB.exe (built from the build.ps1 script) I get the desired result. As seen in this screenshot:

However when I upload and execute the Linux binaries, the result is different:
ubuntu@ip-172-31-16-224:~/go/src/github.com/fanmanpro/dial-vs-listen$ sudo chmod +x clientA clientB
ubuntu@ip-172-31-16-224:~/go/src/github.com/fanmanpro/dial-vs-listen$ ls -la
total 10984
drwxrwxr-x 3 ubuntu ubuntu    4096 Apr 27 03:09 .
drwxrwxr-x 4 ubuntu ubuntu    4096 Apr 27 03:08 ..
drwxrwxr-x 8 ubuntu ubuntu    4096 Apr 27 03:08 .git
-rw-rw-r-- 1 ubuntu ubuntu   11255 Apr 27 03:12 A.txt
-rw-rw-r-- 1 ubuntu ubuntu   11255 Apr 27 03:12 B.txt
-rw-rw-r-- 1 ubuntu ubuntu     247 Apr 27 03:08 build.ps1
-rwxrwxr-x 1 ubuntu ubuntu 2950662 Apr 27 03:08 clientA
-rw-rw-r-- 1 ubuntu ubuntu 2642944 Apr 27 03:08 clientA.exe
-rw-rw-r-- 1 ubuntu ubuntu     718 Apr 27 03:08 clientA.go
-rwxrwxr-x 1 ubuntu ubuntu 2950662 Apr 27 03:08 clientB
-rw-rw-r-- 1 ubuntu ubuntu 2642944 Apr 27 03:08 clientB.exe
-rw-rw-r-- 1 ubuntu ubuntu     718 Apr 27 03:08 clientB.go
ubuntu@ip-172-31-16-224:~/go/src/github.com/fanmanpro/dial-vs-listen$ ./clientA > A.txt & ./clientB > B.txt &
[1] 24914
[2] 24915
ubuntu@ip-172-31-16-224:~/go/src/github.com/fanmanpro/dial-vs-listen$ cat A.txt
dial tcp4 :2222->:3333: connect: connection refused
ubuntu@ip-172-31-16-224:~/go/src/github.com/fanmanpro/dial-vs-listen$ cat B.txt
dial tcp4 :3333->:2222: connect: connection refused
ubuntu@ip-172-31-16-224:~/go/src/github.com/fanmanpro/dial-vs-listen$

I don't expect the connection refused error since these two applications are running under the same environment and the permissions are identical.

@mikioh @bradfitz

I guess Linux (at least in its default configuration) doesn't allow such an active/active TCP connection, at least on localhost. Perhaps it's configurable. It'd probably work between two separate hosts, though.
This isn't so much a Go problem as an OS/config difference.
Closing, as I don't see anything to do here.


IGNITE-19622 Add realtime CDC buffer

Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
The Contribution Checklist

[ ] There is a single JIRA ticket related to the pull request.
[ ] The web-link to the pull request is attached to the JIRA ticket.
[ ] The JIRA ticket has the Patch Available state.
[ ] The pull request body describes changes that have been made.
The description explains WHAT and WHY was made instead of HOW.
[ ] The pull request title is treated as the final commit message.
The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
[ ] A reviewer has been mentioned through the JIRA comments
(see the Maintainers list)
[ ] The pull request has been checked by the Teamcity Bot and
the green visa attached to the JIRA ticket (see TC.Bot: Check PR)

Notes

How to Contribute
Coding abbreviation rules
Coding Guidelines
Apache Ignite Teamcity Bot

If you need any help, please email<EMAIL_ADDRESS>or ask anу advice on http://asf.slack.com #ignite channel.

Not sure about CdcBuffer on heap approach. I think we must rework this to offheap to be able to work with relatively big buffers like several gigabytes.


station density weighting

Weather stations are typically not evenly spaced out. It may be important to weight the stations based on network density so that areas with high station density don't overwhelm the final score.
We should build a function that generates these station weights.
We can follow the ECMWF approach in section 9 of https://rmets.onlinelibrary.wiley.com/doi/pdfdirect/10.1002/qj.656

I've managed to create station density weightings that varies based on a 2D array (e.g., station_number and time dims). It needs to vary due to NaN handling (e.g., there may not be data at some stations at certain timesteps, so those stations should be excluded from the weighting of other stations). The current prototype approach loops through the time dimension and isn't vectorised.
We can to one of the following:

implement 1D/2D version
extend it to N dimensions (this may be slow if we start looping within loops)
someone else has a go at trying to vectorise it


netlify dev crashes when using url in an iframe

- Description of what I am trying to achieve
I am updating my website www.bzin.net to have a blog and other pages while hosted on Netlify. The webpage uses Craft CMS to get its data and in the frontend the technical stack is Sapper and Svelte. At this moment I am trying to enable the preview feature from the CMS when its on its headless mode. This means that updating my data in Craft CMS I should be able to see current changes on an iframe before trigger a deployment. I am able to see and set this preview if I do not use Netlify dev and if I directly call my API endpoint. Although my intention is to use lambda functions on Netlify so I can do this in a more  secure way, without exposing my API and keys in the javascript.
- Do you want to request a feature or report a bug?
bug
- What is the current behavior?
netlify dev breaks when url of project is loaded in an iframe.
- If the current behavior is a bug, please provide the steps to reproduce.
1 - run netlify dev
2 - open the dev url in a browser where its in an iframe
See attached screenshot:

PS: This was posted from a suggestion in https://community.netlify.com/t/netlify-dev-crashes-when-using-url-in-an-iframe/4738/4
- What is the expected behavior?
to be able to continue developing when opening the url in an iframe.
- Local Environment Information
System:
OS: macOS 10.15.1
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Binaries:
Node: 12.4.0 - ~/.nvm/versions/node/v12.4.0/bin/node
Yarn: 1.19.0 - /usr/local/bin/yarn
npm: 6.12.1 - ~/.nvm/versions/node/v12.4.0/bin/npm
Browsers:
Chrome: 78.0.3904.97
Firefox: 69.0.1
Safari: 13.0.3

while in this repository there might be a maintainer coming back to you, you'll probably get a faster answer on community.netlify.com

Thanks @mraerino, I've done that before.
It was a Netlify member that mention there that I should post the issue here.

The socket hangup has been fixed for quite some time now. Thank you for your patience and reporting this. Please update your netlify-cli to the latest version and let us know if it is still a problem.


Max number items per stored guest check is approx. 120

Testing with a two terminal cluster, Steve found that storing (using a total key setting for Service Total) and retrieving a guest check from a Satellite Terminal when the number of items per guest check was set to the maximum of 200 would provide only a summary rather than the complete list of items on the Satellite Terminal.
Steve reported that doing the same action on the Master Terminal did not have this issue and the complete guest check was retrieved and displayed allowing additional items to be added and the resulting guest check stored again.
I suggested dropping the max number of items on a guest check to 120 and that works properly when retrieving a stored guest check from the Satellite Terminal. When he tried 150 items, the summary was retrieved rather than the complete list of items. It appears there is some threshold between 120 items and 150 items where the Satellite Terminal will retrieve a guest check summary rather than the complete guest check.
This was using a system type of Pre-guest Check Buffering.
Note that in the ASSRTLOG logs there was a warning at startup that the size of the data buffer needed for 200 items was greater than 0xFFFF, the max for a USHORT.
At this time 120 items per guest check as a maximum is sufficient for a small restaurant.

On investigation, we discovered that a field used for the response length was a USHORT which has a max of 32,767 and when the number of items in a guest check exceeds approximately 120 to 130, the response length is larger than the max number that will fit in a USHORT.
This field is a holdover from when the amount of data in a guest check and a guest check item was less than it is now. This has been a lurking issue since NHPOS 1.4 on the NCR 7448 was ported to NHPOS 2.0 on newer NCR touchscreen terminals with additional functionality added over the years which has increased the size of the guest check.
The transfer mechanism between two terminals involves a couple of steps: (1) the guest check is located in the guest check file, (2) the guest check is retrieved and saved to a temporary file, (3) the inter-terminal messaging is used to transfer the file from the Master Terminal to the Satellite Terminal a block at a time, (4) the Satellite terminal saves the sequence of data blocks into a temporary file, (5) the Satellite Terminal displays the guest check using the temporary file as a buffer.
We are currently investigating a change in the field from a USHORT to a ULONG. However this change ripples through a number of different places which also need a similar change.


fix: avoid crash on empty files

it crashed because tree was nil (just open an empty lua file)

Thanks!


limit resets in multi server

I have Jobs in 2 servers enabled and using the same database and want to set money/exp/point limit on them.
But when player reaches limit in one server, if he goes to another server (using the same Jobs database) and goes back to the first one (and DO NOT use /jobs limit during this), the limit (in the first server) would be reset.

Maybe I'm missing something in what you stated or trying to do, but why would you want two servers/worlds sharing the same database.  Aside from possible locking issues and/or corruption from one world writing to the same database as another, it isn't something I would recommend.  I've got 8 servers with 4 being Spigot and each have Jobs Reborn on them, but none of them sharing the same database instance.  The only scenario I can think of is if you use BungeeCord Server and allowing teleporting between the two worlds and want to retain "the same" stats between them.  Meaning that the same jobs/xp/levels, etc are identical in both server/worlds.
Perhaps you can describe your setup and what errors if any you see in your logs.  Like what server and version you are on, Jobs Reborn Version, other plugins, etc.

These config options are in the GeneralConfig.yml , obviously they are for multiserver with same database instance.
save-on-disconnect: true
MultiServerCompatability: true

Unfortunately, my scenario is exactly the only one, in these 2 servers almost everything on player should be the same, including the limit status of player in Jobs Reborn.
What I have found is that when player quit the 2nd server(whether quit the BungeeCord or connect to 1st server), the data of this player in table 'job_limit' (contains data about limit) are just GONE.
A temporary solution is to set Triggers on this table in MySQL Server, to avoid delete from these entries, SQL code like these:
Avoid delete from entry:
DELIMITER $$
CREATE TRIGGER tg_jobs_limit_delete
BEFORE DELETE
ON job_limits
FOR EACH ROW
BEGIN
SET @nowtime =  (SELECT unix_timestamp()*1000),
    @diff = @nowtime - OLD.started;
    IF @diff<86400000 THEN
        SIGNAL sqlstate '45001' set message_text = "ERROR!";
    END IF;
END $$
DELIMITER ;

Avoid duplicate enrty:
DELIMITER $$
CREATE TRIGGER tg_jobs_limit_insert
BEFORE INSERT
ON job_limits
FOR EACH ROW
BEGIN
SET @userid_new =  (SELECT NEW.userid),
@type_new = (SELECT NEW.type),
@count = (SELECT COUNT(*) FROM job_limits WHERE (userid = @userid_new AND type = @type_new));
    IF @count>0 THEN
        SIGNAL sqlstate '45001' set message_text = "ERROR!";
    END IF;
END $$
DELIMITER ;

adf91bea983d4626ac58d4d94e9e8ae77a4c9633


i can't setup.py

ERROR: Could not find a version that satisfies the requirement lightglue (unavailable) (from hloc) (from versions: none)
ERROR: No matching distribution found for lightglue (unavailable)

I can install hloc on Windows, but I will encounter errors when installing on Ubuntu22.04
ERROR: Could not find a version that satisfies the requirement lightglue (unavailable) (from hloc) (from versions: none)
ERROR: No matching distribution found for lightglue (unavailable)

i fixed
python -m pip install --upgrade setuptools
python -m pip install --no-build-isolation -e .
but i want to know why

https://github.com/cvg/LightGlue/issues/104

I can install hloc on Windows, but I will encounter errors when installing on Ubuntu22.04
ERROR: Could not find a version that satisfies the requirement lightglue (unavailable) (from hloc) (from versions: none) ERROR: No matching distribution found for lightglue (unavailable)

Hi @applefb can you share your steps to install on windows?


Add support for exact filenames for searches

Currently when typing foo in File Paths of Code Search tool window, the search is implicitly transformed to *foo* (basically a sub-string match). This is useful in most cases, but there are cases where searching for a specific filename can be useful (e.g. Makefile).
To enable these "exact" match searches, the proposal is to allow using double quotes around the path.
So, "foo" would search only files that are exactly named foo

Fixed in (pre)release 0.9.32 (https://github.com/chromium/vs-chromium/releases/tag/v0.9.32)


Authentication error?

Application starts with an authentication error. I try to log in with Plex username(or email)/password, error repeats.

Authentication failed : org.simpleframework.xml.core.PersistenceException: Element 'Server' is already used with @org.simpleframework.xml.Element(name=Server, type=class fr.arsenelapostolet.plexrichpresence.model.Server, data=false, required=false) on field 'Server' private fr.arsenelapostolet.plexrichpresence.model.Server fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer.Server at line 4

I'm on Windows 10, used the installer.

Searching, see this is noted and being looking to, disregard.

Searching, see this is noted and being looking to, disregard.


Autobuyer tab missing

I don't know what happened, might be another extension messing with it but the autobuyer tab on webapp is missing. i can find my page jumper options in settings, but autobuyer tab is just not there

Hi,
do you have the newest Release?
https://github.com/chithakumar13/Fifa21-AutoBuyer/releases/tag/2.1.1

Hi,
do you have the newest Release?
https://github.com/chithakumar13/Fifa21-AutoBuyer/releases/tag/2.1.1

i reinstalled the tampermonkey and reinstall the release. somehow that fixed it

@chithakumar13 I have a similar autobuyer but mine has been down since this happened do you mind helping me out? what did you have to change? I can provide you with some of my indexing code to make your autobuyer faster


fix: throw an error for non observable arg

closes: #2

update the readme.
Otherwise :+1:

I'm just removing: Other values are just passed through., right?

Works for me. @sindresorhus?

:+1:


Blunt cerebrovascular injury: copyedit

Minor format changes, remove space between < (or >) and the number

Codecov Report

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

@@           Coverage Diff           @@
##           master      #54   +/-   ##
=======================================
  Coverage   50.32%   50.32%
=======================================
  Files          14       14
  Lines         155      155
  Branches       43       43
=======================================
  Hits           78       78
  Misses         77       77

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 09a53c0...408a800. Read the comment docs.


Clearing existing diagnostics when a watched configuration file is modified

We implemented the following scenario in the Ruby LSP (PR):

A user is modifying files. Diagnostics are served using pull diagnostics (textDocument/diagnostic)
The user decides to change the configurations for the linter. This is done by editing .rubocop.yml
We then reload the linter with the new configurations and clear the existing diagnostics, since they may no longer be valid

The flow of clearing the diagnostics is simply:

The server receives a workspace/didChangeWatchedFiles notification including .rubocop.yml
We fire textDocument/publishDiagnostics notifications with empty arrays to clear the diagnostics on all currently opened files

However, this does not seem to work. We use the same technique to clear diagnostics on textDocument/didClose and that works properly, but trying to clear the diagnostics when a watched file notification comes in doesn't do anything.
I tried debugging the code for vscode-languageclient to see if our notifications were being received and processed and everything seemed fine, but the diagnostics still won't go away.
Are we doing something incorrectly? Or is this a bug somewhere?

That should work that way. I use the same for ESLint

The fact that the client doesn't include the configuration file's extension as part of its document selector shouldn't matter, right? That is, the configuration file is YAML, but the client doesn't include YAML in the selector.
Do you have any tips for trying to debug this? It's easy for me to reproduce, so if you can point me to where the clearing of the diagnostics happen I can check what's going on.


Functions cannot return something else than maps: did not find expected

This work:
#@ def some_data():
hello: world
#@ end

simple_key: #@ some_data()

This does't work
#@ def some_data():
"hello"
#@ end

simple_key: #@ some_data()

neither this:
#@ def some_data():
- hello: world
#@ end

simple_key: #@ some_data()

The error is not really understandable either: Unmarshaling YAML template: yaml: line 2: did not find expected

inline
Sent from my iPhone

On May 28, 2019, at 7:00 PM, mildred<EMAIL_ADDRESS>wrote:
This work:
#@ def some_data():
hello: world
#@ end
simple_key: #@ some_data()
This does't work
#@ def some_data():
"hello"
#@ end
simple_key: #@ some_data()

currently scalars arent supported thry yanl syntax, however, ...

neither this:
#@ def some_data():

hello: world
#@ end

simple_key: #@ some_data()
returning arrays is supported. you just have to have it in a different yaml doc since its not valid for an array item and map item to be siblings. like this:

#@ def some_data():

item1
#@ end

simple_key: #@ some_data()

The error is not really understandable either: Unmarshaling YAML template: yaml: line 2: did not find expected
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

inline

This work:
#@ def some_data():
hello: world
#@ end
simple_key: #@ some_data()
This does't work
#@ def some_data():
"hello"
#@ end
simple_key: #@ some_data()

currently scalars cannot be retrurned with yaml syntax (have plans to add that though), however, ...

neither this:
#@ def some_data():

hello: world
#@ end

simple_key: #@ some_data()

returning arrays (maps, and multiple documents) is supported. you just have to have it in a different yaml doc since its not valid for an array item and map item to be siblings. like this:
#@ def some_data():
- item1
#@ end
---
simple_key: #@ some_data()

The error is not really understandable either: Unmarshaling YAML template: yaml: line 2: did not find expected

ill look into improving error.
pardon iphone formatting.

thanks for the quick reply

A bit different but it might be solved at the same time. it's not possible to evaluate a function as a complete document. With:
config.yml:
#@ load("funcs2.lib.yml", func3="func1")
---
a: a
---
#@ func3()

and funcs2.lib.yaml:
#@ def func1():
a: b
#@ end

I get
a: a

instead of:
a: a
---
a: b

the templating metadata needs to bind itself to an element which is ambiguous / missing in your example.
you can use a template.replace to achieve this in your config.yml:
#@ load("funcs2.lib.yml", func3="func1")
#@ load("@ytt:template", "template")

---
a: a
---
_: #@ template.replace(func3())

Have to be smart in this case -- I did something like this and it works perfectly:
#@ load("functions.lib.yml", "products")

groups:
#@ def groups_of_products():
- name: ALL
  jobs:
  #@ for product in products():
  - #@ product
  #@ end
#@ end

See the hanging but not-to-be-used groups?
I still can get back an array which includes whatever I want but to avoid ytt's complaints.

A bit different but it might be solved at the same time. it's not possible to evaluate a function as a complete document.

setting document value works.
#@ load("funcs2.lib.yml", func3="func1")
---
a: a
--- #@ func3()

note that --- #@ func3() means set value of document to func3() return value (because #@ ... is on the left of a yaml node, document in this case). this is similar to other uses, similar to, foo: func3() means set foo map item value to the func3() return value.

you can use template.replace to achieve this in your config.yml:

template.replace is useful if you are replacing one or more nodes in existing structure instead of setting value of the structure. for example:
--- #@ template.replace(func3())

is useful when func3() returns multiple documents:
#@ def func3()
---
1
---
2
#@ end

since document's value cannot be other documents, it has to be replaced with them instead.

I did something like this and it works perfectly ... See the hanging but not-to-be-used groups?

i would argue that this approach is not recommended as it adds unnecessary map item (groups). but it's your choice.

Ok, so this works (with the document separator):
#@ def some_data():
- hello: world
#@ end
---
simple_key: #@ some_data()

but this still does not work:
#@ def some_data():
"hello world"
#@ end
---
simple_key: #@ some_data()

No syntax error, but the result is simple_key: null instead of a string. Numbers do not work neither as booleans

A simple workaround is to use a starlark function that return a litteral:
#@ def some_data():
#@   return"hello world"
#@ end
---
simple_key: #@ some_data()


Atmos cell groups

Closes #404

Coverage decreased (-0.07%) to 16.526% when pulling b802fbc8938023e95cfb149bcfdb2144e503e88e on atmos-cell-groups into 1773b46e62deca7a95a6fe1c0463c198adff2630 on master.


ClientRenderer: Use pre instead of div

Changes the ClientRenderer to use <pre> instead of <div>
as this leads to a much nicer degraded user experience
if the script fails to load or hasn't yet loaded.
Since this is a significant change in behavior,
adds a ClientRenderer.ContainerTag option
to let users opt into the old behavior.
Resolves #31

Thanks, @zbysir!


Added colors for dark theme (Development Branch)

Description

Modified theme and colors in tailwind.config.js
Added variables in index.css

Fixes "Theme Button #316 "
Type of change

[x] User Interface
[x] New feature (non-breaking change which adds functionality)

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have commented on my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have npm run format before committing
[x] I replicated the UI with the Design

ScreenShots

@harkiratsm  Review when you have time. 🙂


typed text isn't visible (need a way to select dark-background or light-background palettes)

The typed text "help" below wasn't visible in the terminal.
$ usql sqlite:/var/db/pkg/local.sqlite
Connected with driver sqlite3 (SQLite3 3.21.0)
Type "help" for help.

sq:/var/db/pkg/local.sqlite=> help
You are using usql, the universal command-line interface for SQL databases.
Type:  \copyright for distribution terms
       \? for help with usql commands
       \g or terminate with semicolon to execute query
       \q to quit
sq:/var/db/pkg/local.sqlite=>

Could you provide more information about your environment? Operating system, etc.? Were you using one of the release binaries?
I would likely guess it has something to do with the syntax highlighting. You can try disabling the syntax highlighting by doing the following:
$ usql
Type "help" for help.

(not connected)=> \set SYNTAX_HL false
(not connected)=>

If this fixes your issue, then the problem is likely that package usql uses to detect the color output isn't working as expected. Try the above and let me know if that "fixes" the issue -- if so, please copy and paste your terminal's environment variables:
$ env

FreeBSD 11.1
Built while was creating a port. No binaries, ever.
This

(not connected)=> \set SYNTAX_HL false

didn't help.

You're seeing output, but not syntax colored output? For example, the (not connected) => prompt is visible?

(not connected) => prompt is visible?

Yes. But when I type text it isn't visible. However, "\set SYNTAX_HL false" was visible.

I can't think of any other causes of this kind of behavior, other than the syntax highlighting. Could you output your environment variables? What shell / tty are you using? Do you have similar problems in other applications (not necessarily ones written in Go, as I'm guessing that usql's implementation is unique).

Environment:
$ env
XDG_MENU_PREFIX=xfce-
DISPLAY=unix:0.0
COLORTERM=truecolor
CVSROOT=/usr/home/cvs
SSH_AUTH_SOCK=/tmp/ssh-aIOD9VFrJeLp/agent.4362
GLADE_CATALOG_PATH=:
USER=yuri
GLADE_MODULE_PATH=:
DESKTOP_SESSION=xfce
PWD=/usr/ports
HOME=/home/yuri
LC_CTYPE=en_US.UTF-8
SSH_AGENT_PID=4363
CLICOLOR=1
XDG_DATA_DIRS=/usr/local/share:/usr/share
SVN_EDITOR=vim
GLADE_PIXMAP_PATH=:
MAIL=/var/mail/yuri
TERM=xterm-256color
SHELL=/usr/local/bin/bash
VTE_VERSION=4803
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus
XDG_CURRENT_DESKTOP=XFCE
SHLVL=1
WINDOWID=37748739
LOGNAME=yuri
DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbus-mFZSubmAhO,guid=69f8e988663a552b9c91a3e45a93201f
XDG_RUNTIME_DIR=/var/run/user/1001
XAUTHORITY=/home/yuri/.Xauthority
XFCE4_SESSION_WITH_CK=1
XDG_CONFIG_DIRS=/etc/xdg:/usr/local/etc/xdg
PATH=.:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
XDG_SESSION_COOKIE=xx.xxxxxx.xx-1519591454.955511-1913274999
SESSION_MANAGER=local/yv.noip.me:/tmp/.ICE-unix/4374
GTK_IM_MODULE=ibus
_=/usr/bin/env

Shell: bash
Terminal: xfce4-terminal
Never saw such problem anywhere else.

If you're building it from source for a port I would recommend using dep to lock the built dependencies into place.

I can't use dep, port locks them explicitly.
 Colors work: so this is some kind of logic / terminal detection issue. I manually set the syntax highlighting parameters, however. If you could try the same and report back, I'd appreciate it. Could you try it outside of X?

If help is being highlighted, then syntax highlighting is working properly. usql uses github.com/alecthomas/chroma for the coloring; you can set the theme through \set SYNTAX_HL_STYLE <name> where <name> is one of the styles available in chroma. The list of chroma style names available for use can be retrieved via the chroma cli tool:
$ go get -u github.com/alecthomas/chroma/cmd/chroma
$ chroma --list
...
styles: abap algol algol_nu arduino autumn borland bw colorful dracula emacs friendly fruity github igor lovelace manni monokai monokailight murphy native paraiso-dark paraiso-light pastie perldoc pygments rainbow_dash rrt swapoff tango trac vim vs xcode
...

Any of the named styles above can be used in conjunction with \set SYNTAX_HL_STYLE. If you'd like to set these settings all the time, you can put them in your .usqlrc file.
Additionally, you may execute \set in usql without any parameters to see what the current syntax settings are:
$ usql
(not connected) => \set
SHOW_HOST_INFORMATION = 'true'
SYNTAX_HL = 'true'
SYNTAX_HL_FORMAT = 'terminal16m'
SYNTAX_HL_OVERRIDE_BG = 'true'
SYNTAX_HL_STYLE = 'monokai'
(not connected)=>

If you set SYNTAX_HL to any other value than true, it will disable syntax highlighting.
SYNTAX_HL_STYLE may be set to any of the named styles from chroma (see above).
When SYNTAX_HL_OVERRIDE_BG is any other value than true, usql will not "erase" the background components from the named chroma style -- this is the default because most of the chroma styles have background colors, and they rarely look correct in most cases (from what I've seen).
SYNTAX_HL_FORMAT can be any of the chroma named formatters. For best results, do not use anything other than the following chroma formatters: noop terminal terminal256 terminal16m. These formatters produce "no coloring", "16 colors", "256 colors", and "millions of colors", respectively.

I would recommend trying either the dracula (white backgrounds) or monokai (dark backgrounds) styles.
For reference, on my main development machine, usql's colored syntax highlighting looks like the attached screenshot.

For some reason, I still have the same problem with 'dracula':
(not connected)=> \set
SHOW_HOST_INFORMATION = 'true'
SYNTAX_HL = 'true'
SYNTAX_HL_FORMAT = 'terminal16m'
SYNTAX_HL_OVERRIDE_BG = 'true'
SYNTAX_HL_STYLE = 'dracula'
TIME_FORMAT = '2006-01-02T15:04:05.999999999Z07:00'

Could you upload a screenshot so that I can see what you're seeing? Additionally, have you tried using it in a regular tty?

Here's how I see it in the xfce4 terminal:

I will tell you about the system terminal later.

Please try typing in a regular SQL query as well, and see if it comes back with more visible colors. I would also suggest changing your terminal settings to be white on black or black on white. The highlighting definitely is working, it just seems to be faint. I'd suggest trying all the other styles supported by chroma until you find one that works with your terminal's color settings.

Closing this, as more input would be needed from the @yurivict in order to fix this -- "it works for me."


OCPBUGS-4388: ZT server FirmwareSchema CR does not contain allowable_values, attribute_type and read_only flag

This PR is to address the OCPBUGS-4388
The fix upstream is merged: https://review.opendev.org/c/openstack/sushy/+/872049
Fix is also included in the 4.14 and master branch under commit: fbf44e92c4a820ce0063cfbb4d8a6ad4c224f7ca
Generated via : git cherry-pick fbf44e92c4a820ce0063cfbb4d8a6ad4c224f7ca

/lgtm

/jira refresh


Letter to Rancho Cucamonga Mayor and City Council

Letter to Rancho Cucamonga Mayor and City Council
To:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Subject:
[*** INSERT YOUR OWN SUBJECT LINE***]
Message:
Dear Rancho Cucamonga City Council,
My name is [YOUR NAME], and I am a resident of Rancho Cucamonga. I am writing to you because I am concerned with the city's growing police funding and budget cuts to other services.
The preliminary budget for 2020/21 increases the amount allocated to the police from $42,327,060 to $44,869,070. And while I applaud the substantial increase in the amount allocated to Community Services, there have been budget cuts to Economic and Community Development, Building and Safety Services, Engineering Services, and Planning. Less than $7,000,000 is budgeted for these community development services, while the police get over $44,000,000.
The police in America have never been meant to protect those who are low income and people of color. Unfortunately, Rancho Cucamonga is no exception. Police violence can not be ended by reform. And more policing is not the solution to crime. Instead, we must look to the root causes of crime and address those issues. We must make increased efforts to ensure financial and housing security, improve mental health services, and develop substance abuse treatment services--not increase deployment and militarization of the police.
Following the murder of George Floyd, Minneapolis City Council has announced their plan to "disband the Minneapolis Police Department and invest in community-led public safety."
Rancho Cucamonga must follow this precedent. Rancho Cucamonga must take the initiative to defund the police.
It is no secret that the COVID-19 pandemic has unexpectedly affected city finances. However, a time like this creates even greater necessity to invest in the community. I am urging you to revisit the 2020/21 preliminary budget and reallocate funds from the police back to the community.
Thank you,
[YOUR NAME]
[YOUR ADDRESS]
[YOUR EMAIL]
[YOUR PHONE NUMBER]

on it now


issue connecting to MYSQL, bad connection and invalid connection

Go version
go version go1.22.4 darwin/arm64
GoFrame version
2.7.4
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
#1116 大佬们，这个bug你们是如何解决的呀，我最近经常偶现这个问题。config.yaml配置文件加了queryTimeOut: "10s"，也不行啊。
What did you see happen?
bad connection 和invalid connection
What did you expect to see?
mysql连接正常~

@xugnail 建议把maxLifetime设置为5s或者10s试试


Milestone 01.00.02

Description of PR...
Change been made for Milestone 01.00.02
PR Template Checklist

[x] SI: Fix Roles and Permissions
[x] SI: Modules Pop-Up No Scroll
[x] SI: Replace Gear Icon
[x] SI: Add Icon Descriptions
[x] SI: Search Doesn't Move to Page 1
[x] SI: Button Labels Disappear in Some Themes

Please mark which issue is solved

Close #26 SI: Fix Roles and Permissions
Close #34 SI: Modules Pop-Up No Scroll
Close #35 SI: Replace Gear Icon
Close #33 SI: Add Icon Descriptions
Close #30 SI: Search Doesn't Move to Page 1
Close #23 SI: Button Labels Disappear in Some Themes

In the future, please only include one issue per PR.  Thanks!

Why did you lower the target version of DNN?

Why did you lower the target version of DNN?

My platform is running Dnn 9.4.4, since the module depend on 9.6.1, I lower the version only for installation.
I revert it back, and didn't include in PR.
I've upgrade the site to 9.6.1 and all still running well.


Exporting and importing of breakpoints

Does VSCode support exporting and importing of breakpoints? If so, how to export and import breakpoints.

VSCode Version: 1.6.1
OS Version: Ubuntu 14.04 LTS

Steps to Reproduce:

@dhiraj113 export/import of breakpoints is not yet possible.

Okay. Would love to see the feature implemented soon. Thanks.

Okay, then please submit a pull request. Thanks. ;-)


I am not able to run the jenkinsfile to run the dashboard after installing it

Hi Team,
I am getting the below issue when trying to build the dashboard job from the jenkinsfile. Any help please.
My configuration:
    stage('Create the environment for the users to know what is deployed to where') {

        try {
            environmentDashboard {
                environmentName("${namespace}")
                componentName('om-thor')
                productVersion("${thorBuildVersion}")
                buildJob("${env.JOB_NAME}")
                addColumns(true)
                columns('Envs', "${namespace}")
            }
        } catch (Exception ex) {
            println "Automation failed while trying to create the env dashboard"
            slackSend channel: "#orchprotos-build-fail", color: '#439FE0', message: "Build ${BUILD_NUMBER} Failed on ${BUILD_TIMESTAMP} via ${JOB_NAME} at stage: 'Injecting the datas to'"
            currentBuild.result = 'FAILURE'
            integerationStatus = "Fail"
            throw new RuntimeException("The injecting of the datas to the env dashboard failed... Operation is aborted!; ${ex}")
        }

    }

Getting below error:
[BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
java.lang.NoSuchMethodError: No such DSL method 'environmentDashboard' found among steps [VersionNumber, addBadge, addErrorBadge, addHtmlBadge, addInfoBadge, addShortText, addWarningBadge, ansiColor, ansiblePlaybook, ansibleVault, approveReceivedEvent, approveRequestedEvent, archive, artifactPromotion, awaitDeploymentCompletion, awsIdentity, bat, bayesianAnalysis, bitbucketStatusNotify, build, buildImage, catchError, cfInvalidate, cfnCreateChangeSet, cfnDelete, cfnDeleteStackSet, cfnDescribe, cfnExecuteChangeSet, cfnExports, cfnUpdate, cfnUpdateStackSet, cfnValidate, checkout, container, containerLog, createEnvironment, createEvent, createSummary, currentNamespace, deleteDir, deployAPI, dir, dockerFingerprintFrom, dockerFingerprintRun, dockerNode, ec2, ec2ShareAmi, echo, ecrLogin, emailext, emailextrecipients, envVarsForTool, error, fileExists, findFiles, getContext, git, gitChangelog, hubot, hubotApprove, hubotProject, inNamespace, inSession, input, invokeLambda, isUnix, jiraAddComment, jiraAddWatcher, jiraAssignIssue, jiraAssignableUserSearch, jiraComment, jiraDeleteAttachment, jiraDeleteIssueLink, jiraDeleteIssueRemoteLink, jiraDeleteIssueRemoteLinks, jiraDownloadAttachment, jiraEditComment, jiraEditComponent, jiraEditIssue, jiraEditVersion, jiraGetAttachmentInfo, jiraGetComment, jiraGetComments, jiraGetComponent, jiraGetComponentIssueCount, jiraGetFields, jiraGetIssue, jiraGetIssueLink, jiraGetIssueLinkTypes, jiraGetIssueRemoteLink, jiraGetIssueRemoteLinks, jiraGetIssueTransitions, jiraGetIssueWatches, jiraGetProject,

This is associated with PR #135 that is currently open and has been open for over a year.  Once this merges in, environmentDashboard method should be implemented and usable.

Please see #150


doc: add changelog for version 0.2.1

Signed-off-by: letty<EMAIL_ADDRESS>
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

LGTM


Single code base FAQ is problematic

I’m trying to get my iOS app to build, having just one copy of source. (Using VMware on my Mac, and the 1612 VM.)
The answer at
https://github.com/Microsoft/WinObjC/wiki/FAQ#how-can-i-use-a-vm-on-a-mac-to-develop-a-single-codebase-simultaneously-in-visual-studio-and-xcode
generates
Warning	MSB8029	The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build.	CocoaLumberjack-iOS	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets	400

Hello @alakoring,
Are you facing this issue only when trying to build on a shared folder between your Mac and the VM, or also when trying to build on a non-shared folder on the VM?

Um, the FAQ was about building with a shared folder…
I converted them all to non-$(Temp) paths and got rid of the warning. But then I happened to copy everything out of the shared folder and get
Warning	MSB8029	The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build.	Six Ages	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets	400
Don't know if I missed that because of #2008 or what, but the message seems to say: never use $(Temp).

Using $(Temp) does indeed trigger the warning above, but this shouldn't prevent you from building the app. There must be another error in your build error list. As you pointed out, changing the Output directory path so that it's not under $(Temp) should get rid of the warning.

Right, the bug is against the documentation. (Which wasn’t super clear, I think I was trying to say that I was just starting and having a hard time because the directions weren’t correct.)


Auto-generated TypeScript and JsonSchema for components

Description
A summer project that fell into my lap. For the longest time we've been writing our own JsonSchema for the component/layout definitions, and it has caused us to forget certain properties, under-document others, and even specifying the wrong types/options for some of them. To make sure we always update both our internal types and the external types at the same time, I've written a code generator that lets us configure components in code, and generate the resulting JsonSchema and TypeScript types.
A few new/breaking concepts:

We don't use ExprResolved and ExprUnresolved anymore. Now we instead have Internal and External type suffixes for our components. External types are those in the layout files, the flat configuration of components with expressions, children etc. Internal types are those used internally in app-frontend-react after evaluating expressions and building the node hierarchy. In these types, expressions only have their results (string, boolean), and some properties may change entirely (such as children -> childComponents/rows).
Our TypeScript types are generated with both internal and external types for all components and all of their properties
The JsonSchema only generates the external types, because our internal details here are irrelevant
Each component now should have a config.ts file, which exports a Config instance. Using the CG class (short for code generator) we can start building configurations for each component.
In src/layout/*/index.tsx the main component def class now extends the parent (generated) class. So for example, export class Group extends GroupDef {...}. This is done so that the component category (previously named component type) is set only once, in the config.ts file, and is what decides what the component should extend (FormComponent, ActionComponent, ContainerComponent, PresentationComponent).
Lots of properties that were possible to set on all components are now only possible to set on those components where they make sense. So for example, a Header component cannot have the readOnly property - that only makes sense for form components.
textResourceBindings are still always optional, but we should consider if some of them should be required in the future (for instance, it does not make sense to add a Header component that does not have any text in it).
dataModelBindings can now be either optional or required, but existing ones have only been set to required in the external types - because not all apps have set them for all components, and we should make sure to still check for that when using our internal types. An Input for example, does not work properly without being bound to the data model, so these should be required properties.
All unknown/additional properties in the JsonSchema are disallowed by default, so existing apps will get a lot of warnings when they've added "dataModelBindings": {} etc for components that don't even support data model bindings.
The Group component has been split into 4 different sub-types, so that we can have different textResourceBindings and specify properties that can only be set on one of the sub-types:

Repeating groups
Repeating groups with edit.mode = 'likert'
Non-repeating groups
Non-repeating groups with a panel property

Related Issue(s)

closes #832
replaces #1283
https://github.com/Altinn/altinn-studio/issues/9529
#1315

Verification/QA

Manual functionality testing

[x] I have tested these changes manually
[ ] Creator of the original issue (or service owner) has been contacted for manual testing (or will be contacted when released in alpha)
[ ] No testing done/necessary

Automated tests

[x] Unit test(s) have been added/updated
[ ] Cypress E2E test(s) have been added/updated
[ ] No automatic tests are needed here (no functional changes/additions)
[ ] I want someone to help me make some tests

UU/WCAG (follow these guidelines until we have our own)

[ ] I have tested with a screen reader/keyboard navigation/automated wcag validator
[x] No testing done/necessary (no DOM/visual changes)
[ ] I want someone to help me perform accessibility testing

User documentation @ altinn-studio-docs

[x] Has been added/updated

https://github.com/Altinn/altinn-studio-docs/pull/1084

[ ] No functionality has been changed/added, so no documentation is needed
[ ] I will do that later/have created an issue

Changes/additions to component properties

[ ] Changes are reflected in both src/layout/layout.d.ts and layout.schema.v1.json, and these are all backwards-compatible
[ ] No changes made

Support in Altinn Studio

[ ] Issue(s) created for support in Studio

[ ] This change/feature does not require any changes to Altinn Studio

Sprint board

[x] The original issue (or this PR itself) has been added to the Team Apps project and to the current sprint board
[ ] I don't have permissions to do that, please help me out

Labels

[x] I have added a kind/* label to this PR for proper release notes grouping
[ ] I don't have permissions to add labels, please help me out

The failing Cypress seems like an entirely unrelated fluke, and tests pass on my machine. Opening this up for review (I also disagree with SonarCloud here)


updating docker container default paths for logs,report,data

Issue #1494
I didn't edit the part regarding cert.key
or for secured connections (TLS/SSL), please ensure your configuration file
contains the following lines:

    ssl-cert /srv/data/domain.crt
    ssl-key /srv/data/domain.key
    ws-url wss://example.com:8080

I'm not sure about those paths.

Merged. Thank you for submitting this PR!


st->codecpar is NULL in FFMPEGvideoWriter.cpp

Hello,
I try to use it, I am able to compile it but when I run, there is an exception:
ret = avcodec_parameters_from_context(st->codecpar, c); in FFMPEGvideoWriter.cpp
Because the codecpar is NULL.
The close answer could be
https://stackoverflow.com/questions/71565636/replacing-deprecated-avstream-codec-parameter-in-libav
https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/mux.c
I tried to fix it but not able to do that. But the codecpar is NULL.
I am using ffmpeg-6.0 in Windows 11.
Please help!
Thanks,
-Scott

Probably I messed different version of ffmpeg in the configuration. Now it is working. Thanks!


fix: Make second pop in commit message conditional

There was an accidental message.pop() in the commit message, leading to the last character of the commit message not printing.

The commit messages are displayed in full in my testing - can you give an example?

Hey @jnsahaj, so I've found some really interesting behaviour, apparently the commits from github gui only have 1 trailing \n character and the ones from git cli have two, hence I have made the second pop conditional. Below are some examples on where this happens (All of these are from the main branch of lumen repo only):
The Ones from Github GUI (They were listed as verified so I am assuming Github GUI, it could very well be that verified commits don't have a second trailing new line in their commit message, but it seems unlikely)

The ones that are from git cli/other tools (or are non verified)

To fix this behaviour, I have made the second message.pop() conditional on checking whether the \n actually exists or not after the first pop.

That's very interesting (and weird)
Thanks for the detailed analysis!


doc: Add troubleshooting note about rootless Docker

What?
In Linux environment it is recommended to install Docker in rootless mode. docker-py looks by default Docker at unix:///var/run/docker.sock unless DOCKER_HOME environment is specified. While, the Docker installation notes for Rootless mode clearly advise to set it, if overlooked, it leads to problem connecting to Docker:
[10:40:04.464] ERROR    Docker daemon doesn't seem to be responding. Please check it is up and running correctly before re-running the command.

Why?

Helps people when the issue happen.

References

https://docs.docker.com/engine/security/rootless/

Published here: https://leverage.binbash.co/user-guide/troubleshooting/general/#linux-and-docker-in-rootless-mode
@rynkowsg Thanks again!

No problem! I encountered this issue while getting though 'getting started' so thought it might be useful for others :+1:

Thanks for your contribution @rynkowsg! We really appreciate it :)


Consider passing hardening ELF flags to LDFAGS in Makefile

We need to ensure that the linker resolves all dynamically linked functions at the beginning of the execution, and then makes the GOT read-only.  This technique is called RELRO and ensures that the GOT cannot be overwritten in vulnerable ELF binaries. ^1
gcc -g -O0 -Wl,-z,relro,-z,now -o <binary_name> <source_code>

In Go equivalent:
-extldflags=-zrelro -extldflags=-znow

An example implementation to Vault: https://github.com/hashicorp/vault-csi-provider/pull/143/files by @developer-guy
- trimpath increases build reproducibility. Per default full file paths are added to the go binary so two users will very likely have different binaries build even though the code is the same.
- w No DWARF (reduces binary size)
- s No symbol table (even less binary size)
- znow and zrelro Hardening, adds runtime costs.

feel free to assign it to us, we're willing to do it🙋🏻♂

I'm not familiar with this, perhaps @spring1843 is? Are there any tradeoffs to this? Is there any plans for golang to set this as default if it's considered best practice?

There are known and unknown trade offs to each of these.
Some are developer convenience for example without trimpath on a SIGSEGV or panic you see absolute full path to the problem:
goroutine 1 [running]:
main.main()
        /Users/username/go/src/github.com/aws/karpenter/test/main.go:8 +0x19

Without it you see a trimmed path:
goroutine 1 [running]:
main.main()
        github.com/aws/karpenter/test/main.go:8 +0x19

The former has the benefit that during development you can simply click on that message and the IDE will take the developer exactly to where the problem is. In the latter the developer has to find the file and the line and column number.
It does make sense to have trimpath during the process in which our release artifacts are made. Although even then it's not a hugely beneficial.
The others (zrelro, znow, -buildmode=pie) have tradeoffs in the way the binary is built and executed (both at startup and while executing) as they significantly change the way the binary is structured.
I'm looking deeper into each of these and we should certainly take baby steps e.g. try, and evaluate each change separately and only apply after having tried the consequences.

maybe we could start with -trimpath and -buildid= to provide better reproducibility, then we can start hardening the binary with RELRO and PIE compilation. There are similar ongoing works on both vault-csi-provider and cosign, so, I'm sharing the links that might be useful:

https://github.com/hashicorp/vault-csi-provider/pull/143
https://github.com/hashicorp/vault-csi-provider/commit/659b03f2c2ade3daaea394d347f5a0b5c62a7a79
https://github.com/sigstore/cosign/commit/f436d7637caaa9073522ae65a8416e38cd69c4f2
https://github.com/sigstore/cosign/issues/1450

WDYT @spring1843 @Dentrax ?

@developer-guy What is the value of build reproducibility (all users building identical executables)?

After looking deeper into this I'm inclined to not make any of these changes.
Here's a relevant thread about the similar issues: https://groups.google.com/g/golang-nuts/c/Jd9tlNc6jUE/m/fJodJUqZV-YJ
TLDR is this family of problems exists in C and C++ where bad memory management can lead to buffer overflows that cause security concerns. Go does not permit any of those problems by design hence there is really no need to have RELRO as a defense against ROP. The only exception here is if there are C libraries used by the Go code in an unsafe way, then the Go binary will also expose the same problems.
All of these changes have a cost specially in allowing us to use Go's debugging features. The cost of this therefore outweighs its benefits.
On the other hand it is a good idea for us to completely disable CGO using the CGO_ENABLED flag after ensuring none of our dependencies use it, thereby disallowing the addition of CGO into the code base of Karpenter and its dependencies. As a result we will be protected from the bugs and problems that exists in C libraries.

Closing the issue please feel free to reopen if you can provide more reasons to include any of the flags.


Inline keyboard pagination

This PR offers a simple way to add an inline pagination keyboard.

The idea has been around for a while and #436 gave me the kick to implement it.
How it works
Example command /basicpages

BasicpagesCommand.php
In the command, implement the InlineKeyboardPaginator, populate the required static methods, set reply_markup to the paginator, done!
<?php

namespace Longman\TelegramBot\Commands\UserCommands;

use Longman\TelegramBot\Commands\UserCommand;
use Longman\TelegramBot\Entities\InlineKeyboard;
use Longman\TelegramBot\Entities\InlineKeyboardPaginator;
use Longman\TelegramBot\Request;

class BasicpagesCommand extends UserCommand implements InlineKeyboardPaginator
{
    protected $name = 'basicpages';
    protected $description = 'Basic pages for inline keyboard pagination';
    protected $usage = '/basicpages';
    protected $version = '1.0.0';
    protected static $max_pages = 5; // Assigned dynamically in a real-life scenario!

    public static function getCallbackDataId()
    {
        return 'basicpages';
    }

    public static function getPagination($current_page)
    {
        return InlineKeyboard::getPagination(self::getCallbackDataId(), $current_page, self::$max_pages);
    }

    public static function getOutput($current_page)
    {
        return sprintf('Page %d of %d', $current_page, self::$max_pages);
    }

    public function execute()
    {
        // Using pagination
        $data = [
            'chat_id'      => $this->getMessage()->getChat()->getId(),
            'text'         => self::getOutput(1),
            'reply_markup' => self::getPagination(1),
        ];

        return Request::sendMessage($data);
    }
}

CallbackqueryCommand.php
In the callback query handler, we just need to get the current page number and can then edit the message to display the updated data.
<?php

namespace Longman\TelegramBot\Commands\SystemCommands;

use Longman\TelegramBot\Commands\SystemCommand;
use Longman\TelegramBot\Commands\UserCommands\BasicpagesCommand;
use Longman\TelegramBot\Entities\InlineKeyboard;
use Longman\TelegramBot\Request;

class CallbackqueryCommand extends SystemCommand
{
    protected $name = 'callbackquery';
    protected $description = 'Reply to callback query';
    protected $version = '1.0.0';

    public function execute()
    {
        $callback_data = $this->getUpdate()->getCallbackQuery()->getData();

        if (strpos($callback_data, 'basicpages') === 0) {
            return $this->handleBasicPages();
        }

        return Request::emptyResponse();
    }

    protected function handleBasicPages()
    {
        $callback_query = $this->getUpdate()->getCallbackQuery();
        $callback_data  = $callback_query->getData();

        // Get the page from the callback_data.
        $current_page = InlineKeyboard::getPageFromCallbackData($callback_data);

        return Request::editMessageText([
            'chat_id'      => $callback_query->getMessage()->getChat()->getId(),
            'message_id'   => $callback_query->getMessage()->getMessageId(),
            'text'         => BasicpagesCommand::getOutput($current_page),
            'reply_markup' => BasicpagesCommand::getPagination($current_page),
        ]);
    }
}

What would be nice to have changed to make this work even better:

Public static properties for commands, so that they can be accessed from everywhere, thus removing the requirement for getCallbackDataId()
It would be brilliant to add some kind of registerCallbackQueryHandler method to the default system CallbackqueryCommand class. This could allow adding handlers without having to copy the command and adding it to a custom commands folder.

Thoughts:
The way it is now, when on the first or last page, only 3 buttons get displayed.

Would it make sense to always display 5 if there are enough pages?
Also, what if there are 100 pages, should there be a second row of buttons for greater page jumps?

Your opinion!
Please give this a try and give me your feedback!

This is cool!
Will probably make doing stuff like this easier for people!
Some suggestions/ideas:

Maybe this could be modified to be a little more 'universal' so user could use alphabetical pagination?

Would be nice if we could have few types of button layouts to choose from! Like even simple ones:

‹
2
›

«
‹
›
»

In that case 'extended button layout':

Also, what if there are 100 pages, should there be a second row of buttons for greater page jumps?

Definitely!
Additional ideas/notes:

We could use this pagination with build-in commands: /help /chats etc
CallbackqueryCommand could be somehow modified so that other commands could 'register' itself in it so it could redirect to commands based on data (just like in GenericmessageCommand conversation feature) - just prefix data with something like "c11_page1", must be short to fit into 64-character limit

...so user could use alphabetical pagination?

What exactly do you mean by this? Letters instead of numbers?

button layouts

Brilliant, will see how to make this customisable :+1:

We could use this pagination with build-in commands: /help /chats etc

Yep!

CallbackqueryCommand could be somehow modified so that other commands could 'register' itself in it...

Exactly what I meant by registerCallbackQueryHandler, something like this:
CallbackqueryCommand::registerCallbackQueryHandler('pagination_command', 'myCallbackQueryHandler');

function myCallbackQueryHandler($callback_query)
{
    ...
}

...so user could use alphabetical pagination?
What exactly do you mean by this? Letters instead of numbers?

Yeah, sample use: sorting /chats by letters! No idea how hard this will be to achieve though!

Would be nice if we could have few types of button layouts to choose from! Like even simple ones

Added with https://github.com/akalongman/php-telegram-bot/pull/438/commits/6983b2c0461311f07bc1d2c5c1c93dd1b3d09b1b, by hiding certain buttons using a blank label.

Will leave this open for discussion for the moment, but I'll be moving this whole feature to a separate repo, as an add-on.
Found this neat project that I'll be extending:
https://github.com/lartie/Telegram-Bot-Pagination

New project: https://github.com/php-telegram-bot/inline-keyboard-pagination/


Please invite me to the Recode-Hive GitHub Community Organization

Name
CH Shivangi
Discord Username (if applicable)
shivangi_51686
Additional Context
Hi, I am one of the GSSoC contributors of 2024ext. I have learned a lot from your videos about GitHub and would like to continue with you guys to get more updates about GitHub.

Invitation sent to join the GitHub Organisation. Welcome to the community 🎉
Don't forget after accepting to make it public so it appears on your GitHub profile for everyone else to see. You can do this by finding your name in the GitHub organisation list and change the dropdown to public https://github.com/orgs/recodehive/people


Force a refresh of some CCs when a NIF is received but the node does not have a Lifeline Association

I have a GE wall toggle switch I am experimenting with.  I can change its value reliably, but when I use the switch manually, I do not get any "value updated" event on the node.
I am aware that some devices do not transmit when their values change, but in this case I believe this particular switch is doing so, as every time I change its state I get log output:
>18:04:57.724 SERIAL « 0x0110004984020a04100125277370867277bd                              (18 bytes)
18:04:57.725 SERIAL   Buffer := 0x0110004984020a04100125277370867277bd                    (18 bytes)
18:04:57.727 SERIAL » [ACK]                                                                   (0x06)
18:04:57.729 CNTRLR « [Node 002] Received updated node info
18:04:57.731 SERIAL   The receive buffer is empty, waiting for the next chunk...

In this case, node 2 is indeed the switch I am toggling, so something is being transmitted in response to the changing of the switch value,
I believe the switch is a "GE Z-Wave In-Wall Smart Light Switch", and it is connecting through an Aeotech Gen 5 usb receiver.

The log output you have shown is just a node information frame (NIF), which many devices send when they are woken up.
It might be that the controller needs to be assigned to the Lifeline association group to receive those updates. Is your device a Z-Wave+ device? Those should be automatically configured. Can you send me an excerpt of the cache file (cache/<something hexadecimal>.json)? The part under node 2 should be enough.

It's an older switch so its possible it doesn't.  It definitely sends an update every time I press the switch though, so perhaps that was throwing me off.
        "2": {
            "id": 2,
            "interviewStage": "Complete",
            "deviceClass": {
                "basic": 4,
                "generic": 16,
                "specific": 1
            },
            "isListening": true,
            "isFrequentListening": false,
            "isRouting": true,
            "maxBaudRate": 40000,
            "isSecure": false,
            "isBeaming": true,
            "version": 4,
            "commandClasses": {
                "0x25": {
                    "name": "Binary Switch",
                    "isSupported": true,
                    "isControlled": false,
                    "version": 1,
                    "values": [
                        {
                            "endpoint": 0,
                            "propertyName": "interviewComplete",
                            "value": true
                        },
                        {
                            "endpoint": 0,
                            "propertyName": "currentValue",
                            "value": false
                        }
                    ]
                },
                "0x27": {
                    "name": "All Switch",
                    "isSupported": true,
                    "isControlled": false,
                    "version": 0
                },
                "0x70": {
                    "name": "Configuration",
                    "isSupported": true,
                    "isControlled": false,
                    "version": 1
                },
                "0x72": {
                    "name": "Manufacturer Specific",
                    "isSupported": true,
                    "isControlled": false,
                    "version": 1,
                    "values": [
                        {
                            "endpoint": 0,
                            "propertyName": "interviewComplete",
                            "value": true
                        },
                        {
                            "endpoint": 0,
                            "propertyName": "manufacturerId",
                            "value": 99
                        },
                        {
                            "endpoint": 0,
                            "propertyName": "productType",
                            "value": 18770
                        },
                        {
                            "endpoint": 0,
                            "propertyName": "productId",
                            "value": 12338
                        }
                    ]
                },
                "0x73": {
                    "name": "Powerlevel",
                    "isSupported": true,
                    "isControlled": false,
                    "version": 0
                },
                "0x77": {
                    "name": "Node Naming and Location",
                    "isSupported": true,
                    "isControlled": false,
                    "version": 0
                },
                "0x86": {
                    "name": "Version",
                    "isSupported": true,
                    "isControlled": false,
                    "version": 1,
                    "values": [
                        {
                            "endpoint": 0,
                            "propertyName": "interviewComplete",
                            "value": true
                        },
                        {
                            "endpoint": 0,
                            "propertyName": "libraryType",
                            "value": 6
                        },
                        {
                            "endpoint": 0,
                            "propertyName": "protocolVersion",
                            "value": "3.40"
                        },
                        {
                            "endpoint": 0,
                            "propertyName": "firmwareVersions",
                            "value": [
                                "3.27"
                            ]
                        }
                    ]
                }
            }
        },

Ok that's definitely something I need to handle. Thanks for the info

@RoboPhred just to be sure - is there anything else in the log related to this node when you press a switch?

@RoboPhred I created a PR with a potential fix. Please change your dependency to AlCalzone/node-zwave-js#refreshValues and try with that version. You will have to install devDependencies and build the sources aswell:
cd node_modules/zwave-js
npm i
npm run build

The driver now checks when it receives a NIF if the node supports Z-Wave+. If not, it assumes that it won't receive updates from that node and refreshes all dynamic values, including the switch state. That logic will need some fine-tuning but I need to verify that this is somewhat correct behavior.

Installing that branch gives me a package that contains no code, just a config folder and package file.
NPM version 6.10.2
My guess is its being affected by the files entry in your package.json
  "files": [
    "build/**/*.js",
    "build/**/*.d.ts",
    "config/"
  ],

Ok then you'll need a bit more patience. I'm working on a rather large update that will a lot of configuration issues for a lot of devices. Afterwards, I'll include this PR.

I'll release version 2.0 soon. If you could test if that solves your problem, I would be happy.

I don't think this is entirely working.  With version 2.0.1, I cannot get any value updated events on this switch, and .getValue({commandClass: 0x25, endpoint: 0, property: "currentValue"}) only updates if I manually send a .get command on the command class.
When I change the switch manually, the following log output is generated:
10:37:34.262 SERIAL « 0x01                                                                 (1 bytes)
10:37:34.263 SERIAL   [incomplete] Buffer := 0x01                                          (1 bytes)
10:37:34.264 SERIAL « 0x10004984020a04100125277370867277bd                                (17 bytes)
10:37:34.264 SERIAL   Buffer := 0x0110004984020a04100125277370867277bd                    (18 bytes)
10:37:34.283 SERIAL » [ACK]                                                                   (0x06)
10:37:34.283 CNTRLR « [Node 002] Received updated node info
10:37:34.284 SERIAL   The receive buffer is empty, waiting for the next chunk...

No other effect occurs aside from this.  The value updated event never fires, and getValue shows no new value being received.

Alright, thanks for testing. I'll add some more logging specifically for this case. Once that is in, I'll let you know.

I think the problem is that I wasn't refreshing the values on every NIF, but only when the node state switches from asleep to awake.
I have released a beta version for you, where the the values are refreshed for every NIF, so hopefully that finally resolves this issue.
v2.1.2-beta.0 will be available shortly, please test with that version.

Hey @RoboPhred did you already have an opportunity to test v2.1.2-beta.0?

FYI: I've released this as part of v2.2.0

Closing for housekeeping purposes. Please reopen if this continues to be an issue