[Extensiblity Bug] codeunit 501 OAuth2 AcquireApplicationTokenWithSecret

If we call the procedure AcquireApplicationTokenWithSecret with an invalid applicationid the accesstoken is empty, but I don't know why and addtionally I don't get any error, that I can report to the user.
I would expect that this is returned as an error to business central.
    /// <summary>
    /// Gets the access token via the Client Credentials OAuth2 v2.0 grant flow.
    /// </summary>
    /// <param name="ClientId">The Application (client) ID that the Azure portal – App registrations experience assigned to your app.</param>
    /// <param name="ClientSecret">The Application (client) secret configured in the Azure Portal - Certificates & Secrets.</param>
    /// <param name="OAuthAuthorityUrl">The identity authorization provider URL.</param>
    /// <param name="RedirectURL">The redirectURL of your app, where authentication responses can be sent and received by your app. It must exactly match one of the redirectURLs you registered in the portal. If this parameter is empty, the default Business Central URL will be used.</param>
    /// <param name="Scopes">A list of scopes that you want the user to consent to.</param>
    /// <param name="AccessToken">Exit parameter containing the access token.</param>
    [NonDebuggable]
    [TryFunction]
    procedure AcquireTokenWithClientCredentials(ClientId: Text; ClientSecret: Text; OAuthAuthorityUrl: Text; RedirectURL: Text; Scopes: List of [Text]; var AccessToken: Text)
    begin
        OAuth2Impl.AcquireTokenWithClientCredentials(ClientId, ClientSecret, OAuthAuthorityUrl, RedirectURL, Scopes, AccessToken);
    end;

In the event log I see the following:

Message Microsoft.Dynamics.Nav.LicensingService.Model.Exceptions.LicenseServiceAdalServiceException in AcquireApplicationTokenWithSecret (action id: c64ad927-1b72-4fe6-a6a4-b605c16c285f): AADSTS700016: Application with identifier '00000000-0000-0000-0000-000000000000' was not found in the directory 'our tenant Name xxx'.

@WaelAbuSeada you can look at or at least provide your opinion on this topic?

