Failing to build on ARM

When testing the compilation of Tacent View on ARM in the NixOS CI, the following error is being produce:
[8/33] Building CXX object UnitTests/CMakeFiles/UnitTests.dir/Src/UnitTests.cpp.o
FAILED: UnitTests/CMakeFiles/UnitTests.dir/Src/UnitTests.cpp.o
/nix/store/ay4xxbjafns12mn2ilhz4y7d3m3ziwqg-gcc-wrapper-13.3.0/bin/g++ -DCONFIG_RELEASE -DPLATFORM_LINUX -I/build/source/UnitTests/Inc -I/build/source/Modules/Foundation/Inc -I/build/source/Modules/Math/Inc -I/bu>
In file included from /build/source/UnitTests/Src/UnitTests.cpp:20:
/build/source/UnitTests/Src/UnitTests.cpp: In function 'int main(int, char**)':
/build/source/UnitTests/Src/UnitTests.cpp:149:15: error: 'Rule' is not a member of 'tUnitTest'
  149 |         tTest(Rule);
      |               ^~~~
/build/source/UnitTests/Src/UnitTests.h:48:146: note: in definition of macro 'tTest'
   48 | #define tTest(name)  { tUnitTest::rPrintf("\nTesting " #name "\n"); tUnitTest::UnitRequirementNumber = tUnitTest::UnitGoalNumber = 0; tUnitTest::name(); }
      |                                                                                ^~~~

Any ideas?

Yeah. Unfortunately ARM isn't supported. Even though I likely fixed the above in 701817ceeec6ee76420a57da9529943480d0047e, it won't matter since the entire Tacent Image module is only available for x64, not ARM... at least for the forseeable future.

Understandable. Thank you!


Android build is failing with latest version of the barcode scanner

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Add the plugin in json file
build the code  and run thhe project in the device
android build throws excepotions

Expected behavior
plugin intallation shpuld work for android
Screenshots
If applicable, add screenshots to help explain your problem.
Version
[e.g. v1.0.0]
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

The error you are providing is thrown in a Capacitor class and is not caused by this plugin.
You must first ensure your project will work without the plugin. If there are some problems related to the plugin I will do my best to help, but in this case, I am unfortunately not able to help you


Add simple table drawing functionality.

Motivation
Tables are really useful for displaying data concisely, which is really useful when making animations on topics such as statistics and science. Currently, Manim can only generate Tables easily through LaTeX, which results in difficulty when generating tables programmatically.
Results Obtained
With this addition, tables can be made by calling Table.get_table(<dictionary>), where the main, required parameter is a dictionary with the Keys as the field names and Values per Key are the corresponding records.
from manimlib.imports import *
class Tables(Scene):
    def construct(self):
        tabledict={
            "Vowels":["\\alpha","\\epsilon","\\iota","\\omega","a","e","i","o"],
            "Consonants":["\\beta","\\gamma","\\delta","\\phi","\\eta","\\kappa","\\lambda","\\mu","\\nu","\\pi","\\chi","\\zeta"],
            "Words":["Must","add","proper","length","checking","for","use","with","LaTeX.","(No","wraparound","currently.)"],
        }
        table=Table.get_table(tabledict)
        table.scale(0.50)
        table.move_to((0,0,0))
        self.play(Write(table))
        self.wait(2)

The code above generates the following table:

Further customisations can be made by passing a line_color and text_color in the same function like so: Table.get_table(tabledict,line_color=GREEN,text_color=BLUE)
Both of these values default to WHITE.
Changes Made:
A single file named tables.py has been added to manimlib/mobjects. This file contains the entirety of the logic used.
manimlib.imports has been edited to import the aforementioned file.
Future plans for this feature include a wraparound for text and better length measuring of LaTeX strings to ensure proper table column widths, as well as better table element retrieval, since you can only retrieve elements by indexing the resultant VGroup() as of now.
EDIT: I'm closing this PR, since I feel this would work better as an addon to Manim rather than as a core feature. I added support for Text(), TexMobjects(), TextMobjects() and strings. Those interested can find it here. An example on how to use all its features are here.

Hi thanks for this great work. Can you update the table to add info in it after it has been created?

Hi thanks for this great work. Can you update the table to add info in it after it has been created?

I'm still working on that. However, as a workaround, you can index the table like a list, since it's just a VGroup.
The way I've set it up now, the first few objects in the VGroup are the field names/headings.
After the field names, the next few objects are reserved for those in the first column (the leftmost one) and are ordered top to bottom.
The next few objects are the values in the column to the immediate right of it and so on, until all the records are in the VGroup.
The object present immediately after the records is the horizontal line. The objects present after that are the vertical separators.
Once you know which object to modify, you can ReplacementTransform() them with the new value you want them to be.
For example:
from manimlib.imports import *
from sanim.anim_tools.tables import *
class Tables(Scene):
    def construct(self):

        tabledict={
            TextMobject("TextMobject Input"):[TextMobject("Must"),TextMobject("add"),TextMobject("element"),TextMobject("retrieval.")],
            TexMobject("TexMobject Input"):[TexMobject(r"e^{\iota\pi}+1 = 0"),TexMobject(r"Tex: \alpha\theta\epsilon")],
            Text("Text input",font="Lucida Grande"):[Text("Text",font="sans-serif"),Text("is"),Text("Supported")],
            "Raw String Input":["Defaults","to","TextMobject."]

        }

        table=Table.get_table(tabledict,line_color=GREY,raw_string_color=BLUE)
        table.move_to((0,0,0))
        self.play(Write(table.scale(0.5)),run_time=2)
        #CHECK THIS OUT ↓
        newvalue=TextMobject("New Value").move_to(table[0]) #The first index is the first columns heading
        self.play(ReplacementTransform(table[0],newvalue))

        self.wait(1)

The code above gives this output:

Thanks it worked. The counting does not include empty table cells? It's a bit strange. Looking forward to the rest of your code!

Perhaps you could use empty strings for those locations?
On Wed, 12 Feb, 2020, 23:17 Nathenat<EMAIL_ADDRESS>wrote:

Thanks it worked. The counting does not include empty table cells? It's a
bit strange. Looking forward to the rest of your code!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/3b1b/manim/pull/841?email_source=notifications&email_token=AH5H6JHULQEGJT4VEVJ34LLRCQY4ZA5CNFSM4J7XGHK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELRXAIA#issuecomment-585330720,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH5H6JHA4HKP6CTPVUDJTELRCQY4ZANCNFSM4J7XGHKQ
.

Thanks it worked. The counting does not include empty table cells? It's a bit strange. Looking forward to the rest of your code!

Hey! I managed to add basic Record addition and removal to the table.
You can get the most recent version of the script here: https://github.com/Aathish04/sanim/
I've had to make some major changes regarding how everything works.
Table() is now it's own type of Mobject, and not just a VGroup. You can still use it like a VGroup though.
You can use Table.add_record(record object,field_number) to add records.
You can use  Table.remove_record(field_number,record_number) to remove  the record_numbered record in a field.
See the example below:
from manimlib.imports import *
from sanim.anim_tools.tables import *
class Tables(Scene):
    def construct(self):

        tabledict={
            TextMobject("TextMobject Input"):[TextMobject("Must"),TextMobject("add"),TextMobject("element"),TextMobject("retrieval.")],
            TexMobject("TexMobject Input"):[TexMobject(r"e^{\iota\pi}+1 = 0"),TexMobject(r"Tex: \alpha\theta\epsilon")],
            "Raw String Input":["Defaults","to","TextMobject."],
            Text("Text input",font="Lucida Grande"):[Text("Text",font="Alys Script Bold"),Text("is",font="serif"),Text("Supported",font="serif")],
        }

        table=Table(tabledict=tabledict,line_color=GRAY,raw_string_color=BLUE)
        table.move_to((0,0,0))
        table.scale(0.5)

        self.play(Write(table),run_time=2)

        self.play(Write(table.add_record(record=TextMobject("Hello"),field_num=1)))

        self.play(Uncreate(table.remove_record(field_num=1,record_num=0)))

        self.wait(1)

Hope this helps!

For the empty string, I had already tried and the cell was ignored in the numbering.
Thanks a lot for the new code, I'll use it asap and let you know if I have any feedback.

Please do tell me if there are any wierd bugs etc!
On Mon, 17 Feb, 2020, 16:08 Nathenat<EMAIL_ADDRESS>wrote:

For the empty string, I had already tried and the cell was ignored in the
numbering.
Thanks a lot for the new code, I'll use it asap and let you know if I have
any feedback.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/3b1b/manim/pull/841?email_source=notifications&email_token=AH5H6JBWIESUY7JKRRHEIHTRDJSLNA5CNFSM4J7XGHK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL546JY#issuecomment-586927911,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH5H6JBQ5CHKJNYT2ESI2UDRDJSLNANCNFSM4J7XGHKQ
.

I am getting this error. Any Suggestions?

First Off:
You’re using a really old version of the Manim Library.
Instead of using the version with Pip, you should use the version from GitHub.

On 03-Apr-2020, at 17:18, AIE- Machine Learning & Image Processing<EMAIL_ADDRESS>wrote:
https://user-images.githubusercontent.com/48950631/78357406-0de4cd00-75cf-11ea-9181-738fa08e7f68.png
I am getting this error. Any Suggestions?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/3b1b/manim/pull/841#issuecomment-608389825, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5H6JH7QEK6QUZCFYYZ7ODRKXEI3ANCNFSM4J7XGHKQ.

I'm having the error:
table=Table.get_table(tabledict)

NameError: name 'Table' is not defined
I put the file tables.py into the folder manimlib/mobjects, not sure what the issue is.

I'm having the error:
table=Table.get_table(tabledict)

NameError: name 'Table' is not defined
I put the file tables.py into the folder manimlib/mobjects, not sure what the issue is.

Have you added from manimlib.mobjects.tables import * to manimlib/imports.py ?

I'm having the error:
table=Table.get_table(tabledict)

NameError: name 'Table' is not defined
I put the file tables.py into the folder manimlib/mobjects, not sure what the issue is.
@almccutc

Like @Tony031218 mentioned, also add from manimlib.mobjects.tables import * to manimlib/imports.py, so you can import it that way.
Also, Table.get_table(<dict>) has been deprecated, and you should use Table(<dict>) instead.

