Kanban board

We're 2 people in the team and the Kanban board can be viewed in:
https://github.com/users/acolombo1/projects/5
The project folder is:
https://github.com/acolombo1/recipes

Hi team 👋 ,
Your project is complete!  There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉
Highlights

No linter errors 👍
Descriptive issue 💯

Optional suggestions

N/A
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.

Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.

As described in the Code reviews limits policy  you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

Approved


feat(module/history): add full configurability

While previusly configurable, it was inconsistent with other
configuration options and it was missing configurability of in memory /
on disc history size.
Signed-off-by: Shea690901<EMAIL_ADDRESS>

While zstyle definitions are usually supposed to be honored dynamically (without requiring zsh to be reloaded), we do use it to set global variables (which require zsh reload) anyway. Thus, we might support this configurability anyway.
@Shea690901, thank you for the PR! Can you please also update zpreztorc as well (with commented-out options) for visibility to the users?

Done!

Thank you @Shea690901!


[helm chart] "nifikop-" prefix causes certificate names to be too long

What steps will reproduce the bug?

Deploy via helm with the following values:

cluster:
  listenersConfig:
    internalListeners:
      - type: "https"
        name: "https"
        containerPort: 8443
      - type: "cluster"
        name: "cluster"
        containerPort: 6007
      - type: "s2s"
        name: "s2s"
        containerPort: 10000
    sslSecrets:
      tlsSecretName: "nifi-ssl-certs"
      create: true
  nameOverride: "nifi-cluster"
  pod:
    readinessProbe:
      tcpSocket:
        port: 6007
      initialDelaySeconds: 15
      periodSeconds: 10
    livenessProbe:
      tcpSocket:
        port: 6007
      initialDelaySeconds: 15
      periodSeconds: 10
  zkAddress: zookeeper:2181

Watch as nameOverride is ignored and certificates want to be created with the nikifop- prefix anyway:

{
  "level": "error",
  "time": "2024-09-09T22:16:05.286Z",
  "caller": "controller/controller.go:329",
  "msg": "Reconciler error",
  "controller": "nifiuser",
  "controllerGroup": "nifi.konpyutaika.com",
  "controllerKind": "NifiUser",
  "nifiUser": {
    "name": "nifikop-nifi-cluster-1-node.nifikop-nifi-cluster-headless.nifi.svc.cluster.local",
    "namespace": "nifi"
  },
  "namespace": "nifi",
  "name": "nifikop-nifi-cluster-1-node.nifikop-nifi-cluster-headless.nifi.svc.cluster.local",
  "reconcileID": "437f94fb-863c-46c3-a508-2ba28d2dfbbf",
  "error": "could not create user certificate: admission webhook \"webhook.cert-manager.io\" denied the request: spec.commonName: Toolong: must have at most 64 bytes",
  "stacktrace": "sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:227"
}

What is the expected behavior?
The nifikop- prefix is dropped from the naming scheme.
What do you see instead?
Watch as nameOverride is ignored and certificates want to be created with the nikifop- prefix anyway:
{
  "level": "error",
  "time": "2024-09-09T22:16:05.286Z",
  "caller": "controller/controller.go:329",
  "msg": "Reconciler error",
  "controller": "nifiuser",
  "controllerGroup": "nifi.konpyutaika.com",
  "controllerKind": "NifiUser",
  "nifiUser": {
    "name": "nifikop-nifi-cluster-1-node.nifikop-nifi-cluster-headless.nifi.svc.cluster.local",
    "namespace": "nifi"
  },
  "namespace": "nifi",
  "name": "nifikop-nifi-cluster-1-node.nifikop-nifi-cluster-headless.nifi.svc.cluster.local",
  "reconcileID": "437f94fb-863c-46c3-a508-2ba28d2dfbbf",
  "error": "could not create user certificate: admission webhook \"webhook.cert-manager.io\" denied the request: spec.commonName: Toolong: must have at most 64 bytes",
  "stacktrace": "sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:227"
}

Possible solution
No response
NiFiKop version
v1.10.0
Golang version
Whatever is bundled with the container image
Kubernetes version
Client Version: v1.29.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.7-gke.1104000
NiFi version
No response
Additional context
The docs say:

When using cert-manager Issuer, please make sure that the hostname (default clusterName-id-node.namespace.svc.cluster.local) for the nodes in cluster is 64 bytes or less, otherwise the webhook of cert-manager will fail. You can try to use shorter name for NiFiCluster or modify nodeUserIdentityTemplate to keep the name length under 64 bytes.

When setting cluster.nodeUserIdentityTemplate to the suggested value of "node-%d-", the creation of the certificates/secrets fail because it cannot end in -. When removing the trailing -, the certificate gets created but the pod names are missing the last - between the name of the pod and the unique identifier.

The Certificate couldn't be created because the name of it is too long.
"could not create user certificate: admission webhook \"webhook.cert-manager.io\" denied the request: spec.commonName: Toolong: must have at most 64 bytes

The Certificate couldn't be created because the name of it is too long.
"could not create user certificate: admission webhook \"webhook.cert-manager.io\" denied the request: spec.commonName: Toolong: must have at most 64 bytes

Correct, that is why I opened the issue. The name is too long and the nifikop- inclusion in every resource name should be trimmed, but nameOverride isn't working.
As it stands, the certificate that it wants to create is 80 characters long. If we remove the prefix, from both places where it shows up (nifikop-nifi-cluster-1-node.nifikop-nifi-cluster-headless.nifi.svc.cluster.local) it brings the character count down to 64 (nifi-cluster-1-node.nifi-cluster-headless.nifi.svc.cluster.local).
If nameOverride doesn't modify the names of the resources being created (suppressing the prefix) then what would be the configuration required so that it does?

The Certificate couldn't be created because the name of it is too long.
"could not create user certificate: admission webhook \"webhook.cert-manager.io\" denied the request: spec.commonName: Toolong: must have at most 64 bytes

Correct, that is why I opened the issue. The name is too long and the nifikop- inclusion in every resource name should be trimmed, but nameOverride isn't working.
As it stands, the certificate that it wants to create is 80 characters long. If we remove the prefix, from both places where it shows up (nifikop-nifi-cluster-1-node.nifikop-nifi-cluster-headless.nifi.svc.cluster.local) it brings the character count down to 64 (nifi-cluster-1-node.nifi-cluster-headless.nifi.svc.cluster.local).
If nameOverride doesn't modify the names of the resources being created (suppressing the prefix) then what would be the configuration required so that it does?

