Enable OAuth2 PKCE extension in Doorkeeper

https://trello.com/c/59EBweBx
Signon utilises the OAuth 2.0 Authorization Code Grant type to enable users to authorize client applications to act on their behalf. That page includes:

It is recommended that all clients use the PKCE extension with this flow as well to provide better security.

This PR enables the PKCE extension in Doorkeeper. We're not yet mandating Signon clients to use PKCE but it will be used if the client supplies a code_challenge and code_challenge_method in the request for the Authorization Code.
We hope to mandate the use of PKCE once we're confident all Signon clients are using it.

Thanks, @floehopper :+1:

This looks good to me 👍 I have a few thoughts...

I don't feel strongly about keeping CSRF enabled for the tests. Since Capybara::DSL is mixed into ActionDispatch::IntegrationTest would it be feasible/sensible to use those for the user bit of the interaction (i.e. signing in) thus coping with CSRF...? Or is there a problem that Capybara will follow redirects you don't want to...?

I haven't tried but I worry that it might be confusing to mix the two styles in a single test. Especially as I'd prefer to more explicitly split the integration-style and the system-style tests that already make up our "integration tests".

I suppose ideally you'd use different sessions, although I have to admit I'm only 99% sure that's actually how things work! Having said that, I'm not sure it's worth putting a lot of effort into it. Would using a mixture of Capybara & Rails request helpers (as described in my previous point) achieve separate sessions? If not, could you not just call ActionDispatch::Integration::Session#reset! in the test after signing in and before requesting the authorization code...?

I've updated the commit to use reset! as you've suggested. I'm not entirely sure how much it helps but hopefully it gives some clue that the exchange of an Authorization Code for an Access Token, and the use of the Access Token to request a protected resource, are triggered from the client and don't require the user to be signed in to Signon.

These Doorkeeper docs mention checking a couple of things when enabling PKCE - it would be nice to mention somewhere that you have checked them even if they don't apply.

I've updated the commit note to explain why these don't concern us.

I'm happy to leave all the above to your discretion - essentially it'd be fine to merge as is!

Thank you!

Lastly, don't forget to remove the TODO points from the commit note before you merge!

Done.


[BEAM-9651] Prevent StreamPool and stream initialization livelock

Reduce StreamPool synchronized block section to not include stream
creation which includes sending initial messages. Additionally remove it from being
required to release holds. Some pipelines were observing stuck get and
release methods on synchronization.  This was due to a stuck stream
creation waiting for the onReady callback. This could possibly have
been due to the callback being queued behind other callbacks on
blocked grpc threads. This was addressed in the DirectStreamObserver
used for the fn api so we reuse it here.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

R: @dpmills @reuvenlax

LGTM

Note that the tests never ran on this change. Please only merge on green.
Only committers can start tests on PRs which can sometimes be missed because changes can look like they are merge ready.

run dataflow validatesrunner

@lukecwik my bad - I missed that the tests hadn't triggered. is it possible to trigger tests now, or do we need a new PR?

They would run automatically as a cron PostCommit or you can manually launch them from the Jenkins UI.


API Requirements

"Specify data requirements specification for data ingress/egress."
Plenty of consultative discussions between @jemrobinson, @JimCircadian and our BAS collaborators on compliance to standards. These are precursor discussions to formal requirements being drawn up:

[ ] Collect existing requirements
[ ] Produce associated documentation in wiki
[ ] Disseminate across technical collaborators
[ ] Assess in line with downstream POCs

In consultation with MAGIC for the best/path of least resistance James R implemented PyGeoAPI which fulfilled the scope of this task. No further action required
No point in taking this further at this point. Closing based on POC project wrap up


trouble building on Mac m1

I'm working on a macOS Ventura version 13.2.1 with M1 chip and I'm unable to build the package. I keep getting the following error:
the clang compiler does not support '-march=native'
I tried replacing the add_compile_options(-march=${BUILD_ARCH}) with add_compile_options(-mcpu=apple-m1), but I keep getting the error. Am I missing something?
my clang version is 14.0.0

Try changing 3rd_party/bergamot-translator/3rd_party/marian-dev/CMakeLists.txt too.  I think should should be made an option.

I tried it again, but I'm prompted by the next error:
In file included from /Users/sophiedataroots/Documents/projects/translateLocally/3rd_party/bergamot-translator/3rd_party/marian-dev/src/3rd_party/intgemm/intgemm/intgemm.cc:9: /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/cpuid.h:14:2: error: this header is for x86 only #error this header is for x86 only
Do I need to set a certain variable specifically for Mac m1?

Sorry about this, I'll try to check on M1 but it might be a few weeks. We have an ARM build working on ubuntu arm, and for M1 we've used x86_64 generic prefix, which works with the rosetta stone. There seems to be an issue with how the default architecture on the clang compiler exports ARM defines.
The error you are getting shouldn't ever be there, because the submodule in question should never be compiled.
intgemm is compiled only if USE_INTGEMM is set https://github.com/browsermt/marian-dev/blob/master/src/tensors/cpu/integer_common.h#L10 , and if we detect arm, it is not: https://github.com/browsermt/marian-dev/blob/master/CMakeLists.txt#L68
if(${CMAKE_TARGET_ARCHITECTURE_CODE} MATCHES "arm") branch should be taken. Could you add a
message(${CMAKE_TARGET_ARCHITECTURE_CODE}) to the line before and see what the M1 reports here?

Oh weird. When you have time to test it and it works on your M1, can you send the commands you used? No worries if it takes some time :)

I ran into this error as well when I was trying to make a universal binary for macOS Intel/ARM. I thought it was due to cpuid taking some information from cmake at compile time, which obviously doesn't work when your compiler is emitting for two architectures at the same time :(

Hmm, we are using two very different codepaths for ARM and x86 _64 here... We should at the very least allow for exclusive M1 build

Hi @SophieDC98 ,
We have identified an issue with building an universal binary which we aim to fix shortly.
In the meantime I've pushed some fixes that should allow for building natively on M1/M2 class hardware. Instructions:
git clone https://github.com/XapaJIaMnu/translateLocally.git
cd translateLocally
mkdir build
cd build
# Optional. If you use non standard qt, export path to it: export PATH=/Users/nick/Qt/6.5.2/macos/lib/cmake/:$PATH
cmake .. -DBUILD_EXTERNAL_LIBARCHIVE=ON -DSSPLIT_USE_INTERNAL_PCRE2=ON
# Fix Ruy Build. This step is mandatory otherwise the build will fail with weird include errors
# cmake will provide the exact command you should use in the form of a warning
# it will look like:
../cmake/fix_ruy_build.sh ../ ./
make -j8

Let me know if you run into any errors.

Could you post your cmake log and the last bits of make VERBOSE=1 just the part with the error?

We now provide separate M1 builds. thanks to @jelmervdl
Steps to build are shown in the workflow file: https://github.com/XapaJIaMnu/translateLocally/blob/master/.github/workflows/build.yml#L131


[FEATURE] Animating the navlinks

Description
Adding an hover effect on the navlinks
Screenshots
Before-->
https://github.com/EddieHubCommunity/LinkFree/assets/64919642/5b1de8be-8f76-43b8-8313-bcb5fe6efcc1
After -->
https://github.com/EddieHubCommunity/LinkFree/assets/64919642/d8803fc8-131d-4551-8a36-fe039c50f5ec
Additional information
No response

Thank you for your suggestion.  However as we will be redesigning the website in the near future I will close this issue.


file: and http:, https: protocols for CSV reads?

Is your feature request related to a problem? Please describe.
Trying to read a CSV file outside the vault, or even on one of my servers.
Describe the solution you'd like
At least support the file: protocol, if feasible even http: and https:.
Describe alternatives you've considered
Tried:

… FROM csv("file:///home/matthias/Dokumente/Covid-19-Inzidenz.csv") and
… FROM csv("/home/matthias/Dokumente/Covid-19-Inzidenz.csv")

Additional context

See #383 — file://… also seems to work when leaving out the .csv.

I think this is possible - recent Obsidian versions do allow arbitrary file system access (I think). I believe AJAX calls are also possible.

This has nominally been added in 0.4.6, though it may be still affected by CORS restrictions - please give it a try.


Audio stops on iOS screen lock

Hi! This looks like a nice library :) Stumbled upon here while investigating into sound libraries which can help build a meditation timer (i.e. long delays of e.g 1 hour, sometimes combined with bell sounds and voice recordings).
But for example when playing this example on my iPhone 6 (iOS 10.3.1):
https://tonejs.github.io/examples/#events
The sound stops when locking the screen and resumes when restarting. Both when I lock the screen by myself and when the phone auto-locks after 30 seconds.
Is there any way to keep the sound playing? Meditation sessions are typically much longer than screen auto-lock time. Thanks a lot :)

Sounds like an interesting application, but i don't think i can help out. Mobile browser makers are always trying to conserve battery by stopping background javascript where possible.
A quick search bring up a few hacky solutions which have worked in the past, though i'm not sure which of them work on the current iOS. Also, i think there libraries out there which prevent the device from falling asleep which would be another solution.
If anyone has a good solution, please chime in.

I understand that, but even without talking about silence/delayed playback, the library as it stands doesn't allow simple sounds to continue playing when the screen auto-locks, which can happen as early as 30 seconds after playing starts.
In my view that is a bug, not a feature. Do you agree? If the answer simply is "this library doesn't want to support iOS" that's fine, but I'd just like to understand the reasoning.
What can we do to fix this? Thanks a lot 😊

i am working to support iOS, but in my testing and research, it seems like the current iOS implementation doesn't allow javascript and web audio to be executed when the screen is locked. This is probably a design decision from Apple, and from searching the web and trying a few things out, i didn't find any work arounds other than to prevent the device from falling asleep.
If this is a priority for your application, please file a bug with mobile Safari/Chrome. I will keep my eyes open for things that might work. It'd be great to find a solution to this issue, but at the moment it doesn't seem like a Tone.js issue, but more of a iOS javascript/web audio issue.
I'm not positive, but there might not be the same restriction with the <audio> tag, which might be a good solution for your application. You could generate an hour of silence with a short sound at the end and play that on a user interaction to start the timer.

Thanks, I already got it working using Howler.js, but I'd love to use a library which is future proof/actively maintained.
I managed to play a bell at the beginning then play a sprite of configurable duration (based on a silent audio which is 2 hours in total) then I can play a bell at the end.
So, what I don't understand is that you say that Javascript gets frozen on screen lock, but my example demonstrated that (as of iOS 10.3.1) Javascript is in fact still running, even 45 min after screen was locked (been able to use this proof-of-concept for my meditation a few times). NB: used Howler with html5: true as that's needed "to allow the audio to stream in" for some reason.
NB: Might try to refine later by creating a silent file on the fly client-side to avoid downloading this big 2 hour audio; don't know if your StartAudioContext could help? https://github.com/tambien/StartAudioContext/blob/master/StartAudioContext.js#L70
I also need to combine with a real audio. E.g Bell + 1 min intro voice + configurable silence + 1 min voice + bell.

