Level of study

Resolves Issue #62
Adds the "Level of Study" dropdown to the register page

looking good to me! something I noticed that I didn't catch was the resume upload & track questions are repeated at both the top and the bottom. can you delete the one from the bottom?


D-Link.TFTPServer version 1.0

[ ] Have you signed the Contributor License Agreement?
[ ] Have you checked that there aren't other open pull requests for the same manifest update/change?
[ ] This PR only modifies one (1) manifest
[ ] Have you validated your manifest locally with winget validate --manifest <path>?
[ ] Have you tested your manifest locally with winget install --manifest <path>?
[ ] Does your manifest conform to the 1.4 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Hi @upintheairsheep,
Does this package have a website or other link? I'm having trouble finding this package on D-Link's website.

Hi @upintheairsheep,
Does this package have a website or other link? I'm having trouble finding this package on D-Link's website.

Taken from their official Downloads directory https://ftp.dlink.ru/pub

@wingetbot waivers Add Validation-Domain

@wingetbot waivers Add Validation-Domain

@wingetbot waivers Add Validation-Domain

/axp run

/azp run

@wingetbot waivers Add Validation-Domain


Syntax error

File: network/proxy.md, CC @gbarr01
the correct code is (v. 17.06)
docker run _variables_ --env "HTTP_PROXY=http://<user>:<password>@<proxy_address>:<proxy_port>"

and the same with HTTPS

Hi, @mauromussin  ... I'm not sure what you're saying here. Can you please clarify?

I reviewed this page and  as far as I can tell, the references to 17.06 and 17.07 are correct. I'm closing this issue but feel free to provide more info.


Add ol version 9 in peerDependencies.

Because my project use OL 9.
See the error here.
The PR: https://github.com/geoadmin/web-mapviewer/pull/658
I am not sure though how to test it, since I am not that familiar with OL 9.

I believe @gberaudo started to work on that

I am surprised we don't define the ol version in our devDependencies. We should.
We have an issue with @geoblocks/print, which is not compatible with ol9, see https://github.com/geoblocks/print/issues/8
I will be busy all next week so I will try to look at it today but no promise.


 should be before text input, select etc

form elements are failing DAP tests
Ref: https://github.com/IBM/carbon-components-react/issues/1131#issue-345021899
Ref: https://github.com/IBM/carbon-components-react/pull/1134
Ref:
This is documented in the w3 test techniques for H44: https://www.w3.org/TR/WCAG-TECHS/H44.html
For all input elements of type text, file or password, for all textareas and for all select elements in the Web page:

Check that there is a label element that identifies the purpose of the control before the input, textarea, or select element
Check that the for attribute of the label element matches the id of the input, textarea, or select element
Check that the label element is visible.

Elements to update/test

[ ] Date Picker
[ ] Number Input
[ ] Search
[ ] Select
[ ] Text Input
[x] ~Text Area~ (label is already before textarea)

Date Picker w/ calendar breaks. Other date picker variations are fine


Replace cudatoolkit-dev with nvcc package

Remove instances of cudatoolkit-dev from recipes. It should be replaced with {{ compiler('cuda')}} inside of the build section.
If CUDA_HOME is being set in the build.sh file, it will need to be removed.

The tensorrt-samples package is the tricky part since it requires the cudatoolkit-dev at run time.

I think it probably makes sense to have activate scripts that check for the availability of CUDA. Since the nvcc package is already doing this, it might be enough to just list that as a dependency.


StoryOutput reference in macro functions

Asked via email:
I want to create a macro similar to <<print $var>> in that it results in the function being replaced with text in that part of the passage, but get a reference to the resulting StoryOutput in C#. Hoping that I can use this kind of thing to make StoryLinks with weird behaviors.
For example, if I make a custom macro <<textOutput param1, param2>>, in C# the function I'd like to implement that with:
[RuntimeMacro]
public void multilink (StoryOutput resultingOutput, string param1, string param2)
{
  // resultingOutput is the StoryOutput this macro generates
}

Is this kind of thing possible with Cradle at the moment?

It is indeed possible and it's called a "code generation macro" because you need to generate code for a yield statement. I might add support for something like you suggest - since it's pretty intuitive - but in the meantime, to get it done you can look at how Snoozing does it. In short:

You write an editor script that assigns a new function to either SugarTranscoder.CodeGenMacros["nameOfMacro"] or HarloweTranscoder.CodeGenMacros["nameOfMacro"] (depending on your story format).
You either call transcoder.Code.Buffer.AppendLine("yield return new StoryLink(...);") or one of the transcoder.Generate* functions which do the work for you (mostly relevant for Harlowe).

You can also look at how the builtin code gen macros are defined: Harlowe and Sugar
More details can be found on this issue (download the linked zip for an example).
I'm keeping this issue open though because I want to try to implement your suggestion.

Thanks so much for this, dude!!

I'm not sure I'm understanding how to create a macro in Sugar that uses multiple arguments. When I try to do <<macro argument1 argument2>> it seems to show an error when encoding the HTML. Am I doing something wrong, or how should that look?

Could you port the error log or a screenshot of the error?

Here's how the default Sugar codegen macros handle multiple args - SugarTranscoder.ParamsWithCommas is your answer.
public static SugarCodeGenMacro DisplayShorthand = (transcoder, macro, argument) =>
{
	string passageExpr = transcoder.BuildExpression(macro);
	string args = argument != null ? transcoder.BuildExpression(argument) : null;
	if (!string.IsNullOrEmpty(args))
		args = ", " + SugarTranscoder.ParamsWithCommas(args);

	transcoder.Code.Indent();
	transcoder.Code.Buffer
		.AppendFormat("yield return passage(\"{0}\"{1});", passageExpr, args)
		.AppendLine();
};

Ah, I think I misinterpreted both the error and the ParamsWithCommas before. I see now that the error I was getting was related to how my code gen macro was putting the newly-formatted arguments into code, and from my misunderstanding of the transcoder methods being used.

public static SugarCodeGenMacro MultiLink = (transcoder, macro, argument) =>
	{
		// Takes <<multilink "one" "two">> and turns it into 'multilink, "one", "two"'
		string passageExpr = transcoder.BuildExpression(macro);
		string args = argument != null ? transcoder.BuildExpression(argument) : null;
		if (!string.IsNullOrEmpty(args))
			args = ", " + SugarTranscoder.ParamsWithCommas(args);

		// Inject that into the C# script
		transcoder.Code.Indent();
		transcoder.Code.Buffer
			.AppendFormat("Debug.Log({0}{1});", passageExpr, args) // <- Error 'cause Debug.Log doesn't take multiple arguments. Otherwise fine
			.AppendLine();
	};

That's the right track. You probably don't need the line string passageExpr = transcoder.BuildExpression(macro); because that is used specifically for the shorthand display macro.

You can now make any runtime macro return atype derived from StoryOutput.
[RuntimeMacro]
public StoryText HelloWorld()
{
    return new StoryText("Hello World!")
}

Usage it in your story like this:
Harlowe: (hello-world:)
Sugar: <<helloWorld>>


Update documentation for symmetrised gradient

Describe your changes
Update documentation for symmetrised gradient
Describe any testing you have performed
Please add any demo scripts to CIL-Demos/misc/
Link relevant issues
Closes #1601
Checklist when you are ready to request a review

[x] I have performed a self-review of my code
[x] I have added docstrings in line with the guidance in the developer guide
[x] I have implemented unit tests that cover any new or modified functionality
[ ] CHANGELOG.md has been updated with any functionality change
[x] Request review from all relevant developers
[x] Change pull request label to 'Waiting for review'

Contribution Notes
Please read and adhere to the developer guide and local patterns and conventions.

[x] The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in CIL (the Work) under the terms and conditions of the Apache-2.0 License.
[x] I confirm that the contribution does not violate any intellectual property rights of third parties

Before:

Jenkins is happy


Sysmon hangs when deleting large files on USB-devices

When deleting large files located on USB-devices Sysmon "hangs" and the file is never deleted until Sysmon is killed.
I'm using the latest version of Sysmon (v14.12) and the problem seems to start with files larger than about 1.1 GB.
Deleting files of sizes 1.03 GB, 969 MB, and 619 MB all works but is a bit slower than usual.
Sizes like 1.1 GB and 1.4 GB doesn't work and the error messages shown below are displayed:

If I select Try Again the same error message is shown again, and again, ...
I guess this is a bug!?

What filesystem is there on that drive?

The USB is a FAT32 drive.

When deleting large files located on USB-devices Sysmon "hangs" and the file is never deleted until Sysmon is killed.
I'm using the latest version of Sysmon (v14.12) and the problem seems to start with files larger than about 1.1 GB. Deleting files of sizes 1.03 GB, 969 MB, and 619 MB all works but is a bit slower than usual.
Sizes like 1.1 GB and 1.4 GB doesn't work and the error messages shown below are displayed:

If I select Try Again the same error message is shown again, and again, ...
I guess this is a bug!?

I can add that this issue has been there since at least since Sysmon 12.03 (x64).

What are the steps to reproduce this? Deletes from slower drives do take longer (due to the data being read for checksums before), but eventually they do complete.
Does this "The action can't be completed" dialog pop up as soon as shift-del is issued?
Are there other Sysmon events besides FileDelete involved?

@foxmsft I don't think it is a question of slow drives or me being impatient. When the "action can't be completed" appears I am unable to delete the file(s). I can retry about 10 times and the file is still not deleted. I've tried both small USB-memory sticks and larger USB 3 hard drives and neither of them are "slow".
Deleting files with SHIFT+DEL is the most troublesome. For larger files the error message always seem to appear. Deleting with DEL only (i.e. "via" the Recycle bin) works much better but usually results in an error message for the last file deleted from the Recycle bin. Note that the file size here is reported as 0 bytes!

I tried running Sysmon with an empty config file (logging no events what so ever) I was able to get the zero size error message above on one single occasion when emptying the Recycle bin!?
The event in question isn't FileDelete  (EID 23) but rather FileDeleteDetected (EID 26).
The rule that matches my large test files in the one:
<TargetFilename name="FileDeleteDetected - Container file deleted" condition="end with">.iso</TargetFilename>
I hope this gives you enough information to investigate further.

Sorry, I forgot. The delay between SHIFT+DEL and the error message is about 8-10 seconds.

This is exactly what I needed to know, thank you! I'll get back here with an update.

@SysmonMike do you have other relevant bits of the config to share? I can't get this to repro with either SSD or spindle exFAT USB storage.
I'm interested in the HashAlgorithms directive or anything else that might be relevant here.
Thanks!