In the Helm chart the, the name of the cluster is name: {{ include "nifi-cluster.fullname" . }}.
And nifi-cluster.fullname take as value:
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "nifi-cluster.fullname" -}}
{{- if .Values.cluster.fullnameOverride }}
{{- .Values.cluster.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.cluster.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

And the result is that if nameOverride doesn't contain the Helm release name (here nifikop) we add it as prefix.
But instead of  nameOverride, you could set fullnameOverride which doesn't depend on the release name and will be used as it is.

That worked, thank you!


Doesn't repeat credentials request after unsuccessful login attempt to remote repo

Hi! Thanks for reporting this feature/bug/question!
Please keep / fill in the relevant info from this template so that we can help you as best as possible.
Type (choose one): Bug
NPE version: 6.0.64+c118e46e01
OS version: Windows 10)
Installed from: Microsoft Store
In case of a BUG:

What is the current result? After unsuccessful attempt to load remote package source (when login failed due to wrong password two times) the application gives a communicate (yellow ribbon at the bottom) "Unable to load the service for source...." and no more action is taken. Restarting the app doesn't change anything.
What is the expected result? The app should repeat login request (gitlab in this case)
Are there any workarounds? no

Hi!
I have the same issue, it was installed from Microsoft Store and I deleted almost all registers from regedit, the result was the same.

Same issue. The workaround is to remove the credentials from the Windows Credentials Manager, and then restart Package Explorer


bottom_from draw option doesn't update the rest of the pile with their new position

This causes problems on the front end.

It might be useful to make this a generic property for an interaction.  THere are a number of cards that target the bottom of piles (scissors, plumbing, etc.)

Yup! This would be a generic behavior whenever bottom_from is being used.

oh, i didn't realize it opens up that avenue as well...very interesting.

So I just tested chopsticks and the database state looks fine to me and also I'm not getting any frontend errors. I'm not sure how to replicate the issue you were seeing.


Fixed SI units for current consumption (smappee component)

Total consumption should be in kWh. not kW.

Hi @vandenberghev,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

Breaking change:
The unit of measurement of the consumptions were changed to kWh.


A11y_Deploymentconfigurationtemplate_Usability:Unclear finctionality of the "1" button for screen reader users

GitHubTags: #A11y_AzureDataStudio;#A11yUsable; #A11yTCS;#SQL Azure Data Studio;#DesktopApp;#Win32;#NVDA;
Application Name: Azure Data Studio
Version: 1.12.0-insider (user setup)
Commit:6582debd7388b1be512fc3a9b956d3e54f6115e7
Date: 2019-10-03T08:56:27.454Z
VS Code: 1.38.0
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362
Additional Details:
Tool Name : Keyboard
Steps to Reproduce:

Install /Launch the application Azure data studio.
Navigate to connections and click on more action button.
Select “Deploy SQL Server big data cluster” from more action drop down.
Click on “Deploy SQL Server big data cluster” .
Navigate to step 1 button.
Actual:
While navigating a content through tab navigation screen reader announce the button as 1 but after activating the same no any predictions are identified clearly for screen reader users as well as focus remains on the same control.
Expected:
After activating the same no any predictions are identified clearly for screen reader users as well as focus remains on the same control.
User Impact:
Screen reader users finds difficult to identify the input purpose as well as functionality associated with it.
Attachment for Reference:
7945_A11y_Usability_Deploymentconfigurationtemplate.pptx

Does this issue occur when all extensions are disabled?: Yes

this is for Grade B (Usability), i am going to leave this open until we are planning to get to level B.

closing as won't fix since this is not accessibility grade c blocker.

Science this is usability issue we can not take any action at this point of time.


fixed splitting stopping after 18 missions

Currently if you do more than 18 missions (the amount that have setting defined) the autosplitter will stop splitting. This change should make it so it will continue after this point, though you can no longer disable splits.
It launches fine when I add it in the scriptable autosplitter component, but I have yet to test in a full run, can do that if you want.

code looks good -- i'll get around to redesigning the entire autosplit system at some point hopefully, but for now this is all fine


Use 'std::optional' in 'transientContext'

Similarly to #2448, should not change any visible behavior. This PR just reduces some allocations.

SFMLBuildMaster: Build this please.

SFMLBuildMaster: Build this please.


usage as a library; improve documentation?

I don't use any of the supported frameworks.
Are there any docs/examples how to use the module as a library?
I looked a bit at the code and from what i understand one has to do something like:

write a strategy class
write a storage class
use the auth/login/disconnect methods in social.actions

But to do that, i think i have to reverse engineer one of the supported framework in social.apps..
.

@jandob Did you end up pursuing this further?  I'm considering a similar usage.  Thanks!

@dcmoore-gd
No sorry, not much more than the gist i posted, but i think you could build on that.

Incidentally, if anyone comes across this thread, I did end up using it like a library as well, though a bit differently than the gist above.  I identified a few minor changes to python-social-auth that would make this easier for us and others to do, so will try to contribute some of that as time allows.

The recent split into smaller components should make the support for this more straightforward and clean, I'm sure it's not 100% ready to do so, but in it should be possible.


--submission_information - how to use?

Hi there,
I want to use deliver through the command line (not using a Deliverfile or Fastfile).
There's an option for --submission_information, and the docs say to provide a hash. I've tried the following but the Ruby script sees it as a string, rather than a hash. Any way to add these properties through the command line?
fastlane deliver --username <USERNAME> --app_identifier <APP_ID> --ipa <IPA LOCATION> --submit_for_review --force --metadata_path <METADATA_PATH> --skip_screenshots --submission_information "{add_id_info_limits_tracking: true, add_id_info_serves_ads: true, add_id_info_tracks_action: true, add_id_info_tracks_install: true, add_id_info_uses_idfa: false, content_rights_has_rights: true, content_rights_contains_third_party_content: false, export_compliance_platform: 'ios', export_compliance_compliance_required: false, export_compliance_encryption_updated: false, export_compliance_app_type: nil, export_compliance_uses_encryption: false, export_compliance_is_exempt: false, export_compliance_contains_third_party_cryptography: false, export_compliance_contains_proprietary_cryptography: false,  export_compliance_available_on_french_store: false}"
I get the following error after the app has been uploaded and metadata successfully changed:
.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.9.0/deliver/lib/deliver/submit_for_review.rb:18:in submit!': [!] undefined method each' for #<String:0x007ff08145b108> (NoMethodError)

@markerpen  i am not sure if hash'es are supported on commandline.
what's the reason you cant use a fastfile and/or a deliverfile - maybe we find a way to solve your issues?

Hi @hjanuschka thanks for the reply. I'm working on a non-standard setup (Xamarin on multiple Macs) and I'd like to keep my projects 'portable'. I'd use a deliverfile but there doesn't seem to be a way to get fastlane to choose an arbitary path for the deliverfile - since I'm using fastlane/deliver as part of a larger pipeline I need to use it via the command line.
Is there any way to make fast lane use an arbitary path for fast/deliverfiles?

hey @markerpen
ok i got you, i have pretty much the same requirements for my apps 👍
my fastfile inside one app is usually has 4-6 lines .
i think you have the following options:
import_from_git
this is my preffered solution for a situation like this.
create git repo (this has to be accessable by all consumers of the fastfile).
put a  fastlane/Fastfile in it.
in that "shared fastfile"  you define your lanes.
keep in mind to use variables for dynamic things.
e.g.:
"Shared" Fastfile:
lane :beta do
   match(app_identifiers: $app_identifiers)
   gym(scheme: $app_scheme)
   deliver(submission_information: $submission_info)
end

and inside your projects Fastfile do it like this:
$app_identifiers = ["demo.app", "demo.app.watchkitextension"]
$app_scheme = "Scheme"
$submission_info = {
..
..
}

import_from_git(url: "http://yourgitrepo.com/repo")

use env vars
export MY_SUBMISSION_INFORMATION = "{add_id_info_limits_tracking: true, add_id_info_serves_ads: true, add_id_info_tracks_action: true, add_id_info_tracks_install: true, add_id_info_uses_idfa: false, content_rights_has_rights: true, content_rights_contains_third_party_content: false, export_compliance_platform: 'ios', export_compliance_compliance_required: false, export_compliance_encryption_updated: false, export_compliance_app_type: nil, export_compliance_uses_encryption: false, export_compliance_is_exempt: false, export_compliance_contains_third_party_cryptography: false, export_compliance_contains_proprietary_cryptography: false, export_compliance_available_on_french_store: false}"
Fastfile:
deliver(submission_information: JSON.parse(ENV["MY_SUBMISSION_INFORMATION"]))

hack around it
before calling fastlane do a shell command:
echo "{add_id_info_limits_tracking: true, add_id_info_serves_ads: true, add_id_info_tracks_action: true, add_id_info_tracks_install: true, add_id_info_uses_idfa: false, content_rights_has_rights: true, content_rights_contains_third_party_content: false, export_compliance_platform: 'ios', export_compliance_compliance_required: false, export_compliance_encryption_updated: false, export_compliance_app_type: nil, export_compliance_uses_encryption: false, export_compliance_is_exempt: false, export_compliance_contains_third_party_cryptography: false, export_compliance_contains_proprietary_cryptography: false, export_compliance_available_on_french_store: false}" > this_app.json

inside your fastlane:
deliver(submission_information: JSON.parse(File.read("this_app.json")))

all options have pro and cons (e.g.: global $ variables....)
let me know if there is suitable way for you in the suggestions.

Is there any way to make fast lane use an arbitary path for fast/deliverfiles?
i don't think so, but its a good idea.

Going to close this issue for now as it seems like @hjanuschka's work around could be a great solution to the problem. Feel free to comment and keep conversation going here and we will reopen it if necessary! 🐙


Participating in hacktoberfest?

I was wondering if this project was participating in hacktoberfest? I see that some of the other repositories within the DataDog organization are but not arguably the core project. In order to participate in hacktoberfest, I believe it's a matter of adding a topic to the project named hacktoberfest.

Thanks for asking!
While we welcome anyone's participation in the repository, it's not especially well-suited to the kinds of contributions involved in hacktoberfest -- there aren't a lot of "issues that have a well-defined scope and are self-contained", to quote the hacktoberfest docs.
As you've noted, several other DD repositories are well-suited, so I'm glad to hear they're participating!


unkown flag config

➜  weaviate git:(master) ✗ go run ./cmd/weaviate-server/main.go --scheme=http --port=8080 --host=<IP_ADDRESS> --config="dummy"
unknown flag `config'
exit status 1

According to CONTRIBUTE.md one should run this. But it does not work.

Fixed.


Problem with NFDi_UTF8_Strlen and char

This code will not work properly:
else if (str[i] >> 6 == 2)
because for non-ascii char the value will actually be negative. For bitshift operation char will be promoted to negative int with all 3 upper bytes having all their bits set to 1. So the result will be some large value, not 2.
This code will work:
else if (((str[i] >> 6) & 0x3) == 2)
Bit mask is your friend ;)

Resolved, thanks

Resolved, thanks


Bias term left as pytorch nn.Parameter

Description and motivation
At present, when the bias term is requested from the layers, an additional column in the rpu_tile is created and the biases are updated during the analog backward pass, which add noise and non-idealities typical of the analog devices. In some hardware design it may be desirable to compute the bias in digital, as it would improve the overall network accuracy.
Proposed solution
Now the bias can be either compute in the analog rpu_tile or left as pytorch nn.Parameter. This behavior can be controlled by setting the digital_bias parameter of the layers to True.

Addressed in #307


Merging Aarex's bugfixes onto my branch, take 2.

There is a bug in NG-5 (the version we are devving) that makes it as if we are in EC7. Aarex's branch has the bug that the infinity dimension reset logic is not correctly implemented. both have bugs, but the bugs on Aarex's branch should be easier to fix.

Not to future self: you can bypass the whole pull request mumbo-jumbo by doing git checkout v3.0-Respecced and then git pull git://github.com/aarextiaokhiao/IvarK.github.io.git v3.0-Respecced. resolve conflicts, then merge the changes.


controllers: fix status of StorageSystemInvalid

Fix the bug where the status of StorageSystemInvalid condition is
always in the Unknown state.
  - lastHeartbeatTime: "2021-09-02T06:41:10Z"
    lastTransitionTime: "2021-09-02T06:41:10Z"
    message: Initializing StorageSystem
    reason: Init
    status: Unknown

Signed-off-by: Nitin Goyal<EMAIL_ADDRESS>

/override ci/prow/odf-operator-bundle-e2e-aws


test Design Group

https://strusoft.fogbugz.com/f/cases/121605/StruXML-Design-groups

[ ] Color => which formatting is it using?

[ ] add possibility to create a custom family that FEM-Design can use for optimising the section
[ ] there should be an option where we specify which element we want to optimise


Add Span.IsSliceOf; addresses #827

Fix tests; fix offset bug
Fix overflow case; use ToPointer() for the left hand bounds check (hard to use for the right, as need to avoid overflow  condition)

Hi @mgravell, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.
TTYL, DNFBOT;

Note some initial feedback and discussion in https://github.com/dotnet/corefxlab/pull/829 - but github/git went  south on that one

Nasty edge case to consider: misaligned pointers; can be "inside" a parent yet not be a true slice. Should return false. Suggestion: in ptr case, subtract starts and check % size === 0 (subtract to avoid two %)

Otherwise looks good.

The choice of start here was to match the parameter name that would have
been passed to Slice. I don't actually have strong views, but that was my
reasoning: consistency.
On 23 Sep 2016 4:05 a.m., "Krzysztof Cwalina"<EMAIL_ADDRESS>wrote:

@KrzysztofCwalina commented on this pull request.
In src/System.Slices/System/Span.cs
https://github.com/dotnet/corefxlab/pull/830#pullrequestreview-1052076:

   public unsafe bool IsSliceOf(Span<T> parentSpan)

   {

       var elementSize = PtrUtils.SizeOf<T>();

       ulong parentStart = parentSpan.Offset.ToUInt64(), thisStart = Offset.ToUInt64();

       return Object == parentSpan.Object // either both pointers (both null), or same array instance

           && parentStart <= thisStart // parent must start earlier (or equal start)

           && (parentStart + ((ulong)parentSpan.Length * (ulong)elementSize)) // parent must  end later (or equal end)

               >= (thisStart + ((ulong)Length * (ulong)elementSize))

           && (Object != null || (((thisStart - parentStart) % (ulong)elementSize) == 0)); // pointer spans must have equal alignment

   }

   /// <summary>

   /// Determines whether the current span is a slice of the supplied span

   /// </summary>

   [MethodImpl(MethodImplOptions.AggressiveInlining)]

   public bool IsSliceOf(Span<T> parentSpan, out int start)

I would call the parameters: parent and atParentIndex. What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dotnet/corefxlab/pull/830#pullrequestreview-1052076,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABDsAyQ7KyD17-UyBZZnalZnXA2feEsks5qs0ILgaJpZM4KBnxs
.

Suggest this moves to Memory<T> (see #844) - this does not have the same concerns re 2-field vs 3-field impl. Code exists as is awaiting review in "Channels".

@mgravell, do you still want to merge this?

@dotnet-bot test this

@KrzysztofCwalina that depends a bit on the conclusion of #827 - such as your comment https://github.com/dotnet/corefxlab/issues/827#issuecomment-249920263 ; I also need to fix the  same overflow bug that I fixed for Span<T>  in general, but wanted to bottom out the key questions first:

should it (IsIndexOf) exist?
if so, on which type?

@mgravell, can you provide an update on this?

@KrzysztofCwalina that depends a bit on the conclusion of #827 - such as your comment https://github.com/dotnet/corefxlab/issues/827#issuecomment-249920263 ; I also need to fix the  same overflow bug that I fixed for Span<T>  in general, but wanted to bottom out the key questions first:

should it (IsIndexOf) exist?
if so, on which type?

We have an IndexOf API on Span. What do you mean by IsIndexOf?

are you asking about IsIndexOf? or IsSliceOf? I was talking about IsSliceOf

by which I mean: given spans x and y, is there a combination of
parameters for which x === y.Slice(something) - i.e x is entirely contained
within (including on the borders) y, and has the same alignment.

Should it exist? I don't know; but it would have helped some scenarios I
had at the time
On 14 March 2017 at 00:40, Ahson Ahmed Khan<EMAIL_ADDRESS>wrote:

@mgravell https://github.com/mgravell, can you provide an update on
this?
@KrzysztofCwalina https://github.com/KrzysztofCwalina that depends a
bit on the conclusion of #827
https://github.com/dotnet/corefxlab/issues/827 - such as your comment #827
(comment)
https://github.com/dotnet/corefxlab/issues/827#issuecomment-249920263 ;
I also need to fix the same overflow bug that I fixed for Span in
general, but wanted to bottom out the key questions first:

should it (IsIndexOf) exist?
if so, on which type?

We have an IndexOf API on Span. What do you mean by IsIndexOf?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dotnet/corefxlab/pull/830#issuecomment-286287305, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AABDsCccRsQ211DCdrbX4uaq12nEwaiWks5rleIDgaJpZM4KBnxs
.

--
Regards,
Marc

I don't know; but it would have helped some scenarios I had at the time

Is the scenario still relevant for you? Looking at Krzysztof's comments above, IsSliceOf as an API addition was approved.
@KrzysztofCwalina, is this something we want to discuss as part of https://github.com/dotnet/corefxlab/issues/1292 or can we defer it to the future?

@mgravell, a similar API proposal to this got started here: https://github.com/dotnet/corefx/issues/17793
Do you want to rework this PR and merge?

similar but different semantics; one is a total containmebt check (plus
alignment), the other is an "any intersection" check. I don't see how the
two cab be squares. "Overlaps" would not address my intended scenario.
On 4 Apr 2017 2:07 a.m., "Ahson Ahmed Khan"<EMAIL_ADDRESS>wrote:

@mgravell https://github.com/mgravell, a similar API proposal to this
got started here: dotnet/corefx#17793
https://github.com/dotnet/corefx/issues/17793
Do you want to rework this PR and merge?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dotnet/corefxlab/pull/830#issuecomment-291357746, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AABDsI9nH4sPHalilALl3q3Bb67-J7_Eks5rsZftgaJpZM4KBnxs
.

@"Overlaps" would not address my intended scenario.
Got it. can you resolve the merge conflicts and move the API to https://github.com/dotnet/corefxlab/blob/master/src/System.Buffers.Experimental/System/Buffers/BufferExtensions.cs so we can merge?

Will do
On 4 Apr 2017 7:31 p.m., "Ahson Ahmed Khan"<EMAIL_ADDRESS>wrote:

@"Overlaps" would not address my intended scenario.
Got it. can you resolve the merge conflicts and move the API to
https://github.com/dotnet/corefxlab/blob/master/src/
System.Buffers.Experimental/System/Buffers/BufferExtensions.cs so we can
merge?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dotnet/corefxlab/pull/830#issuecomment-291591488, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AABDsBv0v4BubpQndiOdeIwEtavwWSzuks5rsoydgaJpZM4KBnxs
.

@ahsonkhan  I've whacked some changes together, but I've been unable to run the test suite:
c:\code\corefxlab\tests\System.Buffers.Experimental.Tests>dotnet test
Build started, please wait...
Build completed.

Test run for c:\code\corefxlab\tests\System.Buffers.Experimental.Tests\bin\Debug\netcoreapp2.0\System.Buffers.Experimental.Tests.dll(.NETCoreApp,Version=v2.0)
Microsoft (R) Test Execution Command Line Tool Version <IP_ADDRESS>
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
Testhost process exited with error: A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'c:\code\corefxlab\tests\System.Buffers.Experimental.Tests\bin\Debug\netcoreapp2.0'.

So... it might work? (waits quietly for the CI build) Is anyone able to advise on what that means and how to fix that? (@davidfowl maybe?)
Note it would have been easier to implement in System.Memory, but...  That has resolved the issue you are seeing whenever I ran into it. Also, I am not sure what version of dotnet you have installed, so it is best to use the one that gets installed by the build script (in the dotnet directory at root of the repo).
So, run (in c:\code\corefxlab\tests\System.Buffers.Experimental.Tests>):
....\dotnet\dotnet.exe restore
....\dotnet\dotnet.exe test
Let me know if you continue to see issues that are blocking you.
If you don't have a dotnet directory, run build.cmd at the root first, which brings down the cli.

@nietras, you requested changes in your review. Is the PR good to go now?

@ahsonkhan suggestions implemented (or explanatory note added to review, as appropriate)

@ahsonkhan the GC issue should be gone, and as far as I can tell this code should work, but on the surface it could perhaps be made more efficient/faster. This doesn't seem to be a priority though, given the unused out parameter for some cases and so forth.
If you like I can try to give the impl an optimization pass, but the code will be a little more involved.

If you like I can try to give the impl an optimization pass, but the code will be a little more involved.

Do you want to address that as a separate PR on top of this once we merge this in? Feel free to file an issue/submit a PR.

Sure, that works for me. Although, I am sure @mgravell can do these too 😉

cc @KrzysztofCwalina, good to go?

@mgravell, I think it would be best to move the changes from this PR (along with the discussion and API review/etc) to corefx with the rest of the Span APIs and discussion. In efforts to productize and prepare for shipping, we moved Span to System.Memory.
I think we should also consider consolidating this API with Overlaps (especially given: https://github.com/dotnet/corefx/issues/17793#issuecomment-296126120)
Thoughts?

@nietras you say "the GC issue should be gone, and as far as I can tell this code should work" - I haven't reworked anything re the issue that @ektrah  raised; is it your view that it is OK "as is"? I'm happy to rework it to only compare the starts via byte-offset, and do everything else with length checks - that will avoid the issue. Let me know.

@ahsonkhan ah, fair enough - that makes sense

happy to rework it to only compare the starts via byte-offset

@mgravell if you are happy to do this, then I would change this to only do a single Unsafe.ByteOffset and compute the rest from that, this completely avoids any issues, since refs are only compared once.
I had something like this in mind, completely untested...
private unsafe static bool IsSliceOf<T>(ref T childRef, int childLength, ref T parentRef, int parentLength, out int start) where T : struct
{
    IntPtr nativeByteOffset = Unsafe.ByteOffset(ref parentRef, ref childRef);
    // TODO: Rewrite to use nint if/when C# supports this, see https://github.com/dotnet/corefxlab/issues/1471
    if (sizeof(int) == sizeof(IntPtr))
    {
        int byteOffset = (int)nativeByteOffset;
        int elementSize = Unsafe.SizeOf<T>();

        if (byteOffset >= 0 && // child must start at or later than parent start
            (childLength * elementSize + byteOffset) <= (parentLength * elementSize) && // chilld end must be before or at parent end
            byteOffset % elementSize == 0) // must have equal alignment to T
        {
            start = byteOffset / elementSize;
            return true;
        }
    }
    else
    {
        long byteOffset = (long)nativeByteOffset;
        long elementSize = Unsafe.SizeOf<T>();

        if (byteOffset >= 0 && // child must start at or later than parent start
            (childLength * elementSize + byteOffset) <= (parentLength * elementSize) && // chilld end must be before or at parent end
            byteOffset % elementSize == 0) // must have equal alignment to T
        {
            start = (int)(byteOffset / elementSize);
            return true;
        }
    }
}

as far as I can tell this should save an addition and a subtract. Maybe... 😄 If the duplicate code is worth it is a good question, as soon as we get nint support this can be rewritten using that.

@mgravell I don't think there is any reason to constrain this to where T: struct either.

one might rewrite to avoid a multiplication and modulo:
private unsafe static bool IsSliceOf<T>(ref T childRef, int childLength, ref T parentRef, int parentLength, out int start) where T : struct
{
    IntPtr nativeByteOffset = Unsafe.ByteOffset(ref parentRef, ref childRef);
    // TODO: Rewrite to use nint if/when C# supports this, see ???
    if (sizeof(int) == sizeof(IntPtr))
    {
        int byteOffset = (int)nativeByteOffset;
        int elementSize = Unsafe.SizeOf<T>();

        if (byteOffset >= 0) // parent must start earlier (or equal start)
        {
            var elementOffset = byteOffset / elementSize;
            if ((childLength + elementOffset) <= parentLength) // parent must end later (or equal end)
            {
                if ((byteOffset - elementOffset * elementSize) == 0) // must have equal alignment re T
                {
                    start = elementOffset;
                    return true;
                }
            }
        }
    }
    else
    {
        long byteOffset = (int)nativeByteOffset;
        long elementSize = Unsafe.SizeOf<T>();

        if (byteOffset >= 0) // parent must start earlier (or equal start)
        {
            var elementOffset = byteOffset / elementSize;
            if ((childLength + elementOffset) <= parentLength) // parent must end later (or equal end)
            {
                if ((byteOffset - elementOffset * elementSize) == 0) // must have equal alignment re T
                {
                    start = (int)elementOffset;
                    return true;
                }
            }
        }
    }
}

this might be a bit paranoid 🙄 And probably depends on which path is the most common and so forth. Needs perf testing.

@nietras - Note that childRef >= parentRef is not the same as (nint)(childRef - parentRef) >= 0 in two's complement arithmetic modulo 28*IntPtr.Size.

@ektrah just to be sure are you referring to the issue with e.g. for 32-bit.
childRef    = 0xFFFFFFFD;
parentRef = 0x0000000D;
var diff = childRef - parentRef = 0xFFFFFFF0;

and diff then being negative when seen as a nint, because yes that could be a problem... one that might require we have to add something to Unsafe...

@nietras - Yes, exactly. I think I solved that problem in my Overlaps implementation, but it would be good to have more eyes looking at that.

@ektrah are you referring to the implemention using fixed or the two ByteOffsets? Because the two ByteOffsets aren't "safe" either.
In fact, after given this some thought I can only come to the conclusion that we need to pin here. Given that ByteOffset(ref, ref) is ambiguous and needs to be qualified with another operation e.g. IsGreaterThan(ref, ref), then this means we need two do two operations on two "variables" that can be changed at any time by another thread. Which means we have to do the equivalent of a "lock" but for GC i.e. we need to pin.
Pinning isn't a big issue, and the implementation will be easier since we can just do byte* arithmetic, so we should probably just do that. I don't know why I dismissed the overflow/underflow issue initially and thought a single ByteOffset call would be enough, but can't see how it can be. Even given the constraints we have here:

Only spans over managed memory can move.
Spans overlapping will always be part of the same managed array or be native memory.
Spans overlapping can, therefore, never move to no longer be overlapping, since the underlying managed array as a whole will move.

I thought, these constraints might help us to do this with just a single "compare" of the two refs.
We might ask jkotas or someone to chime in and whether they agree, but perhaps any of you have some thoughts here?

@nietras - Sorry for being unclear. I meant this one: https://github.com/dotnet/corefx/pull/18731

As jkotas comments this isn't safe. The spans underlying memory can move
inbetween the two ByteOffset calls.
On Apr 24, 2017 7:43 PM, "ektrah"<EMAIL_ADDRESS>wrote:

@nietras https://github.com/nietras - Sorry for being unclear. I meant
this one: dotnet/corefx#18731
https://github.com/dotnet/corefx/pull/18731
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dotnet/corefxlab/pull/830#issuecomment-296765364, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKTG72HM9JIW2812eN4oKq_UA-aYA1qjks5rzN9AgaJpZM4KBnxs
.

@nietras - I see three ByteOffset calls:
IntPtr firstByteCount = Unsafe.ByteOffset(ref firstRef, ref Unsafe.Add(ref firstRef, first.Length));
IntPtr secondByteCount = Unsafe.ByteOffset(ref secondRef, ref Unsafe.Add(ref secondRef, second.Length));

IntPtr diff = Unsafe.ByteOffset(ref firstRef, ref secondRef);

The first two should be safe under the assumption that the GC updates the two refs involved in each case (e.g., firstRef and firstRef + first.Length) atomically.
The third should be safe under the assumption that an overlapping span cannot become non-overlapping.

Yes, except that the third call is ambiguous due to the overflow issue like
for IsSliceOf. The 'diff' isn't clear. That's why.
Basically the two first ByteOffset calls are an "abuse" of this to get the
length in bytes. As you can see in my changes to ByteOffset I removed that,
to make it clear when we are really comparing the two refs.
On Apr 24, 2017 7:57 PM, "ektrah"<EMAIL_ADDRESS>wrote:
@nietras https://github.com/nietras - I see three ByteOffset calls:
IntPtr firstByteCount = Unsafe.ByteOffset(ref firstRef, ref
Unsafe.Add(ref firstRef, first.Length));IntPtr secondByteCount =
Unsafe.ByteOffset(ref secondRef, ref Unsafe.Add(ref secondRef,
second.Length));
IntPtr diff = Unsafe.ByteOffset(ref firstRef, ref secondRef);
The first two should be safe under the assumption that the GC updates the
two refs involved in each case (e.g., firstRef and firstRef + first.Length)
atomically.
The third should be safe under the assumption that an overlapping span
cannot become non-overlapping.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dotnet/corefxlab/pull/830#issuecomment-296770544, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKTG7yWXyjLqaPW-ChwboZUL6-V3eZEIks5rzOJ5gaJpZM4KBnxs
.

So my first comment on the overlaps code you referred to was wrong, sorry.
Misread.
On Apr 24, 2017 8:02 PM, "Niels Rasmussen"<EMAIL_ADDRESS>wrote:

Yes, except that the third call is ambiguous due to the overflow issue
like for IsSliceOf. The 'diff' isn't clear. That's why.
Basically the two first ByteOffset calls are an "abuse" of this to get
the length in bytes. As you can see in my changes to ByteOffset I removed
that, to make it clear when we are really comparing the two refs.
On Apr 24, 2017 7:57 PM, "ektrah"<EMAIL_ADDRESS>wrote:
@nietras https://github.com/nietras - I see three ByteOffset calls:
IntPtr firstByteCount = Unsafe.ByteOffset(ref firstRef, ref Unsafe.Add(ref firstRef, first.Length));IntPtr secondByteCount = Unsafe.ByteOffset(ref secondRef, ref Unsafe.Add(ref secondRef, second.Length));
IntPtr diff = Unsafe.ByteOffset(ref firstRef, ref secondRef);
The first two should be safe under the assumption that the GC updates the
two refs involved in each case (e.g., firstRef and firstRef + first.Length)
atomically.
The third should be safe under the assumption that an overlapping span
cannot become non-overlapping.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dotnet/corefxlab/pull/830#issuecomment-296770544, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKTG7yWXyjLqaPW-ChwboZUL6-V3eZEIks5rzOJ5gaJpZM4KBnxs
.

The first two ByteOffset calls can be replaced with (nuint)first.Length * (nuint)Unsafe.SizeOf<T>() if the assumption is wrong.
The overflow issue for the third ByteOffset is a bit tricky. The solution is that I don't do (nint)diff > 0 but interpret diff as an unsigned integer. Give it a try. I haven't found a case where it gives incorrect results, but maybe you see something that I don't see.

Just copying the code here for completeness.
if (second.IsEmpty) return false;

ref T firstRef = ref first.DangerousGetPinnableReference();
ref T secondRef = ref second.DangerousGetPinnableReference();

IntPtr firstByteCount = Unsafe.ByteOffset(ref firstRef, ref Unsafe.Add(ref firstRef, first.Length));
IntPtr secondByteCount = Unsafe.ByteOffset(ref secondRef, ref Unsafe.Add(ref secondRef, second.Length));

IntPtr diff = Unsafe.ByteOffset(ref firstRef, ref secondRef);

return (sizeof(IntPtr) == sizeof(int))
  ? (uint)diff < (uint)firstByteCount || (uint)diff > (uint)-(int)secondByteCount
  : (ulong)diff < (ulong)firstByteCount || (ulong)diff > (ulong)-(long)secondByteCount;

interpret diff as an unsigned integer. Give it a try. I haven't found a case where it gives incorrect results

Ha yeah I can't find a fault in this either... yet 😉 not sure I completely follow here. Perhaps I should just ask what your reasoning is here for the (uint)diff < (uint)firstByteCount || (uint)diff > (uint)-(int)secondByteCount? How does this handle the different overlap cases?

The first two ByteOffset calls can be replaced with (nuint)first.Length * (nuint)Unsafe.SizeOf() if the assumption is wrong.

The assumption isn't wrong it's just abuse due to lack of proper nuint support I assume, this has extra addition + subtraction to compute the byte counts instead of just computing the byte counts as a single multiplication. But it's not wrong.

@nietras - I've added an example: https://github.com/dotnet/corefx/pull/18731#issuecomment-296856781

Apparently, I was too tired yesterday to think straight. Building on @ektrah https://github.com/dotnet/corefx/pull/18731#issuecomment-296856781 we can do the same math for a ContainsSlice method i.e. IsSliceOf, but where x is parent and y is child.
@ektrah if you would please review this that would be great 😃 Note that the code will return true even if child has length zero, as far as I can see, but in my view that would be correct. Zero length spans contained within a parent should return true. The same question applies to Overlaps should this return true or false if one of the spans has zero length but is contained within the other? I think true since this allows for zero lengths to be treated as valid. Which they are.
Let's say we have two spans, x and y. Let
ref T xRef    = x.DangerousGetPinnableReference();
nuint xLength = x.Length * (nuint)Unsafe.SizeOf<T>();
ref T yRef    = y.DangerousGetPinnableReference();
nuint yLength = y.Length * (nuint)Unsafe.SizeOf<T>();

Visually, the two spans are located somewhere in the 32-bit (or 64-bit) address space:
[----------------------------------------------)                          address space
0                                             2^32
                      [------------------)                                first span
                      xRef            xRef + xLength
        [--------------------------)     .                                second span
        yRef          .         yRef + yLength
        :             .            .     .
        :             .            .     .
                      .            .     .
                      .            .     .
                      [----------------------------------------------)    relative address space
                      0            .     .                          2^32
                      [------------------)             :                  first span
                      x1           .     x2            :
                      -------------)                   [-------------     second span
                                   y2                  y1

The idea is to make all addresses relative to xRef: Let x1 be the start of x in this relative address space, x2 the end of x, y1 the start of y, and y2 the end of y:
nuint x1 = 0
nuint x2 = xLength
nuint y1 = (nuint)(yRef - xRef)
nuint y2 = y1 + yLength

Note that y1 + yLength may overflow, which must be avoided.
If y is contained within x i.e. y is slice of x then:
(y1 < x2) && (y2 <= x2)

Substituting x2 and y2 with their definition we get:
= (y1 < xLength) && ((y1 + yLength) <= xLength)

To avoid the overflow we change it to
= (y1 < xLength) && (y1 <= (xLength - yLength))

But this can also overflow if yLength > xLength so first we need to ensure that:
= (yLength <= xLength) && (y1 < xLength) && (y1 <= (xLength - yLength))

which is basically what happened for IsSliceOf but outside the inner code. So the code can be written to something like:
public static bool IsSliceOf<T>(this Span<T> child, Span<T> parent, out int start) where T : struct
{
    start = -1;
    return child.Length <= parent.Length // Child cannot have length greater than parent, this also avoids overflow in below method
           && IsSliceOf(ref child.DangerousGetPinnableReference(), child.Length,
                        ref parent.DangerousGetPinnableReference(), parent.Length, out start);
}

and:
private unsafe static bool IsSliceOf<T>(ref T childRef, int childLength, ref T parentRef, int parentLength, out int start) where T : struct
{
    IntPtr nativeByteOffset = Unsafe.ByteOffset(ref parentRef, ref childRef);
    // TODO: Rewrite to use nuint if/when C# supports this
    if (sizeof(int) == sizeof(IntPtr))
    {
        uint byteOffset = (uint)nativeByteOffset;
        uint elementSize = (uint)Unsafe.SizeOf<T>();
        uint parentLengthUnsigned = (uint)parentLength;
        uint childLengthUnsigned = (uint)childLength;

        var elementOffset = byteOffset / elementSize;
        if ((elementOffset < parentLengthUnsigned)
            && (elementOffset <= (parentLengthUnsigned - childLengthUnsigned)
        {
            // NOTE: I do not think this check should be here for
            //       `ConstainsSlice` since it in my view is an invalid state,
            //       if anything it should instead throw an exception.
            if ((byteOffset - elementOffset * elementSize) == 0)
            {
                start = elementOffset;
                return true;
            }
        }
    }
    else
    {
        ulong byteOffset = (ulong)nativeByteOffset;
        ulong elementSize = (ulong)Unsafe.SizeOf<T>();
        ulong parentLengthUnsigned = (ulong)parentLength;
        ulong childLengthUnsigned = (ulong)childLength;

        var elementOffset = byteOffset / elementSize;
        if ((elementOffset < parentLengthUnsigned)
            && (elementOffset <= (parentLengthUnsigned - childLengthUnsigned)
        {
            // NOTE: I do not think this check should be here for
            //       `ConstainsSlice` since it in my view is an invalid state,
            //       if anything it should instead throw an exception.
            if ((byteOffset - elementOffset * elementSize) == 0)
            {
                start = elementOffset;
                return true;
            }
        }
    }
    start = default(int);
    return false;
}

Based on this there should be no need for pinning or similar.

@mgravell, @nietras, @ektrah: Let's keep the discussion in one place to move forward with the full Overlaps API scenario: https://github.com/dotnet/corefx/issues/17793
I am going to close this PR. Feel free to re-open if you prefer.


Prices are not mapped correctly because of entsoe api changes

The api response of the entsoe api has changed format and will not contain the price of a specific hour (position) if the price is the same as the previous hour. So currently it is possible that the data provided by the integration contains gaps or is not able to show the pricing at al. So based on the resolution of the dataset the empty spots should be filled with correct price.

Besides that change I have observed that the price for tomorrow in Belgium is not returned in the usual 60min resolution but in the 15min resolution instead. While the response for the Netherlands is returning everything in 60min resolution like expected.

Belgian here, since midnight the sensor is unavailable.

Last update fixed it for Belgian sensors, but indeed as of midnight unavailable again.

So looking at the response of the api now. It looks like the prices for tomorrow are back to the expected 60min resolution. This could have been a one of mistake. I think this will fix itself tomorrow.

Resolved the missing hours issue in a branch

Dear all, the issue is still present and has not resolved itself as was expected. For the Belgian sensors the data is still not pushed through. If I can help you providing more information, please let me know. Kind regards, Robin

As the Belgian data issue is separate from the change of the curvetype I have create a separate issue to followup: #195

There is a beta version you can install from hacs: v0.6.3-beta1

`Logger: custom_components.entsoe.sensor
Bron: custom_components/entsoe/sensor.py:249
integratie: ENTSO-e Transparency Platform (documentatie, problemen)
Eerst voorgekomen: 19:27:18 (18 gebeurtenissen)
Laatst gelogd: 19:28:13
Unable to update entity 'entsoe.belgium2_Average electricity price': No valid data for today available.
Unable to update entity 'entsoe.belgium2_Current percentage of highest electricity price': No valid data for today available.
Unable to update entity 'entsoe.belgium2_Current percentage in electricity price range': No valid data for today available.
Unable to update entity 'entsoe.belgium2_Time of highest price': No valid data for today available.
Unable to update entity 'entsoe.belgium2_Time of lowest price': No valid data for today available.`

Still seems to be happening


[Adaptive] @ should not be a special character outside of ```

Inside of we use @{expr} to evaluate an expression.  Outside of we just use {expr}.  It appears that the parser always treats @{ as the start of an expression--even when outside of ```.  Either we should disallow this or clarify in our documentation that {} and @{} can be used anywhere.
[bug]

I have an update via this PR where this is clarified. In general, we should continue to push towards @{} for all expressions so you do not have to remember to do this only within multiline.
Also the latest samples and docs do not have [TemplateName] but instead are pushing for @{templateName()} everywhere.
https://github.com/microsoft/BotBuilder-Samples/pull/1862


Don't parse JSON on 204 status codes

I have seen this issue with BrowserStack returning 204 status codes when calling the /visit command on their Android 4.0 and 4.1 browsers. This change prevents wallaby from crashing because there is no JSON to parse on a 204 status code.

Do we wanna return an :ok if we get a 204? Or should that be an error?

On BrowserStack, 204 means you successfully navigated to a new page, but it just doesn't return a response. I think we should return :ok since webdriver did what we asked it to do and we don't care about the response.

Makes sense to me :+1:


Integration keeps rejecting my Kingspan username and password

Installed the integration and despite several attempts to enter my username and password (which I have checked are correct and also let me login into the Kingspan Connect mobile app), the intergration keeps saying incorrect username and password, so I can't set it up. Any ideas?

You will need to enable debug for th integration and add the log here (you probably need to delete your email).

It happens when you haven't got any readings from the tank in your account yet, it fixed itself for me after a day with the first reading

OK thanks. ALl sorted no. One question though, there seems to be quite a difftrence in the litres per day consumed (30 rolling average) in the Kingspan app and what the integration shows for the same 30 day consumption average in home assistant. Fro excample in HA it shows today a figure of 3.2 litres, whereas in the mobile app it shows 3.89. I have changed the HA Integration usage period to consider, to 30 days to mirror the app. Also the integration predicts I wil run out in 231 days but the app says 6th May 2025 which is 196 days from now, so quite a difference. Any idea why it is not pulling the correct data from Kingspan's server, after each update is sent from the transmitter?

This is a personal choice. I find the Kingspan forecast empty data completely useless in a climate that has very variable weather (the UK). So I fit a linear trend to the consumption numbers in the consumption window configured in the integration. I consider this to be a better representation of when you're likely to run out of oil.
The Kingspan server does provide run-out date and consumption data, but my experience is that it's just garbage data.

It happens when you haven't got any readings from the tank in your account yet, it fixed itself for me after a day with the first reading

I'll modify the errors in the future to distinguish between a successful login with data, a successful login without data and an unsuccessful login. I'd expected that people using HA would have installed the sensor at least 24 hours before adding it to HA. I guess not!

This is a personal choice. I find the Kingspan forecast empty data completely useless in a climate that has very variable weather (the UK). So I fit a linear trend to the consumption numbers in the consumption window configured in the integration. I consider this to be a better representation of when you're likely to run out of oil.
The Kingspan server does provide run-out date and consumption data, but my experience is that it's just garbage data.

OK thanks for the update. Happy with the integration. just wondered about the differences in 30 days readings between the app and HA that's all !!

This is a personal choice. I find the Kingspan forecast empty data completely useless in a climate that has very variable weather (the UK). So I fit a linear trend to the consumption numbers in the consumption window configured in the integration. I consider this to be a better representation of when you're likely to run out of oil.
The Kingspan server does provide run-out date and consumption data, but my experience is that it's just garbage data.

It's also just utterly innacurate when you have <30 days of data
I currently have data from when I installed it (a bit over a week ago) of: 482, 482, 469, 469, 482, 469, 482, 469, 469, 469, 469
The integration sensibly works out approx 1 l/day from this using the best fit data - about the same as what you get from (first-last)/days (approx 1.2 l/day), but kingspan is currently telling me in excess of 4!
I do wonder whether with enough data you could do am estimate correction for temperature/season - forecasting forward 3+ months is fairly useless when the current consumption is based on autumn and barely putting the heating on vs winter being on significantly more


added language for emacs org-mode

This is obviously not complete.
But I think some of the regex could also be used to extend the markdown support.

I used className:deletion for text that should have a strikethough. In html it should result in something similar to <del>. I gues this could be improved to something else?
I also added className:underline which doesn't have a representation in css yet.

Had problems executing the tests. I hope everything is ok.

@reimerdes
First of all, truly sorry for the long delay in anyone responding to this PR.
Thank you so much for desiring to contribute and writing a language grammar.  Unfortunately, we currently are no longer accepting new languages into the core repository.  The existing maintainers simply don't have time to maintain new languages (fixing bugs, dealing with issues, etc).  We'd still love to host your language as a 3rd party module though - if you're willing to help maintain it.
It's easy to turn your language into a module that anyone who likes can easily integrate with Highlight.js using a single line of code:
<script src="/path/to/highlight.min.js"></script>
<!-- they'd simply add your language modules -->
<script src="/path/to/highlightjs-emacs-org-mode"></script>
<script>hljs.initHighlightingOnLoad();</script>

It's also possible for users to rebuild the highlight.js library to include specific 3rd party modules, all in a single file (vs loading a bunch of 3rd party languages one at a time).
If you'd like to become the maintainer for this language then we're happy to create a new repository in the highlightjs organization and host the repository there.  That assumes you'd be open to reviewing issues and fixing bugs as they arise.  You're also welcome to host the repo yourself and we'll link to it from our README.
There isn't much in the way of how to docs on this yet, but there are sample repositories and it's honestly pretty easy.  We're still fleshing out an official "spec" for 3rd party modules, but even after that's done it should require minimal changes from the examples we have already.  IE, if you wanted to get started now there isn't any big reason to wait.
My own robots.txt grammar repository is a great, simple example:
https://github.com/highlightjs/highlightjs-robots-txt
If you have any questions feel free to ask.

I used className:deletion for text that should have a strikethough. In html it should result in something similar to . I gues this could be improved to something else?

deletion sounds right.

I also added className:underline which doesn't have a representation in css yet.

That's not going to display in any themes.  The class names are usually for the context of something, not it's literal visual representation. We do have emphasis.
See https://highlightjs.readthedocs.io/en/latest/css-classes-reference.html

Closing for inactivity; (also finally cleaning all these old PRs out for the new year).
As mentioned above if you're interested in becoming the maintainer of a 3rd party module, please respond [whenever you find time] and we'd be happy to help you get started.


[ Feature request ] Allow call tree through function pointers

Function pointers in c are often used very similarly to inherited functions in c++. The linux kernel assigns functions to members of structs and calls them all over the place. Seeing a call tree which contains "base calls" through the function pointer assignment would be a huge usability improvement when working with this type of code.

int f(){return 0;}
int g(){return 1;}

int main() {
  int (*x)() = f;
  x = g;
  x();   //// Move the cursor at `x`
}

I'm unclear about your request. Do you mean:
Move the cursor at x and press a shortcut to list f and g, i.e. functions that have been assigned to x?

I guess that's an option. I was thinking more as when you execute a call tree on f, the call tree shouldn't end at the assignment to x, but at main since f could be called as x. I would like to see a tree that looks like this when call treeing on f
f
--> x
----> main

and like this when executing a call tree on g
g
--> x
----> main

Similar to how in c++ we have base calls for overridden functions.


Issue building on Fedora 25

I have dependency issues of things that are already installed.
Native dependency 'libevdev' not found
Package libevdev-1.5.6-1.fc25.x86_64 is already installed.

You need the libevdev-devel package.

:+1:  Thanks! Might be a good idea to make note of this somewhere for future users.


spork/mdz eats whitespace

how to reproduce

go in this repo
run in Janet REPL:

(import spork/mdz)
(mdz/markup (slurp "doc/data.mdz"))

now, you should see this output
@{:current-file "<anonymous>" :front-matter { :author "Caleb Figgers" :license "MIT" :order 1 :template "mdzdoc/main.html" :title "data"} :markup-dom @[ "\n" (:a {"href" "https://clojure.org/"} @[@["Clojure"]]) (:p "contains a very useful core library (or \"namespace\" in Clojure parlance) called "

the space between Clojure is and contains is gone!
Also, the :a tag should be inside :p tag, not before it.

I was able to reproduce, i.e. I noticed the lack of a space and the :p tag behavior doesn't seem appropriate.
Fixes would be nice :)

A couple of work-arounds [1]:

Wrap the initial paragraph explicitly, e.g.
@p{@link[https://clojure.org/]{Clojure} contains  ...}

Don't start the paragraph with a link, e.g.
The language @link[https://clojure.org/]{Clojure} contains ...

I'm not suggesting that it wouldn't be better for the current behavior to be improved, the above are just interim alternatives that seem to yield improved results.  If one is willing to modify one's content, may be one or the other is useful.

[1] Limited testing with either of the work-around via:
(htmlgen/html (get (mdz/markup (slurp "file.mdz")) :markup-dom))

seemed to yield ok results here.

So this is something that has been in mendoza since the beginning and not sure the best way to resolve it - starting a section with a tag is ambiguous in that some tags are "inline" and some tags are block elements. I think the recommended work around of using @p{...} is the right thing here, but aside from creating complicated parsing rules, I might just leave this as wontfix.

If there's no good way to address this, may be some kind of mention in documentation could be helpful?

complicated parsing rules

I thought of a rule, which states,

Any group of elements with an empty line before and after,
if it's only one element, it's not wrapped in

otherwise, it is wrapped in

@link[]() this is in a paragraph

this is in a paragraph @link[]()

@link[this is not in a paragraph but should be in a paragraph?]()

@codeblock`this is not in a paragraph`

What existing code does this break?


Refugees: Table View TLC

Describe the problem
We will make the table view the default for some incidents, but we have not paid close attention to its functionality.
Describe the solution
@arroyoDev , when you get a chance, you and I will review the table view and come up with a list of improvements and TLC.
Additional context and instructions
Add any other context or screenshots about the feature request here.

Closing for now. May revisit.


Second Android Rewarded Ads preload does not resolve

steps to reproduce in android demo:

preload rewarded video
show preloaded video
preload rewarded video
this doesn't resolve

https://github.com/EddyVerbruggen/nativescript-admob/pull/52


feature request: wait for RUNNING state of multiple jobs

Hi guys. Thanks for the recent health checking. It's awesome and just what we needed.
In order to wait for our stack to all be running we've had to implement this however:
waitfor() {
    echo "Waiting for $1 seconds"
    for attempt in $(seq 1 $1); do
        STATUS=$(${HELIOS} status -j ${STACK_TAG} | sed 1d | awk '{print $4}' | sort | uniq)
        ${HELIOS} status -j ${STACK_TAG}
        clear
        if [ "${STATUS}" == "RUNNING" ]; then break; fi
        sleep 1
    done
    if [ "${STATUS}" != "RUNNING" ]; then
        echo "Timed out waiting for $1 seconds"
        exit 1;
    fi
}

It would be very nice if there was some kind of command in helios that would do the same.
Maybe it could be a command line argument to the watch command or smth.
Cheers, Rasmus

@rasmusbergpalm Thanks, great to see it's useful for you. Waiting for all instances of a job to be RUNNING seems like a common use case regardless of health checks. I'm not sure how it should be implemented right now, but we'll keep this in mind.

Maybe could be an extension to helios watch, to stop watching when all statuses are RUNNING.

Yea I like this idea.
On Thu, Mar 12, 2015 at 1:26 PM, Rohan Singh<EMAIL_ADDRESS>wrote:

Maybe could be an extension to helios watch, to stop watching when all
statuses are RUNNING.
—
Reply to this email directly or view it on GitHub
https://github.com/spotify/helios/issues/437#issuecomment-78537435.

--
David Xia
Software Engineer
<EMAIL_ADDRESS>

I wonder if this is necessary anymore with deployment groups. Effectively  helios rolling-update does the same thing.


[Bug] Post release still failing

Describe the bug
I noticed the post-release workflow job still fails even after my last fix was merged.
Looking at the CI, we can see it fails on Check no code job step: it makes a git diff --exit-code, but there's some sed operations going on beforehand that I don't fully understand, so I don't really know how to fix it yet (I made a few attempts on my fork yesterday, without success).
Looking at the faulty lines, it seems that it's just code that hasn't been linted so it's not much of a big deal, but having the CI fail is always annoying.
# #467
      - name: "Modify cross-platform code (osx)"
        if: ${{ matrix.os.family == 'osx' }}
        # note the "-i '' -e" is a bug of sed specific to MacOS https://stackoverflow.com/questions/19456518
        run: sed -i '' -e 's/^typedef uintptr_t =.*$/typedef uintptr_t = ffi.UnsignedLong;/g' frb_example/pure_dart/dart/lib/bridge_generated.dart
      - name: "Modify cross-platform code (non-osx)"
        if: ${{ matrix.os.family != 'osx' }}
        run: sed -i -e 's/^typedef uintptr_t =.*$/typedef uintptr_t = ffi.UnsignedLong;/g' frb_example/pure_dart/dart/lib/bridge_generated.dart

What is especially confusing to me, is that in post-release.yml it is stated that # NOTE: Please keep in sync with ci.yaml but at the same time the same steps on code_generator.yml (where it was refactored into, from ci.yml) are somehow different :
# #467
      - name: "Modify cross-platform code (windows) (single block)"
        if: ${{ inputs.family == 'windows' }}
        run: sed -i -e 's/^typedef uintptr_t =.*$/typedef uintptr_t = ffi.UnsignedLong;/g' frb_example/pure_dart/dart/lib/bridge_generated.io.dart

Maybe that rings a bell ?
That kind of discrepancy could probably be avoided by refactoring the CI to use just commands. Basically if the CI runs the same exact commands that we as developers run on our machine, then it's far more unlikely that we'll end up with different results. (I might open a PR for that in the coming weeks, but not yet though, as I have something else I want to work onto first)
Codegen logs with RUST_LOG=debug environment variable
codegen generated in the CI

To Reproduce
No response
Expected behavior
No response
Generated binding code
No response
OS
Github CI
Version of flutter_rust_bridge_codegen
1.48.0
Flutter info
version used in the CI

Version of clang++
version used in the CI
Version of ffigen
version used in the CI
Additional context
No response

Another thing that could be a mistake of mine, many lines seems related to wasm : did I inadvertently remove a compilation flag somewhere ?

That kind of discrepancy could probably be avoided by refactoring the CI to use just commands.

Good suggestion!

Another thing that could be a mistake of mine, many lines seems related to wasm : did I inadvertently remove a compilation flag somewhere ?

/cc @Desdaemon

sed is because, uintptr_t is sometimes UnsignedLong sometimes UnsignedLongLong etc, on different platforms. So in order to avoid diff saying that there is code change, I just use a sed to make it the same.

The post release check has been broken for a while due to not being updated to generate WASM. I've been a bit busy so might not be able to fix it soon enough.

But at least, is this normal that both Modify cross-platform code job step are different ? Or someone just forgot to sync them in the past ?

My guess is that somehow some commands (whether from just or written inline e.g. in CI), do lint once codegen ran, while others might not. Discrepancy might also be introduced by cargo build, which might change code formatting (cannot point out exactly where, but I noticed locally that depending on the command I ran, sometimes the code format is modified at the end of the execution).

But at least, is this normal that both Modify cross-platform code job step are different ? Or someone just forgot to sync them in the past ?

post-release should be identical to ci.yaml, without very special reasons

IMHO the "refactor everything into just" LGTM

I jump on the opportunity for a environment-related question @fzyzcjy : locally, when I try to downgrade/upgrade flutter to 3.3.1, to match with FRB current version used in CI the CLI either put me back on 3.0.5 (dart 2.17.6), either forward to 3.3.3 (dart 2.18.2), e.g.:
downgrade :
Flutter 3.0.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f1875d570e (3 months ago) • 2022-07-13 11:24:16 -0700
Engine • revision e85ea0e79c
Tools • Dart 2.17.6 • DevTools 2.12.2

upgrade :
Flutter 3.3.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 18a827f393 (16 hours ago) • 2022-09-28 10:03:14 -0700
Engine • revision 5c984c26eb
Tools • Dart 2.18.2 • DevTools 2.15.0

Why so and which version would best match (my guess being 3.0.5 because of dart version)

Hmm Flutter 3.3.3 LGTM, since we should stick w/ the latest version
btw I use the fvm to manage flutter

But 3.3.1 and 3.3.3 should have few differences


CullLeaves causes the player to have an unremovable Witch hat

MC 1.17.1
Fabric loader 0.12.3; API 0.41.0
CullLeaves 2.3.1
All of a sudden 2 mods in my modpack started to cause this weird bug, 1 is CullLeaves, another Cool Elytra Roll. Tested with only fabric API and CullLeaves loaded.
To reproduce:

Install fabric loader and API
Launch the game, create a new world or join an old one
Look at your character in 3rd person or in the inventory - everything is normal
Close the game, install CullLeaves, start the game again
Enter the same world or create a new one and look at your character - now it has a witch hat

Screenshots:
Vanilla

With CullLeaves installed

Logs:

Vanilla: https://gist.github.com/Footage2-Amply-Pounce/6343b3c2d87bd2df52a17583c8291a43
With CullLeaves: https://gist.github.com/Footage2-Amply-Pounce/981a6caaa60df2c2789e1142223940b8

That's not a weird bug, it's intended behavior during halloween.
You can disable it in the MidnightLib config.
This feature was removed in more recent versions of MidnightLib, but most of my mods still ship an older version.

Ohhhh.. I spent an embarrassing amount of time finding out which mods caused this 😂 Thanks for telling me.


Add option for spot instances

Signed-off-by: Shantanu Deshpande<EMAIL_ADDRESS>Add support for spot instances for cattle-aws provisioner.

Citing Shantanu: There's no bright side of using cattle-aws really. As a matter of fact it's all bright :-)


Vue.delete property reappears after refresh

Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Using Vue.delete the property removed from the state object get's put back on refresh.
If the current behavior is a bug, please provide the steps to reproduce.
https://codesandbox.io/embed/m37z15yvxp
Press remove property button then reload. You'll see that the property is back.

What is the expected behavior?
Using Vue.delete also persists the delete in localstorage. Property is still deleted on refresh.
If this is a feature request, what is motivation or use case for changing the behavior?

+1

+1

I don't see why you need Vue.delete for this as the reactivity is already handled by Vuex. Please use Vanilla Javascript for such cases;
const store = new Vuex.Store({
  state: {
    count: 0,
    1: 'Property',
    2: 'Property'
  },
  plugins: [createPersistedState()],
  mutations: {
    increment: state => state.count++,
    decrement: state => state.count--,
    removeProperty: state => ({ count: state.count, 2: state[2] }),
  }
});


Use ifx to link examples

Summary
Fixed a build error using oneapi compilers. Fortran examples should be linked with ifx, not icpx.
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/crt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/crt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [axom/quest/examples/CMakeFiles/quest_signed_distance_interface_F_ex.dir/build.make:110: examples/quest_signed_distance\
_interface_F_ex] Error 1

Related: https://github.com/LLNL/axom/issues/803