Howler with html5:true is using the <audio> tag instead of Web Audio, which is probably why it's able to play on the locked screen.

Hey, I am looking into the same problem right now. Is there any known way to keep the tone.js generated sound playing while the smartphone screen is locked yet?

Did anyone find a useful workaround for this?

@cordial what I end up using is https://github.com/swevans/unmute.
It sufficed for my use case, but I guess there's nothing else I could do, to be honest. This was the only solution that I found.


[Feature Request] what is the roadmap for this sdk,  really need it

@charzhao - The workflow portion of the SDK is under active development and should be released within the next couple of weeks. Once done, it will be full featured like any other SDK (but still alpha), only advanced pieces like source generator and static analyzer will remain. There are no exact roadmap dates. We put proposals at https://github.com/temporalio/proposals/tree/master/dotnet.
Closing as question (feel free to ask future questions on our forum or community Slack)


blazor-cli-tutorial - The connection for this site is not secure

URL
https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-cli-tutorial/run
https://localhost:5156
Operating system
windows
More information about your system
Windows 11 X64
Description
I installed the SDK to allow me to work with ASP.NET Core from the command line.  I started the blazor-cli-tutorial to make sure everything was working.  "dotnet watch" fails in both Edge and Chrome with:
The connection for this site is not secure, locahost sent an invalid response, ERR_SSL_PROTOCOL_ERROR
I have two computers which use Bitdefender Total Security and Malwarebytes for protection.  The command line interface works on one but not the other.  The only known difference is that the computer with the error message has Visual Studio 17.11.3 installed.
I have no problem running the Blazor application in visual studio but it is using: https://localhost:7186/
The cli is using: https://localhost:5156/
I tried disabling both Bitdefender and Malwarebytes but the problem remained.   Any idea how to troubleshoot?
Error: The connection for this site is not secure, locahost sent an invalid response, ERR_SSL_PROTOCOL_ERROR

@segnew Typically when you run the app using the .NET CLI the app will run over HTTP, not HTTPS. So, I'm not sure why you're getting an HTTPS address at all when running the app using dotnet watch. Could you please share the console output with us and the contents of the launchSettings.json in the failing project?

dotnet watch 🔥 Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload.
💡 Press "Ctrl + R" to restart.
dotnet watch 🔧 Building...
Determining projects to restore...
All projects are up-to-date for restore.
BlazorApp -> C:\Users\sidne\BlazorApp\bin\Debug\net8.0\BlazorApp.dll
dotnet watch 🚀 Started
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5156
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Users\sidne\BlazorApp
dotnet watch 🛑 Shutdown requested. Press Ctrl+C again to force exit.
info: Microsoft.Hosting.Lifetime[0]
Application is shutting down...
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:9731",
"sslPort": 44365
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5156",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7289;http://localhost:5156",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

Thanks @segnew. That output says that the app is listening at http://localhost:5156/, which is an http address not an https address. If you browse to the http address, do you still get an error? Typically, when you run dotnet watch it should launch the browser at the correct address for you.

I determined the issue was caused by an automatic redirect of localhost in Chrome which is my default browser.  When I manually set http instead of https it still redirected.   In Edge, it redirected  but if I manually specified http it did not redirect.
To correct the problem, I accessed:
chrome://net-internals/#hsts
and deleted domain security policies for localhost.
Thanks for your assistance.

Interesting. Thanks for letting us know! I do wonder how you ended up with HSTS for localhost. ASP.NET Core apps are typically set up with HSTS, but only when the site isn't running in the Development environment.
@blowdart @adityamandaleeka FYI.


Error when fetching docs with a high maxHits param

When fetching more than 200 docs, we have the following logs (1 to 3 lines like this):
Aug 23 17:44:38.211 ERROR root_search: quickwit_search::root: err=InternalError("split-fetch-docs")
And when fetching more than 1000 docs, same logs and no hits
curl http://<IP_ADDRESS>:8080/api/v1/hdfs_logs/search\?query\=hdfs\&maxHits\=1000
{
  "numHits": 19301055,
  "hits": [],
  "numMicrosecs": 7232417
}%

closed with #530


NetworkInterfaceAvailable waiter doesn't retry when facing InvalidNetworkInterfaceID.NotFound

Describe the bug
NetworkInterfaceAvailable waiter doesn't retry when facing InvalidNetworkInterfaceID.NotFound, it just fails immediately with the corresponding exception.
Expected Behavior
NetworkInterfaceAvailable waiter should keep retrying according to the waiter config when facing InvalidNetworkInterfaceID.NotFound.
Current Behavior
NetworkInterfaceAvailable waiter doesn't retry when facing InvalidNetworkInterfaceID.NotFound, it just fails immediately with the corresponding exception:
botocore.exceptions.WaiterError: Waiter NetworkInterfaceAvailable failed: Waiter encountered a terminal failure state: Matched expected service error code: InvalidNetworkInterfaceID.NotFound

Reproduction Steps
The issue is sporadic and appears pretty rarely (I believe once AWS is kinda overloaded a bit?).
Any simple piece of code can hit it all of a sudden when creating an ENI and then immediately calling a waiter to wait for it to become 'available'.
e.g.
import boto3

ec2_client = boto3.client('ec2')
ec2 = boto3.resource('ec2')

response = ec2_client.create_network_interface(
    Description="eni-test",
    InterfaceType="interface",
    SubnetId="subnet-xxx",
    TagSpecifications=[
        {
            'ResourceType': 'network-interface',
            'Tags': [{'Key': 'Name', 'Value': "eni-test"}]
        }
    ])

eni = ec2.NetworkInterface(response["NetworkInterface"]["NetworkInterfaceId"])

ec2_client.get_waiter('network_interface_available').wait(
            NetworkInterfaceIds=[ eni.id ],
            WaiterConfig={
                'Delay': 5,
                'MaxAttempts': 5
            })

print("ENI %s is available" % eni.id)

Possible Solution
I tried to look up waiter metadata across boto repositories - I'm not very familiar with it yet, so the only place I came across is https://github.com/boto/botocore/blob/23ee17f5446c78167ff442302471f9928c3b4b7c/botocore/data/ec2/2016-11-15/waiters-2.json
In that file, ".NotFound" states usually have "retry" action when waiting for availability of a resource, but NetworkInterfaceAvailable waiter has "failure" instead, which may be the root cause (see here )
Additional Information/Context
No response
SDK version used
1.19.5 (but may happen on later versions as well, I believe)
Environment details (OS name and version, etc.)
Linux

Thanks @romos for reaching out!
Since our waiter models are shared across SDKs and owned by their service teams, I've contacted them regarding this and opened a new issue in our cross-SDK repo to address this issue.
I will close this and please refer to that issue for updates going forward: https://github.com/aws/aws-sdk/issues/301


Table example is broken in beta 5.

See examples#beta5 branch.
Maybe we should remove table support from beta5 and ship with beta 6 in a more complete way?

Moved new table implementation to Beta 6.


Unable to run integration tests with --web-renderer skwasm

Steps to reproduce
Run the following command after starting chromedriver. I'm trying to run the integration tests for the camera_web plugin.
I get the same results on Flutter channels stable and master
flutter drive \
  --driver=test_driver/integration_test.dart \
  --target=integration_test/camera_bitrate_test.dart \
  -d chrome --web-renderer skwasm

Expected results
The test runs
Actual results
dart_sdk.js:1

       Failed to load resource: the server responded with a status of 500 (Internal Server Error)
localhost/:1 Refused to execute script from 'http://localhost:58254/dart_sdk.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
require.js:143 Uncaught Error: Script error for "dart_sdk", needed by: main_module.bootstrap, web_entrypoint.dart
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:168:17)
    at HTMLScriptElement.onScriptError (require.js:1738:36)

Code sample
This can be reproduced with the project created from running. Although you have to copy the test_driver file form an existing project since flutter create doesn't create it for some reason. Maybe we should file an issue for that as well?
flutter create --template plugin --platforms web project_name

Screenshots or Video
No response
Logs
The logs above are from the camera_web plugin integration tests
I get this log line when attempting to run integration tests in a fresh project:
flutter_bootstrap.js:3 Uncaught (in promise) FlutterLoader could not find a build compatible with configuration and environment.

Flutter Doctor output
Doctor output
[✓] Flutter (Channel main, 3.23.0-13.0.pre.361, on macOS 14.5 23F79
    darwin-arm64, locale en-US)
    • Flutter version 3.23.0-13.0.pre.361 on channel main at
      /Users/rexios/repos/flutter
    • Upstream repository git@github.com:flutter/flutter.git
    • Framework revision 5bf0192f58 (45 minutes ago), 2024-06-27 10:52:48 -0700
    • Engine revision a9194f0f01
    • Dart version 3.5.0 (build 3.5.0-304.0.dev)
    • DevTools version 2.36.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/rexios/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio
      Preview.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • Build 16A5171c
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version unknown)
    • Android Studio at /Applications/Android Studio Preview.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build
      17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.90.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.90.0

[✓] Connected device (4 available)
    • Aaron’s iPhone (mobile)         • 00008130-001C35CE3A20001C • ios
      • iOS 17.5.1 21F90
    • macOS (desktop)                 • macos                     • darwin-arm64
      • macOS 14.5 23F79 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin
      • macOS 14.5 23F79 darwin-arm64
    • Chrome (web)                    • chrome                    •
      web-javascript • Google Chrome 125.0.6422.142
    ! Error: Browsing on the local area network for Raj's Apple Vision Pro.
      Ensure the device is unlocked and attached with a cable or associated with
      the same local area network as this Mac. (code -27)
    ! Error: Browsing on the local area network for Joe’s iPhone. Ensure the
      device is unlocked and attached with a cable or associated with the same
      local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code
      -27)

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

I realized that the index.html file was out of date for the camera_web integration tests. I updated it and now get the same error as a fresh project:
flutter_bootstrap.js:3 Uncaught (in promise) FlutterLoader could not find a build compatible with configuration and environment.

Hi @Rexios80, I see there is a proposal to support integration test with wasm https://github.com/flutter/flutter/issues/127730. Since this hasn't been supported yet, I'm going to close this issue. Please follow #127730 for updates. Thanks!

I'm not sure that's the same issue. There is an option to run the integration tests compiled to WASM but it doesn't work.

You can pass --web-renderer because flutter run and flutter drive shared web renderer options, see:
https://github.com/flutter/flutter/blob/eb58fe16b60f38ab403b75edd3805e884f4eddb8/packages/flutter_tools/lib/src/commands/drive.dart#L54
https://github.com/flutter/flutter/blob/eb58fe16b60f38ab403b75edd3805e884f4eddb8/packages/flutter_tools/lib/src/commands/run.dart#L37-L43