@foxmsft, We have set the hashes to all hash types in the config file like this:
<HashAlgorithms>*</HashAlgorithms>
I don't think it matters but we have also changed the archive directory:
<ArchiveDirectory>Sysmon_Deleted_Files</ArchiveDirectory>
And finally, I doubt that it matters but we log all file creations (EID 11) on USB-devices with rules like these:
<!-- T1052.001: Exfiltration over USB [https://attack.mitre.org/techniques/T1052/001/] --> <TargetFilename name="Technique_id=T1052.001,Sub_Technique_name=Exfiltration over USB,Technique_name=Exfiltration Over Physical Medium,Tactic=Exfiltration" condition="begin with">D:\</TargetFilename> <TargetFilename name="Technique_id=T1052.001,Sub_Technique_name=Exfiltration over USB,Technique_name=Exfiltration Over Physical Medium,Tactic=Exfiltration" condition="begin with">E:\</TargetFilename>

@foxmsft, I seems that the problem is indeed related to the HashAlgo configuration.
I changed the configuration to;
<HashAlgorithms>SHA1,IMPHASH</HashAlgorithms>
and now it works better (but unfortunately not perfect).
I still get the error message, but if I press retry I'm able to delete the file(s) in 1 or 2 retries.

Does this still happen for you with just FileDeleteDetected? Did you find the minimal config where this behavior can be observed?
<Sysmon schemaversion="4.83">
  <HashAlgorithms>*</HashAlgorithms>
  <ArchiveDirectory>Sysmon_Deleted_Files</ArchiveDirectory>

  <EventFiltering>
    <ProcessCreate onmatch="include" />
    <ProcessTerminate onmatch="include" />

      <FileDeleteDetected onmatch="include">
        <TargetFilename name="FileDeleteDetected - Container file deleted" condition="end with">.iso</TargetFilename>
      </FileDeleteDetected>
  </EventFiltering>
</Sysmon>

@foxmsft I tried the config above at it works fine. No errors are displayed when deleting large files.

Now it's a matter of figuring out which 2 or more rules interact to create this situation. Can you share the full config?

Unfortunately I can't do that. Company policy... I can share pieces but not the entire file.
And figuring out the combination of rules might be tricky since the config file is rather large (almost 7 000 lines).
Any suggestions what to try next or where to start looking for "culprit" rules?

@foxmsft I've managed to identify a minimal configuration file that causes the problematic situation:
<Sysmon schemaversion="4.83">
    <HashAlgorithms>*</HashAlgorithms>
    <EventFiltering>
        <!-- Event ID 1: Process creation -->
        <ProcessCreate onmatch="include" />

        <!-- Event ID 5: Process terminated -->
        <ProcessTerminate onmatch="include" />

        <!-- Event ID 23: FileDelete (A file delete was detected) -->
        <RuleGroup name="FileDelete - Exclude" groupRelation="or">
            <FileDelete onmatch="exclude">
                <!-- MD5 of __PSScriptPolicyTest_RANDOM.ps1 file -->
                <Hashes condition="contains">D17FE0A3F47BE24A6453E9EF58C94641</Hashes>
            </FileDelete>
        </RuleGroup>

        <!-- Event ID 26: FileDeleteDetected (File Delete logged)  -->
        <RuleGroup name="FileDeleteDetected - Include" groupRelation="or">
            <FileDeleteDetected onmatch="include">
                <TargetFilename name="FileDeleteDetected - Container file" condition="end with">.iso</TargetFilename>
            </FileDeleteDetected>
        </RuleGroup>

    </EventFiltering>
</Sysmon>

Thanks for all the support, fix is incoming :)

Thanks for all the support, fix is incoming :)

Great work @foxmsft and @SysmonMike !

Latest version, v14.14 should fix this behavior. There are some performance improvements around the file events, upcoming in the near future.


Remove simulation registry, sim base metaclass, add command args to model

Treat simulation differently than other layers because it is different. There's only one per model, so don't need registry, it doesn't have user supplied fields so it doesn't need meta class, all it has are arguments, so give users a place in model to pass arguments

See #85. Simulations are just like other layers, they can be more than one and more than one settings.


Added TagHelperResolutionResult Converter

Fixes: https://github.com/dotnet/aspnetcore/issues/23597
Essentially instead of RazorLanguageService.GetTagHelpersAsync returning a JObject to Roslyn, and consequently to OOPTagHelperResolver which has to convert it back to TagHelperResolutionResult, we communicate directly with the TagHelperResolutionResult object. This should significantly reduce the overhead of repeated conversions to/from JObject (and related reflection) and consequently, reduce memory utilization.
Tried a streaming based approach, however this led to a much simpler solution. Thanks @ntaylormullen!
Streaming based solution
For future reference; should we need to explore it again:

Razor OOPTagHelperResolver.ResolveTagHelpersOutOfProcessAsync -> passes in a data reader which reads in a stream and converts to the TagHelperResolutionResult

<RPC>

Roslyn Compilation RemoteEndpoint.InvokeAsync -> Leverages https://github.com/dotnet/roslyn/blob/master/src/Workspaces/Core/Portable/Remote/RemoteHostClient.cs#L80-L84

<RPC>

ServiceHub.RoslynCodeAnalysisService (Razor Managed) - RazorLanguageService.GetTagHelpersAsync -> implements a new data writer which writes the TagHelperResolutionResult to a stream

<RPC>