FOR THE REFERENCE OF ANYONE WHO STUMBLES UPON THIS THREAD:
Please use https://github.com/Aathish04/sanim/blob/manim-3b1b/anim_tools/tables.py for the most recent, bug free version of this feature.

Simple adding the latest version of tables.py doesn't work. But the  previous version (95 lines) works good.

Simple adding the latest version of tables.py doesn't work. But the  previous version (95 lines) works good.

Can you please file an issue on the repository I linked stating what went wrong and the traceback/errors, if any?


Fix literal false positives

string literals defined with double-quotes
negative numbers

fixes #91

One comment, otherwise looks good to me.
I've manually verified that uwolfer has signed the CLA.

LGTM


Integration with npm projects

Come up with a design for integrations into npm projects.

Maybe have a puf init node or puf init npm which will create a new npm package with a start script for starting the pufferfish development server and a build script for building the html.


UpperCase/LowerCase/CamelCase/SnakeCase Converter

What feature or new tool do you think should be added to DevToys?
As title
Why do you think this is needed?
Sometime you need to convert between those case i listed like rename file,
Ex; I'm migrating an WPF app to MAUI and all images in there naming as CamelCase  but MAUI resource don't allow that, it must be lowerCase
Solution/Idea
No response
Comments
No response

but cannot navigate to this menu by search uppercase or lowercase


Addresses are not easily assigned/duplicated

As a business I want to be able to enter my address once if my billing/shipping address is the same so that I do not have to duplicate any administrative work.
-issue: currently the address table allows the selection of an existing shipping or billing address but no functionality to auto populate shipping_address if billing_address' role is set to 'shipping/billing'/'both'.

changed the model schema from the time that this enhancement was created. The address FK now points to the Customer parent rather than vice versa - this allows a given customer to have many addresses/locations (as intended). The current proposed process is to use Javascript to dynamically create and link related customer/address/contact models.


Synergy has no encryption plugin

Issue description
Synergy doesn't seem to have the encryption plugin installed, and there is no configuration options in the Synergy client or server services to enable encryption.
@aszlig
Steps to reproduce
synergyc -f --enable-crypto SERVER_ADDRESS_GOES_HERE results in the message "crypto disabled because of ns plugin not available", and the client does not connect to a SSL enabled server.
Technical details
The version of synergy I have installed is synergy-1.7.5.

System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)
16.09pre83100.25e3c09 (Flounder)
Nix version: (run nix-env --version)
1.11.2
Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)
16.09pre83100.25e3c09

What exactly happens when the synergy server enables SSL (I paid for the pro version), and the client attempts to connect with --enable-crypto?
I just tested it and, on the client side, it says crypto disabled because of ns plugin not available. And then it times out connecting to the server. On the server side, it shows:
[2017-03-07T16:47:23] INFO: OpenSSL 1.0.2 22 Jan 2015
[2017-03-07T16:47:38] ERROR: ssl error occurred (system call failure)
[2017-03-07T16:47:38] ERROR: eof violates ssl protocol
[2017-03-07T16:47:38] ERROR: failed to accept secure socket
[2017-03-07T16:47:38] INFO: client connection may not be secure

This is quite important because without SSL, everything passing between the server and client can be intercepted in synergy.

https://github.com/symless/synergy/issues/5895

Are there any updates to this issue, please?