Should using that option fail gracefully instead of whatever is happening now?


[BUG FIX]: Laravel static to injection

This PR closes #39
I have fixed and tested it manually. it works fine.
I check the whole project there are no specific validations for the laravel rector sets. So I didn't add tests.

Thank you @hirenkeraliya


end of level isn't triggering

Something happened during changing the spawn queue over to a deployment area: the level doesn't end anymore. Check the signal on the finish zone and the listeners.
Spawned units were moved into current_level/UnitContainer instead of Lanes. That's likely the source of the problem.

This was an off-by-one error, caused by taking the unit count before the unit was deducted from the UnitCount button. Resolved now.


MDDropDownItem throws error when using declarative approach and text element

When running the code below, the program throws an error and close the application.
Both the pip latest 1.1.1 and master branch 1.2.0.dev0 shows the same behaviour.
Deleting the line text="hi", will make the code work in both 1.1.1 and 1.2.0.dev0.
from kivymd.app import MDApp
from kivymd.uix.floatlayout import MDFloatLayout
from kivymd.uix.dropdownitem import MDDropDownItem

class Example(MDApp):
    def build(self):
        self.theme_cls.theme_style = "Dark"
        self.theme_cls.primary_palette = "Orange"
        return MDFloatLayout(
            MDDropDownItem(
                text="hi",
                on_release=lambda _: self.init_menu()
            )
        )

    def init_menu(self):
        print("hi")

Example().run()