Roslyn (captures response from #3) RemoteEndpoint.InvokeAsync -> Roslyn gets the stream from #3, uses the data reader from #1 to get the TagHelperResolutionResult
https://github.com/dotnet/roslyn/blob/master/src/Workspaces/Remote/ServiceHub/Shared/RemoteEndPoint.cs#L188-L205

<RPC>

Razor OOPTagHelperResolver.ResolveTagHelpersOutOfProcessAsync gets final response as a TagHelperResolutionResult

Curious what the perf differences are in the behavior

61% lower CPU time & 64% lower memory utilization

Method
Mean
Error
StdDev
Op/s
Gen 0
Gen 1
Gen 2
Allocated

'Razor TagHelperResolutionResult Roundtrip JObject Serialization'
12.221 ms
0.1034 ms
0.0916 ms
81.83
125.0000
78.1250
31.2500
10.57 MB

'Razor TagHelperResolutionResult Roundtrip JsonConverter Serialization'
4.707 ms
0.0415 ms
0.0368 ms
212.46
70.3125
46.8750
31.2500
3.85 MB

Added benchmarks and tests, as well as a major refactoring. We had the RazorDiagnosticsJsonConverter elsewhere (and duplicated). I consolidated the copies into one place, and added in support for RazorDiagnostics for the TagHelperResolutionResult.

cc @JamesNK


Can't install in Laravel 9 (urgent)

Seems Laravel has been making some changes to Laravel in the recent week that now breaks the installation of Lunar in Laravel 9. This I believe is due to targeting lunarphp/licensing to dev-main rather than an actual release. So it's not considered a "stable" release.
See
https://github.com/laravel/laravel/commit/5c7cc8eee40c4bf910f48244b3837100342d8b37
https://github.com/laravel/framework/commit/32cf18949d2c6381ca550a8e663992b3aedbb9ba
We will need to tag a release for lunarphp/licensing (suggest 0.1) and make a patch release to solve this on the monorepo.

@alecritson could you sort this in the morning for me pretty please?


[SPARK-15657][SQL] RowEncoder should validate the data type of input object

What changes were proposed in this pull request?
This PR improves the error handling of RowEncoder. When we create a RowEncoder with a given schema, we should validate the data type of input object. e.g. we should throw an exception when a field is boolean but is declared as a string column.
This PR also removes the support to use Product as a valid external type of struct type.  This support is added at https://github.com/apache/spark/pull/9712, but is incomplete, e.g. nested product, product in array are both not working.  However, we never officially support this feature and I think it's ok to ban it.
How was this patch tested?
new tests in RowEncoderSuite.

cc @marmbrus  @yhuai @viirya

Test build #59629 has started for PR 13401 at commit b6c1a5f.

Test build #59629 has finished for PR 13401 at commit b6c1a5f.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class ValidateExternalType(child: Expression, expected: DataType)

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/59629/
Test PASSed.

Test build #59944 has started for PR 13401 at commit 83fe3e0.

Test build #59944 has finished for PR 13401 at commit 83fe3e0.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/59944/
Test PASSed.

Merged build finished. Test PASSed.

Test build #59968 has started for PR 13401 at commit f23891c.

Test build #59968 has finished for PR 13401 at commit f23891c.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/59968/
Test PASSed.


EnableSpatialAudio( ) throws a JS error

Calling the EnableSpatialAudio function throws an JS error related to agoraRTC. This is what it looks like:
Uncaught (in promise) AgoraRTCException: AgoraRTCError INVALID_PARAMS: The length must be within 64 bytes. The supported characters: a-z,A-Z,0-9,space,!, #, $, %, &, (, ), +, -, :, ;, <, =, ., >, ?, @, [, ], ^, _,  {, }, |, ~, ,
at xL (https://html.itch.zone/html/6499448/AgoraRTC_N.js:13:66813)
at t2.join (https://html.itch.zone/html/6499448/AgoraRTC_N.js:30:205784)
at join (https://html.itch.zone/html/6499448/AgoraWebSDK/libs/spatial-audio-main.js:98:12)
at joinSpatialAudioChannel (https://html.itch.zone/html/6499448/AgoraWebSDK/libs/spatial-audio-main.js:293:11)
at ClientManager.enableSpatialAudio (https://html.itch.zone/html/6499448/AgoraWebSDK/libs/clientmanager.js:1128:36)
at enableSpatialAudio (https://html.itch.zone/html/6499448/AgoraWebSDK/agorartcenginev2.js:928:18)
at _enableSpatialAudio (https://html.itch.zone/html/6499448/Build/Build.framework.js:3:249372)
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[34920]:0x833fd3
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[67513]:0xf4a1b8
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[61670]:0xe4ee18
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[14701]:0x28d510
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[48542]:0xb35e97
at invoke_iiii (https://html.itch.zone/html/6499448/Build/Build.framework.js:3:457869)
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[3077]:0x93493
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[27469]:0x595c52
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[6432]:0xfeed1
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[3872]:0xad0aa
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[32108]:0x7bbecf
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[5610]:0xe635c
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[32062]:0x7b9e5f
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[59219]:0xdfc76f
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[17956]:0x32f126
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[5525]:0xe3364
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[59220]:0xdfc955
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[25720]:0x537ac7
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[25722]:0x537b47
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[27472]:0x595d0f
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[27473]:0x5962ae
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[53153]:0xc22d0e
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[27467]:0x595b57
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[52476]:0xbe92b1
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[26619]:0x562bb2
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[26619]:0x562c26
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[25024]:0x50f825
at https://html.itch.zone/html/6499448/Build/Build.wasm:wasm-function[48539]:0xb35e71
at browserIterationFunc (https://html.itch.zone/html/6499448/Build/Build.framework.js:3:230267)
at callUserCallback (https://html.itch.zone/html/6499448/Build/Build.framework.js:3:183592)
at Object.runIter (https://html.itch.zone/html/6499448/Build/Build.framework.js:3:184852)
at Browser_mainLoop_runner (https://html.itch.zone/html/6499448/Build/Build.framework.js:3:183127)

I've been trying to implement a prox. voice chat in my WebGL app for a while and this repo is definitely the way to go for me. Issue is that I just haven't figured out yet how to properly set the prox. stuff yet. I got the basic voice call working easily but the whole hoopla of prox. voice chat goes completely over my head and now I'm getting this error. I'd appreciate some advice ^^ Here's a full look at my code (there's some dummy/placeholder code dw about it):

using UnityEngine;
using agora_gaming_rtc;
using Photon.Pun;
using Hashtable = ExitGames.Client.Photon.Hashtable;
public class VoiceChatManager : MonoBehaviourPunCallbacks
{
string appID = "😳secret appID😳";
public static VoiceChatManager Instance;

private IRtcEngine rtcEngine;

private bool isMuted = false;

private void Awake()
{
    if (Instance != null)
        Destroy(gameObject);
    else
    {
        Instance = this;
        DontDestroyOnLoad(gameObject);
    }

    InitEngine();
    rtcEngine.OnJoinChannelSuccess += OnJoinChannelSuccess;
    rtcEngine.OnLeaveChannel += OnLeaveChannel;
    rtcEngine.OnError += OnError;
}

private void Update()
{
    PermissionHelper.RequestMicrophontPermission();
}

void InitEngine()
{
    rtcEngine = IRtcEngine.GetEngine(appID);
    rtcEngine.SetChannelProfile(CHANNEL_PROFILE.CHANNEL_PROFILE_LIVE_BROADCASTING);
    rtcEngine.EnableAudio();
    rtcEngine.SetClientRole(CLIENT_ROLE_TYPE.CLIENT_ROLE_BROADCASTER);
    //rtcEngine.EnableSpatialAudio(true);
    //rtcEngine.EnableSoundPositionIndication(true);
}

void OnJoinChannelSuccess(string channelName, uint uid, int elapsed)
{
    Debug.Log($"Channel {channelName} joined!");

    Hashtable hash = new Hashtable();
    hash.Add("agoraID", uid.ToString());
    PhotonNetwork.SetPlayerCustomProperties(hash);

    rtcEngine.DisableVideo();

    UIManager.Instance.SetMuteButton(true);
    this.Mute(false);
}

public IRtcEngine GetRtcEngine()
{
    return rtcEngine;
}

void OnLeaveChannel(RtcStats stats)
{
    Debug.Log($"Left channel with duration {stats.duration}s...");
}

void OnError(int error, string msg)
{
    Debug.Log($"Error with agora:{(msg != "" ? $" {msg}\n" : " ")}(ERROR ID: {error})");
}

public override void OnJoinedRoom()
{
    if (PhotonNetwork.CurrentRoom.Name != "Main")
        rtcEngine.JoinChannel(PhotonNetwork.CurrentRoom.Name);
}

public override void OnLeftRoom()
{
    rtcEngine.LeaveChannel();
}

public void Mute()
{
    isMuted = !isMuted;
    UIManager.Instance.ToggleMuteButton(isMuted);
    rtcEngine.MuteLocalAudioStream(isMuted);
    Debug.Log($"You are now {(isMuted ? "muted" : "unmuted")}!");
}

public void Mute(bool _isMuted)
{
    isMuted = !_isMuted;
    this.Mute();
}

void OnApplicationQuit()
{
    if (rtcEngine != null)
    {
        rtcEngine.DisableVideoObserver();
        IRtcEngine.Destroy();
    }
}

}

using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
using Photon.Realtime;
using agora_gaming_rtc;
using System.Linq;
public class SpatialAudio : MonoBehaviour
{
private PhotonView view;
private IRtcEngine rtcEngine;
private static Dictionary<Player, SpatialAudio> spatialAudioFromPlayers = new Dictionary<Player, SpatialAudio>();

private void Awake()
{
    view = GetComponent<PhotonView>();
    rtcEngine = VoiceChatManager.Instance.GetRtcEngine();
    spatialAudioFromPlayers[view.Owner] = this;
}

private void Update()
{
    if (!view.IsMine)
        return;

    foreach(Player player in PhotonNetwork.CurrentRoom.Players.Values)
    {
        if (player.IsLocal)
            continue;

        if (player.CustomProperties.TryGetValue("agoraID", out object agoraID))
        {
            if (spatialAudioFromPlayers.ContainsKey(player))
            {
                SpatialAudio other = spatialAudioFromPlayers[player];

                float azimuth = GetAzimuth(other.transform.position);
                float elevation = GetElevation(other.transform.position);
                float distance = GetDistance(other.transform.position);
                int orientation = GetOrientation(other.transform.position);
                float attenuation = GetAttenuation(other.transform.position);
                bool spatialBlur = GetSpatialBlur(other.transform.position);
                bool spatialAirAbsorb = GetSpatialAirAbsorb(other.transform.position);

                rtcEngine.SetRemoteUserSpatialAudioParams(uint.Parse((string)agoraID), azimuth, elevation, distance, orientation, attenuation, spatialBlur, spatialAirAbsorb);
            }
            else
                rtcEngine.SetRemoteUserSpatialAudioParams(uint.Parse((string)agoraID), 0, 0, Mathf.Infinity, 90, 1, false, false);
        }
    }
}

private void OnDestroy()
{
    foreach(var item in spatialAudioFromPlayers.Where(x => x.Value == this).ToList())
    {
        spatialAudioFromPlayers.Remove(item.Key);
    }
}

private float GetAzimuth(Vector3 otherPosition) // Output value between 0 and 360 degrees
{
    Vector3 relative = otherPosition - transform.position;
    float angle = Mathf.Atan2(relative.z, relative.x) * Mathf.Rad2Deg;
    angle = Mathf.Clamp(angle, 0, 360);
    angle = angle + 90 < 360 ? angle : angle - 360;
    return angle;
}

private float GetElevation(Vector3 otherPosition) // Output value between -90 and 90 degrees
{
    Vector3 relative = otherPosition - transform.position;
    float distance = Vector2.Distance(Vector2.zero, new Vector2(relative.x, relative.z));
    Vector2 v0 = new Vector2(distance, relative.y);
    float angle = Mathf.Atan2(v0.y, v0.x);
    angle = angle - 180;
    angle = Mathf.Abs(angle);
    angle = angle - 90;
    angle = Mathf.Clamp(angle, -90, 90);
    return angle;
}

private float GetDistance(Vector3 otherPosition) // Output value between 0 and infinity
{
    float distance = Vector3.Distance(transform.position, otherPosition);
    return distance;
}

private int GetOrientation(Vector3 otherPosition)
{
    return 0;
}

private float GetAttenuation(Vector3 otherPosition)
{
    return 0.5f;
}

private bool GetSpatialBlur(Vector3 otherPosition)
{
    return false;
}

private bool GetSpatialAirAbsorb(Vector3 otherPosition)
{
    return false;
}

}

@hoomoongoos   Spatial audio wasn't properly implemented in the previous release.  We are working on a fix right now.

Please see Refactor 6 release.

Heya @icywind  ^^
Mind giving me a rundown on how to setup spatial audio? I've now uncommented the "rtcEngine.EnableSpatialAudio(true)" function from my code, but I still can't get it to work. Even setting the values in SetRemoteUserSpatialAudioParams to some fixed numbers still sound the same. It is plain 2D audio.
Do I need to do anything else other than calling EnableSpatialAudio and SetRemoteUserSpatialAudioParams to get it working?


MedicationAdministration modellieren

Zur Dokumentation der tatsächlich erfolgten (abrechnungsrelevanten) Medikationsverabreichung ist MedicationStatement zu ungenau. Dazu sollte MedicationAdministration verwendet werden, vgl.
"[MedicationAdministration] covers the administration of all medications and vaccines.[..] It will principally be used within care settings (including inpatient) to record the capture of medication administrations, including self-administrations of oral medications, injections, intra-venous adjustments, etc."
vs.
"[MedicationStatement] is a record of a medication being taken by a patient or that a medication has been given to a patient, where the record is the result of a report from the patient or another clinician. A medication statement is not a part of the prescribe->dispense->administer sequence but is a report that such a sequence (or at least a part of it) did take place, resulting in a belief that the patient has received a particular medication."

done.


Exception in notifyPath after Polymer/2007-kschaaf-key-disambiguate

It seems that there is annotation scoping issue in templates that is now revealed by the changes in 2007-kschaaf-key-disambiguate.
Sorry for the large example, I couldn't make it smaller.
    <dom-module id="x-row">
    	<template>

key={{model.key}}

    	</template>
    </dom-module>

    <dom-module id="x-list">
    	<template>
            <template is="dom-repeat" items="[[model]]" as="groupData">

-----

                <template is="dom-repeat" items="[[groupData]]" as="model">
                    <x-row model="[[model]]"></x-row>
                </template>
            </template>
    	</template>
    </dom-module>

    <x-list id="test"></x-list>
    <input type="button" value="test" onclick="test();">

If you click on the test button, there is an exception in the following function from notify-path.html
      _modelForPath: function(path) {
        var dot = path.indexOf('.');    // <--- path is undefined
        return (dot < 0) ? path : path.slice(0, dot);
      },

This is because x-row tag is being notified on the following path: model.#0.#1.key.
If you replace the inner repeat by:
                <template is="dom-repeat" items="[[groupData]]">
                    <x-row model="[[item]]"></x-row>
                </template>

the problem disappears.
This issue had no consequence before the #2007 fix because notifications on invalid paths were simply ignored.

Chrome is running into this now (TypeErrors in notifyPath calls that did not previously throw an error).
There seems to be some kind of race condition where, if multiple elements reference the same object via data binding, when that object is initially set in one element, a full path for one of that object's sub-sub-sub-properties is sent via notifyPath to another element that hasn't yet received the base object.
If that makes any sense.

My first impression is that there is a name collision between the inner template binding [[model]] which is a row and the outer property model which is a list.
I tried to pinpoint the bug around Templatizer._forwardInstanceProp or Base.notifyPath but no luck so far.


[ManagedIdentity]Call Azure Instance Metadata Service without proxy

Fix for #8539 .

Can you please check this Scenario -

Add two Devtestlabs azure vm.
Enabled MSI on 1st VM and install squid proxy server on another.
For 1st Vm change internet options to route through proxy server installed on second vm.
In squid config file add to Allow identity service IP. Similarly try for block this Ip.


Background layer animates frame on first show for custom and black types

When using mask type custom or black, the first time the HUD is shown it can be seen to animate the background layer's frame size from zero to full screen.
I tested a few older versions of SVProgressHUD and it appears the bug was introduced in v2.1 (v2.0.4 does not show this behaviour).
Attached is a demo project showing the issue.
HUDTest.zip
And here is a screen capture (iOS simulator slow animations enabled):

Due to changes in iOS 11 and problems with UIVisualEffectView I remodelled the show / hide animation. I will check tomorrow If your issue is fixed with my changed, else work on it.

I can not reproduce the issue in our demo project, however, I can reproduce it in your demo.

So, I updated the Podfile to 2.2 (the new release). Everything is working as expected.


The state distributions should be directly tested

This can simply be generating a series of observations and checking you get an accurate parameter estimation out. You could also check that if gamma is reduced for all the observations identically, that you get the same answer. Finally, the estimator should be able to handle an empty set of observations.

A good way to do this for all StateDistribution types would be create a bunch of cells using the default initializer, then fit these and check you get an estimate close to the real center.

Handling empty observations means that if the observation arrays are empty, it should return some error?

Actually, you can ignore that about empty observations. Shakthi and I ended up discussing that in a PR, and decided we can set it up so that estimators can assume they will always get observations.

I see. OK, so I will add the tests from the other issue and tag Shakthi and then you for review.


collapsible-content-button is in "Slash commands" feature

Description
Didn't see an issue about this, so I opened one.
Reference: https://docs.github.com/en/issues/tracking-your-work-with-issues/about-slash-commands#using-slash-commands
You can tell it's quite beta-y when it has obvious funky styles:

EDIT: noticed some differences, GitHub doesn't surround selected text like collapsible-content-button (would be surprising if they managed to do).
Example URLs
Here
Gotcha: the feature doesn't seem to be enabled on issue templates yet (I'm not seeing it as I'm writing this issue)

I'm not a fan of their feature in the current state due to the ridiculous loaders, but it might be good enough in this case.
The only advantage of ours would be that it works in one click around selected content (which could actually be a good-enough reason to keep it)
Their feature also has table-input but it's even worse UX. See https://github.com/refined-github/refined-github/pull/3598#issuecomment-1471398425

I also want to add that we've been burned by removing features while GitHub implemented theirs in beta, like https://github.com/refined-github/refined-github/pull/1611

The only advantage of ours would be that it works in one click around selected content (which could actually be a good-enough reason to keep it)

Suggested that to GitHub's public feedback.

I also want to add that we've been burned by removing features while GitHub implemented theirs in beta, like #1611

I'm surprised I kinda remember that (Refined) GitHub feature. I also remember GitHub briefly added a /sparkle feature last year.
But I think this one is more practical, less problematic and isn't going away.

How can slash comments act on selected text? It would be a different feature than what they're implementing (typing commands in the current field vs typing commands in an overlay, for example). I don't see them making that change.

I realized that right after I commented lol
But it won't hurt to mention it even if there's little chance they will accept. I feel saved replies and slash commands are doing very similar things in slightly different ways, maybe they will be merged someday, so it's not impossible.

 We can reconsider when the feature is instant and clean


Advent of Haystack (WIP)

Adding the Advent of Haystack page

@carlosgauci tha page seems to be working now. Once the following are complete we can merge it:

pages support images
frontmatter to set to 'hide' or 'show' that dictates whether it's seen or not
Then we can already merge this.

A banner on the top of the website (like we had for Hacktoberfest) saying "Join us for Advent of Haystack this December 🌲" linking to the page would be nice too if it's easy, it not we can make a separate PR :)

@carlosgauci if it's not too much work could we change the doors and background to the design in the canva: https://www.canva.com/design/DAFxzEHRRXc/oSzh49HF1GBmdqd-rcomSw/edit?utm_content=DAFxzEHRRXc&utm_campaign=designshare&utm_medium=link2&utm_source=sharebutton


feat: add danger changelog validation

The type of this PR is: feature

This PR resolves CX-1209
Description

add danger changelog validation

#run_new_changelog_check

PR Checklist (tick all before merging)

[x] I have included screenshots or videos to illustrate my changes, or I have not changed anything that impacts the UI.
[x] I have tested my changes on iOS and Android.
[x] I have added tests for my changes, or my changes don't require testing, or I have included a link to a separate Jira ticket covering the tests.
[x] I have added a feature flag, or my changes don't require a feature flag. (How do I add one?)
[x] I have documented any follow-up work that this PR will require, or it does not require any.
[x] I have added an app state migration, or my changes do not require one. (What are migrations?)
[x] I have added a CHANGELOG.yml entry or my changes do not require one.

Fails

:no_entry_sign:
Danger failed to run `dangerfile.ts`.

Error Error
[BABEL] unknown: Preset /* your preset */ requires a filename to be set when babel is called directly,

babel.transform(code, { filename: 'file.ts', presets: [/* your preset */] });
See https://babeljs.io/docs/en/options#filename for more information.
Error: [BABEL] unknown: Preset /* your preset */ requires a filename to be set when babel is called directly,

babel.transform(code, { filename: 'file.ts', presets: [/* your preset */] });
See https://babeljs.io/docs/en/options#filename for more information.
    at validateIfOptionNeedsFilename (/home/circleci/project/node_modules/@babel/core/lib/config/full.js:286:11)
    at /home/circleci/project/node_modules/@babel/core/lib/config/full.js:298:52
    at Array.forEach (<anonymous>)
    at validatePreset (/home/circleci/project/node_modules/@babel/core/lib/config/full.js:298:25)
    at loadPresetDescriptor (/home/circleci/project/node_modules/@babel/core/lib/config/full.js:305:3)
    at loadPresetDescriptor.next (<anonymous>)
    at recursePresetDescriptors (/home/circleci/project/node_modules/@babel/core/lib/config/full.js:112:30)
    at recursePresetDescriptors.next (<anonymous>)
    at /home/circleci/project/node_modules/@babel/core/lib/config/full.js:186:21
    at Generator.next (<anonymous>)

Dangerfile
--------------^

  Generated by :no_entry_sign: dangerJS

This PR contains the following changes:

Android user-facing changes ()
Cross-platform user-facing changes ()
Dev changes (Add PR changelog validation,Upgrade danger version)
iOS user-facing changes ()

  Generated by :no_entry_sign: dangerJS against 08c3aca7cf59ca97350f7f875e6d121358afd776


CCL/DCL depending on cell-voltage does not turn off charging completely, still overvoltage alarm

When using CCL/DCL from https://github.com/Louisvdw/dbus-serialbattery/pull/293 with mode "WaldemarFech" the code correctly sets the charge current limitation (CCL) to zero, if the highest cell voltage gets over 3.55V. The Victron Multiplus II 48/3000 however does not honor it precisely, and still keeps charging at 0.4A to 0.6A, thus still driving the battery into over-voltage-alarm.
The charge current in the Multiplus seems to be always higher than the CCL, which is not a big problem as long the CCL ist above zero. But if the charge limit is zero it should definitively have zero current to the battery to avoid over charging.
I also observed that the LED in on the Multiplus keeps in "Bulk" mode and does not change into the "absorbtion" or "tickle". I don't know if this is correct or if switching the mode could solve the problem, because the Multiplus might use different charge current limitation algorithms in different modes.
If I set the charging current in DVCC to zero it still have this 0.6A charge. But I was able to have zero charge current by lowering the maximum charging voltage. Interesting effect: After charging current dropped to zero, I increased the max charge voltage, but charge current kept zero.
The code should ensure that the charge current is really zero, either by switching off the charger, or changing the charging mode or altering the charge voltage. There might be also energy savings when the charger is completly off.

hm.
so you see the CCL in the remote console set to zero in the serial battery - parameters menu?
first we have to find out weather it's a bug in our code or if it's a strange behavior of the internal Victron charge control.
i could change the code to print some debug messages in a log file, because I don't think, that i can reproduce it. here it's working fine.
if the code is not the problem, then we can think about workarounds. It's no problem to lower the max charge voltage with the CVL.
But first we have to figure out the reason for the continuous charge current.
Let me change a bit - see you here again.

so you see the CCL in the remote console set to zero in the serial battery - parameters menu?>

Yes. Zero in CCL, but 0,6A still loading into the battery.

Any battery charger must be able to stop loading a battery which cannot be loaded any more. This can happen either because the battery is full or the BMS signals any condition that the battery must not be loaded any more (e.g. temperature, imbalanced cells, overvoltage etc). A battery charger which is not able to stop charging could destroy a battery.
Maybe there is a a measurement inaccuracy in the Multiplus if the charger is on (also in combination with the charging voltage), so that small currents cannot be controlled exactly, but then the code has to switch off the charger completely to archive zero charging or maybe lower the charging voltate dynamically. And this is definitely possible as you can manually switch the charger and inverter on and off via the Venus GUI.
Also the default charging algorithm of the Multiplus seems to alter the charging voltage depending on the state of the battery. There are three charging state in the multiplus: Bulk, Absorption, Float and each uses different voltages as you can see from the documentation picture:

With the serial battery code activated, the Multiplus always keeps the state of "Bulk". Maybe the this should be changed?
Also I strongly disagree with your suggestion constantly changing the charing parameters manually to prevent overcharge and damage to the battery. This must be done by the code and it is possible.
Waldemars solution it already much better then the original algorithm, because it handels the problem with imbalanced cells correctly in theory, which the original solution could not. The only problem is how to implement the complete stop of charging.

It seems to be a known problem, that the Victron cannot reliably stop charging by setting CCL to zero and keeping CVL at the original level. E.g. see here https://community.victronenergy.com/questions/136013/multiplus-48500-still-charging-when-ccl-from-bms-i.html
Someone from Victron Energy explains that with "supported" batteries the charge voltage will be lowered by the BMS.
"Hi, sorry but no its not: we decided as a policy to not work with CCL=0.
Such change you’re suggesting should not be necessary for all supported batteries.
The way to stop charging is make the bms tell our system to work on a lower voltage.
Lowering the voltage stops the charge(current). When that works properly, there are no is."
https://community.victronenergy.com/questions/150732/multiplusess-battery-current-doesnt-go-to-zero-whe.html
ALso another discussion about changing also CVL, which Pylontech BMS seems to do.
https://community.victronenergy.com/questions/106290/bug-in-ess-dc-feed-in-enabled-charge-current-limit.html

Ok,
so the Victron System itself cannot detect such a small current.
And because we have set a maximum charge voltage the system wants to keep this battery-full-voltage, but can't hold it exactly constant because of changing loads and sun.
But maybe we can do something anyway:
We see the cell voltage.
I could wait until one cell reaches 3.55V. Then i backup the current battery voltage and set CVL to this value. When the cell voltages (over all) goes over 3.55V eg. 3.57V, then I could calc the difference -0.02V, multiply with a configurable weight and lower the CVL as kind of penalty.
That would be so nice. We give the balancer time to balance, but if the voltage still raises, then we drain all cells because we discharge the battery a bit.
I'm so excited to test it.
Now I'm motivated to realize it.
Here some examples about my thoughts. To write less first for 4S:
C1: 3.40
C2: 3.45
C3: 3.50
C4: 3.54
resulting CVL: 4 * 3.55V = 14.2V
C1: 3.40
C2: 3.45
C3: 3.50
C4: 3.55
(distanceToMax: 0.3V * weight to add anyway? i think not. If it falls under 3.55V, let it charge with max CVL and higher CCL again)
resulting CVL: sum(c1-c4) = 13.90V
C1: 3.40
C2: 3.45
C3: 3.54
C4: 3.55
resulting CVL: sum(c1-c4) = 13.94V
C1: 3.40
C2: 3.45
C3: 3.54
C4: 3.56
resulting ov: 0.01V
penalty: (ov^2 * weight (= -100)) could be: 0.01V * 0.01V * -100 = 0.01V
resulting CVL: sum(c1-c4) + penalty = 13.95 + -0.01V = 13.94V
C1: 3.40
C2: 3.45
C3: 3.54
C4: 3.57
resulting ov: 0.02V
penalty: (ov^2 *  -100) = 0.02V * 0.02V * -100 = 0.04V
resulting CVL: sum(c1-c4) + penalty = 13.96 + -0.04V = 13.92V
C1: 3.40
C2: 3.45
C3: 3.56
C4: 3.58
resulting ov: 0.04V
penalty: (ov^2 *  -100) = 0.04V * 0.04V * -100 = 0.16V
resulting CVL: sum(c1-c4) + penalty = 13.99 + -0.16V = 13.83V
we could then adjust the weight.
or i don't make a quadratic penalty function, but another mapping function like:
PENALTY_CV: [3.55,   3.6]
PENALTY_PV: [-0.01, -2.0]
maybe the easiest way?

I suggest the easy way. Some GX device already cannot cope if you add more than one BMS and they have other devices connected. A mapping should be good enough resolution

The easiest way is just to to ensure, that charge is really zero when CCL=0. I.e. in case if CCL=0, lower the CVL by some constant or lower it until charge = 0. With Waldemars solution everything works perfectly, but with the only exception the ensure really zero charging current at CCL=0.
A slightly more general way would be to check the real charge value and dynamically lower the CVL until the real charge load it matches CCL.

I just saw, that the seems to be already some code in battery trying to disallow charging in case of charge_current=0:
       if self.control_charge_current == 0:
            self.control_allow_charge = False
        else:
            self.control_allow_charge = True

seems to be already some code in battery trying to disallow charging in case of charge_current=0:

yeah, i did xD
here is a first foretaste:
# if the cell voltage reaches 3.55V, then reduce current battery-voltage by 0.01V
    # if the cell voltage goes over 3.6V, then the maximum penalty will not be exceeded
    # there will be a sum of all penalties for each cell, which exceeds the limits
    PENALTY_AT_CELL_VOLTAGE  = [3.55, 3.6]
    PENALTY_BATTERY_VOLTAGE  = [0.01, 2.0]  # this voltage will be subtracted

Starte Test
Mode:  WaldemarFech
c1-c4 in V: 3.50 | 3.45 | 3.45 | 3.45 - bat.voltage=13.85 - CCL:   2.00A - DCL: 200.00A - CVL:  14.20V - Penalty:   0.00
c1-c4 in V: 3.51 | 3.45 | 3.45 | 3.45 - bat.voltage=13.86 - CCL:   1.60A - DCL: 200.00A - CVL:  14.20V - Penalty:   0.00
c1-c4 in V: 3.52 | 3.45 | 3.45 | 3.45 - bat.voltage=13.87 - CCL:   1.20A - DCL: 200.00A - CVL:  14.20V - Penalty:   0.00
c1-c4 in V: 3.53 | 3.45 | 3.45 | 3.45 - bat.voltage=13.88 - CCL:   0.80A - DCL: 200.00A - CVL:  14.20V - Penalty:   0.00
c1-c4 in V: 3.54 | 3.45 | 3.45 | 3.45 - bat.voltage=13.89 - CCL:   0.40A - DCL: 200.00A - CVL:  14.20V - Penalty:   0.00
c1-c4 in V: 3.55 | 3.45 | 3.45 | 3.45 - bat.voltage=13.90 - CCL:   0.00A - DCL: 200.00A - CVL:  13.89V - Penalty:   0.01
c1-c4 in V: 3.56 | 3.45 | 3.45 | 3.45 - bat.voltage=13.91 - CCL:   0.00A - DCL: 200.00A - CVL:  13.50V - Penalty:   0.41
c1-c4 in V: 3.57 | 3.45 | 3.45 | 3.45 - bat.voltage=13.92 - CCL:   0.00A - DCL: 200.00A - CVL:  13.11V - Penalty:   0.81
c1-c4 in V: 3.58 | 3.45 | 3.45 | 3.45 - bat.voltage=13.93 - CCL:   0.00A - DCL: 200.00A - CVL:  12.73V - Penalty:   1.20
c1-c4 in V: 3.59 | 3.45 | 3.45 | 3.45 - bat.voltage=13.94 - CCL:   0.00A - DCL: 200.00A - CVL:  12.34V - Penalty:   1.60
c1-c4 in V: 3.60 | 3.45 | 3.45 | 3.45 - bat.voltage=13.95 - CCL:   0.00A - DCL: 200.00A - CVL:  11.95V - Penalty:   2.00
c1-c4 in V: 3.61 | 3.45 | 3.45 | 3.45 - bat.voltage=13.96 - CCL:   0.00A - DCL: 200.00A - CVL:  11.96V - Penalty:   2.00
c1-c4 in V: 3.62 | 3.45 | 3.45 | 3.45 - bat.voltage=13.97 - CCL:   0.00A - DCL: 200.00A - CVL:  11.97V - Penalty:   2.00
c1-c4 in V: 3.63 | 3.45 | 3.45 | 3.45 - bat.voltage=13.98 - CCL:   0.00A - DCL: 200.00A - CVL:  11.98V - Penalty:   2.00
c1-c4 in V: 3.64 | 3.45 | 3.45 | 3.45 - bat.voltage=13.99 - CCL:   0.00A - DCL: 200.00A - CVL:  11.99V - Penalty:   2.00
c1-c4 in V: 3.64 | 3.54 | 3.45 | 3.45 - bat.voltage=14.08 - CCL:   0.00A - DCL: 200.00A - CVL:  12.08V - Penalty:   2.00
c1-c4 in V: 3.64 | 3.55 | 3.45 | 3.45 - bat.voltage=14.09 - CCL:   0.00A - DCL: 200.00A - CVL:  12.08V - Penalty:   2.01
c1-c4 in V: 3.64 | 3.56 | 3.45 | 3.45 - bat.voltage=14.10 - CCL:   0.00A - DCL: 200.00A - CVL:  11.69V - Penalty:   2.41
c1-c4 in V: 3.64 | 3.57 | 3.45 | 3.45 - bat.voltage=14.11 - CCL:   0.00A - DCL: 200.00A - CVL:  11.30V - Penalty:   2.81
c1-c4 in V: 3.64 | 3.58 | 3.45 | 3.45 - bat.voltage=14.12 - CCL:   0.00A - DCL: 200.00A - CVL:  10.92V - Penalty:   3.20
c1-c4 in V: 3.64 | 3.59 | 3.45 | 3.45 - bat.voltage=14.13 - CCL:   0.00A - DCL: 200.00A - CVL:  10.53V - Penalty:   3.60
c1-c4 in V: 3.64 | 3.60 | 3.45 | 3.45 - bat.voltage=14.14 - CCL:   0.00A - DCL: 200.00A - CVL:  10.14V - Penalty:   4.00

@chaerle
Here you can try it out:
#https://github.com/WaldemarFech/dbus-serialbattery/releases/tag/v0.14beta3_WFech

I tried this linear setting and get a CVL of 13.4v that I can't seem to get rid of, when I set it back to false my CVL goes back to what I put in the max cell voltage setting. Been using 3.45/13.8. Tried bumping to 3.55/14.2 while using the linear setting but it still does not change from 13.4v. Also tried changing to what you have above in your post.
PENALTY_AT_CELL_VOLTAGE  = [3.55, 3.6]
PENALTY_BATTERY_VOLTAGE  = [0.01, 2.0]
My battery voltage was 13.3 to 13.6 pending if I had the charger on or not, it was at 80% SOC when testing. Any suggestions?
I'm new to putty and have not figure out how to post my file yet so I apologize in advance.
Thanks for your work on this seems like a nice addition.


Why is git forced to add files？？？？？？？？

Why is git forced to add files？？？？？？？？

Question to PyCharm issue tracker


Waveshare SSD1351 display stays black using luma example

Related to https://github.com/rm-hull/luma.oled/issues/205
Using a different hardware manufacturer it's not working unfortunately.
I'm using following module:

It works fine with the sample on https://www.waveshare.com/wiki/1.5inch_RGB_OLED_Module
I figured out that I connected GPIO-24 for DC and GPIO-25 for RST. Moreover the device is connected to CE0 for CS which is supposedly spi-device 0. I'm using RaspberryPi 4 B and
Linux raspberrypi4 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux
With the luma example the display stays black.
pi@raspberrypi4:~/oled/luma.examples $ sudo python examples/demo.py -f conf/ssd1351.conf --framebuffer=full_frame --gpio-data-command=24 --gpio-reset=25 --spi-port=0 --spi-device=0
Version: luma.oled 3.3.0 (luma.core 1.12.0)
Display: ssd1351
Interface: spi
Dimensions: 128 x 128
------------------------------------------------------------
Testing basic canvas graphics...
Testing contrast (dim/bright cycles)...
Testing display ON/OFF...
Testing clear display...
Testing screen updates...

Here another configuration difference: In the waveshare example the baudrate is 9MHz :
#SPI init
SPI = spidev.SpiDev(0, 0)
SPI.max_speed_hz = 9000000
SPI.mode = 0b00

whereas in the ssd1351.conf it's 16Mhz. I tried 8MHz without a difference.
Any ideas why luma example does not work although waveshare example does?

Could you take a picture of the cables as connected to RPi please?


Added SCILAB Documentation for testing.

Test pull request.

Hari:
Nice work! I checked out the documentation and it works.
PKM
On Fri, Apr 17, 2020 at 11:51 AM hari1729<EMAIL_ADDRESS>wrote:

Test pull request.
You can view, comment on, or merge this pull request online at:
https://github.com/OptimalSynthesisInc/GNATS/pull/1
Commit Summary

Added SCILAB Documentation for testing.

File Changes

A Scilab and Octave Documentation Beta 1.9.pdf
https://github.com/OptimalSynthesisInc/GNATS/pull/1/files#diff-db32f3b592d72410d772c0443b341d8f
(0)

Patch Links:

https://github.com/OptimalSynthesisInc/GNATS/pull/1.patch
https://github.com/OptimalSynthesisInc/GNATS/pull/1.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/OptimalSynthesisInc/GNATS/pull/1, or unsubscribe
https://github.com/notifications/unsubscribe-auth/APG46DWFI5K4IAV73PUPLY3RNCQKZANCNFSM4MK6YRIA
.


Blocking Google Search results sections granularly

What filter does this issue target?
Google Search: interface cleanups
What changes should be made?
Can a separate option be added to the "Google Search: interface cleanups" filter to hide the following Google Search results sections for more granular settings than the "Hide most rich-content results (images, stories, businesses...) in the web search" setting?:

Top Stories
For Context
Images (not hidden by Hide most rich-content results (images, stories, businesses...) in the web search)
The "Overview", "Education", Movie" show in the screenshot (not hidden by Hide most rich-content results (images, stories, businesses...) in the web search)

Did you write a uBlock filter solving this?
No
Additional notes
No response

Hello @3DWORX-SA  thanks for the suggestion.
I am tagging this issue help-wanted and low-priority as I am happy to review PRs for it but won't spend any time on the google-search-cleanup template myself. The Google search experience has gone from bad to terrible and keeping up with it is not the best use of my time.


rebasing wip/smc with master

Hmm ... don't you think it would be better to just rebase this directly?

Do you mean without a PR ?

Yup.

OK, I've rebased the branch directly and force pushed ...

Thanks, turns out neglect does work :P
On 26 February 2015 at 12:00, Miles Sabin<EMAIL_ADDRESS>wrote:

OK, I've rebased the branch directly and force pushed ...
—
Reply to this email directly or view it on GitHub
https://github.com/milessabin/shapeless/pull/334#issuecomment-76166703.

--
Stacy


added the ability to choose acl permissions such as private-read etc.

Please review, I have uploaded the files correctly. This will add good functionality for devs. Thank you.

Please review, I would like this to me merged to main branch. Thank you.

If there are any issues please let me know.

@Serdnad, have you had a chance to review?

@jasonroland Sorry, I didn't see any of this until now. Thank you so much for this PR and your other one, I'll publish a new version of the lib.


Sish sometimes doesn't clean connections properly

Hi @antoniomika
I have some test web servers exposed via sish with the following domains:

ws1.sish.mydomain.link
ws2.sish.mydomain.link
....

The ssh client to start sish is under systemd with automatic restart in case of failure, so that if the virtual machine restarts the connections to sish are established automatically.
Sometimes it happens that, if the VM shuts down in an unclean way (power failure for example), the ssh clients are unable to reconnect to sish. The error that is reported is that the subdomain (ws1, ws2, etc) is already in use.
Even if I try to disconnect the client from the console, it won't reconnect (in the console I see it but with "Listener = 0")
To get everything working properly again I have to restart sish. At this point the clients connect again.

For example I have:
The subdomain rve-rizzola.sish.mysite.com is unavailable.

But before running sish I see from the console that this domain doesn't exist.
After I run sish I see the entry in the console but with listner=0

A thousand thanks.
I hope you continue to develop and improve sish. It's a fantastic tool.

Without idle-connections enabled and an extremely high ping interval, tunnels may not be cleaned up until the hour interval has passed.
What you should do is set the ping-client-timeout to something sufficiently short (2 or 3 of the ping intervals is likely appropriate for spotty connections), this would ensure that sish checks' the client periodically to make sure it is online. Then, using that in combination with --force-requested-* and continuous restarts of the client connection, sish will always reconnect to the same tunnel.

Thanks @antoniomika.
I set sish with these parameters:
	--idle-connection=false \
        --idle-connection-timeout=5s \
        --cleanup-unauthed=true \
	--cleanup-unauthed-timeout=5s \
        --cleanup-unbound=true \
	--cleanup-unbound-timeout=5s \
        --ping-client=true \
        --ping-client-timeout=2s \

Do you think they are good for my use case where the tunnel needs to stay up all the time?


Provide access to the response's statusText

As far I can see it is currently only possible to access the status code.
It would be great if it would be possible to also access the statusText especially when the request fails.

Available in 0.5.2


Travis CI build failed with ERROR: Error installing pdd

Travis CI build failed on installing pdd.

@paulodamaso/z please, pay attention to this issue

@zcrusaderz/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

Job gh:yegor256/takes#980 is not assigned, can't get performer

This job is not in scope


Bundle doesn't include package config paths (*.json files) if the absolute path contains a '('

When I created the bundle in my linux env, the resulting js file doesn't include the *.json files (package config files). I opened a Question in StackOverflow related with this issue, where I explain some details, but the problem is quite simple, my package config paths It's something like:
  packageConfigPaths: [
    "github:*/*.json",
<EMAIL_ADDRESS><EMAIL_ADDRESS>    "npm:*.json"
  ],

But my base directory It was something like : "/home/tomcat/.jenkins/.../My Proyect (angular2)", so after some debug, I see that the method getPackageConfigPath(packageConfigPaths, normalized) didn't return anything for the project libs (the same config worked ok in my local env), and I think that the problem is the regExp used to see if the packagename matches in the absolute path defined by packageConfigPaths section, the '(...)' in the absolute path is affecting the regExp match method.
I think that the regExp should be applied only over the packageConfigPaths values , but not on the entire absolute path, anyway I'm not sure, maybe there is a better solution.

Thanks, fixed in https://github.com/systemjs/builder/commit/2315f5faccf819c5153b2bcf223dc3a380527742 for the next release.

Released in 0.16.7.


draft fix for outdated hijacks that have different key

Description of PR

What component(s) does this PR affect?

[X] Back-End (Database, Microservices, Containers, etc)
[ ] Front-End (Flask, API, etc)
[ ] Docs
[ ] Build System

Does the PR require changes on other components? If yes, please mark the components:

[ ] Back-End (Database, Microservices, Containers, etc)
[ ] Front-End (Flask, API, etc)
[ ] Docs
[ ] Build System

Related Issue

Resolves #239
Solution

Type

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Docs update
[ ] None of the above

Checklist:

[X] I have read the contributing guide and my code conforms to the guidelines.
[ ] This change requires a change in the documentation.
[ ] I have updated the documentation accordingly.

TODO: set the new hijack key in outdated BGP hijack updates

Closing to beautify


[Messaging] message delegate not calling didReceiveRegistrationToken from 5.10.0 -> 5.11.0

Describe your environment

Xcode version: 10.1 (10B61)
Firebase SDK version: 5.11.0 and higher
Firebase Component: Messaging
Component version: 3.2.1 and higher

Describe the problem
After updating firebase to version 5.11.0 or higher the messaging delegate function didReceiveRegistrationToken is not called.
This issue is rather similar to https://github.com/firebase/firebase-ios-sdk/issues/1339
Context
In my project I have extracted my push notification handling outside of the AppDelegate and also the delegate handling for messaging to get the FCM token and handle any possible changes.
Current scenario
Below scenario works in version <= 5.10.0, but stopped working in >5.11.0
In the AppDelegate, I have a property that handles the notifications. Which I provide the information from received notifications in the AppDelegate.
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    private let pushNotificationHandler: PushNotificationHandler = PushNotificationHandler()

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        FirebaseApp.configure()
        return true
    }

    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) {
        pushNotificationHandler.handleMessage(userInfo: userInfo)
    }
}

Simplified code of the PushNotificationHandler:
class PushNotificationHandler: NSObject, MessagingDelegate {

    override init() {
        super.init()
        Messaging.messaging().delegate = self
    }

    func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) {
        debugPrint("📌 - Did receive FCM token: \(fcmToken)")
    }

    func handleMessage(userInfo: [AnyHashable: Any]) {
        debugPrint("Handle the notification: \(userInfo)")
    }
}

Steps to reproduce:
Current scenario:
    private let pushNotificationHandler: PushNotificationHandler = PushNotificationHandler()

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        FirebaseApp.configure()
        return true
    }

With above code, the delegate would be set, but it will never call didReceiveRegistrationToken
Workaround:
    private var pushNotificationHandler: PushNotificationHandler?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        FirebaseApp.configure()
        pushNotificationHandler = PushNotificationHandler()
        return true
    }

After changing it to the workaround, the delegate is called again in version >5.11.0
So something changed in the behavior of setting the:
        Messaging.messaging().delegate = self

Between 5.10.0 to 5.11.0, which causes a breaking change for my project and as it seems in different ways for other people.

Is this still an issue?

This should be fixed now with the new FIRApp configure registration infrastructure.


How to connect clients across NAT?

How to connect clients across NAT?
Client 1 -> Private IP 1 (Initiator)
Client 2 -> Private IP 2 (Receiver)
Also, how is ICE server configured?

I guess what you want to create is a WebRTC peer connection which connects client 1 and client 2 using ICE. That's not SaltyRTC. SaltyRTC is neither a WebRTC implementation nor a wrapper to WebRTC. You cannot connect a peer-to-peer connection from A to B with SaltyRTC alone. SaltyRTC is a general purpose signalling protocol which can be used for WebRTC using the SaltyRTC WebRTC Task to exchange signalling data (such as offer, answer and candidates encoded in SDP) needed to set up a WebRTC peer-to-peer connection. However, configuration and setup of WebRTC is outside the scope of SaltyRTC. I hope this clears things up a bit.
Check out the code of our demo application which probably does what you want to do.

I closed the issue because it hasn't anything to do with SaltyRTC. But it's perfectly fine if you want to ask further questions for clearing things up as we don't have any other channel where you can ask these questions. (@dbrgn: maybe it's time for a reddit channel or IRC... or a Threema group? Suggestions?)

We could also go hipster and use https://gitter.im/.

Sure, why not: https://gitter.im/saltyrtc


[Bug] Blurred placeholder's aren't showing

Bug Report
Describe the bug
The placeholder doesn't appear on the image background, this also happens on the examples page here - https://next-cloudinary.spacejelly.dev/components/cldimage/examples
Seems like from the next js docs it needs to be a base64 encoded image instead of a url
Is this a regression?
Not sure
Steps To Reproduce the error

Add a CldImage component
Set the placeholder="blur" option
Delete the src and srcset attributes on inspect to view the unloaded image
See there's no placeholder image showing

Expected behaviour
The image should show a blurred placeholder
Screenshot or Video Recording

thanks for catching this, wonder if this was a Next.js 13 or regression before, it used to work. missed it either way. will get a fix in for this

having a challenge figuring this one out
so given that it requires the base64 version, i ideally need to download the image URL and provide that as the result. i wouldn't want that logic to occur clientside, but then i'd have a hydration mismatch
it seems that i have a few options:

delete the placeholder prop and it's completely unsupported
perhaps i add an option where it's a solid color that just gets added, so it still has something there instead of not supported at all, but it obviously isn't the intended solution

open to ideas, but to avoid it being broken, for now, i think im going to move forward with the color box

Yeah maybe colour option for now, but would it be possible to have the blur uri as a prop we can pass in rather than auto setting it? Just thinking it can still be used in the new server components then and it can be down to the user to generate the base64 data

Yeah maybe colour option for now, but would it be possible to have the blur uri as a prop we can pass in rather than auto setting it? Just thinking it can still be used in the new server components then and it can be down to the user to generate the base64 data

I've been testing it with a next js 13 test repo and it's working fine my end with server components!

okay, after thinking through this and reading a bit more on it, it seems like its probably not a great idea to try to wedge this in anymore without a solid way to make it work
i was reading here which provided some solutions which include loading the placeholders in places like getStaticProps which works, but doesnt relaly make sense in the context of this library
https://github.com/vercel/next.js/issues/42140
im open to the idea of adding back in a createPlaceholderUrl function as a helper in Cloudinary Util if that could be valuable
in the use case, you would use that function to create the placeholder manually in getStaticProps / etc and pass that into the application
would love for a way to automate this reliably between all next versions but for now i dont really see a way. can address later


Crash if UserSettings.xml is missing

If configuration file UserSettings.xml is missing Indexer++ crashes. I suggest that if UserSettings.xml is not to be found in program folder for some reason (deleted accidentally for example), Indexer++ should be able to re-create it automatically in stead of crashing.

This should be fairly easy to implement. What are the default settings, the ones in the repo?

Hi! Sounds good.
All the work with settings located in IndexerGUI project, UserSettings.cs. There is also a UserSettings.xml included in the project, which should be used as the template for recreation.

I can do this. How do you want to handle an error in the event the program lacks permission to write the file? Should we display the error to the user?
I'm a fan of having an error class with an enum that you can keep adding to to check for errors, but I will defer to your judgement.

Fixed and merged to master. The update will be available in v0.6.
Thanks!


Stopping custom named queue breaks default main queue

Your system information

VelocityJS version: 1.5.1
Browser: Firefox/Chrome latest
Operating System: Win10

Checklist

Is this an issue with code?: Yes
Is this an issue with documentation?: No
Have you reproduced this in other browsers?: Yes
Have you checked for updates?: Yes
Have you checked for similar open issues?: No

Please describe your issue in as much detail as possible:
Stopping a custom named queue breaks the default queue animation (left to right in my code example).
It resets the animation to an earlier frame, slows down and stops halfway.
Using another custom named queue instead of the main queue would fix it and isn't affected by the stop call.
Using Velocity v2+ also fixes this with its new queue system, however i'd like to stick with 1.5.1 for better browser support. Will you keep updating the pre v2 versions for bug fixes?
Steps for reproducing this issue (code):
var e = document.getElementById("div1");
e.style.position = 'absolute';

Velocity(e, { left: window.innerWidth}, 5000); // same problem with forcefeeding
Velocity(e, {opacity: 0.5}, {queue: "f", duration: 5000});
Velocity.Utilities.dequeue(e, "f");
setTimeout(function(){Velocity(e, "stop", "f");}, 2000);

JSFiddle example showing issue in action (code):
https://jsfiddle.net/5andr0/b7hyqLgk/1/

Sadly this isn't the sort of bug fix that'll be touched in V1 (I can't see many that will as Velocity isn't exactly a security risk) - the queue code in there is basically just jQuery, and the source itself is a single monolithic that is seriously awkward to understand - if you find and fix the issue against the v1 branch then I'll be happy to merge, but otherwise it's not going to get looked at.

I fixed it: https://github.com/julianshapiro/velocity/pull/890
Really looking forward to the v2 extra file for old browser support!
Thanks for your awesome work

Awesome - I'll merge and update the version number as soon as I can (likely tomorrow evening)!
I need to know what browsers are needed, at the least there'll be some IE fixes, but it won't be able to support as much as V1 simply because standards have moved on so much (so I can polyfill some specific things, but there's a definite limit to them).

I only use polyfill for older IE on websites with big company clients because most of them are forced to use IE for (stupid) security reasons. All other regular end customers usually have updated browsers of their choice, so its a good thing to ditch browser support for speed and less code! Thanks for merging =)

And 1.5.2 is now published and out with this fix - thanks! :-)


Clean up lint of cjk

This splits out computation of the expected names for cjk/non-cjk into their own smaller methods, so that we can have one main method to check the name table rather than one for cjk and one for non-cjk, which was formerly the case.

LGTM


Bot Composer: Refer to app service settings for application insights

I have a bot developed with Composer (v. 2.1.1) tht I have deployed in two different resource groups.
I want to log its activities and messages with Application Insights, and I have configured for this reason my app service with a global configuration setting:
settings:applicationInsights:InstrumentationKey = <my-instrumentation-key>
settings:applicationInsights:connectionString = <my-connection-string>
Note: I have other global settings for QnA and LUIS resources for example and they work fine with this setup (see screen below).

Problem: application insights doesn't log with this configuration, and so far the only option that seems to work is to hardcode the connection string into the appsettings.json file of the bot, like so:

Question/Issue: is it possible to insert in this appsetting file a reference to my global settings, or is it possible to just override whatever I write in here? It is annoying to have this value hardcoded in the appsettings since I would have to move it from one environment to the other if I want to be sure to log into Application Insights for each environment.
Thank you in advance.

Sorry. Use runtimesettings:telemetry:options:connectionString. I just tested it and it worked for me.

@dmvtech Thank you I can confirm that works for me too. I can also use this scope hierarchy to override other runtime settings, may there be need for it.


[49_re_with_feedback]typo

Hi @jstac ,
This PR fixes typos by changing δ to :math:`\delta` .
Here is the result of this PR comparing the current website.
Left: the current website Right: the result of this PR

Nice work, thanks @sayaikegawa

Nice work, thanks @sayaikegawa


[RESOLVED] Interface eth0(): High error rate (>2 for 5m)

Problem started at 10:33:29 on 2023.05.20
Problem name: Interface eth0(): High error rate (>2 for 5m)
Host: S100-Primario
Severity: Warning
Operational data: errors in: 0, errors out: 0
Original problem ID: 20981
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23483&eventid=20981

Problem has been resolved in 3m 0s at 10:36:29 on 2023.05.20
Problem name: Interface eth0(): High error rate (>2 for 5m)
Host: S100-Primario
Severity: Warning
Original problem ID: 20981


Implement Vertex AI kit

With all the cool stuff coming out of Vertex AI, we want to have a kit for their cool bits.

A bit more about Kits, Nodes, and Boards:
https://glazkov.com/2023/08/22/composing-graphs-with-breadboard/


Error [ERR_REQUIRE_ESM]

I'm stumped and not finding anything relevant.
When running artisan krakero:tailwind-config I get the error:
Config file found...
Installing NPM Dependencies...
Converting tailwind config to PHP...
path/vendor/krakero/tailwind-fieldtype/node_modules/@vendeka/tailwind-config-php/index.js:15
const tailwindConfig = require(path.normalize(`${process.cwd()}/${argv.config}`));
                       ^

Error [ERR_REQUIRE_ESM]: require() of ES Module path/tailwind.config.js from<EMAIL_ADDRESS>not supported.
Instead change the require of tailwind.config.js in<EMAIL_ADDRESS>to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (path/vendor/krakero/tailwind-fieldtype/node_modules/@vendeka/tailwind-config-php/index.js:15:24) {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v20.6.1
Config file processed!

I'm running node 20.6.1 and 1.0.2 of the add-on. Latest Statamic and tailwind.
I tried a clean tailwind.config.js using
npx tailwindcss init --esm
and same issue.

Hey @sheldonkotyk thanks for posting. I don't think I've tried it on NPM 20 yet. I'll give that a go and get back to you.

@sheldonkotyk Looks like your --esm flag is causing the issue. If you drop that it runs fine.
The default tailwind.config.js file that is generated with Statamic looks like this:
module.exports = {
  content: [
    './resources/**/*.antlers.html',
    './resources/**/*.antlers.php',
    './resources/**/*.blade.php',
    './resources/**/*.vue',
    './content/**/*.md'
  ],
  theme: {
    extend: {},
  },
  plugins: [
    require('@tailwindcss/typography'),
  ],
}

I'm open to changes that would work and the default. It seems the error has to do with using import vs require. Honestly I'm not up to speed on the pros & cons of each and which is best going forward.
I'm going to close this issue, but please comment with any more info or detail. I'd also accept a PR that works for both ways.

I have no idea what initially caused the tailwind install to use ESM. I was able to get it to work with a different tailwind config. Thanks for your help. Great add-on.

I ended up switching package.json to use "type": "commonjs", as well.


(db-authorization): fix a bug in handling jwt namespace option

The update is designed to streamline and enhance the robustness of the jwt namespace handling mechanism, thereby eradicating any inconsistencies and potential formatting issues that may arise from improper namespace configuration.
Regardless of whether the "authorization" → "jwt" → "namespace" object is assigned a URL with or without a trailing slash, it will now be correctly work.
🔧 fix(db-authorization): Correct the jwt namespace option handling
The jwt namespace option within the authentication configuration now automatically appends a forward slash if missing. This modification ensures a uniform format across the board, eliminating any ambiguity and enhancing the system's reliability when parsing or utilizing the namespace.
💡 refactor(authentication.js): Enforce trailing slash for jwt namespace
The jwt namespace option's handling has been refined to include a trailing slash, if not already present, by modifying the authentication logic. This adjustment guarantees that the namespace is consistently formatted, preventing errors related to incorrect path concatenation or resource identification.
🔎 Use-case:
Previously, developers might encounter issues if the jwt namespace option did not conclude with a forward slash, leading to potential mishandling of resource paths or authorization checks. With the current update, specifying the jwt namespace in the authentication configuration object automatically ensures the inclusion of a trailing slash, thus standardizing the format and eliminating related errors. (check screenshot)

Thanks for opening a PR! Can you please add a unit test?

Here I am.
@mcollina should the unit test check the configuration or the "end results" of the X-PLATFORMATIC variables?
I've attempted to access the JWT configuration programmatically but can't seem to find a way.

The end result

After investigating the code more deeply, I realized that when the JWT session for the user is created by the 'fastify-user' plugin, it does not consider whether the namespace has a trailing slash.
For this reason, I think the best solution in this case is to cancel/close this PR, and I will open another one in the 'fastify-user' plugin repository, so we can address the issue at its source.
Does that sound like a good idea to you? :) (see screenshot for details)

Closed as requested by the author.


Implement Ecmascript 6 Math functions

Fixes #838.  Work in progress.
Currently this is just a proof of concept of Math.hypot(), but eventually will include all Math object methods added in ES6.  For Math.hypot(), at least the following tests pass:
assert.equal(Math.hypot(3, 4), 5);
assert.equal(Math.hypot(3, 4, 5), 7.0710678118654755);
assert.equal(Math.hypot(), 0);
assert.equal(Math.hypot(3, 4, '5'), 7.0710678118654755);
assert.equal(Math.hypot(-3), 3);

List of Math functions added to ES6:

Math.acosh
Math.asinh
Math.atanh
Math.cbrt (cubic root)
Math.clz32 (count leading zeroes [in 32-bit binary representation])
Math.cosh
Math.expm1
Math.fround
Math.hypot (square root of sum of squares)
Math.imul
Math.log1p
Math.log2
Math.log10
Math.sinh
Math.tanh
Math.trunc

Looks like I have my work cut out for me.

By the way, regarding ES6 vs. ES5.1, ES6 is probably too large for some embedded targets. So I think the big goal forwards would be to adopt ES6 features one by one but keep the ability to build a smaller, clean cut ES5.1 version too, with the idea that ES6 features would very minimally contribute to ES5.1 feature footprint.
Right now there isn't good infrastructure in place for optional built-ins; as we discussed before, the properties will remain in place even if the implementation is stubbed out so it's pretty clumsy. My current plan for that is to make the dist process part of the distributable and merge it with genconfig, so that preparing a configuration involves both a configuration file and creating the prepared sources. This setup would then make it easy to drop built-ins cleanly. For example, you could just say "no ES6 Math" or "no Math.exp()".
The concrete issue for this pull is that:

ES6 Math functions should maybe be behind DUK_USE_ES6_MATH (enabled by default).
Low memory build should say DUK_USE_ES6_MATH: false as it already does for e.g. ES6 Proxy.
When ES6 Math is disabled, the Math functions unfortunately need to be present, but with a stubbed out return DUK_RET_ERROR; implementation; to be improved later.

Granted, the compiler still needs to be rewritten in any case, which will likely impact footprint.  That said, I agree on having the ability to compile out ES6 features to reduce footprint, as ES5.1 support is often more than enough for many applications.  My head spins every time I look at the amount of stuff that was added to the standard in ES6.

One interesting tidbit from the ES6 spec about Math.hypot() specifically:

Implementations should take care to avoid the loss of precision from overflows and underflows that are prone to occur in naive implementations when this function is called with two or more arguments.

This appears to be more of a guideline than a strict requirement, but I'm not sure how to satisfy it.  Maybe do the intermediate calculations as long double?  Other than that I can't see how you'd prevent an overflow.

On the plus side (emphasis mine):

Math.hypot returns an implementation-dependent approximation of the square root of the sum of squares of its arguments.

That makes things a little easier for me. :)  The spec only prescribes specific behaviors for Infinity, NaN and -0.  Everything else is left up to the implementation.

ES6 also adds:

Number.isNaN()
Number.isFinite()
Number.isInteger()
Number.isSafeInteger()
Number.parseFloat()
Number.parseInt()
Number.EPSILON
Number.MAX_SAFE_INTEGER
Number.MIN_SAFE_INTEGER

As these are somewhat related, it might be worth investigating to see if they can be added to this pull.

Granted, the compiler still needs to be rewritten in any case, which will likely impact footprint.

True that - but I don't think I could justify a merge that added, say, 30kB to the minimum footprint. So the challenge for me will be to find a way to implement an ES6-capable compiler that also compiles to a reasonably small footprint when used in ES5.1 (if the ES6 version doesn't).

Implementations should take care to avoid the loss of precision from overflows and underflows that are prone to occur in naive implementations when this function is called with two or more arguments.
This appears to be more of a guideline than a strict requirement, but I'm not sure how to satisfy it. Maybe do the intermediate calculations as long double? Other than that I can't see how you'd prevent an overflow.

I think it's referring to the basic numerical computation problems re: precision. For example, if you're adding one large positive number and a bazillion small positive numbers, you should add up the small numbers first before adding in the large number - otherwise you'll lose precision.
For hypot the naive approach is add the squares in sequence which will work very badly if the first argument is large and the subsequent arguments are small - but large enough to contribute to the result if added in a proper order.
A less naive approach is to sort the numbers (absolute value here) and add the squares in increasing order. I don't recall exactly but probably a better approach is to keep adding numbers that have magnitude (exponent) as close to each other as possible, in sequence, so that you'll always minimize the precision loss.
In any case it's not a trivial thing which is why any functions not provided by the standard library are painful to implement. If you look into implementing trigonometric functions from base functions, for example, it's a lot of work to implement that correctly.

hypot is part of the C standard library, but unfortunately it's not a variadic function, and (unlike min/max) can't be composed into one.  So unfortunately we have to do it manually. :(

Yeah. I'm not saying this should be used for the implementation but a numerically OK approach would probably be something like:

Replace all values in the value stack with their square; special case N=0
While duk_get_top(ctx) > 1:

Find two smallest (absolute, automatically) values from the value stack
Remove them and push the result of adding them together to the value stack

In the end there's only one value, return sqrt(value)

I'm not sure if that'd be the best way to do it - but this should be a pretty basic numeric computation problem so it should be easy to find the "right way".
It's then of course a separate question how good the implementation needs to be :)

For large argument count something like that would be too naive and would need an efficient data structure, etc. Again, not really sure how good this needs to be for embedded scripting - in other words, what's the expectation from the application writer?

If there are multiple algorithms that work with variadic arguments and end up adding a bunch of numbers (here the squares), the "add N values minimizing precision loss" should probably be a shared helper.

If you're interested in the theory part, this is one early paper (which at least used to be suggested reading when I was studying numerical computation): http://perso.ens-lyon.fr/jean-michel.muller/goldberg.pdf.
Looks like pairwise summation would be pretty good: https://en.wikipedia.org/wiki/Pairwise_summation, and there are better ones which get more complicated, like https://en.wikipedia.org/wiki/Kahan_summation_algorithm. Not really an area I know well however :)

It's been my experience that hypot() is generally used for its trigonometric purpose ("given side lengths A and B, calculate hypotenuse C) - passing more than two arguments to this function feels odd.  In that light, the naive implementation seems fine to me.
I guess we could use a simple implementation for the initial merge and if it becomes an issue in practice, it can always be changed later. :)

That works for me :)

For one- and two-argument cases it'd be good if the shared one-arg/two-arg helper could be used because it minimizes footprint impact when the functions are intentionally disabled.

I noticed the one- and two-arg helpers, but it seemed they weren't actually used for vararg functions?  e.g. min/max use a separate helper.

Re: ES5.1 / ES6, the builtins YAML metadata has some tags for flagging ES6 objects and properties. That information doesn't yet have a direct impact, but the intent is to allow e.g. "--no-es6" to automatically drop properties flagged with ES6. So it would be nice to add those flags here too (see existing usage) - but unfortunately nothing will detect if a flag is missing yet.

I noticed the one- and two-arg helpers, but it seemed they weren't actually used for vararg functions? e.g. min/max use a separate helper.

Yes, I meant any other ES6 functions which are one/two argument kind.

Also if you think it makes sense to implement these in multiple pulls, that'd be fine too. I don't mind small pulls, as long as they are otherwise clean (i.e. squash fixups and such :-)

Yes, I will probably implement the new Number functions in a separate pull at least.  They are related, but only tangentially (no pun intended!).

Just checked Travis, looks like all Math.hypot() tests pass.  I wasn't sure if I got all the corner cases right, but it looks like it. The function has the someone odd requirement that if any argument is +/- infinity, the result is +Infinity, even if a NaN is present.

By the way, I noticed min/max (and possibly others) include a clause to call ToNumber on all arguments, even when bailing out on a NaN.  Is this a requirement in the specification?

Yes: http://www.ecma-international.org/ecma-262/5.1/#sec-<IP_ADDRESS>.

Thanks for the reference.  I scrolled up a bit from there too, and it's actually required for all Math functions:

Each of the following Math object functions applies the ToNumber abstract operator to each of its arguments (in left-to-right order if there is more than one) and then performs a computation on the resulting Number value(s).

So it seems I did the right thing by doing that in Math.hypot() too :-)

Usually that doesn't matter but the specification guarantees side effects like:
duk> a={valueOf:function() {print('A'); return 123;}}
= [object Object]
duk> b={valueOf:function() {print('B'); return 234;}}
= [object Object]
duk> Math.max(a,b,b,a)
A
B
B
A
= 234

This probably doesn't have much real world importance though.

From a quick glance current test cases don't cover the Math ToNumber() coercion side effects.

Hm, I could write those tests and submit a pull for that, should be easy enough. :)