--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.<PopulateSplitIncludeCollectionAsync>g__InitializeReaderAsync|27_0[TIncludingEntity,TIncludedEntity](RelationalQueryContext queryContext, RelationalCommandCache relationalCommandCache, IReadOnlyList`1 readerColumns, Boolean detailedErrorsEnabled, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.<>c__DisplayClass30_0`2.<<ExecuteAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func`4 operation, Func`4 verifySucceeded, TState state, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func`4 operation, Func`4 verifySucceeded, TState state, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.PopulateSplitIncludeCollectionAsync[TIncludingEntity,TIncludedEntity](Int32 collectionId, RelationalQueryContext queryContext, IExecutionStrategy executionStrategy, RelationalCommandCache relationalCommandCache, IReadOnlyList`1 readerColumns, Boolean detailedErrorsEnabled, SplitQueryResultCoordinator resultCoordinator, Func`3 childIdentifier, IReadOnlyList`1 identifierValueComparers, Func`5 innerShaper, Func`4 relatedDataLoaders, INavigationBase inverseNavigation, Action`2 fixup, Boolean trackingQuery)
   at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.TaskAwaiter(Func`1[] taskFactories)
   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()

@MichelZ Out of curiosity, what did you increase the minimum threads to?

We also started seeing unknown error 258 after migrating from Windows to Linux App Services, but strangely only on one of our environments.
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
 ---> System.ComponentModel.Win32Exception (258): Unknown error 258
   at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__209_0(Task`1 result)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.<PopulateSplitIncludeCollectionAsync>g__InitializeReaderAsync|27_0[TIncludingEntity,TIncludedEntity](RelationalQueryContext queryContext, RelationalCommandCache relationalCommandCache, IReadOnlyList`1 readerColumns, Boolean detailedErrorsEnabled, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.<>c__DisplayClass30_0`2.<<ExecuteAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func`4 operation, Func`4 verifySucceeded, TState state, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func`4 operation, Func`4 verifySucceeded, TState state, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.PopulateSplitIncludeCollectionAsync[TIncludingEntity,TIncludedEntity](Int32 collectionId, RelationalQueryContext queryContext, IExecutionStrategy executionStrategy, RelationalCommandCache relationalCommandCache, IReadOnlyList`1 readerColumns, Boolean detailedErrorsEnabled, SplitQueryResultCoordinator resultCoordinator, Func`3 childIdentifier, IReadOnlyList`1 identifierValueComparers, Func`5 innerShaper, Func`4 relatedDataLoaders, INavigationBase inverseNavigation, Action`2 fixup, Boolean trackingQuery)
   at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.TaskAwaiter(Func`1[] taskFactories)
   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()

@MichelZ Out of curiosity, what did you increase the minimum threads to?

We went aggressive/overkill, but we haven't seen negative side effects currently.
  ThreadPool.GetMaxThreads(out int workerThreads, out int completionPortThreads);
  ThreadPool.SetMaxThreads(Math.Max(workerThreads, 2048), Math.Max(completionPortThreads, 2048));
  ThreadPool.SetMinThreads(1024, 512);

In my last post I guessed the 258 error occurs because of full tcp buffers and wrong tcp socket handling on linux (see my previous post above). Further investigation made me more confident that this is the case.
The additional queue I added (last post) helped a bit, but after adding more features (service implementations) to our host process the error came back quite frequently.
Because most 258 errors occured in DbContext.SaveChanges() I synchronized calls in my DbContext base implementation like this:
public class MyBaseDbContext : DbContext
{
    private static readonly object syncObj = new object();

    public override int SaveChanges()
    {
        lock (syncObj)
        {
            return base.SaveChanges();
        }
    }
}

This dirty code slowed down my execution flow and helped reducing the 258 errors. But like others reported here about disabling MARS it did not solve the problem completly.
I examined that the problem occurs often during extensive external web API rest calls. So I synchronized them as well:
static SemaphoreSlim semaphoreSlimGeocodeLock = new SemaphoreSlim(1, 1);

public void MyRestCallMethod()
{
    try
    {
        await semaphoreSlimGeocodeLock.WaitAsync();

        HttpClient httpClient = new HttpClient();
        string result = await httpClient.GetStringAsync(url);
        ...

    }
    finally
    {
        httpClient.Dispose();
        semaphoreSlimGeocodeLock.Release();
    }
}

No parallel web calls helped a lot and made me sure the error is related to the current tcp buffer usage within the application.
I guess the error originates in some way like this:

SqlClient reads/writes to the sql server tcp socket connection.
Because of the buffer handling bug the read/write loop returns indicating the remotehost has terminated the connection.
SqlClient internal reconnect feature reconnects immediately to the SQL Server.
On the next tcp read/write the same error occures because the application tcp buffer is still full.
This is repeated many times and there might be a threading issue playing a role as well.
The application is freezed and timeout "Unknwon error 258" occurs

Slowing down the execution flow and hoping not reaching tcp buffer limits is not a production ready workaround :) I wonder if this is a common problem for all high tcp i/o apps running on Linux and connecting to Sql Server?
This error occured some time after upgrading ef core (not sure which .net core/ef core version). My application runs currently on:

Bare metal server: AMD Ryzen 7 2700X
Ubuntu 18.04.2 LTS
.NET 5.0
Microsoft.EntityFrameworkCore.SqlServer 5.0.1

Used SQL Server: Latest SQL Server 2019 Docker container
Side notes:

Upgrading from a two years old SQL Server 2017 Container to the latest 2019 version did not change anything.
I did try collecting traces with dotnet-trace collect --process-id 27455 --profile database
but the results did not include the expected events.

Thought I'd add that when we investigated this a year ago, we felt that analysis from @bennil, above, married up with what we were seeing.
Not sure I'm comfortable with your solution @MichelZ even though you haven't suffered any negative consequences. Great it is working for you though.

Thanks @co7e for bringing this matter up again.
My insight after watching/analyzing this for years are the following:
SqlClient is not thread safe on Linux (saw it on Intel and AMD). Reducing parallel work or adjust thread execution might help but not solve the problem. Sooner or later the exception will hit you.
Surprisingly Microsoft doesn't care for years even though a huge number of enterprise software is running on this db access lottery.
The bug is hard to reproduce as all threading issues are. I have some ideas how to construct testcode for further investigations, but this is not a charity project...

We also started seeing unknown error 258 after migrating from Windows to Linux App Services, but strangely only on one of our environments.
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
 ---> System.ComponentModel.Win32Exception (258): Unknown error 258
   at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__209_0(Task`1 result)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.<PopulateSplitIncludeCollectionAsync>g__InitializeReaderAsync|27_0[TIncludingEntity,TIncludedEntity](RelationalQueryContext queryContext, RelationalCommandCache relationalCommandCache, IReadOnlyList`1 readerColumns, Boolean detailedErrorsEnabled, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.<>c__DisplayClass30_0`2.<<ExecuteAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func`4 operation, Func`4 verifySucceeded, TState state, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func`4 operation, Func`4 verifySucceeded, TState state, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.PopulateSplitIncludeCollectionAsync[TIncludingEntity,TIncludedEntity](Int32 collectionId, RelationalQueryContext queryContext, IExecutionStrategy executionStrategy, RelationalCommandCache relationalCommandCache, IReadOnlyList`1 readerColumns, Boolean detailedErrorsEnabled, SplitQueryResultCoordinator resultCoordinator, Func`3 childIdentifier, IReadOnlyList`1 identifierValueComparers, Func`5 innerShaper, Func`4 relatedDataLoaders, INavigationBase inverseNavigation, Action`2 fixup, Boolean trackingQuery)
   at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.TaskAwaiter(Func`1[] taskFactories)
   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()

@MichelZ Out of curiosity, what did you increase the minimum threads to?

Your stack trace doesn't contain Microsoft.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync() - be aware that error 258 is a fairly broad error, see my comment https://github.com/dotnet/SqlClient/issues/647#issuecomment-1348177080

In our case the problem has now as mysteriously disappeared as it has mysteriously appeared. The only change we made was migrate to a different virtual machine than the previous SQL Server was running on.
By taking some packet captures by logging in with ssh on the Linux Web App, and typing ip a to get the interface name and then tcpdump -i vnet0g6qkt5hl -w ~/network_traces/0001.pcap we noticed something strange while the problem was still occurring.
A packet containing a SQL query that in the tcpdump was registered with size 2130 bytes and data length 2064 was being "partially acked". After sending the large packet out, the ACK came back only for the first 1398 bytes, causing a retransmission of the last 666 bytes. However, in response to this retransmission only came another ACK for only the first 1398 bytes, causing another retransmission of the last 666 bytes, and so on and so forth, until eventually the connection timed out. Rather than a threading issue this potentially seems like some kind of network layer problem. However, we can no longer reproduce it, so it's difficult to investigate more deeply.
As @dazinator already suggested our particular problem was probably something entirely different than what this ticket is about. The 258 timeout error is fairly general - it just means that some kind of wait operation timed out and it can have multiple different underlying causes. Sorry for the noise.

In our case the problem has now as mysteriously disappeared as it has mysteriously appeared. The only change we made was migrate to a different virtual machine than the previous SQL Server was running on.
By taking some packet captures by logging in with ssh on the Linux Web App, and typing ip a to get the interface name and then tcpdump -i vnet0g6qkt5hl -w ~/network_traces/0001.pcap we noticed something strange while the problem was still occurring.
A packet containing a SQL query that in the tcpdump was registered with size 2130 bytes and data length 2064 was being "partially acked". After sending the large packet out, the ACK came back only for the first 1398 bytes, causing a retransmission of the last 666 bytes. However, in response to this retransmission only came another ACK for only the first 1398 bytes, causing another retransmission of the last 666 bytes, and so on and so forth, until eventually the connection timed out. Rather than a threading issue this potentially seems like some kind of network layer problem. However, we can no longer reproduce it, so it's difficult to investigate more deeply.
As @dazinator already suggested our particular problem was probably something entirely different than what this ticket is about. The 258 timeout error is fairly general - it just means that some kind of wait operation timed out and it can have multiple different underlying causes. Sorry for the noise.

We have also experienced the same issue.
The solution, for us, was to limit the packet size in the Connection string by appending ;Packet Size=512.  We chose 512 as it is the minimum size.
See https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnection.packetsize?view=dotnet-plat-ext-8.0 for more info on SqlConnection.PacketSize property

Could this be related ?
https://medium.com/swlh/fix-a-random-network-connection-reset-issue-in-docker-kubernetes-5c57a11de170

https://www.codeproject.com/Tips/5378079/Challenges-in-Migrating-ASP-NET-Apps-to-Containers
Maybe after all it relates to MARS? (DB connection string: MultipleActiveResultSets=True)

https://www.codeproject.com/Tips/5378079/Challenges-in-Migrating-ASP-NET-Apps-to-Containers
Maybe after all it relates to MARS? (DB connection string: MultipleActiveResultSets=True)

Not in mine or many other cases. The MARS issue was seperate as far as I know. I use MultipleActiveResultSets=False.
Note: After moving the work to a seperate dedicated process (and therefore removing contention of the application thread pool in the process) I no longer see this issue.

I also wondered if Azure SQL has some sort of connection "rejection" mechanism, such that when it scales up or CPU usage is high, it can reject queries with a 258 "immediately" and that perhaps when a connection is in this state, it doesn't clear. A bit like a rate limiting feature. However this is pure speculation, I don't have the networking skills to trace what packets is being sent when this occurs, as our apps run in docker, on linux azure VM's and things get pretty complicated pretty fast.

We are closing this issue as the error is very generic and applies to several valid failure scenarios that might have different underlying causes including network issues and thread starvation. There is no real fix for this.

In our case the problem has now as mysteriously disappeared as it has mysteriously appeared. The only change we made was migrate to a different virtual machine than the previous SQL Server was running on.
By taking some packet captures by logging in with ssh on the Linux Web App, and typing ip a to get the interface name and then tcpdump -i vnet0g6qkt5hl -w ~/network_traces/0001.pcap we noticed something strange while the problem was still occurring.
A packet containing a SQL query that in the tcpdump was registered with size 2130 bytes and data length 2064 was being "partially acked". After sending the large packet out, the ACK came back only for the first 1398 bytes, causing a retransmission of the last 666 bytes. However, in response to this retransmission only came another ACK for only the first 1398 bytes, causing another retransmission of the last 666 bytes, and so on and so forth, until eventually the connection timed out. Rather than a threading issue this potentially seems like some kind of network layer problem. However, we can no longer reproduce it, so it's difficult to investigate more deeply.
As @dazinator already suggested our particular problem was probably something entirely different than what this ticket is about. The 258 timeout error is fairly general - it just means that some kind of wait operation timed out and it can have multiple different underlying causes. Sorry for the noise.

We have also experienced the same issue.
The solution, for us, was to limit the packet size in the Connection string by appending ;Packet Size=512. We chose 512 as it is the minimum size.
See https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnection.packetsize?view=dotnet-plat-ext-8.0 for more info on SqlConnection.PacketSize property.

Have you seen anymore instances of this issue after applying this change? We see it randomly, but it causes a lot of issues and latency when it does happen. We've tried everything but nothing seems to be working. I see queries completing in the DB because we run some stored procs that have logging and log the steps in certain procedures but the result never seems to return back to the app and the timeout occurs.

In our case the problem has now as mysteriously disappeared as it has mysteriously appeared. The only change we made was migrate to a different virtual machine than the previous SQL Server was running on.
By taking some packet captures by logging in with ssh on the Linux Web App, and typing ip a to get the interface name and then tcpdump -i vnet0g6qkt5hl -w ~/network_traces/0001.pcap we noticed something strange while the problem was still occurring.
A packet containing a SQL query that in the tcpdump was registered with size 2130 bytes and data length 2064 was being "partially acked". After sending the large packet out, the ACK came back only for the first 1398 bytes, causing a retransmission of the last 666 bytes. However, in response to this retransmission only came another ACK for only the first 1398 bytes, causing another retransmission of the last 666 bytes, and so on and so forth, until eventually the connection timed out. Rather than a threading issue this potentially seems like some kind of network layer problem. However, we can no longer reproduce it, so it's difficult to investigate more deeply.
As @dazinator already suggested our particular problem was probably something entirely different than what this ticket is about. The 258 timeout error is fairly general - it just means that some kind of wait operation timed out and it can have multiple different underlying causes. Sorry for the noise.

We have also experienced the same issue.
The solution, for us, was to limit the packet size in the Connection string by appending ;Packet Size=512. We chose 512 as it is the minimum size.
See https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnection.packetsize?view=dotnet-plat-ext-8.0 for more info on SqlConnection.PacketSize property.

@jaq316 Have you seen anymore instances of this issue after applying this change? We see it randomly, but it causes a lot of issues and latency when it does happen. We've tried everything but nothing seems to be working. I see queries completing in the DB because we run some stored procs that have logging and log the steps in certain procedures but the result never seems to return back to the app and the timeout occurs.

@mkieloch-352 ... We have not experienced this since applying this change.

This issue should have its own bug bounty program

I'm also having this same problem in my WEB API. But my problem is originating from docker, I can guarantee that.
Look this stack-trace.
Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
Unknown error 258
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
  	at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location ---
  	at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
  	at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location ---
  	at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
  	at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
  	at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
  	at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
  	at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
  	at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)
  	at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)
  	at App.Core.Services.Process.SearchFor(Query query, InfoSession session)

My Web API runs on dotnet 8.x with the latest version of entityframework. In my searches, both those who use DAPPER and those who use entityframework are having this problem, so it is something more internal.
Running a local test pointing to the production database without using docker, everything works fine. I ran the same query generated by entityframework directly in the database and the query was done in less than 1 second as expected. Later I ran the API through Docker and did the same thing again, I received the timeout error "Unknown error 258". I looked in Azure and when I run the application via Docker, when making a query, the DTU usage rate goes to 100%, normally it doesn't exceed 15% which is quite strange. Once run outside of Docker, this rate remains below 10% for the same query.

Have you tried increasing the MinThreads as mentioned multiple times in this thread? (ThreadPool.SetMinThreads())


Applying recommendations immediately leads to OOMKilled on startup

Describe the bug
I am new to right-sizing k8s clusters and thought I'd give krr a try.
I've used all the default settings (history and buffer) and krr has suggested significant changes across many of my pods.
Upon applying them across two of my example pods, I immediately get OOMKilled errors.
To Reproduce
N/A
Expected behavior
A pod's expected memory footprint to be taken into consideration and not have its memory limit set so low that it can't start.
Screenshots

As can be seen in the above screenshot, HomeAssistant exceeds 1GB of memory use on a number of occasions in the past week, but krr suggests 516Mi as its memory limit.
Any tips on how to make this more useful?

Hey, @adampetrovic!
Thank you very much for reporting and helping the project.
Could you send me the exact promql query that was used to build the second image (I assume it is grafana)? KRR uses the history data using container_memory_working_set_bytes metric for 2 weeks of data and adding a buffer to it, so your behaviour is unexpected, as from your graph the recommendation should have been around 1.6Gi
Also, could you please tell what version are you using? And if you were using the source code - what commit tag.

Yep, here it is:
sum(container_memory_working_set_bytes{job="kubelet", metrics_path="/metrics/cadvisor", cluster="$cluster", namespace="$namespace", pod="$pod", container!="", image!=""}) by (container)

@adampetrovic can you please check if the graph in grafana has "Stack" visualisation setting turned on (on the graph that you provided)?

Yes, stack is enabled. If you look closely at some of those spikes they are around the 1GB mark (when the total is 1.4GB)

@adampetrovic can you try using calculation_improvement branch and tell me what results do you get from them?
Also, it would be really useful if you'll provide separate plots for each container

Things are much better now that I am using the latest master (which seems to have had that branch merged in).
I'll close it off!


enhance: Add API to allow print options

Implement global print options with WebKitGtk2 support and reuse MacOS support from #1259
Previous failed attempt for Windows was #1167
This could allow a print API in Tauri: https://github.com/tauri-apps/tauri/issues/4917
The specific goal I have is to generate PDF files from WebViews in Tauri.
I took the approach of specifying options in an array as it allows to only pass some options of interest and not the full list, and it also allows some platform to support some options and not others. this would be easier to have the feature developped and some options might not be relevant everywhere.

Currently there is an issue with printing PDF on webkit. It shows lpr: Error - No default destination.

It seems there is easy way to print to PDF in WebkitGtk: https://bugs.webkit.org/show_bug.cgi?id=212814

Perhaps there is a way to make the PDF generation work by using the PDF printer by name, but there is a problem with i18n in that case as the printer name can change...
I'm not sure how to continue there. Still, it's possible to have the printing options without the PDF generation if that can be of use to other people (it seems it would be looking at https://github.com/tauri-apps/tauri/issues/4917)

On windows, you could use the WebView2 function PrintToPdf. It seems as if the used webview-com crate provides an interface to this function.

Here's a workable POC for the Windows to print to PDF. I'm unfamiliar with win32 API, it would be nice if this one can give you some ideas.
pub fn print(&self) -> Result<()> {
  // self.eval(
  //   "window.print()",
  //   None::<Box<dyn FnOnce(String) + Send + 'static>>,
  // )
  unsafe {
    if let Ok(webview7) = self.webview.cast::<ICoreWebView2_7>() {
      if let Ok(env) = self.env.cast::<ICoreWebView2Environment6>() {
        let printsettings = env.CreatePrintSettings().unwrap();
        let _ = webview7.PrintToPdf(
          PCWSTR::from_raw(HSTRING::from("C:\\Users\\Jason\\Downloads\\webview2.pdf").as_ptr()),
          &printsettings,
          &PrintToPdfCompletedHandler::create(Box::new(move |_hresult, _is_success| {
            dbg!(_hresult, _is_success);
            Ok(())
          })),
        );
      }
    }

    Ok(())
  }
}

It seems possible to print to PDF using the print to file printer, and it's possible to discover this printer as webkitgtk does it already, but in a private part of its code...
https://github.com/WebKit/WebKit/blob/c289534e80934cfed8a0f32ac13a3cf70beb0f7f/Source/WebKit/UIProcess/API/gtk/WebKitPrintOperation.cpp#L423-L440
Just below you have the code that uses the "print to file printer" and generates a file
Ideally, in wry, we should be able to run identical code and fetch the printer name to feed it to the printer settings. Here is the code that selects the printer from the printer settings in WebkitGtk (and if not found selects the default printer)
https://github.com/WebKit/WebKit/blob/c289534e80934cfed8a0f32ac13a3cf70beb0f7f/Source/WebKit/UIProcess/API/gtk/WebKitPrintOperation.cpp#L836C28-L836C56
Up until now, I was not able to select correctly the file printer, I could trace the function calls with ltrace -e 'gtk_print*+gtk_page*' but the gtk_print_settings_get_printer function returned NULL.
What's tricky is that the gtk_enumerate_printers is not available to the gtk crate. And the gtk crate is unmaintained. However, the gtk4 crate has the function, but that's not the gtk version wry is built against... :(
Also, trying to use extern C bindings for those gtk functions could work but the G_OBJECT_TYPE_NAME call to get the printer backend name is a C macro and is not available to FFI or extern C :( GObject is tricky and I don't see how without the C proprocessor I can manage to get the type name of a GObject pointer... Else, this would have been doable with something like:
use gtk;

pub struct Printer { }
pub struct PrinterBackend { }
struct UserData {
  printer_name: &str
}

extern "C" {
    // pub fn wry_gtk_find_file_printer(settings: &gtk::PrintSettings) -> &str;
    pub fn gtk_enumerate_printers(cb: Fn(&Printer, &UserData) -> bool, userdata: &UserData, destroy: &UserData, wait: bool);
    pub fn gtk_printer_get_backend(printer: &Printer) -> &PrinterBackend;
    pub fn gtk_printer_get_name(printer: &Printer) -> &str;
    fn g_type_name(backend: &PrinterBackend) -> &str;
}

pub fn find_file_printer() -> String {
  let userdata: UserData;
  unsafe {
    gtk_enumerate_printers(|printer, userdata| {
      let backend = gtk_printer_get_backend(printer);
      let type_name = g_type_name(backend);
      if (type_name == "GtkPrintBackendFile") {
        userdata.printer_name = gtk_printer_get_name(printer);
      }
    }, &userdata, null, true);
  }
  return userdata.printer_name;
}

I'll probably continue investigation later...

As for Win32, I have no means of testing

Another problem... with this I found that the printers have all an empty name :(
use gtk;
use std::ptr;

pub struct Printer { }
pub struct PrinterBackend { }
struct UserData {
  printer_name: String
}

extern "C" {
    // pub fn wry_gtk_find_file_printer(settings: &gtk::PrintSettings) -> &str;
    pub fn gtk_enumerate_printers(cb: extern "C" fn(&Printer, &UserData) -> bool, userdata: &UserData, destroy: *const i32, wait: bool);
    pub fn gtk_printer_get_backend(printer: &Printer) -> &PrinterBackend;
    pub fn gtk_printer_get_name(printer: &Printer) -> &str;
    fn g_type_name(backend: &PrinterBackend) -> &str;
}

extern "C" fn printer_enumerate(printer: &Printer, _userdata: &UserData) -> bool {
    unsafe {
        // let backend = gtk_printer_get_backend(printer);
        //let type_name = g_type_name(backend);
        //if type_name == "GtkPrintBackendFile" {
        //  userdata.printer_name = gtk_printer_get_name(printer).to_string();
        //  return true; // stop iteration
        //}
        let printer_name = gtk_printer_get_name(printer);
        println!("Printer: {printer_name}");
        return false; // continue iteration
    }
}

pub fn find_file_printer() -> String {
    let userdata: UserData = UserData { printer_name: "".to_string() };
    unsafe {
        let cb = printer_enumerate as extern "C" fn(&Printer, &UserData) -> bool;
        gtk_enumerate_printers(cb, &userdata, ptr::null(), true);
    }
    return userdata.printer_name;
}

What I'll probably be doing is to set up a HTTP server and open the browser to localhost on that server and let the user use the print dialog himself... But this PR is still interesting to get a print API rolling...


Add tests

Should have
lines = cd_stats[:total_lines_of_code].to_f
expectations = cd_stats[:total_test_expectations].to_f
 0.045 < (expectations / lines)

Fixed with cdd47b879aab01b4e49bdf8f8bced9f9ff00cf03


[2.8] Bump webhook version to 0.4.0

Here is the branch:
https://github.com/rancher/webhook/tree/release/v0.4


Clean up File Browser interfaces

Uses the new IOptions and IRenderer patterns, and takes the "sorted" state off of the model.

👍


Normalize baseUrl paths

Use hugo's built-in absURL function to produce correctly formatted absolute URLs instead of manually concatenating separators.
This is mostly an aesthetic change as browsers correctly understood the malformed URLs for the most part. Before, the template would produce URLs such as:

[...]
open source

(note the double slash after the port number).
It seems as though hugo's .Site.BaseURL already contains a trailing slash, which would double up when building a path using e.g. {{ .Site.BaseURL }}/categories/{{ . | urlize }}.
This fix uses hugo's built-in absURL and printf functions to build correctly delimited absolute URLs for various links and resources, producing URLs such as:

[...]

open source

(note the single slash after the port number).

Hi,
Thanks for taking the time to add this pull request. It has now been merged.


feat: ingressgateway logs show up in cf logs [sidecar version]

In our PR, we use fluent-bit as a sidecar instead of as a daemonset (which was done in the previous draft here). We have deployed to a cf-for-k8s cluster and it works 🎉
We used cf-k8s-logging-fluent's fluent-bit dockerfile to build the fluent-bit images.
Note, istio-ingressgateways do not have an Istio sidecar so we needed to add a PeerAuthentication to all plaintext traffic to fluentd; this is not ideal.
#173568724

LGTM 👍

@KauzClay please merge


Lein support

Hi folks thanks for this repo and all the work involved.
I would like to know if you are planning to add lein support or open for a PR adding support for it?
Regards

Hey I did some tests as a study I used a lib that converts lein projects to deps with license-finder and managed to get good results.
(require '[lein2deps.api :as lein-deps]
         '[scarlet.license-finder.deps.tools-deps :as deps.tools-deps])

  (-> (lein-deps/lein2deps {:project-clj "/Users/rafael.delboni/dev/nu/mantiqueira/project.clj"})
      :deps
      deps/calc-basis
      (deps.tools-deps/basis-deps {:transitive? true}))

If you folks are interested I can open a PR with a new find-dependencies defmethod for lein "project.clj"
Best


feat(agents-api): Configure routes

@ellipsis-dev remove references to cozo in agents-api/**/*.py files including comments


Disk (MSFT_Disk): Opens Format Window

Disk (MSFT_Disk): Opens Format Window - and not in the CLI
Details
When Running the above script the verbose output returns no error messages and finishes cleanly however the "Formatting Disk (E:)" window is opened upon "completion" of the other operations. This forces you to still select formatting options through the GUI instead of remain on the CLI
If you run the below cmdlets it all runs within the CLI.
Get-Partition -DriveLetter 'C' | Resize-Partition -Size 32GB
New-Partition -DiskNumber 1 -UseMaximumSize -DriveLetter 'E'
Format-Volume -DriveLetter 'E' -FileSystem NTFS -NewFileSystemLabel 'Data' -Full -Force

Verbose Output
Clean output no errors.
VERBOSE: [WIN-768UBAPULEL]: LCM:  [ End    Set      ]  [[Disk]EVolume]  in 3.8290 seconds.
VERBOSE: [WIN-768UBAPULEL]: LCM:  [ End    Resource ]  [[Disk]EVolume]
VERBOSE: [WIN-768UBAPULEL]: LCM:  [ End    Set      ]
VERBOSE: [WIN-768UBAPULEL]: LCM:  [ End    Set      ]    in  3.9380 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 3.985 seconds

Suggested solution to the issue
Adding something like this to the "Default NTFS option"
$volParams = @{
            FileSystem = $FSFormat
            Confirm    = $false
            Force = $true
            Full = $true
}

or this...
if ($FSFull)
{
    # Set the File System label on the new volume
    $volParams["Full"] = $Full
} # if
if ($FSForce)
{
    # Set the File System label on the new volume
    $volParams["FSForce"] = $FSForce
} # if

The DSC configuration that is used to reproduce the issue (as detailed as possible)
configuration buildFileServer
{
    Import-DSCResource -ModuleName StorageDsc

    Node localhost
    {
        Disk EVolume
        {
             DiskId = 0
             DriveLetter = 'E'
             FSLabel = 'Data'
        }

    }
}
buildFileServer

Set-DSCLocalConfigurationManager -Path .\buildFileServer –Verbose
Start-DscConfiguration -Wait -Force -Path .\buildFileServer -Verbose

If I look at the source code it shows:
if ($volume.FileSystem -eq '')
    {
        # The volume is not formatted
        $volParams = @{
            FileSystem = $FSFormat
            Confirm    = $false
        }

        if ($FSLabel)
        {
            # Set the File System label on the new volume
            $volParams["NewFileSystemLabel"] = $FSLabel
        } # if

        if ($AllocationUnitSize)
        {
            # Set the Allocation Unit Size on the new volume
            $volParams["AllocationUnitSize"] = $AllocationUnitSize
        } # if

        Write-Verbose -Message ( @(
                "$($MyInvocation.MyCommand): "
                $($localizedData.FormattingVolumeMessage -f $volParams.FileSystem)
            ) -join '' )

        # Format the volume
        $volume = $partition | Format-Volume @VolParams
}

So it should return soimething like this if we "break out" the params from @volparams
$volume = $partition | Format-Volume -NewFileSystemLabel 'Data' -FileSystem NTFS
But it does not have the -Force or -Full params, which I believe are the options that enforce the process to remain within the CLI
The operating system the target node is running
OsName               : Microsoft Windows Server 2016 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
WindowsBuildLabEx    : 14393.0.amd64fre.rs1_release.160715-1616
OsLanguage           : en-US
OsMuiLanguages       : {en-US}
Version and build of PowerShell the target node is running
PSVersion: 5.1.14393.0
PSEdition: Desktop
PSCompatibleVersions: {1.0, 2.0, 3.0, 4.0...}
BuildVersion: 10.0.14393.0
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: <IP_ADDRESS>
Version of the DSC module that was used ('dev' if using current dev branch)
Master

Looks like this was a similar issue to: #148
And I also tested with:
Get-Partition -DriveLetter 'C' | Resize-Partition -Size 32GB
New-Partition -DiskNumber 1 -UseMaximumSize -DriveLetter 'E'
Format-Volume -DriveLetter 'E' -FileSystem NTFS -NewFileSystemLabel 'Data' -Full

This will still bring up a prompt but allow the actual progress to be "tracked within the CLI

I have noticed this during integration tests and should be resolved if possible - although it doesn't seem to cause a failure. It should be easy enough to fix using your suggested code. I've got one PR going through at the moment so I'll include your code after that (unless you want to submit a PR?) .

Whatever works easiest for you :)

Using Format-Volume with Full will actually write to every byte on the disk, and is not recommended when using thin provisioning. So using Full says that it should not use quick-format.
The GUI that pops up, isn't that just the GUI is to quick to find the disk will it still isn't reported as formatted? Isn't it a GUI "bug" and not a problem with running the cmdlets? 🤔

I am currently use "Thick" provisioning for my VM's so I think -Full is the better option in the long run, I could definitely be wrong though... :)
But I'm betting to help those who do not use "Thick" provisioning there should be the option to turn it "on/off"
Disk EVolume
{
     Full = $true
}

You can add in the -Confirm parameter and it should suppress the gui window. Still testing as it seems it may not work in conjunction with the -Force parameter. But I'll update on that once I get more information.


Fix systemCompress to support multiple files

After testing that, it wouldn't work. It doesn't error but the archive resulted by it is just empty. require("child_process").spawn("tar",["czf","test.tar",["a.txt","b.txt"]]).on("error",console.log);

Oh, I see because its an array in an array.

@TrixterTheTux please fix the code so it passes the Travis-CI tests. :)


Move AppVeyor Artifact upload to build job

Changed my mind because the AppVeyor statements are simple & easy to understand


Issues with rcon

rcon should be round/round_number (or an abbreviated form thereof), since it's the round number used to derive the round constant (the two are equivalent but not the same)
The spec permits 0<=rcon<=0xA, but rcon[i] is only defined for i >= 1, so the spec should clarify exactly how the (renamed) rcon relates to the AES specification

Hi @jrtc27

rcon should be round/round_number (or an abbreviated form thereof), since it's the round number used to derive the round constant (the two are equivalent but not the same)

Thanks for this. I agree, if it refers to the round number, it should be called rnum or some-such.

The spec permits 0<=rcon<=0xA, but rcon[i] is only defined for i >= 1, so the spec should clarify exactly how the (renamed) rcon relates to the AES specification

Also agreed. I can add a simple table/mapping to the spec and a note to explain how it relates to the FIPS 197 AES spec, and can point to the Sail code in the appendix.
I'll raise both of these at the meeting. Any changes will show up in a commit, but might not make it into a proper release for a little while. I'll be sure to leave this issue open until a release is made with the changes.
Cheers,
Ben

Okay, we discussed this in the meeting last Thursday and agreed it merits tidying up.
I think the simplest solution to this will be to rename rcon -> rnum. A sentence in the spec saying that "the round number provided by the immediate is translated into the corresponding round constant using the following mapping..." should then suffice. I'll add comments in where relevant about which part of the FIPS 197 spec it relates to. I think the original reason the immediate was called rcon was because that's what the "round constant word array" is called in FIPS 197.
The Sail function aes_decode_rcon can be renamed aes_rnum_to_rconst (or even be turned into a mapping if that makes more sense).
There are a few pending changes building up for the next release, so I'll roll this change together with those, since the Sail/Spike/Spec/Opcodes repos will need changing and it's easier for me to do everything at once.
Thanks again,
Ben

Great, all sounds sensible, thanks.


Uncaught Error: dlopen(/private/var/folders/6q/zxf7vcf15lb65_42_w0b6dc40000gp/T/AppTranslocation/...

[Enter steps to reproduce:]

...
...

Atom: 1.58.0 x64
Electron: 9.4.4
OS: Mac OS X 10.13.6
Thrown From: Atom Core
Stack Trace
Uncaught Error: dlopen(/private/var/folders/6q/zxf7vcf15lb65_42_w0b6dc40000gp/T/AppTranslocation/A2304604-BF4D-45D6-8CB2-6C68A953ECCC/d/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node, 1): image not found
At electron/js2c/asar.js:140

Error: dlopen(/private/var/folders/6q/zxf7vcf15lb65_42_w0b6dc40000gp/T/AppTranslocation/A2304604-BF4D-45D6-8CB2-6C68A953ECCC/d/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node, 1): image not found
    at process.func [as dlopen] (electron/js2c/asar.js:140:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1034:18)
    at Object.func [as .node] (electron/js2c/asar.js:149:18)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:74:18)
    at customRequire (/private/var/folders/6q/zxf7vcf15lb65_42_w0b6dc40000gp/T/AppTranslocation/A2304604-BF4D-45D6-8CB2-6C68A953ECCC/d/Atom.app/Contents/Resources/app/static/<embedded>:1:756278)
    at get_KeyboardLayoutManager (/private/var/folders/6q/zxf7vcf15lb65_42_w0b6dc40000gp/T/AppTranslocation/A2304604-BF4D-45D6-8CB2-6C68A953ECCC/d/Atom.app/Contents/Resources/app/static/<embedded>:14:2894476)
    at get_manager (/private/var/folders/6q/zxf7vcf15lb65_42_w0b6dc40000gp/T/AppTranslocation/A2304604-BF4D-45D6-8CB2-6C68A953ECCC/d/Atom.app/Contents/Resources/app/static/<embedded>:14:2894578)
    at Object.getCurrentKeyboardLayout (/private/var/folders/6q/zxf7vcf15lb65_42_w0b6dc40000gp/T/AppTranslocation/A2304604-BF4D-45D6-8CB2-6C68A953ECCC/d/Atom.app/Contents/Resources/app/static/<embedded>:14:2894704)
    at e.keystrokeForKeyboardEvent (/private/var/folders/6q/zxf7vcf15lb65_42_w0b6dc40000gp/T/AppTranslocation/A2304604-BF4D-45D6-8CB2-6C68A953ECCC/d/Atom.app/Contents/Resources/app/static/<embedded>:14:1119649)
    at KeymapManager.keystrokeForKeyboardEvent (/private/var/folders/6q/zxf7vcf15lb65_42_w0b6dc40000gp/T/AppTranslocation/A2304604-BF4D-45D6-8CB2-6C68A953ECCC/d/Atom.app/Contents/Resources/app/static/<embedded>:11:1224825)
    at KeymapManager.handleKeyboardEvent (/private/var/folders/6q/zxf7vcf15lb65_42_w0b6dc40000gp/T/AppTranslocation/A2304604-BF4D-45D6-8CB2-6C68A953ECCC/d/Atom.app/Contents/Resources/app/static/<embedded>:11:1222810)
    at WindowEventHandler.handleDocumentKeyEvent (/private/var/folders/6q/zxf7vcf15lb65_42_w0b6dc40000gp/T/AppTranslocation/A2304604-BF4D-45D6-8CB2-6C68A953ECCC/d/Atom.app/Contents/Resources/app/static/<embedded>:11:286651)

Commands
  2x -1:02.7.0 application:new-file (ul.list-inline.tab-bar.inset-panel)

Non-Core Packages
platformio-ide-terminal 2.10.1

Thanks for reaching out!
We require the template to be filled out on all new issues and pull requests. We do this so that we can be certain we have all the information we need to address your submission efficiently. This allows the maintainers to spend more time fixing bugs, implementing enhancements, and reviewing and merging pull requests.
Thanks for understanding and meeting us half way 😀


[Tutorial] tutorial for tensorize

@cowanmeg @anijain2305 @ZihengJiang @tqchen Pls help to review.

@anijain2305 @ZihengJiang @merrymercy @cowanmeg please https://docs.tvm.ai/contribute/code_review.html#approve-and-request-changes-explicitly

@yzhliu can you act on the final review comments?

Thanks @yzhliu @cowanmeg @ZihengJiang @anijain2305 @merrymercy this is now merged!

Hi, have we considered that write tutorial with jupyter notebook? I notice that most tutorials are interactive. By interactive I mean, read a document segment, run a code segment, check the result of that code segment, and go on. Jupyter notebook seems very good at this.

It is a Jupyter notebook. For this one, check out https://docs.tvm.ai/tutorials/language/tensorize.html#sphx-glr-tutorials-language-tensorize-py, go to the end of the page, you will see Download Jupyter notebook: tensorize.ipynb

Yes. I have seen the web page. Thank you :)
Yida Wang<EMAIL_ADDRESS>于2019年2月26日周二 下午2:46写道：

It is a Jupyter notebook. For this one, check out
https://docs.tvm.ai/tutorials/language/tensorize.html#sphx-glr-tutorials-language-tensorize-py,
go to the end of the page, you will see Download Jupyter notebook:
tensorize.ipynb
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/dmlc/tvm/pull/1774#issuecomment-467316972, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEtTjXH-iVykEMeYCQaW9cNh03KC-givks5vRNg9gaJpZM4W5x5P
.

--
以上，祝好
王振华


#64: Speedb artifacts

This PR implements the initial phase of the Speedb artefacts differentiation (#64). That phase deals with renaming the output artefacts from RocksDB to Speedb, as well as replacing any references to RocksDB that are outputted by the code to Speedb.
This includes:

librocksdb.{a,so} -> libspeedb.{a,so} (and the SO name was changed from 7.2.2 to 1.5.0)
librocksdbjni*.{a,so} -> libspeedbjni*.{a,so} (the same SO name change was made here as well)
rocksdbjni*.jar -> speedbjni*.jar (here too, the JAR bears the Speedb version now)

Additionally, the following tools with RocksDB in their name have been renamed:

rocksdb_dump -> speedb_dump
rocksdb_undump -> speedb_undump

As part of the build changes, all build-time configuration variables were changed from ROCKSDB_* to SPEEDB_* (e.g. ROCKSDB_LITE is now SPEEDB_LITE. Note that only the build-time configuration was changed. The macro in the source code is still named ROCKSDB_LITE), and the CMake package name is now Speedb::speedb instead of RocksDB::rocksdb.
Version information that is printed by tools was changed to use the Speedb version information (except for trace_replay which uses that information as database version for format compatibility checks).
Additionally, a bunch of scripts were updated to point at the Speedb repository instead of the RocksDB one and to refer to the newly introduced artefact names.
For ease of review, the changes were broken into categories, each in its own commit, the largest of which is unfortunately the first one which deals with build-related changes.
Test Plan: Build all make and CMake targets and run make check and make jtest.

Updated the PR to reduce the scope of the changes to the artefact names, logging, and version names only. Some of the work (setting the library name based on the project name, removing explicit mentions of RocksDB in status strings, etc.) can theoretically be upstreamable, if RocksDB would be open to accepting something like that.


Update tests for Alphametics

Updated the tests for Alphametics as per #453. I kept test_solve_long_puzzle commented out, since it certainly does take a long time to run. I also observed that test_solve_puzzle_with_many_words has the same problem, and commented that out as well.

Great! Thanks :heart:

Happy Hacktoberfest! 😄


vdW energy mismatch between Amber and GROMACS/OpenMM

In [23]: ff14sb = ForceField("ff14sb_off_impropers_0.0.3.offxml")

In [24]: out = Interchange.from_smirnoff(
    ...:     force_field=ff14sb,
    ...:     topology=[Molecule.from_polymer_pdb(get_data_file_path('proteins/MainChain_HIE.pdb'))],
    ...: )

In [25]: out.box = [10, 10, 10]

In [26]: get_summary_data(out)
Out[26]:
             Bond      Angle    Torsion       vdW  Electrostatics
OpenMM   2.041475  80.760040  54.966743  5.605402     -211.167846
Amber    2.041374  80.759986  54.966882  6.151735     -211.158530
GROMACS  2.041476  80.760101  54.673031  5.606108     -211.196062

Bookmarking for later: https://gromacs.bioexcel.eu/t/mdp-parameters-for-non-bonded-interaction-using-the-amber-force-field/6458/5

Okay, the problem is that fswitch does not apply a switching function. It applies a shift to the entire potential. The interaction energy at the cutoff is simply subtracted out of the potential for the entire range, disregarding where a shifting function is meant to be applied.

If use OpenFF's current default (vdWHandler.switch_width = 8 * unit.angstrom) you can see that the energies reported by OpenMM and GROMACS code paths are unaffected below 8 A and follow a continuous transition to smoothly decay to zero at 9 A. What's reported through our Amber code paths (including passing fswitch=8 through to sander) is a complete shift of the potential over the entire range:

I'm not sure where the value 8 ends up; nothing happens at 8 A so maybe it'll behave the same if I use 7 or 6.
From the Amber22 manual (emphasis mine):

When off, fswitch<=0 , uses a truncation cutoff. When on fswitch>0, sets a force switching region
where the force cutoff smoothly approaches 0 between the region of the fswitch value to the cut
value. Force values below the fswitch value follow the standard Lennard-Jones force. Default is
-1. This option is not supported for use with GB (i.e., only igb=0 and ntb>0), nor is it compatible
with the 12-6-4 Lennard-Jones model (lj1264=1). Due to performance regressions (about 20%)
with running with the force switching on, it is recommended that simulations run with fswitch off
unless using a force field that requires or recommends using the force switch.

Something is clearly going wrong here. I can't find any mention of an option that adds a potential shift (like vdw-modifier = Potential-shift in GROMACS or pair_modify shift yes in LAMMPS) to sander.
For good measure, here's the second plot zoomed out a bit - clearly what's happening is applied the same everywhere below 8 A:

One bigger picture thing that might be applicable logic to use here - I decided with InterMol that "success" was that all the parameters were translated correctly; if the functional forms were not the same, that wasn't the converter's problem.  i.e. if I could get the energies to match with 9 A abrupt cutoffs in both engines, then that was matching. Lack of similar implementation between programs was the program's problem, not mine.

fswitch is I think short for force-switching, which is not the same multiplying the potential by a scaling function.  I don't think there is a way to multiply the potential by a switching function, yes.

I agree that getting parameters to being written correctly to the data files is a good target; the problem is that OpenFF's force fields use a switching function and there's no better place to try and get that translated that here. People will get different results if the switching function is turned into a hard cutoff. How much? Probably less than other error in most cases, I don't know.
Unfortunately it seems the best we can do in this case is document this gap in functionality so that users are aware of what non-bonded settings are included in the force field that can't precisely be used in their workflow.

Unfortunately it seems the best we can do in this case is document this gap in functionality so that users are aware of what non-bonded settings are included in the force field that can't precisely be used in their workflow.

Exactly.  I would not change it to a hard cutoff, that was just the setting that was implementable in all version of the codes InterMol used, and therefore could be used to show that in THAT mode, the energies were the same.  I think using fswitch for AMBER outputs and WARNING the user the change that was made is 100% a great way to go.   We can't make simulation engines more cross-compatible.

Agree on warning users - but my intuition is to default to not using fswitch at all for these cases. I think shifting the force is probably better for practical use but it's more disruptive (shifting the potential over the entire range introduces more numerical error, even if the physics are usually fine, compared to having an incorrect cut-off and some error accumulating between 8 and 9 A) compared to what's "supposed to be used." I have this implemented in #914, including the same warning for LAMMPS since we weren't able to figure out that case.
The scope here is internal energy comparisons and an API point that only ever writes out a script to set up a 0-step "simulation." In both cases a warning will be emitted. I expect power users will have their own infrastructure for all of this and aren't as worried about the tail correction, but I do see it as our responsibility to communicate out the settings that are encoded in force field.

In #914 I have added a warning - until Amber implements this particular type of tail correction, there isn't anything we can do


feat(unified_postman_collection): Unified complete postman collection

Type of Change

[x] New feature
[x] Enhancement

Description

This PR aims at bringing all postman collections into one. The main goal is to make use of environment variables, symlinks and import as much as possible to reduce duplications thereby effectively making the system more robust and useful.
Motivation and Context

Current implementation has a lot of duplicate files. This PR aims to delete that.
How did you test it?

TBD.
Checklist

[x] I reviewed the submitted code
[x] I added unit tests for my changes where possible

closing as this PR has become obselete and hard to maintain. Also, based on the sources, we're moving away from this in near future


ingest gene knockout data from LBL microbial fitness experiments

All of the data is here (84G total):
http://genomics.lbl.gov/supplemental/bigfit/
The numerical relative growth data would have to be converted - growth vs no growth, via eg thresholding.
Just taking the first organism as an example:
http://genomics.lbl.gov/supplemental/bigfit/html/acidovorax_3H11/
On the organism page, under 'Genes' the 'Specific phenotypes' link gives a table of most significant phenotype per gene for this KO dataset:
http://genomics.lbl.gov/supplemental/bigfit/html/acidovorax_3H11/specific_phenotypes
and this file can serve as the primary data source.
These columns:
sysName	desc	name	lrn	t	Group	Condition_1	Concentration_1	Units_1
provide the following data:
gene name
description
internal name
log ratio normalized
t-statistic
condition group
condition name
concentration
unit
For reference under 'Genes' the 'Gene fitness' link gives a full table of relative fitness values:
http://genomics.lbl.gov/supplemental/bigfit/html/acidovorax_3H11/fit_logratios_good.tab
The y-axis labels are 'locusId' which are gene ids and the x-axis labels are condition (sample) ids including a text description.
There is additional data on each condition on the organism page under 'Tables' then 'Experiments' then 'Detailed metadata for experiments':
http://genomics.lbl.gov/supplemental/bigfit/html/acidovorax_3H11/expsUsed
A basic ingest of this data would model as mutant alleles or a gene-condition relation indicating that this gene X is essential for growth in condition Y. As key supporting data the gene annotations should also be ingested:
http://genomics.lbl.gov/supplemental/bigfit/html/acidovorax_3H11/fit_genes.tab
with the caveat that these are 'free text' annotations so may require standardization.
Further ingests could include:

In addition, the expsUsed table could be treated as a Sample metadata table and run through the usual NLP process.
Significance values for each fitness value eg:
http://genomics.lbl.gov/supplemental/bigfit/html/acidovorax_3H11/fit_t.tab

As key supporting data the gene annotations should also be ingested:
http://genomics.lbl.gov/supplemental/bigfit/html/acidovorax_3H11/fit_genes.tab
with the caveat that these are 'free text' annotations so may require standardization.

Can we not just get the annotations from uniprot? The challenge here is there is no shared ID between the files
This line
Ac3H11_2265     NA      1       scaffold5/16    499203  500063  +       NA      FIG146518: Zn-dependent hydrolases, including glyoxylases       0.6574  7       TRUE
May correspond to https://www.uniprot.org/uniprot/A0A165JRD7 ?
Do we have the AA sequences easily accessible?


CORS middleware is not processing when using "send()" on a response.

My API uses response()->...->send() to terminate code execution and immediately return an error response. What I have found is that whenever I use send() with the response, the CORS middleware is not running and the CORS headers are not being attached to the response.
Here is an example: return response()->json($output, 500)->send();
Does anyone (@barryvdh) know of a way that I can make sure the CORS middleware is being run when calling send() on a response? Or a way to trigger the middleware manually when send() is needed?

Why do you send and terminate it directly?

@barryvdh In our API, we have abstracted some of the more common error checking out into their own methods. When you are inside a child method if you call return response()->json($output, 500) it just returns on that child method, not the parent, so the parent method continues to run. You would have to return false from the child and then check for the false response form the child on the parent and trigger the return response()->json($output, 500) from the parent. This is less than ideal as it bloats the code and in some rare cases, it could be a child of a child of a parent method.
If we call return response()->json($output, 500)->send(); then it terminates the script at the abstracted child method and returns the error response. Laravel supports the withHeaders() when using send(), I am just trying to avoid having to had the CORS headers manually.
Also, just and FYI, I am not calling return response() directly from the abstracted child, I have another error method that I just to process and format errors. Here is the static error function I call for consistent responses.
public static function error(int $http_status, string $message = null, string $code = null)
{
    if (!empty($message)) { $message = ['message' => self::processMessage($message)]; } else { $message = []; }
    if (!empty($code)) { $code = ['code' => $code]; } else { $code = []; }

    $output = array_merge(['status' => 'error'], $message, $code);

    return response()->json($output, $http_status)->send();
}

I suggest you throw an error (eg. ApiResponseException) with the message and code, catch that in your error handler and convert to json.

Great thinking! I added in the custom exception and trigger the response from there and the CORS headers are added correctly. 👍


ci: add lint stage to CI pipeline

:tada: This PR is included in version 1.0.0 :tada:
The release is available on:

GitHub release
v1.0.0

Your semantic-release bot :package::rocket:


Added Persian

I added some css code for better responsiveness. Please you yourself update keyboard.vue file with proper Sass codes.
I added Persian support in js files and I also changed README.
And please minify the js file as you wish.
Thanks

Coverage remained the same at 5.31% when pulling 461166f917dda7ef9f4290330113849541654863 on hosein2398:master into b819b2508759afda82d9978ec9f812db9e5c6a62 on icebob:master.

Thanks, I will check.

Thanks. I will merge, but I will change and separate languages to single files because if there are 50 layouts this file will be unmanageable.

Coverage remained the same at 5.31% when pulling d5f65d05bde745753d018e5c723915419094dab3 on hosein2398:master into b819b2508759afda82d9978ec9f812db9e5c6a62 on icebob:master.


Configuring the mod in-game crashes the game.

Title, modlist and other info in report.
https://pastebin.com/T2rtueeB

I'll look into it! Thanks for letting me know!

I published a new version replacing owo lib with cloth config, which should fix the problem.
Please let me know if you encounter any more issues :)

Not sure why owo Lib was needed before. Could've used aCloth Config API before. Seems simpler then writing an entirely different config system.

That was an oversight on my part. I wasn't aware of cloth config's possibilities, but I'm glad I learned something new this way :)

Yep. Should probably remove Owo Lib from Modrinth since it's kinda unnecessary.


[BUG]: CrisisCommunication.Request shows up as Not Connected on Communication App

Describe the bug
The CrisisCommunication.Request is not getting attached to the Communication App, thus causing the entire workflow to break
To Reproduce
Steps to reproduce the behavior:

Go to the Communication App on Power Apps click on '...''
Scroll down to details, and then select Flow tab
No value there

Expected behavior
There should be a Flow for CrisisCommunication.Reques
Screenshots
If applicable, add screenshots to help explain your problem.

Interface(please complete the following information):

Browser : Edge
Version 83.0.478.58

Smartphone (please complete the following information):

None
Additional context
Add any other context about the problem here.

Hi @denisem-msft , I am not sure if you are the right person for this, but i just want to see if you help with this? Or Guide me to the right contact


Clock swing

Add the option to output the analog clock with swing. This would allow to output the same swing to external sequencers that is also used internally.

seconded, and this would fill a niche that i'm not aware of elsewhere - having the option to output with or without swing.  wmd metron is always with swing, tiptop circadian rhythms is never without swing.  they both have their issues depending on what else is going on, so having the option to do it either way would be a great thing.

part of 0.1.21 release


How to work with Azure Service Bus without context manager (Python)

Hi!
I find it super confusing to work with Azure service bus queues. As a result, I am afraid I am making mistakes without even understanding this and get unexpected behavior.
I want to have a class, say, Consumer where in the constructor I instantiate all the necessary things such as ServiceBusClient, AutoLockRenewer, and Receiver. Then, say, I have 2 methods - get_message() and acknowledge_message(). My other code receives a message, attempts to process it, and then if successfully processed acknowledges the message.
ALL examples use context managers, which is not the way we'd like to go. My attempts to do it my way resulted in the following monstrosity, which is obviously wrong:
class CustomServiceBusClient(ServiceBusClient):
    def enter(self):
        if self._connection_sharing:
            self._create_uamqp_connection()

    def exit(self):
        self.close()

class AzureConsumer:
    def __init__(
            self,
            connection_str: t.Optional[str] = None,
            queue_name: t.Optional[str] = None,
            timeout: int = 10,
            logging_enable: bool = False,
    ) -> None:
        self._conn_str = connection_str
        self._queue_name = queue_name
        self._timeout = timeout
        self._logging_enable = logging_enable
        self._being_processed_messages = {}
        try:
            self._client = CustomServiceBusClient.from_connection_string(
                conn_str=self._conn_str, logging_enable=self._logging_enable
            )
        except Exception as e:
            raise e
        else:
            self._client.enter()
        self._lock_renewer = AutoLockRenewer(max_workers=2)
        self._receiver = self._client.get_queue_receiver(
            self._queue_name, max_wait_time=self._timeout
        )

    def get_message(self) -> t.Tuple[t.Optional[str], t.Optional[str]]:
        try:
            msg = next(iter(self._receiver))
        except StopIteration:
            return None, None
        # Register the message with the lock renewer
        self._lock_renewer.register(
            self._receiver, msg, max_lock_renewal_duration=6000.0
        )
        message_id = str(msg.message_id)
        message_content = str(msg.message)
        self._being_processed_messages[message_id] = msg
        return message_content, message_id

    def acknowledge_message(self, message_id: str) -> None:
        if message_id not in self._being_processed_messages:
            raise KeyError(
                f"The key {message_id} doesn't belong to any messages!"
            )
        self._receiver.complete_message(
            self._being_processed_messages.pop(message_id)
        )

OR something among those lines (the example is incorrect, I got completely lost)
class Consumer:
    QUEUE_NAME = ""
    CONNECTION_STR = ""

    def __init__(self):
        self._bus_client: ServiceBusClient = ServiceBusClient.from_connection_string(
            conn_str=Consumer.CONNECTION_STR
        )
        self._lock_renewer = AutoLockRenewer(
            max_lock_renewal_duration=300,
            max_workers=4,
        )

    def get_message(self) -> t.Generator:
        with self._bus_client.get_queue_receiver(Consumer.QUEUE_NAME) as rec:
            for message_obj in rec:
                self._lock_renewer.register(
                    rec, message_obj, max_lock_renewal_duration=300
                )
                yield message_obj.message
                ok: bool = yield
                if ok:
                    rec.complete_message(message_obj)

Could anyone explain how to implement something similar or direct me to the appropriate resource, please? I've tried my best to google, but there are so few examples out there and they all seem to use the context manager approach.
Thank you, much appreciated.
ET
P.S.
Apologies if thats the wrong place to ask it.

Thanks for the question!! We'll look into this asap

hey @EvgeniiTitov , you could use ServiceBusClient.close method to shutdown the client or use ServiceBusRecever.close method to shutdown the spawned receiver.
Let me know if you need more help!


Why the depth map has the inverted reflection in a concrete ground？

How to solve the problem or avoid it? Thanks a lot.

@JunLFang to dig a bit more deeper into this problem we probably need more details. Nevertheless please keep in mind this is a camera with an active illumination. It looks like you are suffering from reflective materials which do act like a mirror.

@JunLFang  - thank you for the details provided.  As @graugans mentions, additional detail would be required to best support your questions.  It may also be helpful to understand your primary Use Case as this may help us direct you to the appropriate settings.  Would you like to do this offline or on this thread?

@JunLFang I'm going through and closing old issues -- please feel free to reactivate or reach out to @GarrettPlace directly and take him up on his offer to discuss offline.


Fix animated tile time-slice calculation accumulating float errors

TileMap's tile animation time slice starts/ends were calculated like:
((6.0f / 6.0f) + (1.0f / 6.0f) + (1.0f / 6.0f) + (1.0f / 6.0f)) -> 1.49999988079071044922
instead of:
((6.0f + 1.0f + 1.0f + 1.0f) / 6.0f) -> 1.50000000000000000000
but the total animation duration were calculated like the latter and hence there was potentially a small time gap between the last frame's end and the end of the whole animation.
Should fix #82286, @Proggle please test if you can.

This seems a bit complicated tbh. IMO, the simplest solution is to set the end frame equal to animation_duration when you are at the last frame. Something like:
real_t slice_end = frame == atlas_source->get_tile_animation_frames_count(p_atlas_coords)-1 ? animation_duration : time + frame_duration;
RenderingServer::get_singleton()->canvas_item_add_animation_slice(p_canvas_item, animation_duration, time, slice_end, p_animation_offset);

This seems a bit complicated tbh. IMO, the simplest solution is to set the end frame equal to animation_duration when you are at the last frame.

It's barely more complicated. I disagree we should be picking a little simpler solution over a more correct one (assuming there are no performance reasons etc.). And calculating things like I've done in here seems more correct to me (for the intermediate frames it's i * addition_error + division_error vs i * addition_error + i * division_error).
In the usual use cases it should indeed not matter and both solutions should be unnoticeably different. But if for some reason e.g. speed would be very small then the discrepancies could get significant.
Is it theoretization? Yes.
Does this matter in practice? Likely no.
But I still see no reason to not handle such potential edge cases properly if it's not computationally costlier, the code isn't much more complicated, or something like that. And AFAICT that's the case in here.
(if anything I'd say the most complicated is the comment I've added for clarifying things :smile:; for me the code seems self-explanatory and that comment is not needed, still added it so no one would refactor it back)
I can go with your suggested solution if that's what's really preferred. Just wanted to point out that in general I advocate for correctness over a barely simpler code. :upside_down_face: Decision up to you, you're the maintainer here.

I don't mind either way to be honest, merging as is would be fine.
TBH I don't really understand why the CanvasItem API does need both a frame start, a frame end and a duration. Either the frame duration or the total duration should be "ignorable".

I don't mind either way to be honest, merging as is would be fine.

:slightly_smiling_face:

TBH I don't really understand why the CanvasItem API does need both a frame start, a frame end and a duration. Either the frame duration or the total duration should be "ignorable".

AFAICT it could be as you're saying if it would be limited to a typical looped frame by frame animations (like the ones in the TileMap). But it's not like that, the API allows full flexibility. Animation slices can potentially overlap each other time-wise, there can be periods with nothing  to draw,you could even issue at once all commands to draw some layered animation with each layer having its own "fps", etc.
Each animation slice rendering command is an independent command, it doesn't know/assume anything about other such commands, hence it seems to need all that info:
https://github.com/godotengine/godot/blob/008b08b5fb559f896ea3a6b3b9a8de41824c5ad4/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp#L948-L955

TileMap's tile animation time slice starts/ends were calculated like: ((6.0f / 6.0f) + (1.0f / 6.0f) + (1.0f / 6.0f) + (1.0f / 6.0f)) -> 1.49999988079071044922 instead of: ((6.0f + 1.0f + 1.0f + 1.0f) / 6.0f) -> 1.50000000000000000000 but the total animation duration were calculated like the latter and hence there was potentially a small time gap between the last frame's end and the end of the whole animation.
Should fix #82286, @Proggle please test if you can.

Thanks!  I'll check this weekend when I have time.
If I'm understanding properly this particular glitch would cause a tile rendering failure only if the frame rendering fell exactly in the 0.0000001192 second window between timespans, so it's possible that I'm seeing animation failures for multiple reason beyond this one

I'll check this weekend when I have time.

@Proggle Thanks! Note you don't need to build it yourself to test, you could download an artifact from the CI checks down below ("Show all checks" -> "Details" (any of them) -> "Summary" -> "Artifacts"). E.g. this one for windows (artifacts are available only for some time after the CI action is run so the link is temporary).

If I'm understanding properly this particular glitch would cause a tile rendering failure only if the frame rendering fell exactly in the 0.0000001192 second window between timespans,

Indeed.

so it's possible that I'm seeing animation failures for multiple reason beyond this one

If you're talking about that specific glitch from #82286 then AFAICT it's unlikely there's a different cause (e.g. a different reason could be Math::fposmod not working correctly). But sure, there could be some different problem I haven't noticed looking at the relevant code. :upside_down_face:

Thanks!

I'll check this weekend when I have time.

@Proggle Thanks! Note you don't need to build it yourself to test, you could download an artifact from the CI checks down below ("Show all checks" -> "Details" (any of them) -> "Summary" -> "Artifacts"). E.g. this one for windows (artifacts are available only for some time after the CI action is run so the link is temporary).

If I'm understanding properly this particular glitch would cause a tile rendering failure only if the frame rendering fell exactly in the 0.0000001192 second window between timespans,

Indeed.

so it's possible that I'm seeing animation failures for multiple reason beyond this one

If you're talking about that specific glitch from #82286 then AFAICT it's unlikely there's a different cause (e.g. a different reason could be Math::fposmod not working correctly). But sure, there could be some different problem I haven't noticed looking at the relevant code. 🙃

Oh, that's handy, trying to compile on my laptop takes forever.
Anyway, running both the original and patched versions side by side, I managed to catch 4 framedrops on the old version and 0 on the new one, so tentatively looks like it's patched.  I'm going to keep working on this project more and I'll yell if I see any more vanishing tiles.
Mathematically seems weird that this'd be the cause, if it were some kind of uniform distribution it seemed super unlikely a frame would fall into the crack between floats as often as I was seeing it (about a 0.0007% chance per loop, so about 3% chance of seeing a single frame drop if I was watching it a whole hour).  I guess the distribution isn't actually that random and when my computer is at the right cpu load it consistently takes exactly 1.49999988079071044922 seconds to do 90 frames.
Weird, but I'll take the win.  Thanks for the fix :)

Cherry-picked for 4.1.3.


HMGET variant returning a dict.

When calling HMGET, I almost always need the results wrapped up with the keys in a dict. This would simply allow the caller to designate their desired return type.
Test included.

@mastermatt
Thanks for the patch. However, this doesn't work in pipelines. Anytime you want to do casting/converting of the response type you need to do it in a response callback. For example, something like this would work:

class StrictRedis(object):
    ...
    def hmget(self, name, keys, *args):
        args = list_or_args(keys, args)
        # note that any kwargs will get passed to response callbacks
        return self.execute_command('HMGET', name, *args, keys=args)

def hmget_dict(response, **options):
    keys = options['keys']
    return dict(izip(keys, response))

r = StrictRedis(...)
r.set_response_callback('HMGET', hmget_dict)
my_dict = r.hmget('my-hash', 'key1', 'key2')


bump version to 0.23.17

Why

bump version to include changes to sessionDisconnectGrace and handshakeTimeout
What changed
Added handshakeTimeout and corresponding tests

Versioning

[ ] Breaking protocol change
[ ] Breaking ts/js API change

you might need 0.23.18 re: https://github.com/replit/river/pull/223/files


tree-wide: Add Debug impls

I find this really useful as a general baseline; I'm a "printf debugger" person by default. Add derives tree wide (plus two manual impls). Enable deny-by-default lint.

Do you consider add tokio tracing?


[BugFix] Fix ORC's SearchArgument not followed with case sensitive behavior

What type of PR is this：

[x] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Which issues of this PR fixes ：

Fixes #
Problem Summary(Required) ：

Fix orc SearchArgument not follow with case sensitive behavior.
For example, we have an orc file's schema as struct<a int, b int>, and the SlotDescriptor's name is A and B.
In OrcChunkReader, we use non case sensitive by default, but our SearchArgument has not followed it. So if the user run query: select * from tbl where A=5,  it will throw an error message in OrcRowReaderFilter::filterMinMax().
Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto backported to target branch

[ ] 2.5
[ ] 2.4
[ ] 2.3
[ ] 2.2

@dirtysalt @DorianZheng PTAL

run starrocks_admit_test

@Mergify backport branch-3.0

@mergify backport branch-2.5


Cleaning up CSS Properties with null value

Describe the issue
CSS Properties that are not defined end up in the bundle output.  Don't know if its a known issue.

Expected behavior
It would be great to clean up this unnecessary CSS Properties from the bundle output. This is not affecting any UI or causing issue, its just end up in the final bundle which essentially increases the bundle size.
Steps to reproduce

Rollup
JavaScript(No framework)
@stylexjs/rollup-plugin

I defined stylex CSS with create API and used @stylexjs/rollup-plugin plugin. The output looked like above.
Test case
No response
Additional comments
No response

Unless I'm mistaken, I think this behavior is intended in order to ensure that the last style always wins. It seems to be setting null here in order to override more specific styles that potentially come from other stylex.create() calls that are passed in.
if you had some styles that define background color
const lessSpecificStyles = stylex.create({
  container: {
    background: 'green',
  },
});

const moreSpecificStyles = stylex.create({
  container: {
    backgroundColor: 'red'
  }
});

Setting these nulls allows you to use the less specific styles last, and still have them apply because lessSpecificStyles.container will set backgroundColor to null when it builds.
stylex([moreSpecificStyles.container, lessSpecificStyles.container]);

I'm not 100% sure if this is the reason though

Change styleResolution to property-specificity. The output will not contain that bloat https://stylexjs.com/docs/api/configuration/babel-plugin/#styleresolution

@Jta26 That is exactly the reason for this.
@venututor if you choose property-specificity styles merge the way they do in React Native, so be aware of the change in behaviour.