You are not getting an error as it is a try function, and the user can not really do anything to fix this, so I would rather add prior validation on the parameters passed to the auth methods. In this example the client id seems to be null guid.
If you would prefer to surface the error to the customer, then maybe try something like this (haven't tried it, so let me know if it works):
if not AcquireTokenWithClientCredentials(...) then
error(GetLastErrorText());

GetLastErrrorText is empty in my process.
And If I don't catch the TryFunction, then I still should receive a runtime error. This is currently not the case.
The problem in my case was that I accidentlly used the client secred Id instead of the application Id of the App Registration.
But I don't receive any error message inside AL, only a message at the event log.

Yea it doesn't throw a runtime error, which makes sense considering that end user cannot really fix this. The only thing you can do is to check if the token was issued (not empty) otherwise throw a generic error then the end-user can maybe verify whatever credentials they entered again, or reach out to you.

My problem is, that I'm unable to help customers in cloud environments, when we provide some way of setting the connection up, but can`t get any details about the error.
If I could at least get some more details by using a try catch, but currently the message in the event log does not seem to throw an error that I can catch.
e.g. the Error Event Log 0000I75 in codeunit 7802 "Azure Functions OAuth2" implements "Azure Functions Authentication" could benefit from more details about the problems in retrieving an accesstoken, too.
https://github.com/microsoft/ALAppExtensions/blob/main/Modules/System/Azure Function/AzureFunctionsOAuth2.Codeunit.al

Hello there,
I have the same issue here - we try to authenticate against an Azure App using ClientCredentials flow - and - except not getting the token, we have no idea what we have to do in order to get it works.
The provided Exception stack is completely useless

Server instance: BC
Category: Security
ClientSessionId: 6943d7dc-5479-4fde-8c92-072bf7477b9a
ClientActivityId: ab9a1400-cc9f-bd44-85b1-d35617764add
ServerSessionUniqueId: 69c94aa4-755d-45fe-a832-e5b0bdbf547c
ServerActivityId: 393954ba-b5a5-48f5-ac37-daeeb91b6bb2
EventTime: 06/22/2023 08:54:46
Message (LicenseServiceAdalServiceException): RootException: LicenseServiceAdalServiceException
ExceptionStackTrace:
at Microsoft.Dynamics.Nav.LicensingService.Client.Authentication.AuthenticationHandler.d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dynamics.Nav.LicensingService.Client.Authentication.AuthenticationHandler.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dynamics.Nav.LicensingService.Client.Authentication.AuthenticationHandler.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dynamics.Nav.Runtime.AzureADCodeGrantFlow.<>c__DisplayClass25_1.b__1()
at Microsoft.Dynamics.Nav.Runtime.AzureADCodeGrantFlow.GetAuthenticationInfo(Func1 action, String operationName)    at Microsoft.Dynamics.Nav.Runtime.AzureADCodeGrantFlow.<>c__DisplayClass25_0.<AcquireApplicationToken>b__0()    at Microsoft.Dynamics.Nav.Runtime.AzureADGraphQuery.ExecuteActionRethrowAggregateException[T](Func1 action, String functionName)
at Microsoft.Dynamics.Nav.Runtime.ALAzureAdCodeGrantFlow.<>c__DisplayClass67_0.b__0()
at Microsoft.Dynamics.Nav.Runtime.ALAzureAdCodeGrantFlow.Catch[T](Func1 action) CallerStackTrace:    at Microsoft.Dynamics.Nav.Runtime.ALAzureAdCodeGrantFlow.Catch[T](Func1 action)
at Microsoft.Dynamics.Nav.Runtime.ALAzureAdCodeGrantFlow.ALAcquireApplicationToken(String clientId, String clientSecret, String authority, String[] scopes)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Dynamics.Nav.Runtime.NavDotNet.Invoke[T](String methodName, UInt32 methodIndex, BindingFlags flags, ParameterModifier modifier, Type[] referenceTypes, Object[] arguments)
at Microsoft.Dynamics.Nav.Runtime.NavDotNet.InvokeMethod[T](Boolean isStatic, String methodName, UInt32 methodIndex, Object[] arguments)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit502.AcquireTokenWithClientCredentials_Scope__955424199.OnRun()
at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit502.AcquireTokenWithClientCredentials_955424199(NavText clientId, NavText clientSecret, NavText oAuthAuthorityUrl, NavText redirectURL, NavList1 scopes, ByRef1 accessToken)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit502.OnInvoke(Int32 memberId, Object[] args)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit501.AcquireTokenWithClientCredentials_Scope__955424199.OnRun()
at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit501.AcquireTokenWithClientCredentials_955424199(NavText clientId, NavText clientSecret, NavText oAuthAuthorityUrl, NavText redirectURL, NavList1 scopes, ByRef1 accessToken)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit501.OnInvoke(Int32 memberId, Object[] args)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50111.GetAccessToken_Scope__1661502021.b__11_2()
at Microsoft.Dynamics.Nav.Runtime.NavApplicationObjectBase.TryInvoke(Action method)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50111.GetAccessToken_Scope__1661502021.OnRun()
at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50111.GetAccessToken()
at Microsoft.Dynamics.Nav.BusinessApplication.Page50815.Debug_a45_OnAction_Scope.OnRun()
at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
at Microsoft.Dynamics.Nav.BusinessApplication.Page50815.Debug_a45_OnAction()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Dynamics.Nav.Runtime.NavApplicationMethod.InvokeMethod(ITreeObject obj, String methodName, Object[] args, Boolean resolveHandler, Boolean throwOnNotFound)
at Microsoft.Dynamics.Nav.Runtime.NavForm.RaiseOnAction(Nullable1 actionId, String actionTriggerMethodName)    at Microsoft.Dynamics.Nav.Service.NSField.<>c__DisplayClass20_0.<ActionField>b__0(NsDataAccess recDataAccess)    at Microsoft.Dynamics.Nav.Service.NsFormDataAccess.RunWithFormDataAccess[T](ITreeObject parent, NavForm form, Func2 func)
at Microsoft.Dynamics.Nav.Service.NsDataAccess.RunWithDataAccess[T](ITreeObject parent, NavRecordState state, Boolean instantiateNewForm, Guid parentFormHandle, String parentControlName, Boolean& instantiatedForm, Func2 func)    at Microsoft.Dynamics.Nav.Service.NsDataAccess.RunWithDataAccess[T](ITreeObject parent, NavRecordState state, Func2 func)
at Microsoft.Dynamics.Nav.Service.NSField.Action(NavSession session)
at SyncInvokeActionField(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.RunInTransactionCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.TransientErrorRetryCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.ErrorMappingCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.PushPopCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationTracer.TraceScopeCombinator(Category telemetryCategory, ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass10_0.b__0()
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.PerformanceCounterCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.InitClientTelemetryIdsCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.TlsClearCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at Microsoft.Dynamics.Nav.Types.Channels.ReceiveCorrelator.AsyncResult.Complete(Action setValue)
at Microsoft.Dynamics.Nav.Types.Channels.ReceiveCorrelator.OnNewMessage(IAsyncResult ar)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Security.SecuritySessionServerSettings.ServerSecuritySessionChannel.ReceiveRequestAsyncResult.Complete(Boolean synchronous, Exception exception)
at System.ServiceModel.Security.SecuritySessionServerSettings.ServerSecuritySessionChannel.ReceiveRequestAsyncResult.OnReceive(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ReliableChannelBinder1.InputAsyncResult1.OnInputComplete(IAsyncResult result)
at System.ServiceModel.Channels.ReliableChannelBinder1.InputAsyncResult1.OnInputCompleteStatic(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceiveAsyncResult.OnReceive(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state)
at System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Security._SslStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.ReadFrameCallback(AsyncProtocolRequest asyncRequest)
at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)
at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

While trying to retrieve a token using Postman, I had an error message which help me to address the original issue

OAuth Response:
{
"error": "invalid_scope",
"error_description": "AADSTS1002012: The provided value for scope api://ad8e9cf6-a23e-4b0f-9f24-86a69f7e6a1e/Site.Provision is not valid. Client credential flows must have a scope value with /.default suffixed to the resource identifier (application ID URI).\r\nTrace ID: f1901e71-2c5a-4f61-80e0-5b0b4e443300\r\nCorrelation ID: 319c49ad-70ca-4ab1-ba88-16c30d412661\r\nTimestamp: 2023-06-22 09:05:16Z",
"error_codes": [
1002012
],
"timestamp": "2023-06-22 09:05:16Z",
"trace_id": "f1901e71-2c5a-4f61-80e0-5b0b4e443300",
"correlation_id": "319c49ad-70ca-4ab1-ba88-16c30d412661"
}

I'll close this issue as unresolved as it doesn't seem to be going anywhere. @pri-kise, if this issue remains, could you create a new one?

I've created an Idea to get this improved by the plattform, since this cannot be solved via a GitHub issue.
If anyone sees this issue then please vote here: https://experience.dynamics.com/ideas/idea/?ideaid=5fd15edb-612d-ef11-8ee7-000d3a03fcad


Torches??

Basically, Torches burn out just like the campfire, but you can use the campfire to light them or even other torches. Going under water can put them out? Putting them away can put them out? You could also start the campfire with a torch or even catch other things on fire??

Hey!
Thanks for your interest and idea for this mod. :)
The focus of this mod is on the campfire. I like your idea to expand the behaviour of torches, but it sounds to me like a dedicated mod out of scope of this mod. And for me there is no plan to create such a mod. :)
For 1.16.5 there is a mod with similar functionality: https://www.curseforge.com/minecraft/mc-mods/realistic-torches


[Shopify] Integration to use Sales Unit of Measure for inventory synchronization

This pull request does not have a related issue as it's part of delivery for development agreed directly with @AndreiPanko
Quick summary:
We saw that the Sales Unit of Measure should be used for inventory synchronization but there is a bug that prevents it from doing it. In line 61, Item.???Sales Unit Of Measure??? will always be empty, because in the function in line 51, it is cleared. It means that if the statement in line 63 never is true, the Base Unit of Measure will always be used for inventory synchronization.
Fixes #26719
Fixes AB#539103

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: .


Updated js calls to .enable and .disable to use jQuery

https://github.com/ManageIQ/manageiq/issues/1148
@dclarizio, @h-kataria please review.

Brian, do we need other values than 'true' and 'false' here? Should now we use bool?

@martinpovolny That'd probably be the better way to go.  Updating...

@martinpovolny Updated.

@AparnaKarve Please verify . . . thx, Dan

I was not able to push my changes on to @bmclaughlin 's branch so closing this PR opened a new PR https://github.com/ManageIQ/manageiq/pull/1353


Some doubts on the dataset tested

Hello! I greatly appreciate your work and have a simple problem.
I would like to know whether the editing performance results showed were tested on the dataset named 'zsre_mend_eval_portability_gpt4.json' which the number of the samples is 1037. Because I didnt see any "probability inputs" on the orginal Zsre dataset that you provide in google drive and it will not have the prob metric I think.
Thank you so much.

Thank you for your interest in EasyEdit. 😊

To test the model's ability to take advantage of edited facts, we used gpt4 to generate a one-hop question about edited facts. So the editing performance was tested on the dataset zsre_mend_eval_portability_gpt4.

That is, we extend the original ZsRE dataset for more robust evaluation.

Yes, the original ZsRE dataset could not be used for portability evaluation.

OK, Thank you very much for your qucik response.
So the portability evaluation in the same performance table with original dataset is only on 1037 samples? I mean, maybe too small to be representative compared to the original amount of zsre? And the probability problem is only one per sample.
 Anyway it is a good work. Thanks.

Thank you for your advice. 🤗

In fact, 1037 samples is enough to measure the performance of different editing methods. For example, in the sequence editing scenario, the editing capacity of most editing methods is <=100.
You're right. In our experiments, only one one-hop entity is considered for each editing case. We test the model's ability to apply edited facts, unabling to identify all of the affected one-hop link entities.

If your problem has been resolved, please help close this issue.


[NEW ALGORITHM] Dijkstra's Algorithm

Description:
A weighted graph is given and a source vertex is provided in the graph. Through this algorithm we can find the shortest paths from the source to all other vertices of the graph.
Checklist:

[ ✔] Contributor in GSSoC-ext
[✔ ] Want to work on it

Additional Information:
Provide any other relevant information or resources regarding the algorithm.

@Mahima-2404 @pankaj-bind  Please assign this issue to me I want to work on this.

@Mahima-2404 please assign this issue to me. I would like to work on this issue

please assign this issue to me also. I would like to work on this issue.

Please assign this Issue to me I will fix this

// A weighted graph is given and a source vertex is provided in the graph. Through this algorithm we can find the shortest paths from the source to all other vertices of the graph.
// answer of this
#include
#include
#include
#include
#include <limits.h>
using namespace std;
typedef pair<int, int> pii;  // pair of (distance, vertex)
void dijkstra(int source, vector<vector>& graph, int V) {
// Initialize distance array with infinity
vector dist(V, INT_MAX);
dist[source] = 0;
// Min-heap priority queue to select vertex with the smallest distance
priority_queue<pii, vector<pii>, greater<pii>> pq;
pq.push({0, source});

while (!pq.empty()) {
    int u = pq.top().second;  // Current vertex
    int uDist = pq.top().first;  // Distance to the current vertex
    pq.pop();

    // Explore neighbors of u
    for (const auto& neighbor : graph[u]) {
        int v = neighbor.second;  // Neighbor vertex
        int weight = neighbor.first;  // Edge weight

        // Relaxation step
        if (dist[u] + weight < dist[v]) {
            dist[v] = dist[u] + weight;
            pq.push({dist[v], v});
        }
    }
}

// Print shortest distances from source
for (int i = 0; i < V; ++i) {
    if (dist[i] == INT_MAX)
        cout << "Vertex " << i << " is unreachable from source.\n";
    else
        cout << "Distance from source to vertex " << i << " is " << dist[i] << ".\n";
}

}
int main() {
int V = 5;  // Number of vertices
vector<vector> graph(V);
// Graph represented as adjacency list (weight, vertex)
graph[0].push_back({10, 1});
graph[0].push_back({5, 3});
graph[1].push_back({1, 2});
graph[1].push_back({2, 3});
graph[2].push_back({4, 4});
graph[3].push_back({3, 2});
graph[3].push_back({2, 4});
graph[4].push_back({6, 0});

int source = 0;
dijkstra(source, graph, V);

return 0;

}
``


Bug on Safari

Hey guys, me again...
On Safari v12 and iPad, I found that some puzzle pieces contain the wrong image and they have a transparent side:

If you open this link https://6l3f8.csb.app and try, 1 time out of 3, if you hit refresh you'll see the issue.
Cheers, I'm considering using this puzzle lib for a very large scale app on appstore and android.
So far you have the best approach

on iOS I can reproduce this bug on all major browsers, Safari, chrome, brave:

Hey,
apparently this had something to do with it. I added the gist snippet from the thread and it now works fine in safari again :)

awesome!! Thanks!


Scrape mavat plan status history

wip in branch scrape-mavat-status

@gruppin can I close this as duplicate?

@GalGend @drorgivton I think this can be closed


Weird problems on startup/wake from sleep on OS X + Linux

The app seems to get into a weird state when started during boot or resuming from sleep. It generates an invalid code, the timer doesn't start, and it refuses to generate any other codes. I have to shut down the app and restart to get it working again. It's a minor annoyance and I'll dig into it if and when I have time, just filing this in case somebody else has time sooner.
System info:
$ uname -a
Linux endophage 4.3.3-3-ARCH #1 SMP PREEMPT Wed Jan 20 08:12:23 CET 2016 x86_64 GNU/Linux
$ pacman -Qs yubico-yubioath-desktop
local/yubico-yubioath-desktop 2.3.0-1
    Crossplatform graphical user interface to generate one-time passwords.

Screenshot of app state when broken:

Note no timer running and the button to generate a new code is disabled. The displayed code does not work when logging in to the configured service. On restarting the app, a working code is correctly generated and the timer runs.

I can confirm similar behavior on OS X

Just happened to me on Ubuntu 15.10

I'm having a hard time reproducing this, for me it seems to work fine to go in and out of sleep as well on starting the program during boot. If someone have the possibility to provide logs from running the program from the command line when having the program in this state it would help a lot.

Retested (on OSX) with @a-dma and @klali looking looking over my shoulder and it seems to have been fixed since February.
@xortim are you still able to repo on OSX with the latest version?
@jskvbinmv are you able to confirm whether it's fixed or still breaking on Linux?

@endophage - I worked around the problem by writing a ControlPlane context to kill the app when I unplug my key.

This is still occurring every day (for me) on 3.1.0 on OSX 10.12 - if you can suggest a way to cause the app to crash out and generate something useful - then I'm happy to do that.
I tried a kill -SEGV pid - and it has generated a report - but I'm wary about posting it publicly without sanitisation.

This is still occurring every day (for me) on 3.1.0 on OSX 10.12 - if you can suggest a way to cause the app to crash out and generate something useful - then I'm happy to do that.

Could you see if the issue is still there with the 4.0.1 version?

I thought I had checked for a newer version - but apparently not!
I've installed the newer version and will leave it running and see what happens.


Crash when Pen tool's in-progress point snaps along an angle with its previous anchor

Describe the Crash
This crash happens immediately upon hoving the in-progress anchor point over the previous anchor point while snapping is enabled and angle constraint (Shift to snap 15° or Ctrl to lock angle) is active:
Steps To Reproduce
Describe precisely how the crash occurred, step by step, starting with a new editor window.

Ensure snapping is enabled
Use the Pen tool and click to start drawing
Hold Shift (Snap 15°) or Ctrl (Lock Angle)
Move the pointer so the new point snaps to the already drawn anchor which the in-progress segment is coming from
Immediate crash when it snaps

Additional Details
https://github.com/GraphiteEditor/Graphite/assets/4388688/6044dab6-7aa8-4a4f-a607-5eeb7223d91d
Browser and OS
Chrome 122, Windows 10 or 11
Stack Trace
panicked at C:\Users\Keavon\.cargo\registry\src\index.crates.io-6f17d22bba15001f\glam-0.25.0\src\f64\dvec2.rs:478:9:
assertion failed: other_len_sq_rcp.is_finite()

Error
    at http://localhost:8080/src/io-managers/panic.ts:7:24
    at callCallback (http://localhost:8080/src/wasm-communication/subscription-router.ts:24:9)
    at Object.handleJsMessage (http://localhost:8080/src/wasm-communication/subscription-router.ts:32:5)
    at http://localhost:8080/src/wasm-communication/editor.ts?t=1710214358055:33:19
    at http://localhost:8080/wasm/pkg/graphite_wasm.js?t=1710214358055:2217:37
    at handleError (http://localhost:8080/wasm/pkg/graphite_wasm.js?t=1710214358055:375:18)
    at imports.wbg.__wbg_call_5830eb5e103aa772 (http://localhost:8080/wasm/pkg/graphite_wasm.js?t=1710214358055:2216:67)
    at js_sys::Function::call2::h0ed55ef12986170a (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[11510]:0x864b2b)
    at graphite_wasm::editor_api::JsEditorHandle::send_frontend_message_to_js::hf2e4cd2a1981ff0a (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[1730]:0x518e13)
    at std::thread::local::LocalKey<T>::with::hade82515fadb6fea (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[3360]:0x646868)
    at core::ops::function::Fn::call::h72a0b6954e26d692 (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[10168]:0x83f959)
    at std::panicking::rust_panic_with_hook::h3aa054d35a0817d7 (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[8200]:0x7eb4b7)
    at std::panicking::begin_panic_handler::{{closure}}::h2f73e4cf6cd6319a (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[9172]:0x818117)
    at std::sys_common::backtrace::__rust_end_short_backtrace::h98ac61a6abbff7e9 (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[17545]:0x89a281)
    at rust_begin_unwind (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[11250]:0x85ee55)
    at core::panicking::panic_fmt::h3e1dd3d08288569e (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[12516]:0x877afb)
    at core::panicking::panic::h0f0c05b20da93dd7 (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[12102]:0x870c4f)
    at graphite_editor::messages::tool::tool_messages::pen_tool::PenToolData::compute_snapped_angle::h7254d1ed6caec95f (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[430]:0x2964b1)
    at graphite_editor::messages::tool::tool_messages::pen_tool::PenToolData::place_anchor::hacccaf780b7971b2 (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[1461]:0x4caea0)
    at <graphite_editor::messages::tool::tool_messages::pen_tool::PenToolFsmState as graphite_editor::messages::tool::utility_types::Fsm>::transition::h0588fd582e3ef768 (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[367]:0x23a78e)
    at graphite_editor::messages::tool::utility_types::Fsm::process_event::h37aa1a299bc58843 (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[4148]:0x6a8dd4)
    at <graphite_editor::messages::tool::tool_messages::pen_tool::PenTool as graphite_editor::utility_traits::MessageHandler<graphite_editor::messages::tool::tool_message::ToolMessage,&mut graphite_editor::messages::tool::utility_types::ToolActionHandlerData>>::process_message::h81060c3ec2bd2207 (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[1958]:0x54f3b8)
    at <graphite_editor::messages::tool::tool_message_handler::ToolMessageHandler as graphite_editor::utility_traits::MessageHandler<graphite_editor::messages::tool::tool_message::ToolMessage,(&graphite_editor::messages::portfolio::document::document_message_handler::DocumentMessageHandler,graphite_editor::messages::portfolio::document::utility_types::misc::DocumentId,&graphite_editor::messages::input_preprocessor::input_preprocessor_message_handler::InputPreprocessorMessageHandler,&graphite_editor::messages::portfolio::utility_types::PersistentData,&graphite_editor::node_graph_executor::NodeGraphExecutor)>>::process_message::h7b1cc11a0a9d6e4d (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[383]:0x25558b)
    at graphite_editor::dispatcher::Dispatcher::handle_message::h1abe1b8977479f2d (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[483]:0x2d13e4)
    at graphite_editor::application::Editor::handle_message::h4ac967c04fe1ef6d (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[12720]:0x87a836)
    at std::thread::local::LocalKey<T>::with::h6a5ab5e7aaaa52e3 (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[3098]:0x62055d)
    at graphite_wasm::editor_api::JsEditorHandle::dispatch::h425f7754b09794ad (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[4836]:0x6f1188)
    at graphite_wasm::editor_api::JsEditorHandle::on_mouse_move::hc2bcdea0ac540d9c (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[8359]:0x7f3d37)
    at jseditorhandle_onMouseMove (http://localhost:8080/wasm/pkg/graphite_wasm_bg.wasm:wasm-function[10098]:0x83d32a)
    at JsEditorHandle.onMouseMove (http://localhost:8080/wasm/pkg/graphite_wasm.js?t=1710214358055:688:14)
    at onPointerMove (http://localhost:8080/src/io-managers/input.ts:101:21)
    at action (http://localhost:8080/src/io-managers/input.ts:18:64)

i tried this one and was able to resolve this , shall i make a PR

submitted a PR for this issue

Can this issue be closed if the above PR resolved it?


At Solr datasource, support for null-safe equality comparison.

I wanted to send a email first but I could not find a proper email address so I opened an issue here.
I assume that this code has the support for Spark 1.5. For Spark 1.5, EqualNullSafe can be pushed down as a filter operator. (https://issues.apache.org/jira/browse/SPARK-9814)
I think this can be easily done adding combination of equality comparison query and [* TO *] adding a if case at SolrRelation.fq() in com.lucidworks.spark
Could I open a PR for this?

Fixed in https://github.com/LucidWorks/spark-solr/pull/25


gitRepo: 2.25 -> 2.26

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for gitRepo is: "Android's repo management tool"
meta.homepage for gitRepo is: "https://android.googlesource.com/tools/repo"
meta.changelog for gitRepo is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 2.26 with grep in /nix/store/jqq2b4vjlm0lrg9hwgw83k227wvssb9f-git-repo-2.26
found 2.26 in filename of file in /nix/store/jqq2b4vjlm0lrg9hwgw83k227wvssb9f-git-repo-2.26

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

1 package rebuild(s)

1 x86_64-linux rebuild(s)
1 x86_64-darwin rebuild(s)

First fifty rebuilds by attrpath
gitRepo

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/jqq2b4vjlm0lrg9hwgw83k227wvssb9f-git-repo-2.26 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A gitRepo https://github.com/r-ryantm/nixpkgs/archive/795e12ed94ca2bd678a1ae2c8e58c5a53ec71f6e.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/jqq2b4vjlm0lrg9hwgw83k227wvssb9f-git-repo-2.26
ls -la /nix/store/jqq2b4vjlm0lrg9hwgw83k227wvssb9f-git-repo-2.26/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

gitRepo

Maintainer pings
cc @otavio for testing.

Result of nixpkgs-review pr 175062 run on x86_64-darwin 1

1 package built:

gitRepo

#181488


THRIFT-5784: Add THeaderTransforms to TConfiguration

Client: go
While I'm here, also auto add compression transforms read (currently only zlib is supported) to writeTransforms so that a server will auto use the same compression on the responses as the client chose to use in the requests.

@dcelasun mind taking another look?


nixos/ckb: Add option to restrict access to the devices to a particu...

…ar group
Motivation for this change
By default, the ckb daemon allows acces to its controlling socket to any process (chmod 666), which is kinda crazy. This PR allows to restrict access to a unix group.
Things done

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

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

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

merged in 99a8c45bdde5c59f5a7a7b7d57813f20fbb70a92


Can we get error messages on submit ?

I would like use this.getErrorMessage() in a modal view.
Thanks

I think you have to give us some more details than that :-)

https://github.com/christianalfoni/formsy-react/issues/147


Add MacAddress to inspect

Use interfaces from cnitypes and use it to find the MacAddress of the container.

You'll also need to clear the new Interfaces field in State at https://github.com/42wim/libpod/blob/467ef9fb6d5bcd82adf3287b47645798d7b7c722/libpod/container_internal.go#L808 and https://github.com/42wim/libpod/blob/467ef9fb6d5bcd82adf3287b47645798d7b7c722/libpod/boltdb_state.go#L182

bot, add author to whitelist

@42wim Also, your commit is missing a signoff - please add one with git commit -s --amend and repush

Ok, nit fixed :)

LGTM and happy green test buttons.

Thanks @42wim
@rh-atomic-bot r+

@rh-atomic-bot retry

Also needs #957 to fix the tests

Alright, should be good now
@rh-atomic-bot retry


Capitalization, Duplicate, Cleaning

Fixed capitalization.
Made a proper sentence.
Removed duplicate of blobmaker.
Removed spaces to make the code more consistent.

If you think some of the things are unnecessary and won't be added but other are quite good just let me know so I can either edit or make a new and better pullrequest.


Cant Find  jdk1.8.0_20

Hello, JDK1.9.0_20 is missing from the directory after cloning resulting in an error. Anything you could advise?
Thanks!

Read the README. Download the correct JDK.

Thanks, Koz. I Should have read that over once more.


tests fail if start attribute is present

Describe the Bug
Testing of wasm-bindgen lib fails if #[wasm_bindgen(start)] is present (for both browser and node).

Error Message
$ wasm-pack test
[INFO]: Checking for the Wasm target...
   Compiling rav1e_js v0.1.0 (/home/urhengulas/Documents/github.com/xiph/rav1e/rav1e_js)
error: linking with `rust-lld` failed: exit code: 1

### ----- stripped ----- ###

  = note: rust-lld: error: function signature mismatch: main
          >>> defined as () -> void in /path/to/rav1e/target/wasm32-unknown-unknown/debug/deps/librav1e_js.rlib(rav1e_js.e16cnisiuzwaayg.rcgu.o)
          >>> defined as (i32, i32) -> i32 in /path/to//rav1e/target/wasm32-unknown-unknown/debug/deps/web-17ed0dcdfd20c376.2kwhsv3emygdoj04.rcgu.o

### ----- stripped ---- ###

error: entry symbol `main` declared multiple times
  |
  = help: did you use `#[no_mangle]` on `fn main`? Use `#[start]` instead

error: aborting due to previous error

error: could not compile `rav1e_js`.

### ----- stripped ----- ###

Caused by: failed to execute `cargo build`: exited with exit code: 101
  full command: "cargo" "build" "--tests" "--target" "wasm32-unknown-unknown"

Steps to Reproduce
# 1. clone repo
git clone https://github.com/Urhengulas/rav1e.git
# 2. checkout commit
git checkout 46283554cfc093fb6721557068b3242794544226
# 3. go into subfolder
cd rav1e_js/
# 4. run tests
wasm-pack test --node

Expected Behavior
I expect wasm-pack test --node to run all wasm-bindgen tests for node.
And since the wasm-bindgen books says here:

The start function will not be executed when testing.

I also expect it to not be executed. (Maybe not even part of the build).
Actual Behavior
The command fails and doesn't run any tests.
Additional Context
wasm-pack build runs without any problems and also the pkg/ works.

This says that main is defined multiple times in two crates, which I think is unrelated to #[wasm_bindgen(start)]? Can you see why the main symbol is defined twice?

Thanks for the fast answer @alexcrichton.
No, I didn't define the #[wasm_bindgen(start)] twice.
I now solved the issue by renaming the function I annotated with the attribute from main to main_js.
I got the hint from https://github.com/rust-gamedev/wg/issues/51:

wasm-bindgen doesn't currently support main - you have to use the wasm_bindgen(start) attribute on a public function instead, and that function can't be main

I couldn't find a reason why this solves the problem, but it does.
I will send a PR changing this in the example in the rust-bindgen book.

Ok thanks for the follow-up! It sounds like this isn't a bug in wasm-bindgen so I'm going to close this.

I just encountered this issue, and the workaround of renaming main to main_js fails for me with the error <path to output file>.wasm: Syntax error: end of file unexpected. Everything works fine when building normally; the issue only occurs with cargo test.
Is there another workaround? Does anyone know if this is a bug in rustc, cargo, or wasm-bindgen?

I just encountered this issue, and the workaround of renaming main to main_js fails for me with the error <path to output file>.wasm: Syntax error: end of file unexpected. Everything works fine when building normally; the issue only occurs with cargo test.
Is there another workaround? Does anyone know if this is a bug in rustc, cargo, or wasm-bindgen?


Gnome Restaurant KC

Let's add a kill count for Gnome Restaurant, for flex of course.

Additional context
This data does exist, as it is present in the collection log

Generally we don't add !kc commands for activities which don't output your completions/kills in the chat. Gnome delivery only shows your delivery counts in the collection log but never has chat messages, so I don't think we should add this.


Fix #49: Scroll build panel

Fixes Issue #49 with updated and fixed code from @5n8ke

Closing in favor of #137


fix learn more link

fix learn more link

Changes 👷♀

rename FAQ tab to position info
make the banner button work at the bottom of the open position page
click the button and the position info tab top scrolls into view

Looks ok, just like the mdx, not sure about the knowledge base link (gottem).


Nodes are replicating and storing every dataset they bid on

Expected Behavior
Datasets are deleted as soon as the DC has confirmed that the node has not won the job.
Actual Behavior
The nodes store the data from the job they bid on, which increases the space used. During the initial jobs on the xDAI network, the space used per day increases with 300MB. As per the expected growth of the network of 450k jobs for 2021, would require over 200GB space per server to contain the ODN data. Extrapolating further over the years, this approach is not sustainable.
Steps to Reproduce the Problem

Backup performed daily shows increase of 3GB in the span of 6 days.

Specifications

Version: 5.0.0
Platform: Ubuntu v20

Hello,
Thanks for submitting this issue.
We already started working on this and you can check PR here: https://github.com/OriginTrail/ot-node/pull/1515
This is first version of dataset pruning feature that will be updated in the feature.
You can expect this feature to be added in new version 5.0.2 of ot-node.
Regards,
Djordje


CLOUD-61285 Use cbd start-wait instead of wait_for_cloudbreak_api.sh

@schfeca75 @doktoric review please

Refer to this link for build results (access rights to CI server needed):
http://ci.sequenceiq.com//job/cloudbreak-pull-request/2817/

Refer to this link for build results (access rights to CI server needed):
http://ci.sequenceiq.com//job/mock-integration-test/309/


Horrible documentation

Not only does your on-prem software comes without documentation, and the links you remember to put within the apps aren't even for a direct resource, you still go on to hawking on and on Azure and go on without documenting how stuff is done with the undocumented bloat we pay thousands for.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 428e9e07-ca35-27d2-e63a-92930cec0118
Version Independent ID: 9a452a85-9afa-42d5-f319-bf1c4c50d01d
Content: Remote Desktop Services architecture
Content Source: WindowsServerDocs/remote/remote-desktop-services/Desktop-hosting-logical-architecture.md
Product: windows-server-threshold
GitHub Login: @lizap
Microsoft Alias: elizapo

Hi @vitaprimo,
We do actually have quite a lot of on-premises documentation. We're sorry you didn't find what you were looking for specifically. We can address your concerns better when you reference the particular documentation that’s not meeting your needs.
Thanks,
Corey


option to have all lualib functions accessed through object

lua only has up to 200 local variables but typescripttolua creates many local variables for the lualib
instead of
local ____lualib = require("lualib_bundle")
local Error = ____lualib.Error
local RangeError = ____lualib.RangeError
local ReferenceError = ____lualib.ReferenceError
local SyntaxError = ____lualib.SyntaxError
local TypeError = ____lualib.TypeError
local URIError = ____lualib.URIError
local __TS__New = ____lualib.__TS__New

it would make more sense to just have
local ____lualib = require("lualib_bundle")

and then access the various features with ____lualib.Error.

same applies for named imports
import { foo, bar } from './baz'

becomes
local baz = require("baz")
local foo = baz.foo
local bar = baz.bar

but could only declare baz and then access properties of baz when used.

I might be mistaken, but I've seen this done in FiveM forexample, and I'm fairly certain that this is done to improve performance.
Aka, to keep the function "in memory" or whatever.
Dont really know the exact logic behind it, but I'd imagine there's at least some kind of similar thought behind this too.
As for the "lua local variable limit", that anyways seems to be for every individual function, so it should be quite hard to get up to 200

I might be mistaken, but I've seen this done in FiveM forexample, and I'm fairly certain that this is done to improve performance. Aka, to keep the function "in memory" or whatever.
Dont really know the exact logic behind it, but I'd imagine there's at least some kind of similar thought behind this too.
As for the "lua local variable limit", that anyways seems to be for every individual function, so it should be quite hard to get up to 200

good point. tstl probably/should keep track of this and handle it automatically regardless.

I might be mistaken, but I've seen this done in FiveM forexample, and I'm fairly certain that this is done to improve performance. Aka, to keep the function "in memory" or whatever.
Dont really know the exact logic behind it, but I'd imagine there's at least some kind of similar thought behind this too.
As for the "lua local variable limit", that anyways seems to be for every individual function, so it should be quite hard to get up to 200

good point. tstl probably/should keep track of this and handle it automatically regardless.

That of which I agree with.
We could at least start out with warning if it ever becomes more than 200.
And in the odd situation that someone actually gets up there, we could have a further look at this.
Doubt it'll happen, I've used TSTL to compile & inline import like 10 libraries at a time, leading to tens of thousands of lines of code being inline imported, without ever having said issue.


Vscode Extensions provideCompletionItems cannot trigger in string

I'm not sure if I'm asking a very stupid question and I'm not sure if this is a bug,
But it's been bothering me for a week, it is time for help.
My Code
const ALL_INVOKE_CHAR = [
  "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",
  "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z",
  ".",":","(",")","[","]","{","}"
];
export function activate(context: ExtensionContext) {
  languages.registerCompletionItemProvider(
    [
      { scheme: "file", language: "javascript" },
      { scheme: "file", language: "javascriptreact" },
      { scheme: "file", language: "typescript" },
      { scheme: "file", language: "typescriptreact" },
    ],
    {
      async provideCompletionItems(document, position, token, context) {
        console.log("@do something");
        // any other logic
        return undefined;
      },
    },
    ...ALL_INVOKE_CHAR
  );
}

my procedure
you can see this gif

type 'F5' and run this extensions
type any char in vsc,observe whether to do things

actual
In string e.g. '',"",``,i can trigger in  ".",":","(",")","[","]","{","}" but not letter
expect
i expect it can trigger provideCompletionItems in "" or '' or `` , does any way to solve it?
Thank you for reading to the end

I think "wordPattern" in language-configuration.json influences it and also the VSCode setting "editor.quickSuggestions"

thx ! editor.quickSuggestions is useful


Check IMDS with IAM User creds

I thought someone had opened an issue for this, but now I can't find any. I think IMDS might break without a session token, which means we would need to get temporary credentials if it's an IAM user. This would also need to be implemented on the standalone server https://github.com/benkehoe/imds-credential-server

Shipped in v0.17


Add some default pv as part of snc script

We are not creating any PV which make it difficult for some of the tools like odo to work correctly, we need to fix it so it should work as expected.
The way oc cluster up used to do it https://github.com/openshift/origin/blob/release-3.11/pkg/oc/clusterup/coreinstall/components/persistent-volumes/setup_persistent_volumes.go#L39-L91

So using below scripts I am able to create 50 pv and also tested odo which works.
$ cat create_files.sh
#/bin/bash

set -xe
function setup_pv_dir() {
  local dir="${1}"
  if [[ ! -d "${dir}" ]]; then
    sudo mkdir -p "${dir}"
  fi
  if ! sudo chcon -t svirt_sandbox_file_t "${dir}" &> /dev/null; then
    echo "Not setting SELinux content for ${dir}"
  fi
  sudo chmod 770 "${dir}"
}

basedir=/var/data
setup_pv_dir "${basedir}"

for i in $(seq 1 50); do
  setup_pv_dir "${basedir}/pv${i}"
done

$ ssh<EMAIL_ADDRESS>'bash -s' < create_files.sh

$ cat create_files.sh
#/bin/bash

set -xe
function setup_pv_dir() {
  local dir="${1}"
  if [[ ! -d "${dir}" ]]; then
    sudo mkdir -p "${dir}"
  fi
  if ! sudo chcon -t svirt_sandbox_file_t "${dir}" &> /dev/null; then
    echo "Not setting SELinux content for ${dir}"
  fi
  sudo chmod 770 "${dir}"
}

basedir=/var/data
setup_pv_dir "${basedir}"

for i in $(seq 1 50); do
  setup_pv_dir "${basedir}/pv${i}"
done
[prkumar@prkumar-test ~]$ cat create_pv.sh
#/bin/bash -xe
function generate_pv() {
  local basedir="${1}"
  local name="${2}"
cat <<EOF
apiVersion: v1
kind: PersistentVolume
metadata:
  name: ${name}
  labels:
    volume: ${name}
spec:
  capacity:
    storage: 100Gi
  accessModes:
    - ReadWriteOnce
    - ReadWriteMany
    - ReadOnlyMany
  hostPath:
    path: ${basedir}/${name}
  persistentVolumeReclaimPolicy: Recycle
EOF
}

function create_pv() {
  local basedir="${1}"
  local name="${2}"
  if ! oc get pv "${name}" &> /dev/null; then
    generate_pv "${basedir}" "${name}" | oc create -f -
  else
    echo "persistentvolume ${name} already exists"
  fi
}
basedir="/var/data"
for i in $(seq 1 50); do
  create_pv "${basedir}" "pv${i}"
done

$ export KUBECONFIG=/home/prkumar/.crc/cache/crc_libvirt_v4.1.0.rc0/kubeconfig
$ ./create_pv.sh
persistentvolume/pv1 created
persistentvolume/pv2 created
persistentvolume/pv3 created
persistentvolume/pv4 created
persistentvolume/pv5 created
persistentvolume/pv6 created
persistentvolume/pv7 created
persistentvolume/pv8 created
persistentvolume/pv9 created
persistentvolume/pv10 created
persistentvolume/pv11 created
persistentvolume/pv12 created
persistentvolume/pv13 created
persistentvolume/pv14 created
persistentvolume/pv15 created
persistentvolume/pv16 created
persistentvolume/pv17 created
persistentvolume/pv18 created
persistentvolume/pv19 created
persistentvolume/pv20 created
persistentvolume/pv21 created
persistentvolume/pv22 created
persistentvolume/pv23 created
persistentvolume/pv24 created
persistentvolume/pv25 created
persistentvolume/pv26 created
persistentvolume/pv27 created
persistentvolume/pv28 created
persistentvolume/pv29 created
persistentvolume/pv30 created
persistentvolume/pv31 created
persistentvolume/pv32 created
persistentvolume/pv33 created
persistentvolume/pv34 created
persistentvolume/pv35 created
persistentvolume/pv36 created
persistentvolume/pv37 created
persistentvolume/pv38 created
persistentvolume/pv39 created
persistentvolume/pv40 created
persistentvolume/pv41 created
persistentvolume/pv42 created
persistentvolume/pv43 created
persistentvolume/pv44 created
persistentvolume/pv45 created
persistentvolume/pv46 created
persistentvolume/pv47 created
persistentvolume/pv48 created
persistentvolume/pv49 created
persistentvolume/pv50 created

Fuse Online development is also blocked by this.

Assigned to @cfergeau as this would likely have to be added to the end of the image generation, right before shut-down and cleanup

I'v added a patch doing that to PR #26 , it's only creating one /mnt/pv-data directory/one PV, not clear to me whether one is enough, or if we need to create multiple ones.

@cfergeau I am not entirely sure either, but to be on the safe side (thinking mininshift compatible), why don't we create the same amount as before? Or do you see any down sides in having mutiple ones?

@cfergeau we should add atleast ~50 pv directory, in minishift we use to 100 by default but I think ~50 is something good amount for any kind of application developer.


Doctests configuration for plutus-ledger

Was able to get doctests working following the example here: https://github.com/input-output-hk/haskell.nix/tree/master/test/cabal-doctests
This PR only activates it for plutus-ledger.
The only thing I need to verify is that we don't need to add dependencies in plutus-ledger lib for modules only used in doctests.
EDIT:
Cool! Using dependencies like generic-arbitrary  don't need to be added to the cardano-ledger lib, only in the doctests test-suite.

Pre-submit checklist:

Branch

[ ] Tests are provided (if possible)
[ ] Commit sequence broadly makes sense
[ ] Key commits have useful messages
[ ] Formatting, PNG optimization, etc. are updated
[ ] Important changes are reflected in changelog.d of the affected packages

PR

[ ] Self-reviewed the diff
[ ] Useful pull request description
[ ] Reference the ADR in the PR and reference the PR in the ADR (if revelant)
[ ] Reviewer requested

Oh, just noticed that cabal-doctest is deprecated :(. However, it still works. Using doctest directly instead doesn't work out of the box. Maybe I should drop this PR and create a ticket for doctest?

Personally, I just don't think doctests are worth it any more. Yes, they're somewhat nice, but you can't demonstrate most complex things in them, and they're such a pain to get running :(
But if this works then fine!


Reusing the Database connection in app

I am not sure how things work with this example.
How does the database connection object become available in the app?
More detailed question here.

If you use Typeorm, you can connect to your database in one place and get the connection elsewhere using getConnection(), so you don't need to directly pass your connection to the app.
But, in this example, you can create whithin ./app a method to initialize your database, pass it to your express instance to build your routes, and then return your express instance to be used to create serverlessExpress({ app }).
Something like this:
async function setup (event, context) {
  const expressApp= await app.initializeExpressInstanceWithDatabase()

  serverlessExpressInstance = serverlessExpress({ expressApp: app })
  return serverlessExpressInstance(event, context)
}

RDS proxy can be leveraged here as a secondary measure.  It can help manage/reuse db connections.


Assertion error

I'm not sure if this is because I'm using the library wrong, or if this is a bug. I managed to reproduce it with this code:
#include "reactphysics3d.h"

using namespace rp3d;

int main(int argc, char *argv[])
{
    DynamicsWorld *world = new DynamicsWorld(Vector3(0, -9.81, 0));
    // floor
    {
        BoxShape *shape = new BoxShape(Vector3(10, 1, 10));
        RigidBody *body = world->createRigidBody(Transform(Vector3(0, 0, 0), Quaternion(0, 0, 0, 1)));
        body->setType(STATIC);
        body->addCollisionShape(shape, Transform(Vector3(0, 0, 0), Quaternion(0, 0, 0, 1)), 90);
    }
    // box
    {
        BoxShape *shape = new BoxShape(Vector3(2, 2, 2));
        RigidBody *body = world->createRigidBody(Transform(Vector3(0, 10, 0), Quaternion(0, 0, 0, 1)));
        body->setType(DYNAMIC);
        body->addCollisionShape(shape, Transform(Vector3(0, 10, 0), Quaternion(0, 0, 0, 1)), 90);
    }
    while(true) {
        world->update(1.0f/60.0f);
    }
    return 0;
}

And the error:
Assertion failed: (wDotv > 0.0), function computePenetrationDepthAndContactPoints, file deps/reactphysics3d/collision/narrowphase/EPA/EPAAlgorithm.cpp, line 391.
Abort trap: 6

You can't see it in the command line, but in my game It errors the instant the box collides with the floor.
I think it's because I add the 2x2x2 box's shape to the body at (0, 10, 0) instead of (0, 0, 0) as it probably wants. Because if I put (0, 0, 0) for the position in addCollisionShape, it works as expected.
Also, if you don't do that and instead set the 2x2x2 box's size to 1x1x1, it stops crashing and works as expected.
Edit:
Also, another bug: If you try to update the dynamics world when it has no bodies, it crashes, presumably because it wants always to have bodies in it.
Thanks.

Thanks a lot for reporting this and thanks for your code. Can I ask you to try the same code but using the current "develop" branch (instead of master) ? I have improved the robustness of the collision detection recently. Also let me know if it still crashes with no bodies in the physics world.
Best Regards.

 Fix both bugs at https://github.com/DanielChappuis/reactphysics3d/issues/26

I am getting the assertion in EPAAlgorithm.cpp. Where can we get the fix?

I am currently working on improving the robustness of collision detection to fix this bug. I will let you know when this issue is fixed.

The version v0.7.0 of ReactPhysics3D has been released. This issue has been fixed in this release.
Thanks a lot for reporting this.


Newer Tensorflow Version Error occurs [ tf 2.3 ]

Some of this reqs are outdated so deprecated functions occurs some probs.

We will not update the requirements in this repository.
Please use a virtual environment or a development environment with a TF version 1.4.1 - 1.14.
We will update the README to inform.


Use named export for largest series product

Per #436, convert default export to named export for largest series
product exercise. Change from class style new Series(x).largestProduct(y)
to largestSeriesProduct(x, y) since there is no need to keep state. See 8a38f2f.
As part of this change, I also simplified and linted the pre-existing logic in the example solution (
c2d080c, e9e737b, c450f53 and 40504cf.  If these are too noisy to be within the same PR, please let me know.  I can break these into a separate PR.  Thanks!

I think it would be better if you move the named export changes to another PR and leave this one for eslint only.

@serixscorpio we appreciate your contributions, truly!  But I am in agreement with @tejasbubane that the PRs should be logically separate.  Just makes it easier for the easily confused among us to follow the plot :)

Thanks for your feedback, I'll open a separate PR to lint first, and another one to move to named export (in the order suggested) to reduce the cognitive load.  Thanks.


Push monitor w/ interval > 1 day does not seem to work

⚠ Please verify that this bug has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

Description
I have a push monitor set to a 90000 second (25 hours) interval. I have a script that runs once/day and curls the push monitor URL upon successful completion. I disabled the script and noticed that I did not get any alert.
Here's the configuration:

I have the same setup for some monitors/scripts on 60 second intervals, and they all correctly trigger when the script does not run.
👟 Reproduction steps

Setup a push monitor w/ a 90000 second interval
Curl the monitor URL once
Never curl it again
The push monitor never goes red

👀 Expected behavior
If the push URL does not receive a request in 25 hours, it should trip the alert. In other words, a push monitor should behave the same regardless its interval.
😓 Actual Behavior
See description
🐻 Uptime-Kuma Version
1.22.1-debian
💻 Operating System and Arch
Ubuntu 22.04
🌐 Browser
Chronium 114.0.5735.198
🐋 Docker Version
23.0.5, build bc4487a
🟩 NodeJS Version
No response
📝 Relevant log output
No response

Set Retries to 0.

Thanks, I'll try that. Could you explain why this is necessary?

With Retries=1, the monitor will not send a notification on the first failed check. It will check one more time to confirm that. In your case, it will send in 50 hours.
If you want to keep the retries logic, you can lower Heartbeat Retry Interval to maybe 60 seconds, so it won't take too long to retry.

Hmm. The problem was that it just never sends the notification. Even if the push is down for weeks.

I swear I have seen this before. After a bit (a lot) of digging I finally found this: #2801
I will setup a push monitor to try to test this myself.

I swear I have seen this before. After a bit (a lot) of digging I finally found this: #2801
I will setup a push monitor to try to test this myself.

Oh, it's the push monitor again, I feed this monitor's implementation becomes over complicated somehow...
Change back to bug, did not realize the monitor type.

Thanks @louislam . Just a bit of feedback: as a user, I have found the Retries and Heartbeat Retry Interval parameters confusing. I'm not sure what it means to "retry" a push monitor. The monitor is just waiting for an HTTP request. I can't think of anything that it could be retrying.

I think I might have found one contributing factor to the issue. I normally run a backup of my uptime-kuma container that involves stopping and restarting the container. I disabled this backup, created a new 25-hour alert, curled it once, and then left it alone. I got an email alert this time. The only difference compared to my previous setup is that I did not re-start the container. @louislam is there perhaps anything in the push metric code that would be affected by a container restart?

Wait then this may be more dumb than I thought... On server start, we schedule a task after your defined interval to check if the push route has been called.
If you set your interval to 25 hours, then restart the server every 24 hours, then obviously the task will never get to fire 🤦🏻♂

I agree, we should handle this better. I meant that as I expected this to be a week long debugging session involving tracking down platform-dependent or race condition issues. Turns out it's way more "obvious" than that.
I think on restart we can compute the remaining interval like I did in #3072, then schedule the next check base on that. But it would be a slight change from the current behavior as people who have their interval set at 60s would likely see their push monitor immediately go Down after restart.
Also currently retries do not persisting across restart, and that's more difficult to fix.

likely see their push monitor immediately go Down after restart.

Do you think we need to introduce a minimum time in this case?
(Could this solve https://github.com/louislam/uptime-kuma/issues/454 as well?)

This has been running well since I stopped doing the nightly reboot. Feel free to close this issue. I'll be excited to see a fix at some point, but no rush.

You can also change the issue title to be more descriptive of what the actual problem is, maybe we can keep this open until a fix is available.


Fixed #32031 -- Added model class for each model to AdminSite.each_context().

Ticket https://code.djangoproject.com/ticket/32031

@rsalmaso  Do you have time to keep working on this?

@rsalmaso Do you have time to keep working on this?
Yes, next week I hope to have some free time to work on it

@rsalmaso Thanks for updates :+1:


[Bug Report]: resolve.tsConfigPath does nothing

System Info
System:
    OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (2) x64 AMD EPYC
    Memory: 618.58 MB / 1.63 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.17.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.15.0 - /usr/local/bin/npm
    Watchman: 20220528.183901.0 - /usr/local/bin/watchman
  npmPackages:
    @rspack/cli: latest => 0.1.0

Details
Specifying resolve.tsConfigPath has no effect: compilerOptions.baseUrl and compilerOptions.paths from tsconfig.json are ignored.
Reproduce link
https://codesandbox.io/p/sandbox/new-leaf-qxbh8e
Reproduce Steps
Run npm run build:ts to see that TS has no resolve issues.
Run npm run build and see:
error[internal]: Resolve error
  ┌─ src/App.tsx:3:1
  │
3 │ import Button from "components/Button";
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Failed to resolve components/Button in /project/home/garrisond/workspace/src/App.tsx

In the case of a simple setup like mine, this can be a solution:
- resolve: { tsConfigPath: "./tsconfig.json" },
+ resolve: { modules: ["node_modules", "src"] },

You can run npm run build-modules and see that it works like a charm.

@bvanjoi I updated the Code Sandbox to the latest of rspack 0.1.1 but the issue still presents 😞

@bvanjoi I would be happy to help, just let me know how.

I found out the reason for this.
First, there was indeed a problem with resolving relative paths based on baseUrl in #2174 before, but #2174 fixes it.
The problem is now caused by the need to pass an absolute path to tsconfig.
Also, the current error reporting is misleading and I have added a new error to https://github.com/web-infra-dev/rspack/pull/2264/files#diff-e3cb84e19ccc823fb214fdbb9dcd1afe8de633c34762f11d11a2c22a1fff2238R77 to try and fix it.
So, you can change './tsconfig.json' to path.resolve(__dirname, './tsconfig.json') to fix that

Can we expect one day './tsconfig.json' to be a valid option?
For entry: { main: "./src/index.tsx" }, it works fine. That would be great to keep it consistent.

I can confirm that with path.resolve(...) it works! Thanks a lot for your assistance!

Can we expect one day './tsconfig.json' to be a valid option?

track this in #2312


Resizing of Arrays causes several problems

The resizing of arrays causes some funny issues and errors. Cause of these problems is that the Refnum of the array element will point to the last element in the array that the user clicked or changed.
Try the following things with the VI (LabVIEW 2015) included in the zip-File attached.
Array Issue.zip
Start the VI and e.g. maximize the window size -> OK
Set back to original size -> OK
Change the value 10 in the leftmost array (ArrayElement Refnum will now point to that specific numeric)
Maximize VI window size -> Top position of "Array" is not aligned anymore with the other element -> FAIL
Set back to original size, click element 1 of "Array".
This error is even worse if the array element is a cluster that is not set to "autosizing". This is demonstrated with "Array 2", just click on the last element of that array and than resize the frontpanel -> major fail, because the position of the "wrong" cluster elements (in comparision to the elements of the xml-file) gets changed and suddenly all cluster elements are "invisible".
Clicking on the first visible element of "Array 2" at least recovers the position of the cluster elements after the next resizing.
Work-arounds:
Activating "AutoSize" on the cluster at least resolves the issue that the cluster elements are "invisible". But after that, the array itself can get repositioned.
That problem can be resolved by  changing the code of the VI "NI_SE_Front Panel Layout.lvlib:Array Control Layout.lvclass:ApplyLayoutToObject.vi". - see attached image:

Today I found another solution to solve this issue: The visible size of the array has to be decreased to only 1 element in total. The Refnum "ArrayElement" will than point to exactly this 1 element. All position and resize changes are then applied to this one element. After resizing the element, the visible size of the array gets changed back to its original values:


Does not work with latest aframe

I'm getting the following error when including this with the latest aframe version:
Uncaught (in promise) TypeError: Cannot read property 'register' of undefined

You can check this out here: http://codepen.io/anon/pen/MyzwVX?editors=1001

Also having issues with latest AFrame Build. It appears to be an issue with line 119,
this.draw.register(this.render.bind(this));

Please make sure you also have the aframe-draw-component in your project, as this component uses the draw component.

works with aframe 0.3.2

@tizzle Adding aframe-draw-component, and ensuring that it was loaded before htmltexture-component worked for me


Add logging statement when there is a None actor.

#739
#740  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @rohinb2 and the rest of your teammates on  Graphite


Ensure reasonable performance with large CSV datasets

In order to provide the best utility to Pycytominer users it's crucial we ensure reasonable performance when ingesting large amounts of CSV data (whether by number of files, size of files, or both). This issue is intended to help to guide this repo towards reasonable performance expectations (computing resources and time).

Hi @gwaybio - would you have any suggestions in terms of large CSV dataset(s) to benchmark CSV data handling for pyctyominer-transform? I've been using the "Human HT29" example CSV output from CellProfiler for early work here but these are relatively small in number and size.

Hi Dave,
All the data you could ever want can be found here! Data sets range in size from a couple of plates into the several hundred.
https://registry.opendata.aws/cellpainting-gallery/

Fantastic, thank you so much @bethac07!

Hi @bethac07  - thanks again for the cellpainting-gallery data references, these have been very helpful! Using those data as a reference, what is typically used as an input for pycytominer work? I notice there are analysis files broken down into compartments ("Cells", "Cytoplasm", etc) and also backend files which appear to be aggregations. If both are used, is there a preference towards one or other other for certain purposes? I'm wondering if I should target one format over the other for work in this repo. (cc @gwaybio)

Great question!

The analysis files are what come directly from CellProfiler, and are what we hope will eventually be the direct target for pycytominer-transform in new experiments going forward. They are much more important to be performant on.
The backend aggregated sqlite files we would like to eventually convert to whatever format we end up with here (parquet or whatever). We have a lot of them from 15 years of experiments, so it would be nice to not be terrible to convert these all over, but since they're already available in aggregated form, are much less important.

I was very excited to test this out! I've included my notes below – hope this helps!

Python setup
sudo apt remove pipenv
install pipenv
pipenv install --python /usr/bin/python3.10
pipenv shell
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10

Test dataset
aws s3 ls --recursive s3://cellpainting-gallery/test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/|grep csv
2023-01-30 22:05:41    2497224 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A01-1/Cells.csv
2023-01-30 22:05:42    2431302 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A01-1/Cytoplasm.csv
2023-01-30 22:05:42     361721 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A01-1/Experiment.csv
2023-01-30 22:05:42     105210 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A01-1/Image.csv
2023-01-30 22:05:43    2378879 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A01-1/Nuclei.csv
2023-01-30 22:05:44    8301088 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A01-2/Cells.csv
2023-01-30 22:05:44    8026097 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A01-2/Cytoplasm.csv
2023-01-30 22:05:45     361721 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A01-2/Experiment.csv
2023-01-30 22:05:45     105251 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A01-2/Image.csv
2023-01-30 22:05:45    7920455 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A01-2/Nuclei.csv
2023-01-30 22:06:04    1980355 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A02-1/Cells.csv
2023-01-30 22:06:04    1932478 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A02-1/Cytoplasm.csv
2023-01-30 22:06:05     361721 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A02-1/Experiment.csv
2023-01-30 22:06:05     105204 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A02-1/Image.csv
2023-01-30 22:06:05    1886212 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A02-1/Nuclei.csv
2023-01-30 22:06:06    8551391 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A02-2/Cells.csv
2023-01-30 22:06:07    8274429 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A02-2/Cytoplasm.csv
2023-01-30 22:06:07     361723 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A02-2/Experiment.csv
2023-01-30 22:06:07     105383 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A02-2/Image.csv
2023-01-30 22:06:08    8154002 test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/BR00117035-A02-2/Nuclei.csv

Install package
git clone git@github.com:cytomining/pycytominer-transform.git
cd pycytominer-transform
pip install -e .

Run
from pycytominer_transform import convert

convert(
    source_path="s3://cellpainting-gallery/test-cpg0016-jump/source_4/workspace/analysis/2021_04_26_Batch1/BR00117035/analysis/",
    source_datatype="csv",
    dest_path=".",
    dest_datatype="parquet",
    concat=True,
    no_sign_request=True,
)

Error log
22:07:21.433 | INFO    | prefect.engine - Created flow run 'hopping-snake' for flow 'to-parquet'
22:07:21.579 | INFO    | Flow run 'hopping-snake' - Created subflow run 'military-dingo' for flow 'gather-records'
22:07:21.631 | INFO    | Flow run 'military-dingo' - Created task run 'build_path-505e517e-0' for task 'build_path'
22:07:21.631 | INFO    | Flow run 'military-dingo' - Executing 'build_path-505e517e-0' immediately...
22:07:21.736 | INFO    | Task run 'build_path-505e517e-0' - Finished in state Completed()
22:07:21.762 | INFO    | Flow run 'military-dingo' - Created task run 'get_source_filepaths-b02baff7-0' for task 'get_source_filepaths'
22:07:21.763 | INFO    | Flow run 'military-dingo' - Executing 'get_source_filepaths-b02baff7-0' immediately...
22:07:22.887 | INFO    | Task run 'get_source_filepaths-b02baff7-0' - Finished in state Completed()
22:07:22.908 | INFO    | Flow run 'military-dingo' - Created task run 'infer_source_datatype-8e1a10f3-0' for task 'infer_source_datatype'
22:07:22.908 | INFO    | Flow run 'military-dingo' - Executing 'infer_source_datatype-8e1a10f3-0' immediately...
22:07:22.953 | INFO    | Task run 'infer_source_datatype-8e1a10f3-0' - Finished in state Completed()
22:07:22.976 | INFO    | Flow run 'military-dingo' - Created task run 'filter_source_filepaths-7fbae088-0' for task 'filter_source_filepaths'
22:07:22.977 | INFO    | Flow run 'military-dingo' - Executing 'filter_source_filepaths-7fbae088-0' immediately...
22:07:24.263 | INFO    | Task run 'filter_source_filepaths-7fbae088-0' - Finished in state Completed()
22:07:24.289 | INFO    | Flow run 'military-dingo' - Finished in state Completed()
22:07:24.383 | INFO    | Flow run 'hopping-snake' - Created task run 'read_file-518a7dde-2' for task 'read_file'
22:07:24.384 | INFO    | Flow run 'hopping-snake' - Submitted task run 'read_file-518a7dde-2' for execution.
22:07:24.403 | INFO    | Flow run 'hopping-snake' - Created task run 'read_file-518a7dde-6' for task 'read_file'
22:07:24.404 | INFO    | Flow run 'hopping-snake' - Submitted task run 'read_file-518a7dde-6' for execution.
22:07:24.431 | INFO    | Flow run 'hopping-snake' - Created task run 'write_parquet-9d9b144f-2' for task 'write_parquet'
22:07:24.432 | INFO    | Flow run 'hopping-snake' - Submitted task run 'write_parquet-9d9b144f-2' for execution.
22:07:25.220 | INFO    | Flow run 'hopping-snake' - Created task run 'read_file-518a7dde-4' for task 'read_file'
22:07:25.221 | INFO    | Flow run 'hopping-snake' - Submitted task run 'read_file-518a7dde-4' for execution.
22:07:28.333 | INFO    | Flow run 'hopping-snake' - Created task run 'read_file-518a7dde-10' for task 'read_file'
22:07:28.334 | INFO    | Flow run 'hopping-snake' - Submitted task run 'read_file-518a7dde-10' for execution.
22:07:31.568 | INFO    | Flow run 'hopping-snake' - Created task run 'read_file-518a7dde-1' for task 'read_file'
22:07:31.569 | INFO    | Flow run 'hopping-snake' - Submitted task run 'read_file-518a7dde-1' for execution.
22:07:34.815 | INFO    | Flow run 'hopping-snake' - Created task run 'write_parquet-9d9b144f-10' for task 'write_parquet'
22:07:34.816 | INFO    | Flow run 'hopping-snake' - Submitted task run 'write_parquet-9d9b144f-10' for execution.
22:07:41.747 | INFO    | Flow run 'hopping-snake' - Created task run 'write_parquet-9d9b144f-6' for task 'write_parquet'
22:07:41.748 | INFO    | Flow run 'hopping-snake' - Submitted task run 'write_parquet-9d9b144f-6' for execution.
22:07:53.852 | INFO    | Flow run 'hopping-snake' - Created task run 'read_file-518a7dde-0' for task 'read_file'
22:07:53.853 | INFO    | Flow run 'hopping-snake' - Submitted task run 'read_file-518a7dde-0' for execution.
22:07:55.301 | INFO    | Flow run 'hopping-snake' - Created task run 'write_parquet-9d9b144f-1' for task 'write_parquet'
22:07:55.302 | INFO    | Flow run 'hopping-snake' - Submitted task run 'write_parquet-9d9b144f-1' for execution.
22:08:06.304 | INFO    | Flow run 'hopping-snake' - Created task run 'read_file-518a7dde-15' for task 'read_file'
22:08:06.305 | INFO    | Flow run 'hopping-snake' - Submitted task run 'read_file-518a7dde-15' for execution.
22:08:12.840 | INFO    | Task run 'read_file-518a7dde-10' - Finished in state Completed()
22:08:16.472 | INFO    | Flow run 'hopping-snake' - Created task run 'read_file-518a7dde-8' for task 'read_file'
22:08:16.473 | INFO    | Flow run 'hopping-snake' - Submitted task run 'read_file-518a7dde-8' for execution.
22:08:21.693 | INFO    | Task run 'read_file-518a7dde-2' - Finished in state Completed()
22:08:24.641 | INFO    | Flow run 'hopping-snake' - Created task run 'write_parquet-9d9b144f-0' for task 'write_parquet'
22:08:24.642 | INFO    | Flow run 'hopping-snake' - Submitted task run 'write_parquet-9d9b144f-0' for execution.
22:08:24.880 | ERROR   | prefect.orion - Encountered exception in request:
Traceback (most recent call last):
  File "/home/ubuntu/.local/share/virtualenvs/pycytominer-transform-ckiYrrK9/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
    self.dialect.do_execute(
  File "/home/ubuntu/.local/share/virtualenvs/pycytominer-transform-ckiYrrK9/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
  File "/home/ubuntu/.local/share/virtualenvs/pycytominer-transform-ckiYrrK9/lib/python3.10/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 108, in execute
    self._adapt_connection._handle_exception(error)
  File "/home/ubuntu/.local/share/virtualenvs/pycytominer-transform-ckiYrrK9/lib/python3.10/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 236, in _handle_exception
    raise error
  File "/home/ubuntu/.local/share/virtualenvs/pycytominer-transform-ckiYrrK9/lib/python3.10/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 90, in execute
    self.await_(_cursor.execute(operation, parameters))
  File "/home/ubuntu/.local/share/virtualenvs/pycytominer-transform-ckiYrrK9/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 68, in await_only
    return current.driver.switch(awaitable)
  File "/home/ubuntu/.local/share/virtualenvs/pycytominer-transform-ckiYrrK9/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 121, in greenlet_spawn
    value = await result
  File "/home/ubuntu/.local/share/virtualenvs/pycytominer-transform-ckiYrrK9/lib/python3.10/site-packages/aiosqlite/cursor.py", line 37, in execute
    await self._execute(self._cursor.execute, sql, parameters)
  File "/home/ubuntu/.local/share/virtualenvs/pycytominer-transform-ckiYrrK9/lib/python3.10/site-packages/aiosqlite/cursor.py", line 31, in _execute
    return await self._conn._execute(fn, *args, **kwargs)
  File "/home/ubuntu/.local/share/virtualenvs/pycytominer-transform-ckiYrrK9/lib/python3.10/site-packages/aiosqlite/core.py", line 137, in _execute
    return await future
  File "/home/ubuntu/.local/share/virtualenvs/pycytominer-transform-ckiYrrK9/lib/python3.10/site-packages/aiosqlite/core.py", line 110, in run
    result = function()
sqlite3.OperationalError: database is locked

Related issue: https://github.com/PrefectHQ/prefect/issues/7277
Config
python --version
# Python 3.10.9

git rev-parse --short HEAD
# e55424d

git branch -v
# * main e55424d [behind 1] Add Initial CSV to Parquet Conversion, Documentation, and Workflows

sqlite3 --version
# 3.31.1 2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837balt1

uname -r
# 5.15.0-1028-aws

Thank you @shntnu for trying this out and the great details! Very sorry to see the test failed. I'll look into this and follow up.

Very sorry to see the test failed. I'll look into this and follow up.

I am so excited to see what you've built here!

Closing this issue as we've seen reasonable performance so far, and because our primary discussions about performance will continue in https://github.com/cytomining/CytoTable-benchmarks


ISO-20 Missing SupportedProvidersListType array

Hi :)
In the AuthorizationSetupRes, the following applies to the SupportedProviders element in the PnC_ASResAuthorizationMode element:
<xs:complexType name="SupportedProvidersListType">
	<xs:sequence>
		<xs:element name="ProviderID" type="v2gci_ct:nameType" maxOccurs="128"/>
	</xs:sequence>
</xs:complexType>

In the generated code, the ProviderID is just a string (char array) but not a list or array of strings:
struct iso20_SupportedProvidersListType {
    // ProviderID, nameType (base: string)
    struct {
        char characters[iso20_ProviderID_CHARACTER_SIZE];
        uint16_t charactersLen;
    } ProviderID;

};

Can you guys please take a look at this?
Many greetings
Sebastian

Correct, however we have ignored the problem so far, as it has not yet had any impact for us.
But with the -20, the problem seems to be acute.
This actually affects all arrays of simple types, but which are coded as array and length byte in a struct, so quasi array of array struct. https://github.com/EVerest/cbexigen/issues/19 seems to have the same cause


Customize Scrollbar( vertical / horizontal )

I am new to vscode.
Is there any options to customize the Scrollbars properties. i.e 'color', 'width'.
"scrollbar":{
 "color":"",
 "width":""
}

We added some colors to theme the scrollbar:
scrollbarShadow
scrollbarSliderActiveBackground
scrollbarSliderBackground
scrollbarSliderHoverBackground

Also displayPermanently: true/false since I find it confusing how the scrollbar disappears in some situations and I want to know how log the file is.

has this been reverted? in a previous installation i was able to set these values, but now they do not show up in settings searches.

See here for the (final) setting names: https://code.visualstudio.com/docs/getstarted/theme-color-reference#_scroll-bar-control

Please file a separate issue with for the scollbar width. Also see #30191


Migrate to 1ES pipeline templates

Splits the existing CI pipeline into two separate pipelines:

ci-public.yml: for public builds - This is the same as the original content except that conditional logic has been removed that was meant to support internal builds.
ci.yml: for internal builds - Uses the 1ES pipeline template pattern

The SDL stage revealed some credscan errors coming from arcade (eng/common) and various repos defined as submodules in SBE. The Arcade ones will need to be addressed by the Arcade team. For the others, these are external and so not actionable by us. These have all been added as suppressions.

/backport to release/8.0

/backport to release/7.0


ValueError: operands could not be broadcast together with shapes (100,100,0) (100,100,3)

I changed the resolution through config-norm yml, and added the new trait named as same as old names, this only two changes that I made, it gives me only 1/1000 img then this error appears, can you please help me, thanks.
[Running] python -u "c:\Users*\Documents*\generator-main\generate.py"
Lossy conversion from float64 to uint8. Range [0.0, 255.0]. Convert image to uint8 prior to saving to suppress this warning.
Lossy conversion from float64 to uint8. Range [0.0, 255.0]. Convert image to uint8 prior to saving to suppress this warning.
Traceback (most recent call last):
File "c:\Users***\Documents\ *\generator-main\generate.py", line 192, in
main()
File "c:\Users*\Documents\ ****\generator-main\generate.py", line 181, in main
gen.generate_normal(i, mistakes)
File "c:\Users\ ****\Documents\ ****\generator-main\generate.py", line 30, in generate_normal
image, ids[idx], name, value, trait = self.add_layer(image, layer_id, layer, traits)
File "c:\Users\ ****\Documents\ ****\generator-main\generate.py", line 102, in add_layer
image = alpha * layer + (1 - alpha) * image
ValueError: operands could not be broadcast together with shapes (100,100,0) (100,100,3)

I changed the resolution through config-norm yml, and added the new trait named as same as old names, this only two changes that I made, it gives me only 1/1000 img then this error appears, can you please help me, thanks.
[Running] python -u "c:\Users*\Documents*\generator-main\generate.py" Lossy conversion from float64 to uint8. Range [0.0, 255.0]. Convert image to uint8 prior to saving to suppress this warning. Lossy conversion from float64 to uint8. Range [0.0, 255.0]. Convert image to uint8 prior to saving to suppress this warning. Traceback (most recent call last): File "c:\Users*\Documents\ *_\generator-main\generate.py", line 192, in main() File "c:\Users***_\Documents\ ****\generator-main\generate.py", line 181, in main gen.generate_normal(i, mistakes) File "c:\Users\ ****\Documents\ ****\generator-main\generate.py", line 30, in generate_normal image, ids[idx], name, value, trait = self.add_layer(image, layer_id, layer, traits) File "c:\Users\ ****\Documents\ ****\generator-main\generate.py", line 102, in add_layer image = alpha * layer + (1 - alpha) * image ValueError: operands could not be broadcast together with shapes (100,100,0) (100,100,3)

Change the image height/width in the config


Emails whenever a release gets yanked or unyanked

Addresses a part of #13234

This is apparently already a feature as seen in the above ^ comment; closing.


Beta values are not same

According to your paper, you used adan with β1 = 0.02, β2 = 0.01, and β3 = 0.01 when fine-tuning Bert. But in your config file, they are all 0.9x like here. Which is right?

Hi, @JaheimLee,
The beta in the paper is actually the 1-beta in the code. To maintain comparability with the results of some previous theoretical papers, such as (https://arxiv.org/abs/2112.03459), we need to set
$$ \mathbf{m_k} = (1-{\color{orange}\beta_1})\mathbf{m_{k-1}} + {\color{orange}\beta_1} \mathbf{g_k}.$$
But in the code, to maintain the user's usage habits (we are used to setting the moment coefficient between 0.9-1), we have switched them, that is,
$$ \mathbf{m_k} = {\color{orange}\beta_1}  \mathbf{m_{ k-1 }} + (1-{\color{orange}\beta_1})\mathbf{g_k}.$$
Thanks for the question, we have added some notifications on the homepage.


Driver does not appear to be able to query MixedCase tables

Driver version

<IP_ADDRESS>
Redshift version

PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.52931
JAVA/JVM version

Java Version 11
Table schema

MixedCaseTable:
          MixedCasedColumn	int

Problem description

Expected behaviour: To be able to query mixed case tables from both the Redshift query editor v2 and JDBC driver.
Actual behaviour: Query fails when executing query using JDBC driver.
Error message/stack trace:

Caused by: com.amazon.redshift.util.RedshiftException: ERROR: relation "public.mixedcasedtable" does not exist
	at com.amazon.redshift.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2601)
	at com.amazon.redshift.core.v3.QueryExecutorImpl.processResultsOnThread(QueryExecutorImpl.java:2269)
	at com.amazon.redshift.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1874)
	at com.amazon.redshift.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1866)
	at com.amazon.redshift.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:368)
	at com.amazon.redshift.jdbc.RedshiftStatementImpl.executeInternal(RedshiftStatementImpl.java:514)
	at com.amazon.redshift.jdbc.RedshiftStatementImpl.execute(RedshiftStatementImpl.java:435)
	at com.amazon.redshift.jdbc.RedshiftPreparedStatement.executeWithFlags(RedshiftPreparedStatement.java:200)
	at com.amazon.redshift.jdbc.RedshiftPreparedStatement.executeQuery(RedshiftPreparedStatement.java:115)

Any other details that can be helpful:
SQL statement submitted to driver: SELECT "MixedCasedColumn" FROM "public"."MixedCasedTable"

Reproduction code

PreparedStatement preparedStatement = buildSplitSql(connection, readRecordsRequest.getCatalogName(),  readRecordsRequest.getTableName(), readRecordsRequest.getSchema(), readRecordsRequest.getConstraints(), readRecordsRequest.getSplit());
ResultSet resultSet = preparedStatement.executeQuery();

Thank you for opening this issue @akuzin1 ! I will investigate and get back to you once I have an update

Just wanted to check in and ask if any update is available?

@akuzin1  To use case-sensitive identifiers (e.g., schema, table, column) in Redshift, you must both set enable_case_sensitive_identifier to true and also enclose all identifiers in double quotes at all usages. Have you set  enable_case_sensitive_identifier to true? If not, you can follow documentation here.

Yes I have and I verified from the query editor that the query succeeds, does anything need to be configured from driver side?

Could this be a problem with the driver?

Hmm ok... I will try again. Thank you.

Hi @akuzin1 any updates on this? If you're no longer seeing it we can close this issue.

Haven't had the opportunity to do additional testing, will prioritize confirming the behavior this upcoming week.

@akuzin1 closing this issue as we haven't heard back. If you are still consistently having issues we can dicuss reopening this.


Add AeroTherm2023 models

Bradford White Aerotherm2023 50-, 65-, and 80-gal models are incorporated into HPWHsim. The 50-gal model was refined to match reasonably the RE2H50_UEF50 and RE2H50_UEF67 test schedules extracted from the provided measured datasets. These schedules were translated into the standard HPWHsim, multifile, schedule format, using scripts added to scripts/conversion.
Additional python scripts and an html file were added to facilitate comparison of simulated and measured profiles.  The comparison is done by 1) running poetry run python server.py from within the scripts/python folder and 2) opening the file index.html from a browser (e.g., Chrome). The user can interactively specify the HPWH model and specification, then apply test parameters or view the 24-hr test output. Presently, a measured test data file (for comparison to simulated test data) must be specified to generate plots.

@spahrenk is this ready to review again?

Should be able to change the build folder now.


Not an issue but a request

I love this tool. It meets almost all of my requirements. I am trying to push my team to use this.
I wanted to know if it is possible to add the following behavior to the formatting.

new line before return if it is not the only statement in the block
wrapped line (everything after the first part of the line) will be indented once (or [n] times) more than usual to indicate the line is wrapped

  if ( condition-a && condition-b
  && condition-c
  && conditon-d ...) {
}

must become
  if ( condition-a && condition-b
      && condition-c        // <-- Indented twice so that it sticks out as part of another line
      && conditon-d ...) { // <-- Indented twice so that it sticks out as part of another line
}

max line length

I am not sure if this is the right place for such a request, correct me if am wrong.

new line before return if it is not the only statement in the block

could easily be done as a plugin. Would be a nice thing to have (I would use this plugin).

max line length

anything related to wrapping and max-line length will be handled by plugins, because there are so many ways to do it, that it would be hard to configure and would increase the complexity of this project drastically. (see: #409 for more details)

I looked into making a plugin and gave it a shot
https://github.com/iamprasad88/esformatter-only-return

Thought I'd comment for the wrapped lines: in the #409 that @millermedeiros linked, I commented about the plugin I made for wrapping lines. Get it here https://github.com/pgelinas/esformatter-auto-wrap and feedback very much welcome :smile:

@pgelinas Thank you. I just had a chance to try it out. It works really well.


Add a section on polymorphic lambdas to the README.

This PR is an interesting exercise -- it has forced me to test my understanding
of the feature by trying to write documentation for it. It's possible that we
need another section for polymorphic lambda caveats or errata, but I'd prefer
to keep the initial section relatively high-level.
I plan to release this in 0.9.0 as soon as we feel like we have adequate
documentation to describe what is going on.
Review by @paulp.

I wonder if I should move this section? I didn't want to bury it, but on the other hand the section after it is still talking about type lambdas. Maybe I should move it farther down? Restructure the other sections? What do you think?

I would suggest including a concise and explicit accounting of the desugaring, with emphasis on it being syntactic and not intelligent. Something along the lines of...
If you write either of these:
λ[F Op G](expr)
λ[Op[F, G]](expr)

And adhere to these requirements:

F and G are unary type constructors - equivalently, F[X] and G[X] are fully applied types
expr is of type Function1[_, _]

Then this will be rewritten immediately after parsing (and before name resolution or typechecking) into:
new Op[F, G] {
  // the actual type parameter will not be called A, but given a unique name
  def apply[A](x: F[A]): G[A] = expr(x)
}

The function expression expr will be typechecked as if it were the body of the polymorphic apply method, and it must be parametric, which means: it will accept an argument of type F[A] and produce a result of type G[A] for every possible A.

Great suggestion -- I'll definitely add it now.

What do you think? I ended up restructuring your text a bit but I think the meaning is still there. Let me know if you think it's OK or if there are edits you want to see.

Looks pretty solid to me. There are probably some structuring improvements to be had but that can be pursued anytime. 👍


Publish v3.6.0 Add Portuguese Translation

Changes proposed in this Pull Request:

Add Portuguese translation
Fixed type checking for errors

@huayunh @daileytj  Is this ready to go in?

@emclaug2 I'd say so, not sure why it's still a draft ¯_(ツ)_/¯

ah yes. I forgot. Meant to change it after the date change PR. Thanks Tom.

Now it's outdated again 🙈

@huayunh I can fix it