Oh, I still have this pull open too.  I forgot about this one :)

@svaarala I'm going to close this pull and open a laundry-list issue for ES6 Math.  There are enough functions to implement that it's probably better to do it in stages so that the implementation doesn't end up getting rushed.
I will open a pull for Math.hypot() though, I need that one :)

Sounds good to me :)


Add Siwei's noncoding constraint metric as an additional score

From Slack: https://atgu.slack.com/archives/CNNTF8Z46/p1639073008051400
Hello everyone! I want to share with the group a non-coding constraint metric we recently developed for assessing negative selection in the human genome, using our gnomAD v3.1.2 dataset. Briefly, selection was measured by the depletion of variation and a constraint Z score was assigned to each 1kb genomic window along the genome. Scores are provided in the .bed file below, alongside with a brief description of our method. Please feel free to use/test/explore it and we would appreciate any feedback or comments!!
https://www.dropbox.com/sh/rmhrd0w81xxnzzo/AADlczN-h1pqXiIcc8NVc_ula?dl=0

Region based ref annotation: download_and_create_reference_datasets/v02/mito/write_mito_mitomap_ht.py

Added in https://github.com/broadinstitute/seqr-loading-pipelines/pull/355

@mike-w-wilson is there a reason gnomad_non_coding_constraint_z_score is exported as an array? Would we ever expect multiple scores for a single variant?