Error:
 Traceback (most recent call last):
   File "kivy\properties.pyx", line 961, in kivy.properties.ObservableDict.__getattr__
 KeyError: 'label_item'

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "D:\Desktop\coding\cjk-character-count-kivy\min.py", line 23, in <module>
     Example().run()
   File "D:\Desktop\coding\cjk-character-count-kivy\kivy_venv\lib\site-packages\kivy\app.py", line 955, in run
     self._run_prepare()
   File "D:\Desktop\coding\cjk-character-count-kivy\kivy_venv\lib\site-packages\kivy\app.py", line 925, in _run_prepare
     root = self.build()
   File "D:\Desktop\coding\cjk-character-count-kivy\min.py", line 13, in build
     MDDropDownItem(
   File "D:\Desktop\coding\cjk-character-count-kivy\kivy_venv\lib\site-packages\kivymd\uix\behaviors\declarative_behavior.py", line 311, in __init__
     super().__init__(**kwargs)
   File "D:\Desktop\coding\cjk-character-count-kivy\kivy_venv\lib\site-packages\kivymd\theming.py", line 1670, in __init__
     super().__init__(**kwargs)
   File "D:\Desktop\coding\cjk-character-count-kivy\kivy_venv\lib\site-packages\kivy\uix\behaviors\button.py", line 121, in __init__
     super(ButtonBehavior, self).__init__(**kwargs)
   File "D:\Desktop\coding\cjk-character-count-kivy\kivy_venv\lib\site-packages\kivy\uix\boxlayout.py", line 145, in __init__
     super(BoxLayout, self).__init__(**kwargs)
   File "D:\Desktop\coding\cjk-character-count-kivy\kivy_venv\lib\site-packages\kivy\uix\layout.py", line 76, in __init__
     super(Layout, self).__init__(**kwargs)
   File "D:\Desktop\coding\cjk-character-count-kivy\kivy_venv\lib\site-packages\kivy\uix\widget.py", line 357, in __init__
     super(Widget, self).__init__(**kwargs)
   File "kivy\_event.pyx", line 262, in kivy._event.EventDispatcher.__init__
   File "kivy\properties.pyx", line 520, in kivy.properties.Property.__set__
   File "kivy\properties.pyx", line 567, in kivy.properties.Property.set
   File "kivy\properties.pyx", line 606, in kivy.properties.Property._dispatch
   File "kivy\_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
   File "kivy\_event.pyx", line 1213, in kivy._event.EventObservers._dispatch
   File "D:\Desktop\coding\cjk-character-count-kivy\kivy_venv\lib\site-packages\kivymd\uix\dropdownitem\dropdownitem.py", line 107, in on_text
     self.ids.label_item.text = text_item
   File "kivy\properties.pyx", line 964, in kivy.properties.ObservableDict.__getattr__
 AttributeError: 'super' object has no attribute '__getattr__'

My guess is that by not using kv language, which kinda of instanciate the widgets first, prevents the text property to be used. Not sure why, but if you try to use current_item does not raise an exception.
Anyway, you can get it working by doing this:
`def build(self):
self.theme_cls.theme_style = "Dark"
self.theme_cls.primary_palette = "Orange"
self.dropdown = MDFloatLayout(
MDDropDownItem(
id="dropdown_test",
on_release=lambda _: self.init_menu()
)
)
    self.dropdown.ids.dropdown_test.set_item("hi")

    return self.dropdown`

The issue is deprecated due to the new API of the KivyMD library 2.0.0 version


Failed to pull mainflux/dashflux:latest container image

BUG REPORT

What were you trying to achieve?
Pull mainflux dashflux container image

What are the expected results?
Pull image successfully.

What are the received results?

$ docker pull mainflux/dashflux:latest
Error response from daemon: pull access denied for mainflux/dashflux, repository does not exist or may require 'docker login'

What are the steps to reproduce the issue?

Just execute docker pull mainflux/dashflux:latest

In what environment did you encounter the issue?
OSX 10.14.3
Docker client 18.09.2

Additional information you deem important:

Hi @yhung124,
Dashfllux has been deprecated and replaced by ui. You can the docker image here. Please update to the latest version and try again. Feel free to open another issue if you experience any problems.


applications/asterisk: Remove incorrect dependency

ahcpd dependency appears to have come from a cut-n-paste from
luci-app-ahcpd.

merged


Can't save heatmap as an image

Neither manual nor automatic image saving don't save heatmap as an image. When trying to do so, nothing happens.
RuneLite logs:
2022-08-07 11:52:53 [pool-3-thread-1] INFO  com.worldheatmap.WorldHeatmapPlugin - Saving 'Type A' .heatmap to disk...
2022-08-07 11:52:53 [pool-3-thread-1] INFO  com.worldheatmap.WorldHeatmapPlugin - Finished writing 'Type A' .heatmap to disk after 238 ms
...
2022-08-07 11:57:24 [pool-3-thread-1] INFO  com.worldheatmap.WorldHeatmapPlugin - Saving 'Type A' heatmap image to disk...
2022-08-07 11:57:28 [pool-3-thread-1] ERROR n.r.c.util.RunnableExceptionLogger - Uncaught exception in runnable com.worldheatmap.WorldHeatmapPlugin$$Lambda$443/0x43c1ca28@fe66c3
java.lang.OutOfMemoryError: Java heap space

It's the same with "Type A" and "Type B"

Intredasting. Some questions:
-How much RAM do you have? (I ask because I've only tested the plugin on a PC with lots of RAM). Other pc specs might help
-When you try to write the image, is there a large spike in ram usage?
-Does the file .runelite/worldheatmap/osrs_world_map.png exist?
I'm going to test it out on a laptop with less resources and see if I get the error, and review the code for memory leaks. Thanks for the bug report.

Saw the post in the runelite discord. I'm able to reproduce the same error 100% of the time and the cause is https://github.com/GrandTheftWalrus/RuneLite-World-Heatmap/blob/master/src/main/java/com/worldheatmap/WorldHeatmapPlugin.java#L432
Running runelite via the jagex launcher gives me a MaxMemory of 512mb with around 400mb being used. Running in intellij gives me a max of 16gb with 300-600 used.
Running a "Type A" "Write Heatmap Image" lowers free memory by about 40mb just from loading osrs_world_map.png
Also this project is kind of a mess to look at and I don't understand why you're using runnables instead of just using lambda method references

-How much RAM do you have? (I ask because I've only tested the plugin on a PC with lots of RAM). Other pc specs might help

PC Specs:
CPU: Ryzen 5 1400
RAM: 16gb (2x 8gb)
GPU: AMD RX 570
OS: Win10 Pro 21H2 (Build 19044,1826)

-When you try to write the image, is there a large spike in ram usage?

Ram usage stays the same, only CPU usage gets a little usage spike, but thats all.

-Does the file .runelite/worldheatmap/osrs_world_map.png exist?

Nope. File structure for me looks loke this:
.runelite/
     WorldHeatMap
          Heatmap Files
               Mintaras_TypeA.heatmap
               Mintaras_TypeB.heatmap

Running runelite via the jagex launcher gives me a MaxMemory of 512mb with around 400mb being used

I'm also using Jagex launcher to launch RuneLite, but on my other RuneLite instance (separate account), launchet not thru Jaxes launcher, it still does not save heatmap image.

Saw the post in the runelite discord. I'm able to reproduce the same error 100% of the time and the cause is https://github.com/GrandTheftWalrus/RuneLite-World-Heatmap/blob/master/src/main/java/com/worldheatmap/WorldHeatmapPlugin.java#L432
Running runelite via the jagex launcher gives me a MaxMemory of 512mb with around 400mb being used. Running in intellij gives me a max of 16gb with 300-600 used. I assume my plugin setup could be the cause of the 400mb?
Running a "Type A" "Write Heatmap Image" lowers free memory by about 40mb just from loading osrs_world_map.png
Also this project is kind of a mess to look at, with the main issue being the random int arrays for x,y positions and the usage of runnables instead of lambda method references
Edit: With a bit of extra testing to see if I can get a more exact memory usage number, the code from here returns 123641856 bytes for your osrs_world_map.png loaded into memory which would be a problem with the amount you have available.

Thank you for the advice. I was unsure about whether or not my use of Runnables was correct. Would the proper way of doing it be to place the code I put within the Runnables into methods instead, and then pass the methods into the Executor whenever they're meant to be used? I think this is what you were suggesting - just making sure. Also, could you perhaps clarify what you meant about the random int arrays for x,y positions?
Currently, each Heatmap object stores the 2D matrix of steps per tile in a very large 2D int array, but now that it's become apparent that memory usage is more constrained than I originally thought, I'm going to make it so that heatmap data is stored in a more efficient way (probably by use of a hashmap where the keys are coordinate pairs and the values are the step values). I'm also going to see if there's a way to load, edit, and write the heatmap image to disk in a way that uses less memory (not sure how to do that yet, since I'm already using BufferedImages, but maybe the foremost overuse of memory is due to the aforementioned method of storing heatmaps; each heatmap being a big ass 2D array of 32 bit integers is probably around 12 megabytes)
Thanks again for your input

Neither manual nor automatic image saving don't save heatmap as an image. When trying to do so, nothing happens. RuneLite logs:
2022-08-07 11:52:53 [pool-3-thread-1] INFO  com.worldheatmap.WorldHeatmapPlugin - Saving 'Type A' .heatmap to disk...
2022-08-07 11:52:53 [pool-3-thread-1] INFO  com.worldheatmap.WorldHeatmapPlugin - Finished writing 'Type A' .heatmap to disk after 238 ms
...
2022-08-07 11:57:24 [pool-3-thread-1] INFO  com.worldheatmap.WorldHeatmapPlugin - Saving 'Type A' heatmap image to disk...
2022-08-07 11:57:28 [pool-3-thread-1] ERROR n.r.c.util.RunnableExceptionLogger - Uncaught exception in runnable com.worldheatmap.WorldHeatmapPlugin$$Lambda$443/0x43c1ca28@fe66c3
java.lang.OutOfMemoryError: Java heap space

It's the same with "Type A" and "Type B"

Same issue here. I don't get an image write. It's just a  .heatmap  file

@HeyJacob Could you please try disabling every plugin besides World Heatmap and then writing an image to see if the problem persists? I think that the problem might be that users with other memory-intensive (or simply many) plugins running might run out of available memory when the World Heatmap plugin loads/writes an image, which means that the plugin works for (perhaps) most users, but never for some. It would also be very valuable feedback if you could share the list of plugins that you have running. Thank you for your help.
(P.S. I have a new update that makes the plugin require much less memory. Before I publish the update, I have to replace a dependency disallowed by RuneLite with a homemade version which will require me doing some research on manually writing PNGs chunk-by-chunk. Once it's ready, then even users with lots of plugins should not run into heap space overflow problems such as that mentioned in this issue (if I'm right about the nature of the problem).)

Could you please try disabling every plugin besides World Heatmap and then writing an image to see if the problem persists?
While running RuneLite with no plugins, it works. But not with other plugins enabled.

https://youtu.be/A2EITKNCQ6w

It would also be very valuable feedback if you could share the list of plugins that you have running.

 I've been meaning to investigate and fix it for a long time, but have been pretty biz with university stuff. Anywhomst, don't worry I will fix it some time in the next couple of months. Thank you all for the interest.

Could you please try disabling every plugin besides World Heatmap and then writing an image to see if the problem persists?
While running RuneLite with no plugins, it works. But not with other plugins enabled.

https://youtu.be/A2EITKNCQ6w

It would also be very valuable feedback if you could share the list of plugins that you have running.

RuneLite Enabled Plugins List (Click to expand)

Also thank you for ze video and list of plugins

P.S. I should mention: The heatmap data itself is probably indeed being saved/kept track of for you all (despite the image saving not working). So, when I fix it, you guys should be able to see your progress if you've been running the plugin.

I would say you are correct as the file is still getting updated.

Any updates to this?

@Nick2bad4u Not at the moment, sorry. Still busy with school stuff but I'm rooking forward to fixing it before too long

@Nick2bad4u Not at the moment, sorry. Still busy with school stuff but I'm rooking forward to fixing it before too long

I did some troubleshooting. and thought it was a permissions error on the folder but that does not seem to be the case as I set permissions to wide open on the entire folder.
Not sure whether that helps or not.

In the folder called Heatmap Images you can rename the username_TypeA and TypeB files to end with ".png" and you will get the image.

In the folder called Heatmap Images you can rename the username_TypeA file to end with ".png" and you will get the image. Doesn't seem to work for TypeB.

I tried this and neither one works. Trying to open the PNG just gives me a corrupt file error.

In the folder called Heatmap Images you can rename the username_TypeA file to end with ".png" and you will get the image. Doesn't seem to work for TypeB.

I tried this and neither one works. Trying to open the PNG just gives me a corrupt file error.

As far as the heatmap images folder - I dont have one at all due to it now writing anything when you try to get it to generate a heatmap

Make sure you're in the Heatmap Images folder and not the Heatmap Files folder. From your screenshot the name of your files are ending in  ".heatmap.png" which suggests you are in the Heatmap Files folder.

In the folder called Heatmap Images you can rename the username_TypeA file to end with ".png" and you will get the image. Doesn't seem to work for TypeB.

I tried this and neither one works. Trying to open the PNG just gives me a corrupt file error.

As far as the heatmap images folder - I dont have one at all due to it now writing anything when you try to get it to generate a heatmap

Make sure you're in the Heatmap Images folder and not the Heatmap Files folder. From your screenshot the name of your files are ending in  ".heatmap.png" which suggests you are in the Heatmap Files folder. The files ending in ".heatmap" should be left alone as these are not images.

Correct!
The issue is the heatmap images folder doesn't exist for me. Even after clicking write image.

Hello All, I have a shadow JAR aka a preview of the World Heatmap update/fix which you can test out downloading it here and then running java -jar -ea worldheatmap.jar on it in a terminal. I would recommend making a backup of your ~/.runelite/worldheatmap folder (it's in your home directory) before testing it, just in case something were to go wrong and your original .heatmap files disappeared or something (don't remove it, just make a backup copy of it somewhere)
It would be super coolio if some of you could test it out and tell me if there are still any problems. Also there are some new features. One of em is a heatmap combiner tool that can be used to combine .heatmap files that were saved under different usernames, because originally I forgot to take into account that people's usernames can change. Now, the heatmap files go by unique player ID (and the image filenames properly end with ".png")

Hello All, I have a shadow JAR aka a preview of the World Heatmap update/fix which you can test out downloading it here and then running java -jar -ea worldheatmap.jar on it in a terminal. I would recommend making a backup of your ~/.runelite/worldheatmap folder (it's in your home directory) before testing it, just in case something were to go wrong and your original .heatmap files disappeared or something (don't remove it, just make a backup copy of it somewhere)
It would be super coolio if some of you could test it out and tell me if there are still any problems. Also there are some new features. One of em is a heatmap combiner tool that can be used to combine .heatmap files that were saved under different usernames, because originally I forgot to take into account that people's usernames can change. Now, the heatmap files go by unique player ID (and the image filenames properly end with ".png")

I will try this out tomorrow.

So I tried it out but I cannot log in because I use jagex launcher, and the command above tries to launch runelite manually and not via jagex launcher.
Can you compile the plugin so I can add it as a plugin to my current runelite folder?

So I tried it out but I cannot log in because I use jagex launcher, and the command above tries to launch runelite manually and not via jagex launcher.
Can you compile the plugin so I can add it as a plugin to my current runelite folder?

You can follow these steps and then when you do the java -jar -ea worldheatmap.jar, it'll start up with your account logged in as per the usual jagex launcher way. Thanks again for helping to make sure it's working 😎

So I tried it out but I cannot log in because I use jagex launcher, and the command above tries to launch runelite manually and not via jagex launcher.
Can you compile the plugin so I can add it as a plugin to my current runelite folder?

You can follow these steps and then when you do the java -jar -ea worldheatmap.jar, it'll start up with your account logged in as per the usual jagex launcher way. Thanks again for helping to make sure it's working 😎

Thanks.
It worked.

So I tried it out but I cannot log in because I use jagex launcher, and the command above tries to launch runelite manually and not via jagex launcher.
Can you compile the plugin so I can add it as a plugin to my current runelite folder?

You can follow these steps and then when you do the java -jar -ea worldheatmap.jar, it'll start up with your account logged in as per the usual jagex launcher way. Thanks again for helping to make sure it's working 😎

Thanks.
It worked.

Awwww yeah 😎Sweet. I'll close this issue now, since the bugs have presumably been fixed by the update. It'll probably take a week or two for the update to get through the RuneLite code review and then it'll be available on the client plugin hub

Amy idea when this update will hit runelite?

Amy idea when this update will hit runelite?
Yeaahhh I made the pull request for the update and then realize there was something I need to change (may or may not be significant) and had to cancel it. I'm on break so I'll repush it in the next week or two. Sorry about the delay boys

Amy idea when this update will hit runelite?

Yeaahhh I made the pull request for the update and then realize there was something I need to change (may or may not be significant) and had to cancel it. I'm on break so I'll repush it in the next week or two. Sorry about the delay boys

Thanks for update!


rust: enable profiler support

Is your feature request related to a problem? Please describe.
The current version of rust does not ship with the profiler support.
Describe the solution you'd like
Ship a version of rust which has profiler support.

feature merged.


(feat) FluentBit kubernetes_events input plugin

Is your feature request related to a problem? Please describe.
FluentBit introduced kubernetes_events plugin in 2.15 or so. Would be nice to be able to define it in the Fluent Operator native way.
Describe the solution you'd like
kubernetesEvents plugin in ClusterInput/Input for FluentBit
Additional context
No response

I will pick this up some time next week.

We would also love to use this. @jjsiv, have you had time to look at it?

I have created a PR to add this feature.


Migration from V2 to  V3:  tick() returns unreliable status

Unsuccessfully tried to migrate from V2 to v3 with troubles.  Platform: STM32F401
I use the following to handle events/actions:
if( inputEnc.tick() ){
        // event handler
        bool fastRotate = inputEnc.fast();
  	if( inputEnc.right() ) {
           // do something for encoder turning right
        }
        ....
  	if( inputEnc.left() ) {
           // do something for encoder turning left
        }
 }

So, it seems that tick() is skipping events (returns true for some events, does not return true for some events even though an event is happening); as a result, the handler does not process events, behaves as event did not happen... It skips events unregularly, so, I did not notice any pattern.  Should be mentioned, I also call tickISR() in the interrupt for any pin state CHANGE.
Please, check up if tick() is always returning true for any event.
Thank you.

Do you have only one tick function in loop?

yes, I do: just one tick() is in the loop() for encoder with button. I also have a separate button with a dedicated button.tick()  in the loop()...

no, v3 is more stable than v2, I'm sure that you do something wrong. Try examples from library. And give me a minimal example with this bug. Because tick always returns true on events, there can't be event without true result


Bug when dropping raman.spc

Using the file in test-data\spc\raman.spc in the empty app:

It seems to be a bug in react-plot.

I'm unable to reproduce, dev or previews.

I have the error sometimes in dev, but I am not able to find a pattern that reproduces it consistently.
It could be related to hot-reloading. If anyone experiences the issue in prod, please repoen.


Global error codes defined

This adds an error code system to the project. The Error class could be enhanced to throw exceptions - but this works as a baseline / skeleton and creates a common error interface through the project.

Looks good! I added an Error for shader loading. If it still looks good to you I'm ready to merge. :+1:

Then merge it 👍


Use single lookup and binary search for log2

We can do a much more efficient and simple implementation by employing a binary search to quickly narrow down the most significant bit, followed by a small lookup table for the final 4 bits.
It's more performant as we avoid using multiple lookup tables and modulo.
To generate the table lookup value:
 def msb_position(n):
    return (n.bit_length() - 1) if n else 0

def generate_lookup_table():
    table = [msb_position(i) for i in range(16)]

    # Pad the table to 32 bytes
    padded_table = table + [0] * 16

    # Convert to a single 32-byte value
    lookup_value = 0
    for i, value in enumerate(padded_table):
        lookup_value |= value << (8 * (31 - i))

    return f"0x{lookup_value:064x}"

print(generate_lookup_table())

Inspired by https://www.chessprogramming.org/BitScan#De_Bruijn_Multiplication_2

@cairoeth Great work! your solution is indeed simpler, cheaper and generate a smaller binary 👏 .
I rewrote it in pure EVM assembly to check how the optimal code looks like (is hard to make solidity generate optimal code), your solution optimal code consumes 156 gas:
PUSH32 <value_here>

// Lookup Table
PUSH30 0x010102020202030303030303030300000000000000000000000000000000

// If value has upper 128 bits set, log2 result is at least 128
DUP2
PUSH16 0xffffffffffffffffffffffffffffffff
LT
PUSH1 7
SHL

// If upper 64 bits of 128-bit half set, add 64 to result
DUP3
DUP2
SHR
PUSH8 0xffffffffffffffff
LT
PUSH1 6
SHL
OR

// If upper 32 bits of 64-bit half set, add 32 to result
DUP3
DUP2
SHR
PUSH4 0xffffffff
LT
PUSH1 5
SHL
OR

// If upper 16 bits of 32-bit half set, add 16 to result
DUP3
DUP2
SHR
PUSH2 0xffff
LT
PUSH1 4
SHL
OR

// If upper 8 bits of 16-bit half set, add 8 to result
DUP3
DUP2
SHR
PUSH1 0xff
LT
PUSH1 3
SHL
OR

// If upper 4 bits of 8-bit half set, add 4 to result
DUP3
DUP2
SHR
PUSH1 0x0f
LT
PUSH1 2
SHL
OR

// Table lookup
SWAP2
DUP3
SHR
BYTE
OR

In comparison, my solution optimal code consumes 162 gas and generates a larger binary 127 bytes, while yours 121 bytes, thank you very much for this contribution @cairoeth 🎉 :
PUSH32 0xf000

DUP1
PUSH1 1
SHR
OR

DUP1
PUSH1 2
SHR
OR

DUP1
PUSH1 4
SHR
OR

DUP1
PUSH1 8
SHR
OR

DUP1
PUSH1 16
SHR
OR

DUP1
PUSH1 32
SHR
OR

DUP1
PUSH1 64
SHR
OR

DUP1
PUSH1 128
SHR
OR

PUSH1 1
SHR
PUSH1 1
ADD

PUSH31 0x08101820283038404850586068707880889098a0a8b0b8c0c8d0d8e0e8f0f8
PUSH30 0x010002040007030605000000000000000000000000000000000000000000
PUSH1 11
PUSH1 255
DUP5
MOD
MOD
BYTE

SWAP2
DUP3
SHR
MUL
PUSH1 248
SHR
ADD


Detect when date is pressed, and get the date

[x ] I have verified there are no duplicate active or recent bugs, questions, or requests
[x ] I have verified that I am using the latest version of CVCalendar.
[x ] I have given my issue a non-generic title.

How can I detect when a date is pressed, and print the date value? I tried using this:
func didSelectDayView(dayView: CVCalendarDayView) {
        print("yay")
}

But when selecting a date in the CalendarView, it doesn't print anything.

Did you set the delegates properly?

@ccortessanchez I have added it like this:
func ViewController: UIViewController, CVCalendarViewDelegate, CVCalendarMenuViewDelegate {

I'm guessing you add this two lines somewhere in your viewDidLoad method
calendarView.delegate = self menuView.delegate = self

@ccortessanchez I have this:
    override func viewDidLoad() {
        super.viewDidLoad()

        // Code below

        // Appearance delegate [Unnecessary]
        self.calendarView.calendarAppearanceDelegate = self

        // Animator delegate [Unnecessary]
        self.calendarView.animatorDelegate = self

        // Menu delegate [Required]
        self.menuView.menuViewDelegate = self

        // Calendar delegate [Required]
        self.calendarView.calendarDelegate = self
    }

    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()

        // Commit frames' updates
        self.menuView.commitMenuViewUpdate()
        self.calendarView.commitCalendarViewUpdate()
    }

This worked:
    func didSelectDayView(_ dayView: DayView, animationDidFinish: Bool) {
        print("kfkf")
    }

But how do I get the the exact date that is selected? I have stored value in Realm that I want to show up when the specific date is selected, and I have also stored date values in Realm. How can I do that?

This worked:
    func didSelectDayView(_ dayView: DayView, animationDidFinish: Bool) {
        print("kfkf")
    }

But how do I get the the exact date that is selected? I have stored value in Realm that I want to show up when the specific date is selected, and I have also stored date values in Realm. How can I do that?

You can get the selected day view date like this
`
var calendar = Calendar.current
calendar.locale = Locale.current
calendar.timeZone = TimeZone(identifier: Constants.TimeZone.UTC)! // Here use your time zone
let date = dayView.date.convertedDate(calendar: calendar)
`

var calendar = Calendar.current
calendar.locale = Locale.current
calendar.timeZone = TimeZone(identifier: Constants.TimeZone.UTC)! // Here use your time zone
let date = dayView.date.convertedDate(calendar: calendar)

Where did you get Constants from? I get error: Use of unresolved identifier 'Constants'

@ccortessanchez Worked, thanks!

@ccortessanchez Worked, thanks!


Windows wheel build error - Tried everything with all requirements you have

I need compile DeepSpeed for Python 3.10
I have literally everything setup. The compile did run like 20 minute or more
However failed later
Now as a Microsoft you are forcing us to use DeepSpeed on Linux is ridiculous if you ask anyone opinions
So i got build tools totally installed - 2022

I got python 3.10.11 and CUDA 12.4 installed
The first error is that you have to fix setup.py git path since it works only on Linux. I did that
# Write out version/git info.
git_hash_cmd = ["git", "rev-parse", "--short", "HEAD"]
git_branch_cmd = ["git", "rev-parse", "--abbrev-ref", "HEAD"]
if command_exists('git') and not is_env_set('DS_BUILD_STRING'):
    try:
        result = subprocess.check_output(git_hash_cmd, shell=True)
        git_hash = result.decode('utf-8').strip()
        result = subprocess.check_output(git_branch_cmd, shell=True)
        git_branch = result.decode('utf-8').strip()
    except subprocess.CalledProcessError:
        git_hash = "unknown"
        git_branch = "unknown"
else:
    git_hash = "unknown"
    git_branch = "unknown"

After that compile starts

And finally compile ends with below error
cl : Command line warning D9025 : overriding '/D__CUDA_NO_HALF2_OPERATORS__' with '/U__CUDA_NO_HALF2_OPERATORS__'
slice_attn_masks.cu
tmpxft_0000b2e4_00000000-7_slice_attn_masks.compute_90.cudafe1.cpp
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\include\cuda_fp16.hpp(992): fatal error C1001: Internal compiler error.
(compiler file 'D:\a\_work\1\s\src\vctools\Compiler\CxxFE\sl\p1\c\token_io.cpp', line 2687)
 To work around this problem, try simplifying or changing the program near the locations listed above.
If possible please provide a repro here: https://developercommunity.visualstudio.com
Please choose the Technical Support command on the Visual C++
 Help menu, or open the Technical Support help file for more information
error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.4\\bin\\nvcc.exe' failed with exit code<PHONE_NUMBER>

And still with below attached full logs it failed
entire.logs.txt
I have the below pip freeze so you are going to either start publishing pre compiled up to date wheels for Windows or fix your script to run on Windows?
Microsoft Windows [Version 10.0.22631.4602]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Furkan>pip freeze
ae-ffmpeg==1.2.0
aiofiles==24.1.0
aiohappyeyeballs==2.4.3
aiohttp==3.11.7
aiosignal==1.3.1
anyio==4.6.2.post1
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==2.4.1
async-lru==2.0.4
async-timeout==5.0.1
attrs==24.2.0
auto-editor==25.3.1
babel==2.16.0
beautifulsoup4==4.12.3
bleach==6.1.0
Brotli==1.1.0
bs4==0.0.2
cachetools==5.5.0
certifi==2024.8.30
cffi==1.17.1
charset-normalizer==3.3.2
colorama==0.4.6
comm==0.2.2
cryptography==44.0.0
debugpy==1.8.7
decorator==4.4.2
defusedxml==0.7.1
discord==2.3.2
discord.py==2.4.0
exceptiongroup==1.2.2
executing==2.1.0
fastjsonschema==2.20.0
ffmpeg==1.4
ffmpeg-python==0.2.0
filelock==3.13.1
fire==0.7.0
fqdn==1.5.1
frozenlist==1.5.0
fsspec==2024.2.0
future==1.0.0
GPUtil==1.4.0
h11==0.14.0
hf_transfer==0.1.8
httpcore==1.0.6
httpx==0.27.2
huggingface-hub==0.26.2
idna==3.10
imageio==2.36.1
imageio-ffmpeg==0.5.1
imutils==0.5.4
inputimeout==1.0.4
ipykernel==6.29.5
ipython==8.28.0
ipywidgets==8.1.5
iso8601==2.1.0
isoduration==20.11.0
jedi==0.19.1
Jinja2==3.1.3
json5==0.9.25
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter-events==0.10.0
jupyter-lsp==2.2.5
jupyter_client==8.6.3
jupyter_core==5.7.2
jupyter_server==2.14.2
jupyter_server_terminals==0.5.3
jupyterlab==4.2.5
jupyterlab_pygments==0.3.0
jupyterlab_server==2.27.3
jupyterlab_widgets==3.0.13
llvmlite==0.43.0
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib-inline==0.1.7
mdurl==0.1.2
mistune==3.0.2
more-itertools==10.5.0
moviepy==1.0.3
mpmath==1.3.0
multidict==6.1.0
mutagen==1.47.0
natsort==8.4.0
nbclient==0.10.0
nbconvert==7.16.4
nbformat==5.10.4
nest-asyncio==1.6.0
networkx==3.2.1
ninja==<IP_ADDRESS>
notebook_shim==0.2.4
numba==0.60.0
numpy==1.26.3
nvidia-ml-py==12.535.161
nvitop==1.3.2
openai-whisper @ git+https://github.com/openai/whisper.git@90db0de1896c23cbfaf0c58bc2d30665f709f170
opencv-contrib-python==<IP_ADDRESS>
opencv-python==<IP_ADDRESS>
overrides==7.7.0
packaging==24.1
pandocfilters==1.5.1
parso==0.8.4
pillow==10.2.0
pillow_heif==0.20.0
platformdirs==4.3.6
proglog==0.1.10
prometheus_client==0.21.0
prompt_toolkit==3.0.48
propcache==0.2.0
psutil==6.0.0
pure_eval==0.2.3
py-cpuinfo==9.0.0
pyav==13.1.0
pycparser==2.22
pycryptodomex==3.21.0
Pygments==2.18.0
PyNaCl==1.5.0
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-json-logger==2.0.7
pywin32==308
pywinpty==2.0.14
PyYAML==6.0.2
pyzmq==26.2.0
referencing==0.35.1
regex==2024.9.11
requests==2.32.3
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rich==13.9.2
rpds-py==0.20.0
safetensors==0.4.5
Send2Trash==1.8.3
sentencepiece==0.2.0
six==1.16.0
sniffio==1.3.1
soupsieve==2.6
stack-data==0.6.3
sympy==1.13.1
termcolor==2.4.0
terminado==0.18.1
tiktoken==0.7.0
tinycss2==1.3.0
tokenizers==0.20.0
tomli==2.0.2
torch==2.5.0+cu124
torchao==0.7.0
torchaudio==2.5.0+cu124
torchvision==0.20.0+cu124
tornado==6.4.1
tqdm==4.66.5
traitlets==5.14.3
transformers==4.45.1
triton @ https://github.com/woct0rdho/triton-windows/releases/download/v3.1.0-windows.post5/triton-3.1.0-cp310-cp310-win_amd64.whl
twitchio==2.10.0
types-python-dateutil==<IP_ADDRESS>41003
typing_extensions==4.9.0
uri-template==1.3.0
urllib3==2.2.3
Wand==0.6.13
wcwidth==0.2.13
webcolors==24.8.0
webencodings==0.5.1
webp==0.4.0
websocket-client==1.8.0
websockets==13.1
widgetsnbextension==4.0.13
windows-curses==2.3.3
WMI==1.5.1
xformers==0.0.28.post2
yarl==1.18.0
yt-dlp==2024.10.7

C:\Users\Furkan>

Hi @FurkanGozukara - we are working on getting Windows support added back in, and wheels published (and automated) again soon.
In the meantime, are you able to identify which deepspeed op is causing the nvcc internal error and confirm if that is the only problem you are hitting/confirm that nvcc is able to properly compile other files?

hi @loadams . i am able to compile some other apps like InsightFace, XPose, UniPose maybe some other 3d related libraries recently i tried like using microsoft/TRELLIS
i really don't know what causes error here entire logs
thank you so much i hope you make automated wheel releases for Windows
entire.logs (1).txt

Hello again @loadams
This guy single handedly and (automatically i presume) publishing all torch and python versions of pre-compiled wheels of pytorch3d
Perhaps it can help you
https://github.com/MiroPsota/torch_packages_builder
I used it and it works amazing


Update Actions.md

Coverage remained the same at 83.7% when pulling 6a91599de260675a28e7e557190ae8cc1b17dd37 on segiddins:patch-1 into 282bbe6727f356bff7e38656a9498e567088a661 on KrauseFx:master.

Thank you @segiddins :+1:


TEST_CASE_TEMPLATE not executable in combination with TYPE_TO_STRING

Description
I have two separate cpp files. In one I have a test case like this:
TYPE_TO_STRING(robin_hood::unordered_flat_map<int, int>);
TYPE_TO_STRING(robin_hood::unordered_node_map<int, int>);

TEST_CASE_TEMPLATE("bench distinctness" * doctest::test_suite("bench"), Map,
                   robin_hood::unordered_flat_map<int, int>,
                   robin_hood::unordered_node_map<int, int>) {
...
}

In the other .cpp file I have this:
TYPE_TO_STRING(robin_hood::unordered_flat_map<int, int>);
TYPE_TO_STRING(robin_hood::unordered_node_map<int, int>);

TEST_CASE_TEMPLATE("copy and assign maps" * doctest::test_suite("unit"), Map,
                   robin_hood::unordered_flat_map<int, int>,
                   robin_hood::unordered_node_map<int, int>) {
...
}

It seems that somehow doctest does not like that. When I execute my binary with -ltc I get this output:
[doctest] listing all test case names
===============================================================================
copy and assign maps<robin_hood::unordered_flat_map<int, int>>
copy and assign maps<robin_hood::unordered_node_map<int, int>>
copy and assign maps<robin_hood::unordered_flat_map<int, int>>
copy and assign maps<robin_hood::unordered_node_map<int, int>>
===============================================================================
[doctest] unskipped test cases passing the current filters: 4

It seems I cannot execute the "bench distinctness" tests, they somehow are erroneously mapped to the "copy and assign maps" tests.

doctest version: v2.3.1
Operating System: Linux Mint 19.2
Compiler+version: g++ 8.2.0

I have a minimal example:
In main.cpp:
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest.h>

in a.cpp:
#include <doctest.h>
#include <string>
TYPE_TO_STRING(std::string);
TEST_CASE_TEMPLATE("a", T, std::string) {}

in b.cpp:
#include <doctest.h>
#include <string>
TYPE_TO_STRING(std::string);
TEST_CASE_TEMPLATE("b", T, std::string) {}

Compiled everything, running ./app -ltc shows:
[doctest] listing all test case names
===============================================================================
a<std::string>
===============================================================================
[doctest] unskipped test cases passing the current filters: 1

So no mention of b<std::string>. Running ./app runs just one test:
[doctest] doctest version is "2.3.1"
[doctest] run with "--help" for options
===============================================================================
[doctest] test cases:      1 |      1 passed |      0 failed |      0 skipped
[doctest] assertions:      0 |      0 passed |      0 failed |
[doctest] Status: SUCCESS!

I reproduced it... Thanks for reporting! I'll look into this ASAP

This is due to an ODR violation... horrible and nasty bug - thanks for catching it!
The problem is that this constructor is implicitly inline and is thus a weak symbol so if there are multiple copies of it (with the same types for the template) in different source files with the same names then only 1 copy would be left (by random - or object file include order - AKA random) because of the linker removing all other duplicates.
Currently unique names are generated using __COUNTER__ so if there is 1 normal test case above that in one of the 2 files then all would be fine.
Alternatively I could add __LINE__ in addition to __COUNTER__ for unique names but even then your example wouldn't work because the 2 test cases are on the same lines in the 2 different TUs.
So I'm currently trying to figure out how to rewrite it so the symbols aren't weak.

try it out now - should be fine

Works great, thanks for fixing this so fast!


Link to file

It'd be great to be able to link to a specific file in a bin so people who click on the link see that file front and center!

+1
I'm willing to PR if someone can direct me where to write the code, I"m not familiar with the project files. Or at least give me a direction.


feat: martian-pipestance crate

Add a new crate that defines structs corresponding to _perf and _finalstate file. Code mostly copied from Logan's crate
Code to compute critical path in a pipestance.

I'm going to close this PR.  It doesn't belong in this repo, it doesn't product correct output, and it's redundant with existing code we have elsewhere.

@adam-azarchs can you please link this PR to the aforementioned existing code for our current edification/posterity?

I'm going to close this PR. It doesn't belong in this repo, it doesn't product correct output, and it's redundant with existing code we have elsewhere.

I am okay not including the critical path code here, but it makes sense to have the struct definitions for perf and finalstate in this repo.

https://github.com/10XDev/timetrial/tree/master/schedulesim

I'm going to close this PR. It doesn't belong in this repo, it doesn't product correct output, and it's redundant with existing code we have elsewhere.

I am okay not including the critical path code here, but it makes sense to have the struct definitions for perf and finalstate in this repo.

Why?  Nothing using this repo should be touching top-level pipestance state like that.

So I see library code there, but is there an existing executable to output the critical path from _perf data?  If not, at least some guidance to how to fit the existing pieces together would probably be useful.

Yes, but they needed a bit of maintenance; see the (private repo) PRs I sent you.


UX suggestion: Markdown editor with preview side-by-side (split-view)

As in the title - it will be great to have Markdown editor where you type together with preview available side-by-side in split-view, perhaps working in fullscreen mode, similar to one markdown editor for Mac Mou. This will look less or more like this (excuse me using text, not proper icons, its just a quick mock-up:

I've already answered this in the admin plugin (where this should of been raised :)
https://github.com/getgrav/grav-plugin-admin/issues/533


Updated ModifiableSinkConduit + RequestInterceptInjectionHandler

Fixed issue where request is in "completed" state during request transformation, causing the transform operation to be skipped

@KalevGonvick Thanks for your help.


uni-sync.service does not exist

Hello when I run the install script and select 'y' to install as a service I get this message.
Failed to enable unit: Unit file uni-sync.service does not exist.
Failed to restart uni-sync.service: Unit uni-sync.service not found.

Issued fixed in this PR: https://github.com/EightB1ts/uni-sync/pull/9

Fix did not do it for me, I am using fedora, was using Arch(btw) and it works fine but not on fedora.


HAWQ-848. Writable external table: gpfdist report "Failed initialization (url.c:1671)"

cc @yaoj2 @wengyanqing

+1

LGTM


[Feature] Add "Quantity" as an addable option

Is your feature request related to a problem? Please describe.
Right now the extension behave options to trigger the device  restricted by

Opening time
payable x times during the last 24 hours

Describe the solution you'd like
One more option to allow triggering by a quantity check would allow a few more usecases.
I would like it to be possible to specify the quantity of availability for each product/machine. That way, it can no longer be triggered if the product is sold out.
This would allow or improve the "misuse" of the extension, e.g. for the use of vending machines.
This is my solution
Add a "optional int" value field to specify the quantity during configuration/editing of the device.

Additional context

If the field is empty do not consider this option.
If value 0 give back sold out
if value <1 allow create invoice

Thoughts

Backend Update:

Implement a feature in the backend to track the product's quantity. When the quantity reaches 0, mark the product as "sold out" in the database. This would prevent the device from being triggered when a product is out of stock.

UI Enhancement:

In the DeviceTimer configuration/editing form, add a visible field for the current product quantity.
When the quantity hits 0, display a prominent "Refill Needed" message with an option to manually restock the product. This would improve usability by enabling quick restocking directly through the UI.

WebSocket or Webhook Reminder:

Integrate a WebSocket/Webhook connection to send a reminder when the product quantity reaches 0. This could trigger notifications or alerts for admins.


Update deps

@typescript-eslint
vue-loader
all codex packages
Bug: T350667

As far as i've tested they do but would appreciate more eyes testing!


Policy Pack for Azure CIS v2.0 Enforcement for Section 5

Created the resource via stack to make CIS green

Closing this because this section is merged already via a different PR. https://github.com/turbot/guardrails-samples/pull/755


Revert "Move source properties backwards compatibility rules to drive…

…rs (#3072)"
This reverts commit 15d85f53c1a0917d79aeb223048d23dfdb440777.
Please go the the Preview tab and select the appropriate sub-template:

Applications
Others

closed in favor of https://github.com/rilldata/rill/pull/3080


App Bridge React Link in README Leads to a 404

Issue summary
The project README contains a link to a repository on GitHub called App Bridge React which does not exist or is private which results in a 404 when followed.
The broken link is:
[App Bridge React](https://github.com/Shopify/app-bridge/tree/master/packages/app-bridge-react)

Expected behavior
The link should lead to a public repository, relevant documentation or be removed.
Possible Replacement URLs

https://shopify.dev/tools/app-bridge
https://shopify.dev/tools/app-bridge/react-components
https://github.com/Shopify/shopify-app-bridge (though this repository only contains a README at the time of writing)

@DaveLak thanks for reporting this, it's been fixed.


improvementadd check when drop/set workload group

Proposed changes
1 check group exists when set group for user property;
eg, if g1 not exists, then set op should be failed.
mysql [test]>SET PROPERTY FOR 'root' 'default_workload_group' = 'g1';
ERROR 1105 (HY000): errCode = 2, detailMessage = workload group g1 not exists

2 check whether group is used for user when drop group;
eg, if a group is set for root, then drop should be failed.
mysql [test]>drop workload group test_g1;
ERROR 1105 (HY000): errCode = 2, detailMessage = workload group test_g1 is set for user root

run buildall

run buildall

run buildall


Provide authentication for images accessed via network within platform's driver_config

I should preface this by mentioning that I'm quite new to Kitchen and Kitchen-Docker (and Configuration Management as a whole!), so apologies if I've missed something obvious.
When configuring the test environment, the image(s) to be provisioned can have their origin specified via URL. However, if the image is located behind a level of authentication (e.g. proxy network), to my knowledge there is no method of supplying authentication information to bypass whatever layer of security there may be and retrieve the image from beyond.
I noticed that there are username and password variables in the source code (.kitchen.yml) as shown below...
        driver:
          name: docker

        platforms:
          - name: dockerfile
            driver:
                 username: dockerfile
                 password: dockerfile

...but these seem to be unrelated to any sort of image attainment, and even then their nature doesn't appear to be secure enough (hard-coded in source albeit probably storable in environment) to fit the use case.
I was wondering whether such a method of providing authentication existed within this plugin, or if not, whether it could develop into something related to what I've pseudo'd below?
        driver:
          name: docker

        platforms:
          - name: example
            driver_config:
               platform: os
               image: path_to_image
                 image_auth: admin:password

Figured out a solution to this issue, albeit its likely specific to my use case: I was able to 'docker login' to the internal registry prior to retrieving the image, and credentials were passed in through a network-available environment variable.


added default input and output filenames

This PR fixes #27

@pzarabadip also maybe specify the default output Node to fix verdi calcjob res? Here's the error that I get:
Critical: cannot load results as <class 'aiida_orca.calculations.orca_main.OrcaCalculation'> does not specify a default output node

Codecov Report

Merging #29 (4ffb6d5) into master (693c217) will increase coverage by 0.26%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #29      +/-   ##
==========================================
+ Coverage   89.89%   90.15%   +0.26%
==========================================
  Files           8        9       +1
  Lines         188      193       +5
==========================================
+ Hits          169      174       +5
  Misses         19       19

Impacted Files
Coverage Δ

aiida_orca/calculations/orca_asa.py
40.00% <ø> (ø)

aiida_orca/calculations/orca_main.py
100.00% <100.00%> (ø)

aiida_orca/parsers/__init__.py
93.02% <100.00%> (ø)

aiida_orca/utils/input_generator.py
97.50% <100.00%> (+0.13%)
:arrow_up:

aiida_orca/__init__.py
100.00% <0.00%> (ø)


SRG SSR hidden and page view tracking support

As an app developer integrating Pillarbox I want to be able to track page views according to the SRG SSR standards. I also want to be able to track various arbitrary events.
Acceptance criteria

Manual page view tracking is possible.
Hidden tracking is possible.

Tasks

[ ] Implement page view analytics for comScore.
[ ] Implement page view analytics for Commanders Act.
[ ] Implement hidden event analytics for Commanders Act.
[x] Discuss if app overlap measurements are still needed and create a story if the answer is yes.

App overlap measurements are not needed anymore.


Full recompilation on Groovy-Java joint compilation

Context
Currently, incremental Groovy compilation only works for files compiled by the Groovy compiler. Java files are compiled by the Java compiler.
This PR disables incremental compiler if Java files found because this might cause incorrectness.

Thanks @wolfs !


war file unavailable

fs-moni.cloudapp.net not resolving...! Maybe Azure is down? ;-)
wget http://fs-moni.cloudapp.net/freeswitchop_2.11-0.1.0-SNAPSHOT.war
--2016-08-23 22:35:59--  http://fs-moni.cloudapp.net/freeswitchop_2.11-0.1.0-SNAPSHOT.war
Resolving fs-moni.cloudapp.net (fs-moni.cloudapp.net)... <IP_ADDRESS>
Connecting to fs-moni.cloudapp.net (fs-moni.cloudapp.net)|<IP_ADDRESS>|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-08-23 22:35:59 ERROR 404: Not Found.

Hi there,
The server was down and that is why you had issues downloading the war..
please try again


Tidy Feature Highlighting

When a user cancels an action, associated highlighting is removed. However if the user does not cancel (e.g via an abort or form close button) an action and switches to a new tool the highlighting persists until a new selection is made.
When a new tool is selected feature highlighting must be reset or at-least hidden

resolved


chore(deps): upgrade dev dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-dev-dependencies-2.x" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 1574

Questions ?
Please refer to the Backport tool documentation


Displaying input of fractions

If there is a requirement for inputting fractions on the user, via the rule fractionNumbers, then Numbas is very kind to the user by displaying any decimal input by the user as a fraction  where possible e.g. user  input of 0.5 is dynamically displayed as 1/2 in the input box. This should be displayed as a decimal to reinforce the stern message that comes up asking for the  input of fractions - otherwise the user may get confused!

I assume you're talking about the answerSimplification setting. That is only for display. It doesn't affect marking. You'll have to use string restrictions.

This is the dynamic display of user input not the answer display - I already have the string restriction in place, but if the user inputs e^(0.5x) for example, which is not accepted by the restriction, the display as he or she types in becomes e^(x/2)


Add support for sandboxing and resource quotas

This is a feature I've developed for our own usage, but since it might be useful for others I'm submitting it here. I'll let you choose whether this deserves being merged here or not.
The goal is to allow more secure embedding of DynJS by:

Preventing JS code from accessing outside APIs (e.g. Java libraries)
Enforcing CPU and memory quotas when JS code is being executed

The first one boils down to an additional config option that prevents Java packages from being exposed to JS code.
The second one is slightly more complex. It uses performance counters to monitor the CPU usage and total allocations for the thread while JS code is running. At regular interval the quotas are checked, and if they are found to be exceeded an exception is thrown.
Sadly, those counters are only available on Hotspot, so attempting to use resource quotas on JVMs that don't implement them will result in an exception being thrown.
I haven't yet battle tested the "strength" of this sandbox, but as of now I know of no way to circumvent it.

+1 for merging this changes. Is there any schedule for this?

Anyone with write access willing to merge this?

I would need this for a big project - any plan to merge or do I have to use @malaporte's persion ?

This project is now unmaintained as mentioned in the last commit. On our side we're trying to migrate to Nashorn, but we haven't (yet) found any way to enforce similar CPU & memory quotas there. It's missing a way to have a piece of code executed at interval in the JS processing. And according to this recent mailing list post it's not going to happen: http://mail.openjdk.java.net/pipermail/nashorn-dev/2016-January/005909.html ...

Actually, I came across this project because I have quite a long experience with nashorn but never found any nice way to use it for running "unsafe" (user-input) scripts with, at least. Please update if you find any nice way of doing it :D


[Extension API] Handling copy paste event in tree view

It seems that currently the tree view cannot receive copy-paste event like the file explorer.
Since the tree view has supported D&D now, would also be great if copy-paste can be doable.

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


lib/core: Optimized html_escape for FlatText variants

As @privat requested, a byte-oriented optimized version of FlatText for FlatString as it is the most common case, like escape_to_c, it works at the byte level to accelerate fetching of characters.
On a short test program
var s = ""
for i in [0 .. 2000[ do s = "<STRING/&rt;".html_escape

Valgrind reports an old runtime of 18.208 MIr with a 8856 Ir/call to html_escape; the new runtime is 3.093 MIr, which translates to a 1298 Ir/call.

+1


Transformation idea: represent 1 as cos(0.0)

In GraphicsFuzz we have various ways of generating 1, and a new one could be as cos(some-expression-also-guaranteed-to-be-one).

Fixed via #424


Can I use Regex in the rules?

Is it possible to use Regex.IsMatch as a rule?
something like this for example:
"Expression": "new Regex(@"a").IsMatch(input1.someString)"
when I'm debugging I get an exception " Type 'Regex' not found".
Thanks.

Hi @Arikli,
Not in an expression as Rules Engine is built on LINQ. To get around this, rewrite the expression using SQL via LINQ, pass the results of your RegEx in as a ScopeParam or evaluate the RegEx outside of the engine itself when evaluating the outcome (e.g. Rule.IsSuccess && Regex.IsMatch).
Hth.

@Arikli , You need inject Regex type for RulesEngine to recognize it.
You can do it by passing custom type in ReSettings:
var reSettings = new ReSettings{
  CustomTypes = new Type[]{  typeof(Regex) }
};

var engine = new RulesEngine.RulesEngine(workflows,logger, reSettings);

RegexOptions.IgnoreCase not included?

RegexOptions.IgnoreCase not included?

In order to include Enums in the namespace, it would need to be passed in, just like Regex itself:
var reSettings = new ReSettings{
  CustomTypes = new Type[]{  typeof(Regex), typeof(RegexOptions) }
};

var engine = new RulesEngine.RulesEngine(workflows,logger, reSettings);


Sensor does not appear in new (2021.8) Energy dashboard?

I'm unable to find the sensor in the Energy tab.
I'm referred to: https://www.home-assistant.io/more-info/statistics/.
Another implementation is referenced in the release notes, https://github.com/zuidwijk/dsmr, but I have not tried that as I haven't verified if the pin mapping is the same.

I've done some experimentation based on ESPHome documentation and the dsmr repository. I'm still waiting for data to be visible in the Energy panel (can take up to 2 hours), but adding the following to Cumulative Active Import at least allows it to be added:
state_class: "measurement"
device_class: "energy"
last_reset_type: "never"

I have the same issue.
Was told to add, in addition to device class and state, this :
last_reset; "1970-01-01T00:00:00+00:00"
Same state, can add the cumulative active import but no data is showing.

I have the same issue.
Was told to add, in addition to device class and state, this :
last_reset; "1970-01-01T00:00:00+00:00"
Same state, can add the cumulative active import but no data is showing.

I read that last_reset_type: "never" should set last_reset to epoch, so it should lead to the same result. There is now a pull request that allows the sensor to be added.

I must be doing something wrong. Keep getting this error regardless of how I format the yaml
  [state_class] is an invalid option for [0]. Did you mean [state_topic], [device_class]?
  state_class: measurement [source p1reader.yaml:74]
  device_class: energy

  [last_reset_type] is an invalid option for [0]. Please check the indentation.
  last_reset_type: never [source p1reader.yaml:76]

@grobius have you formatted the lines in the same way as the pull request I've linked to this issue? It seems to complain about indentation.

Yes, I did copy it from the pull request. Here is the full yaml:
esphome:
name: electricity_meter
platform: ESP8266
board: nodemcu
includes:
- p1reader.h
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "electricity_meter"
password: !secret fallback_password
captive_portal:
Enable logging
logger:
level: DEBUG
baud_rate: 0 # disable logging over uart
Enable Home Assistant API
api:
password: !secret hass_api_password
ota:
password: !secret ota_password
uart:
id: uart_bus
tx_pin: TX
rx_pin: RX
baud_rate: 115200
sensor:

platform: custom
lambda: |-
auto meter_sensor = new P1Reader(id(uart_bus));
App.register_component(meter_sensor);
return {
meter_sensor->cumulativeActiveImport,
meter_sensor->cumulativeActiveExport,
meter_sensor->cumulativeReactiveImport,
meter_sensor->cumulativeReactiveExport,
meter_sensor->momentaryActiveImport,
meter_sensor->momentaryActiveExport,
meter_sensor->momentaryReactiveImport,
meter_sensor->momentaryReactiveExport,
meter_sensor->momentaryActiveImportL1,
meter_sensor->momentaryActiveExportL1,
meter_sensor->momentaryActiveImportL2,
meter_sensor->momentaryActiveExportL2,
meter_sensor->momentaryActiveImportL3,
meter_sensor->momentaryActiveExportL3,
meter_sensor->momentaryReactiveImportL1,
meter_sensor->momentaryReactiveExportL1,
meter_sensor->momentaryReactiveImportL2,
meter_sensor->momentaryReactiveExportL2,
meter_sensor->momentaryReactiveImportL3,
meter_sensor->momentaryReactiveExportL3,
meter_sensor->voltageL1,
meter_sensor->voltageL2,
meter_sensor->voltageL3,
meter_sensor->currentL1,
meter_sensor->currentL2,
meter_sensor->currentL3
};
sensors:

name: "Cumulative Active Import"
unit_of_measurement: kWh
accuracy_decimals: 3
state_class: "measurement"
device_class: "energy"
last_reset_type: "never"
name: "Cumulative Active Export"
unit_of_measurement: kWh
accuracy_decimals: 3
name: "Cumulative Reactive Import"
unit_of_measurement: kvarh
accuracy_decimals: 3
name: "Cumulative Reactive Export"
unit_of_measurement: kvarh
accuracy_decimals: 3
name: "Momentary Active Import"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Export"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Reactive Import"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Export"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Active Import Phase 1"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Export Phase 1"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Import Phase 2"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Export Phase 2"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Import Phase 3"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Export Phase 3"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Reactive Import Phase 1"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Export Phase 1"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Import Phase 2"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Export Phase 2"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Import Phase 3"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Export Phase 3"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Voltage Phase 1"
unit_of_measurement: V
accuracy_decimals: 3
name: "Voltage Phase 2"
unit_of_measurement: V
accuracy_decimals: 3
name: "Voltage Phase 3"
unit_of_measurement: V
accuracy_decimals: 3
name: "Current Phase 1"
unit_of_measurement: A
accuracy_decimals: 3
name: "Current Phase 2"
unit_of_measurement: A
accuracy_decimals: 3
name: "Current Phase 3"
unit_of_measurement: A
accuracy_decimals: 3

Yes, I copied it from pullrequest. Here is the full yaml:
esphome:
name: electricity_meter
platform: ESP8266
board: nodemcu
includes:
- p1reader.h
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "electricity_meter"
password: !secret fallback_password
captive_portal:
Enable logging
logger:
level: DEBUG
baud_rate: 0 # disable logging over uart
Enable Home Assistant API
api:
password: !secret hass_api_password
ota:
password: !secret ota_password
uart:
id: uart_bus
tx_pin: TX
rx_pin: RX
baud_rate: 115200
sensor:

platform: custom
lambda: |-
auto meter_sensor = new P1Reader(id(uart_bus));
App.register_component(meter_sensor);
return {
meter_sensor->cumulativeActiveImport,
meter_sensor->cumulativeActiveExport,
meter_sensor->cumulativeReactiveImport,
meter_sensor->cumulativeReactiveExport,
meter_sensor->momentaryActiveImport,
meter_sensor->momentaryActiveExport,
meter_sensor->momentaryReactiveImport,
meter_sensor->momentaryReactiveExport,
meter_sensor->momentaryActiveImportL1,
meter_sensor->momentaryActiveExportL1,
meter_sensor->momentaryActiveImportL2,
meter_sensor->momentaryActiveExportL2,
meter_sensor->momentaryActiveImportL3,
meter_sensor->momentaryActiveExportL3,
meter_sensor->momentaryReactiveImportL1,
meter_sensor->momentaryReactiveExportL1,
meter_sensor->momentaryReactiveImportL2,
meter_sensor->momentaryReactiveExportL2,
meter_sensor->momentaryReactiveImportL3,
meter_sensor->momentaryReactiveExportL3,
meter_sensor->voltageL1,
meter_sensor->voltageL2,
meter_sensor->voltageL3,
meter_sensor->currentL1,
meter_sensor->currentL2,
meter_sensor->currentL3
};
sensors:

name: "Cumulative Active Import"
unit_of_measurement: kWh
accuracy_decimals: 3
state_class: "measurement"
device_class: "energy"
last_reset_type: "never"
name: "Cumulative Active Export"
unit_of_measurement: kWh
accuracy_decimals: 3
name: "Cumulative Reactive Import"
unit_of_measurement: kvarh
accuracy_decimals: 3
name: "Cumulative Reactive Export"
unit_of_measurement: kvarh
accuracy_decimals: 3
name: "Momentary Active Import"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Export"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Reactive Import"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Export"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Active Import Phase 1"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Export Phase 1"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Import Phase 2"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Export Phase 2"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Import Phase 3"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Export Phase 3"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Reactive Import Phase 1"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Export Phase 1"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Import Phase 2"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Export Phase 2"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Import Phase 3"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Export Phase 3"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Voltage Phase 1"
unit_of_measurement: V
accuracy_decimals: 3
name: "Voltage Phase 2"
unit_of_measurement: V
accuracy_decimals: 3
name: "Voltage Phase 3"
unit_of_measurement: V
accuracy_decimals: 3
name: "Current Phase 1"
unit_of_measurement: A
accuracy_decimals: 3
name: "Current Phase 2"
unit_of_measurement: A
accuracy_decimals: 3
name: "Current Phase 3"
unit_of_measurement: A
accuracy_decimals: 3

Yes, I copied it from the pullrequest. Here is the full yaml:
`esphome:
name: electricity_meter
platform: ESP8266
board: nodemcu
includes:
- p1reader.h
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "electricity_meter"
password: !secret fallback_password
captive_portal:
Enable logging
logger:
level: DEBUG
baud_rate: 0 # disable logging over uart
Enable Home Assistant API
api:
password: !secret hass_api_password
ota:
password: !secret ota_password
uart:
id: uart_bus
tx_pin: TX
rx_pin: RX
baud_rate: 115200
sensor:

platform: custom
lambda: |-
auto meter_sensor = new P1Reader(id(uart_bus));
App.register_component(meter_sensor);
return {
meter_sensor->cumulativeActiveImport,
meter_sensor->cumulativeActiveExport,
meter_sensor->cumulativeReactiveImport,
meter_sensor->cumulativeReactiveExport,
meter_sensor->momentaryActiveImport,
meter_sensor->momentaryActiveExport,
meter_sensor->momentaryReactiveImport,
meter_sensor->momentaryReactiveExport,
meter_sensor->momentaryActiveImportL1,
meter_sensor->momentaryActiveExportL1,
meter_sensor->momentaryActiveImportL2,
meter_sensor->momentaryActiveExportL2,
meter_sensor->momentaryActiveImportL3,
meter_sensor->momentaryActiveExportL3,
meter_sensor->momentaryReactiveImportL1,
meter_sensor->momentaryReactiveExportL1,
meter_sensor->momentaryReactiveImportL2,
meter_sensor->momentaryReactiveExportL2,
meter_sensor->momentaryReactiveImportL3,
meter_sensor->momentaryReactiveExportL3,
meter_sensor->voltageL1,
meter_sensor->voltageL2,
meter_sensor->voltageL3,
meter_sensor->currentL1,
meter_sensor->currentL2,
meter_sensor->currentL3
};
sensors:

name: "Cumulative Active Import"
unit_of_measurement: kWh
accuracy_decimals: 3
state_class: "measurement"
device_class: "energy"
last_reset_type: "never"
name: "Cumulative Active Export"
unit_of_measurement: kWh
accuracy_decimals: 3
name: "Cumulative Reactive Import"
unit_of_measurement: kvarh
accuracy_decimals: 3
name: "Cumulative Reactive Export"
unit_of_measurement: kvarh
accuracy_decimals: 3
name: "Momentary Active Import"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Export"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Reactive Import"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Export"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Active Import Phase 1"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Export Phase 1"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Import Phase 2"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Export Phase 2"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Import Phase 3"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Active Export Phase 3"
unit_of_measurement: kW
accuracy_decimals: 3
name: "Momentary Reactive Import Phase 1"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Export Phase 1"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Import Phase 2"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Export Phase 2"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Import Phase 3"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Momentary Reactive Export Phase 3"
unit_of_measurement: kvar
accuracy_decimals: 3
name: "Voltage Phase 1"
unit_of_measurement: V
accuracy_decimals: 3
name: "Voltage Phase 2"
unit_of_measurement: V
accuracy_decimals: 3
name: "Voltage Phase 3"
unit_of_measurement: V
accuracy_decimals: 3
name: "Current Phase 1"
unit_of_measurement: A
accuracy_decimals: 3
name: "Current Phase 2"
unit_of_measurement: A
accuracy_decimals: 3
name: "Current Phase 3"
unit_of_measurement: A
accuracy_decimals: 3
`

Yes, I did copy it from the pullrequest. I can't see that there is something wrong with it (but it's probably me):
  sensors:
  - name: "Cumulative Active Import"
    unit_of_measurement: kWh
    accuracy_decimals: 3
    state_class: "measurement"
    device_class: "energy"
    last_reset_type: "never"

Solved it. Update of esphome was required (I was running v1.18, upgrade to v1.20.4 solved it)

Yes, I did copy it from the pullrequest. I can't see that there is something wrong with it (but it's probably me):

Same error message here when pasting in ESPhome.

Solved it. Update of esphome was required (I was running v1.18, upgrade to v1.20.4 solved it)

Dooh, same issue here ;)
Thanks mates!

Fixed by @fredrikbaberg in PR https://github.com/psvanstrom/esphome-p1reader/pull/13 👍