(on going) Editable collective

Currently a user is able to edit:

Name
Logo
Background Image
Mission
Description
Long Description
Website

To view the editor, simply go the route opencollective.com/:slug/edit. You must be logged in, in order to save changes.
You can make a change and preview it before saving, as changes will only be saved when clicking the Publish button.

Where is the edit mode triggered from? And what auth is in place to only allow it for people who are MEMBERS of that collective?

@asood123

edit mode is triggered by going to the url: opencollective.com/:slug/edit, there is no link in place as of now, however there will be one on the LoginTopBar menu only when a user is logged in.

Currently there is no auth to only allow it for people who are members of the collective.
Yesterday I worked with the api repo having the group update endpoint include a auth middleware:
aZ.authorizeAccessToGroup({userRoles: [HOST, MEMBER]})
https://github.com/OpenCollective/opencollective-api/blob/86a8a719e2df9f5da3d10d5e170e539b7d73cbd4/server/routes.js#L142`
However, I can only see that after a merge, it is now missing:
https://github.com/OpenCollective/opencollective-api/blob/1eb5362853f6a276e93af2a6ba339880a982a250/server/routes.js#L143

I am assuming that removing the auth was unintentional? If that is the case then we can add the auth middleware back to the endpoint.

@carlosascari i'll take care of the auth


Add social share component

Description
This PR includes additions to allow the user share the page they are viewing with social buttons
before:

after:

Lunaria Status Overview
🌕 This pull request will trigger status changes.

Learn more
By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.
You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale
File
Note

en
reference/overrides.md
Source changed, localizations will be marked as outdated.

Warnings reference

Icon
Description

🔄
The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

I must have forgotten to remove the docs label. it is a core update, has nothing to do with the docs (except that the changes show up there as well, hehe)

:wave: Thanks for this pull request and your contribution to Starlight.
We usually follow a specific process for contributions/new features to Starlight starting from a discussion to understand a problem or feature, identifying the best solution, and then only implementing it. This helps us ensure that the feature is a good fit for Starlight and that it is implemented in a way that is consistent with the rest of the project.
In the future, always feel free to open a discussion before starting to work on a pull request to see if your idea is something that might make sense as part of Starlight or is better as external content. We’re always happy to provide guidance and you can also get feedback from the community.
Regarding the specific of this pull request, I don't think this a common enought pattern to include the feature in Starlight itself, also considering that some documentation authors may not want such a sharing feature in their documentation.
On the other hand, I think this would make a great third-party plugin that users can install if they want such feature to share their documentation. If you're interested in creating such a resource, a good starting point could be this plugin adding a zoom feature to documentation images.
We will also be happy to share such a resource with the community using our plugins and integrations showcase or community content page for any guides you might create.