Query: Sargability of string literals in combination with non-Unicode columns

PR #4667 "fixed" issue #4622 by making all string literals Unicode in our SQL generation.
But it has been claimed that SQL Server cannot leverage indexes when comparing a Unicode literal or parameter against a non-Unicode column. For an example, see http://stackoverflow.com/questions/5828621/.
Rather than reopening #4622, I am creating a new issue to discuss the priority of sargability in this scenario on its own.
Whenever we decide to improve this we should verify in which scenarios the claim is valid and then we can avoid creating Unicode literals in those cases.

Just came across this with latest vnext rc2 bits.  Wondered why my query was suddenly so slow
It was because
Generated SQL was
SELECT [c].[TransRef], [c].[CommentLineNo], [c].[Comments], [c].[TimeStamp]
FROM [CommentDetails] AS [c]
INNER JOIN (
    SELECT DISTINCT [t].[TransRef]
    FROM [Transactions] AS [t]
    WHERE [t].[CustSuppRef] IN (N'5802685') AND (([t].[TransCode] = 0) OR ([t].[TransCode] = 1))
) AS [t2] ON [c].[TransRef] = [t2].[TransRef]
ORDER BY [t2].[TransRef]

Taking 2 seconds
SELECT [c].[TransRef], [c].[CommentLineNo], [c].[Comments], [c].[TimeStamp]
FROM [CommentDetails] AS [c]
INNER JOIN (
    SELECT DISTINCT [t].[TransRef]
    FROM [Transactions] AS [t]
    WHERE [t].[CustSuppRef] IN ('5802685') AND (([t].[TransCode] = 0) OR ([t].[TransCode] = 1))
) AS [t2] ON [c].[TransRef] = [t2].[TransRef]
ORDER BY [t2].[TransRef

Taking a few miliseconds. (Note no N on literal '5802685')
So it looks like treating all string literals as Unicode will hurt performance in this scenario dramatically
I would change this from enhancement to bug please!!.
Due to CustSuppRef being varchar and indexed
Any workarounds in the meantime?

Ref https://github.com/aspnet/EntityFramework/issues/4622

Is custsuppref mapped AS varchar In Your model?

  entity.Property(e => e.CustSuppRef)
                    .HasColumnType("varchar(15)");

Yes.

Heres the code
  public ICollection<Invoice> GetInvoices(int[] invoiceNumber)
        {
            if (invoiceNumber == null) return null;

            string[] invoiceNoStrings = invoiceNumber.Select(x => x.ToString()).ToArray();
            ICollection<Models.Transactions> invoiceTransactions = _tradingCompanyDbContext.Transactions
                .Include(t => t.AccountNoNavigation).ThenInclude(a => a.InvTypeNavigation)
                .Include(t => t.AccountNoNavigation).ThenInclude(a => a.PaymentFreqNavigation)
                .Include(t => t.InvoiceDetails).ThenInclude(i => i.StockNoNavigation)
                .Include(t => t.DiscountDetails)
                .Include(t => t.CommentDetails)
                .Where(t => invoiceNoStrings.Contains(t.CustSuppRef)
                    && (t.TransCode == 0 || t.TransCode == 1))
                .AsNoTracking()
                .ToList();

            if (invoiceTransactions.Count != 0)
            {
                Models.CompanyDetails companyDetail = _tradingCompanyDbContext.CompanyDetails
                    .AsNoTracking()
                    .FirstOrDefault();

                return GetInvoiceViewModel(companyDetail, invoiceTransactions);
            }
            else
            {
                return null;
            }

        }

Clearing up milestone based on the new data.

BTW the generated sql is just part of 4 queries generated by the code.  They all exhibit the same issue.
So code that used to be almost instant now takes over 8 secs.

Will this fix make it to rc2?
Its blocking me and used to work fine a few weeks ago.
Is there a workaround in the meantime?
No one will wait 8+ seconds for page load.

@divega  @ErikEJ  Are there any workarounds.
I'm currently blocked because of this issue.

Custom version of EFCore.Relational, or use FromSQL ?

Can't EF check what DB type is the string being filtered, and if it's an NVARCHAR use unicode literal and if's VARCHAR is non-unicode literal?
And there should be something similar to EntityFunctions.AsNonUnicode in EF core that people can use to customize it for weird cases where this rule of thumb isn't good because the index is (for God knows why) VARCHAR and the column in the table is NVARCHAR.

@rowanmiller
Are you saying (from the labels) no support for varchar columns with indexes until RTM https://github.com/aspnet/EntityFramework/pull/4667 broke this scenario very recently.
Varchar is still common place in database first senarios.

Can't EF check what DB type is the string being filtered, and if it's an NVARCHAR use unicode literal and if's VARCHAR is non-unicode literal?

Yes, that is a good description of the fix that we want to implement.
Ideally we would recognize all C# relational operators and (as we already saw in @mikes-gh's example) usages of Enumerable.Contains() in both positive and negated form, between a property (for which we may know it is non-Unicode) and a literal, parameter or arbitrary expression including those (for which we only know it is a string), etc.
In practice I would expect the solution to do a reasonable effort to recognize those patterns and to leave the rest for some explicit way to specify that a string should be treated as non-Unicode (in EF 6 we had DbFunctions.AsNonUnicode() for that).
We can try to get something in soon for this but I doubt it will be ready for RC2 (which is rather close).

@divega @rowanmiller Maybe we could do just the AsNonUnicode part for RC2 so that there is a reasonable workaround?

@ajcvickers that would be great.

This is interesting.
http://sqlblog.com/blogs/marco_russo/archive/2006/10/21/unicode-varchar-nvarchar-and-index-usage-in-sql-server.aspx
It seems we can supply a non-Unicode literal or parameter as a predicate against an nvarchar field and index can be used.
It just can't apply a Unicode literal as a predicate to a varchar indexed field.
Sounds like a strong argument for reverting  https://github.com/aspnet/EntityFramework/pull/4667

It seems we can supply a non-Unicode literal or parameter as a predicate against an nvarchar field and index can be used.

Even if  I that is the case I don't think reverting #4667 is the right solution. That change actually fixed a bug. See #4781.
@ajcvickers Sounds good to me if that is viable.

Ah sorry yes sometimes forgot the world is not all on the same alphabet.

This make interesting reading
http://www.olcot.co.uk/sql-blogs/revised-difference-between-collation-sql_latin1_general_cp1_ci_as-and-latin1_general_ci_as
It appears if we use a windows collation  (Latin1_General_CI_AS) on the database, index seek can still be used when comparing an nvarchar predicate to a varchar column.
My current collation is SQL_Latin1_General_CP1_CI which would cause an index scan on my large table hence the dramatic performance drop.

Why is this? The reason behind all of this is down to the actual differences between the two collations. The SQL_Latin1_General_CP1_CI_AS collation is a SQL collation and the rules around sorting data for unicode and non-unicode data are different. The Latin1_General_CI_AS collation is a Windows collation and the rules around sorting unicode and non-unicode data are the same. A Windows collation as per this example can still use an index if comparing unicode and non-unicode data albeit with a slight performance hit. A SQL collation cannot do this as shown above and comparing nvarchar data to varchar removes the ability to perform an index seek.

Of course this is not something to be done lightly but in my case I think it will be a good option as I see no downsides from moving form the SQL collation to the Wndows collation which seems to be the recommended approach anyway now.
I will report back.

OK good news to report
SELECT [c].[TransRef], [c].[CommentLineNo], [c].[Comments], [c].[TimeStamp]
FROM [CommentDetails] AS [c]
INNER JOIN (
    SELECT DISTINCT [t].[TransRef]
    FROM [Transactions] AS [t]
    WHERE [t].[CustSuppRef] IN (N'4802685') AND (([t].[TransCode] = 0) OR ([t].[TransCode] = 1))
) AS [t2] ON [c].[TransRef] = [t2].[TransRef]
ORDER BY [t2].[TransRef]

Now runs identically times for N'4802685'' or '4802685''
So basically changing database, table and column collation from
SQL_Latin1_General_CP1_CI
to
Latin1_General_CI_AS
fixes this issue.
BTW My sql server installation is set to Latin1_General_CI_AS so any new databases would be this anyway.
The databases in question are quite old so the SQL collation has followed them from a previous install of SQL server.
Changing collation is a bit time consuming but for me its worth it as I now have a more future proof database.  I can also still benefit from smaller index size of varchar for large  3mil plus row table and SQL Server now knows how to compare nvarchar to varchar efficiently.
EFCore now works for me again :smiley:
Hope this helps someone else.

#4937 added functionality to infer the Unicode-ness of string literal & parameters for common cases. (when one side of operator is Column/property).

@smitpatel should we close this issue now? From my understanding of what you checked in, it doesn't seem that the explicit method is compelling anymore.

There are complex cases which may not be inferred easily which may need method.
one example is this disabled test.
https://github.com/aspnet/EntityFramework/blob/dev/test/Microsoft.EntityFrameworkCore.FunctionalTests/GearsOfWarQueryTestBase.cs#L1014
The issue is we can infer the Unicode-ness when one side is property and traverse the other side like that but we still do not have concept of Unicode-ness of return value. There can be other complex cases like that which may need explicit method.

General question...  How do I know when this fix goes to cidev.
I would like to test my senario.

@mikes-gh - 20401 was successful build number which took this commit in. It should be in cidev packages now.

filed #4978 for complex cases. Closing this.

@smitpatel thanks on hols at mo but will report back in this thread in acouple of days

@smitpatel
ComfrimedTSQL now without 'N and optimal execution plan as a result from my example above
.Where(t => invoiceNoStrings.Contains(t.CustSuppRef)

Many thanks

I think I'm coming across something related to this issue...
There is a column set up as varchar:
            modelBuilder.Entity<Quotes>().Property(s => s.StripInsuredCorporationName).HasColumnType("varchar(500)");
Query:
  var tmp = (from q in context.Quotes                      where                      (q.StripInsuredCorporationName.Contains(strippedName))                      select new { q.QuoteID });
The resulting SQL:
SELECT [q].[QuoteID] FROM [tblQuotes] AS [q] WHERE CHARINDEX(N'Test', [q].[StripInsuredCorporationName]) > 0
Since the column is defined as varchar, not sure what is causing the N to be there.
Thanks

@mk9753 could you create a new issue, complete with information about the EF Core version you are using?


Coloured output can't be disabled with the -lc flag

Issue description
The -lc flag should enable/disable coloured output for Gollums' internal logging coming from logrus.
But with the current Gollum version, this flag doesn't work at all.
Context
I tried to deactivate the coloured output with the parameter -lc never to avoid having output formatted like the following in files:
ESC[97mPluginIDESC[0m=GollumKafkaOut ESC[97mPluginTypeESC[0m=producer.Kafka ESC[97mScopeESC[0m=Sarama
2018-01-03T17:42:59+00:00 hostname ESC[90m[2018-01-03 17:42:59 UTC]ESC[0m ESC[97m INFOESC[0m producer/leader/topicname/0 state change to [normal]

Also, the messages from that stream which are also sent to a topic in Kafka contain coloured parts which they shouldn't.
Steps to Reproduce (for bugs)

Configure Gollum to write its internal "_GOLLUM_" stream in a file.
Start Gollum with the parameter -lc never
See entries like above in the newly created file.
Try setting -lc always or -lc auto instead and you won't see any difference.

Your Environment
Used versions

gollum version: 0.5.0
go version: 1.9
Operating System and version: Debian 9

fixed in 0.5.1


Sanitize column values when rendering PDFs

Description
Sanitize the column values so HTML doesn't get accidentally rendered when creating PDFs.
User-facing documentation
N/A
Testing and quality

[x] the change is production ready: the change is GA or otherwise the functionality is gated by a feature flag

Automated testing
No automated tests needed.

I've opened #13396 to properly trigger CI


Update intro.md

2 changes proposed, Change Pages/Shared/_Layout.cshtml to Pages/_Layout.cshtml and change Data/ContosoUniversityContext.cs to Data/SchoolContext.cs
#7732

Sorry. I updated finally to 2.1 then I saw the shared folder.


[move-prover] Havocked variables missing in error trace

In the program below, if we mistakenly write x < 10 instead of x <= 10 for the first loop invariant, the invariant is not inductive and an error trace is given by Move.
fun test_loop_induction(x: u64) {
    spec {
        assume x >= 0 && x <= 2;
    };
    let y = x + 1;
    while
    ({
        spec {
            invariant x <= 10;
            invariant y == x + 1;
        };
        (x < 8)
    })
    {
        x = x + 3;
        y = y + 3;
    };
    spec {
        assert x >= 8 && x <= 10;
        assert y >= 9 && y <= 11;
    };
}

The error trace reads as
error: induction case of the loop invariant does not hold
  ┌─ ./sources/loop.move:9:13
  │
9 │             invariant x < 10;
  │             ^^^^^^^^^^^^^^^^^
  │
  =     at ./sources/loop.move:1: test_loop_induction
  =         x = 2
  =     ...
  =     at ./sources/loop.move:5: test_loop_induction
  =         y = 3
  =     ...
  =     at ./sources/loop.move:6: test_loop_induction
  =         x = 10
  =     at ./sources/loop.move:16: test_loop_induction
  =         y = 11

However, this is not a valid trace. Starting from x=2, y=3, we cannot reach the state x=10, y=11 following the program. When Boogie generates this error trace, variables x and y are havocked and implicitly reassigned to x=7, y=8, a program state satisfying the loop invariant. Then after one loop iteration, we have x=10, y=11 which violates the loop invariant. The "havoc" and the reassignment x=7, y=8 are now missing in the error trace, leading to confusion.

Fixed in #256.


[v12 mainnet] - Oracle Documentation Changes Needed

Running list of things we need to change / add for mainnet launch
Didn't know rather to put here or in the testnets repo, so here it is. Then we can alter there & move to here for go
1
If you are in the USA:
For the rest endpoint - try out https://api.binance.us
If you have websocket issues stream.binance.com:9443

2
custom providers

in the price feeder config.toml at the bottom [[provider_endpoints]], you can set custom ones for the following providers

https://github.com/CosmosContracts/juno/blob/0e77692cb1cec195b1ebf986c45367fa02c39c20/price-feeder/oracle/provider/provider.go#L19-L30

handling there now


No way to specify uncertainty keys

Careless needs

an --uncertainty-key flag
to detect the first uncertainty column by default

see #94

resolved by #104


[dbeaver core CoreResources_it.properties] Small Italian translation

[dbeaver core CoreResources_it.properties] Small Italian translation update
Purpose
Better Italian translation.
Proposed changes
I want to enhance the Italian translation.

Thanks!

Thanks.


PANIC: 1

Hi Prisma Team! My Prisma Client just crashed. This is the report:
Versions

Name
Version

Node
v12.18.4

OS
rhel-openssl-1.0.x

Prisma Client
2.12.1

Logs
prisma-client { clientVersion: '2.12.1' }
prisma-client { clientVersion: '2.12.1' }
prisma-client { clientVersion: '2.12.1' }
plusX Execution permissions of /home/website/apiapp/node_modules/.prisma/client/query-engine-rhel-openssl-1.0.x are fine
plusX Execution permissions of /home/website/apiapp/node_modules/.prisma/client/query-engine-rhel-openssl-1.0.x are fine
plusX Execution permissions of /home/website/apiapp/node_modules/.prisma/client/query-engine-rhel-openssl-1.0.x are fine
plusX Execution permissions of /home/website/apiapp/node_modules/.prisma/client/query-engine-rhel-openssl-1.0.x are fine

I change select to include, it is work for me.


Improve mapping of errors on HTTP responses, and log stacks with debug

The use of string parsing could be improved, especially as it doesn't work in cases where the i18n framework is used with custom non-FF prefixes (which we support).

Codecov Report

Merging #96 (7cdda74) into main (f52df06) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #96   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           63        63
  Lines         4943      4967   +24
=========================================
+ Hits          4943      4967   +24

Files Changed
Coverage Δ

pkg/ffapi/handler.go
100.00% <100.00%> (ø)

pkg/i18n/errors.go
100.00% <100.00%> (ø)


Opening a executable file on windows

Dear Kensoh,
I was reading your documentation and most of it deals with web element. How do i write code to automate the execution of files stored on local computer? Thanks

Can you share an example what do you mean?
If you mean running commands from the command line, you can use the run step.

For instance, I want the RPA to follow these steps:
Click on search icon on windows menu
Type "Microsoft Word" in search box
Enter to search
Click on Microsoft Word to open app
etc.

I see.. to interact with desktop apps use the keyboard step, and visual automation. I don't have Windows to test, it should be something like below to do what you want above. msword.png is an image snapshot (you can use the Windows snipping tool to capture it) of the MS Word icon.
keyboard [win]
keyboard Microsoft Word
click msword.png

For keyboard step and visual automation, Java OpenJDK is needed. See here for the installation link - https://tagui.readthedocs.io/en/latest/setup.html

Thank you. This is what I have been looking for.
However, I noticed every time i run the TAG file, the first step is always opening a Google Chrome browser even though my first step is not a URL. Why is this so?

Yes this is the default behaviour because most use cases involve the web browser. You can run with -n or -nobrowser option to disable that.
tagui flow_name.tag -n
tagui flow_name.tag -nobrowser


Failed attempt to join a cluster terminates Serf

Summary
Splitting from issue #1680.
Run instance (1) of Kong on a machine.  Attempt to run instance (2) that's configured to use the cluster ports used by (1) but is otherwise incompatible (different database config), on the same machine.  Attempt to run (2) fails, but Serf terminates on (1) without feedback.  Attempt to run (2) again, this time it works because ports are no longer in contention.
Steps To Reproduce

Create kong-1.conf.
Create kong-2.conf.  Ensure proxy_listen, admin_listen, dnsmasq_port and the pg_ params are distinct from the -1 file.  Ensure cluster_listen and cluster_listen_rpc both MATCH the -1 file.
Start the (1) instance: kong start -v -c /path/to/kong-1.conf -- observe which elements are running via: ps axu | grep -i -E 'kong|nginx|serf|dnsmasq' | grep -v grep -- note that serf is shown with parameters for the (1) instance
Attempt to start the (2) instance via: kong start -v -c /path/to/kong-2.conf -- get this error: Error: /usr/local/share/lua/5.1/kong/cmd/start.lua:22: could not start serf: Failed to start the Serf agent: Error creating Serf: Failed to create memberlist: Failed to start TCP listener. Err: listen tcp <IP_ADDRESS>:7946: bind: address already in use
Observe which elements are running via: ps axu | grep -i -E 'kong|nginx|serf|dnsmasq' | grep -v grep -- note that serf is no longer running, other elements of (1) are still running, and no elements of the failed (2) instance are running
Attempt to start (2) again, this time succeeds: Kong started
Observe which elements are running via: ps axu | grep -i -E 'kong|nginx|serf|dnsmasq' | grep -v grep -- note that elements of (1) other than serf are still running, and all elements of (2) including serf are running.

Additional Details & Logs

Kong version ($ kong version) -- 0.9.1

Recommendation
-- When an instance tries and fails to join a cluster for any reason, don't allow that failure to kill serf (or other components) for the already-running instances. (The surprise was not that the new instance failed to join the cluster, but that in failing it killed serf for the OTHER instance.)
-- Determine which settings must be the same for an instance to join a cluster. Minimally that includes using the same database instance, maybe others (must be the same Kong version or ??). When a new node attempt to join a cluster, compare those items with a current cluster member. If the new instance doesn't match, abort the join from the new instance side.

Still having this with 0.9.2? some fixes were made on failing startup behaviour.

@chris-hailstorm 0.9.2 should terminate everything if a mandatory service like Serf fails to start.
Can you try?

That's another fix, I was actually referring to the change that if you try to start an already started Kong instance, it errors, and then cleans up, effectively stopping the already running Kong instance. This was fixed in 0.9.2.

Closing, since a). this is already listed as fixed a while ago, and b). serf is going away!


Docs: Make sidebar collapsible for easier readbility

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/3250
Originally created by @tayloramurphy on 2022-02-15 23:20:17

I like what Dagster is doing with their docs https://docs.dagster.io/getting-started Collapsing the sidebar would make it easier to understand the information hierarchy and not overwhelm the user.

View 2 previous comments from the original issue on GitLab

Closing this is now addressed in docs v2 https://afolson-docs.netlify.app/concepts/environments


1.10.2 Crash Placing Machine Block with Lime Lib

An issue was discovered with CM3 which was apparently fixed according to this:
https://github.com/MrRiegel/LimeLib/issues/13
Could that fix be also applied to the 1.10.2 version? My world is crashing because of this (I think). I know you have moved on past this version but pretty please? I need both CM2 and Particle Spreader for my modpack.
Here is the log:
crash-2017-10-21_14.16.18-server.txt

Done. Build is waiting for approval on curse.

Thanks for the quick fix! Works now.

You are welcome. Glad that fixed it for you!


InferenceServer Error

I am trying to use seel-RL style centralized server for inference. I modified the IMPALA example by adding the inference_server.InferenceServerConfig, which is passed to experiments.make_distributed_experiment. I keep getting the below error when running the modified code.
Code
Only the main function has been modified to be as below

def main(_):
  experiment_config = build_experiment_config()
  if RUN_DISTRIBUTED.value:
    program = experiments.make_distributed_experiment(
        experiment=experiment_config,
        num_actors=4,
        inference_server_config=inference_server.InferenceServerConfig(batch_size=32,
          update_period=1000,
          timeout=datetime.timedelta(seconds=100, milliseconds=0, microseconds=0))
        )
    lp.launch(program, xm_resources=lp_utils.make_xm_docker_resources(program))
  else:
    experiments.run_experiment(experiment_config)

Error
    batcher = pybind.BuildBatchedHandlerWrapper(func.__name__, handler,
TypeError: BuildBatchedHandlerWrapper(): incompatible function arguments. The following argument types are supported:
    1. (arg0: str, arg1: courier::HandlerInterface, arg2: int, arg3: int, arg4: int, arg5: bool) -> courier::HandlerInterface

Invoked with: 'dereference_params_and_call_handler', <courier.handlers.python.pybind.HandlerInterface object at 0x7f36002f7b30>, 32, 2, 0.0, True
terminate called without an active exception
Fatal Python error: Aborted

Thread 0x00007f36c93a5740 (most recent call first):

Could you please help me run the InferenceServer based training?
Thanks
Kinal

I managed to get the inference server up. But it gets stuck at the action selection step.
Based on my understanding, launchpad only supports calling a CourierNode using python types. However, when passing observations and LSTM states which are usually numpy or jax type objects, the system stops.
Any hints on how this can be handled? I tried using pickle to serialize and deserialize the objects but launchpad doesn't seem to accept byte type objects.

Hi, did you make any headway on this? Running into the same thing/ I saw you commented on a related launchpad issue since your last update. Thanks!

I am trying to run r2d2 with batched inference and am also running into this issue!

I managed to get the Inference Server up and running, though I use it in my personal code-repo, not with acme. But there were a lot of other hacks I had to do to get it running.
And based on my experiments, I found that the standard IMPALA architecture with CPU inference is much faster than the Inference Server based action prediction. It could be that my network is small, and the overhead of making the call to inference server is higher than using CPU for inference.

Thanks for the response! Seems like in our case, at the very least there are some inconsistencies with how timelimits are being passed around by acme that we need to get to the bottom of.

If you have installed launchpad from pip, it is launchpad's bug.
It can be fixed by editing python3.9/site-packages/launchpad/nodes/courier/courier_utils.py in your python environment installation of launchpad.
You can refer the attached python script to fix your launchpad installation for the timelimits bug.
fix_launchpad.txt

Hi, would you mind sharing more of what you did to get InferenceServer working? Think I'm treading the same path as you. I made the change to timeout which got the inference server called. Turned off jit because of the variable_client thing. Replaced the numpy arrays in obs/action/reward with jax arrays, which stopped InferenceServer from hanging, and lets the handler be called.
But now it seems that the arguments to the select_action function aren't working with the vmap in make_distributed_experiment. Not positive but I think the main problem is that the LSTM state isn't something you can vmap easily? I'm thinking of designing around it by directly passing on the parts of the recurrent state that are tensors instead of the whole class. But wanted to know if you can help me skip to the finish line instead :)
Thanks for your insights so far!

Here is the modified inference server script I've been using
import dataclasses
import datetime
import threading
from typing import Any, Callable, Generic, Optional, Sequence, TypeVar

import acme
import haiku as hk
import jax
import jax.numpy as jnp
import jaxlib
import launchpad as lp
import numpy as np
from acme.jax import variable_utils

@dataclasses.dataclass
class InferenceServerConfig:
  """Configuration options for centralised inference.

  Attributes:
    batch_size: How many elements to batch together per single inference call.
        Auto-computed when not specified.
    update_period: Frequency of updating variables from the variable source.
        It is passed to VariableClient. Auto-computed when not specified.
    timeout: Time after which incomplete batch is executed (batch is padded,
        so there batch handler is always called with batch_size elements).
        By default timeout is effectively disabled (set to 30 days).
  """
  batch_size: Optional[int] = None
  update_period: Optional[int] = None
  timeout: datetime.timedelta = datetime.timedelta(days=30)

InferenceServerHandler = TypeVar('InferenceServerHandler')

class InferenceServer(Generic[InferenceServerHandler]):
  """Centralised, batched inference server."""

  def __init__(self, handler: InferenceServerHandler,
               variable_source: acme.VariableSource,
               devices: Sequence[jax.xla.Device],
               config: InferenceServerConfig):
    """Constructs an inference server object.

    Args:
      handler: A callable or a mapping of callables to be exposed
        through the inference server.
      variable_source: Source of variables
      devices: Devices used for executing handlers. All devices are used in
        parallel.
      config: Inference Server configuration.
    """
    self._variable_source = variable_source
    self._variable_client = None
    self._keys = []
    self._devices = devices
    self._config = config
    self._call_cnt = 0
    self._device_params = [None] * len(self._devices)
    self._device_params_ids = [None] * len(self._devices)
    self._mutex = threading.Lock()
    self._handler = jax.tree_map(self._build_handler, handler, is_leaf=callable)

  @property
  def handler(self) -> InferenceServerHandler:
    return self._handler

  def _dereference_params(self, arg):
    """Replaces VariableReferences with their corresponding param values."""

    if not isinstance(arg, variable_utils.VariableReference):
      # All arguments but VariableReference are returned without modifications.
      arg = postprocess_data(arg)
      return arg

    # Due to batching dimension we take the first element.
    variable_name = arg.variable_name[0]

    if variable_name not in self._keys:
      # Create a new VariableClient which also serves new variables.
      self._keys.append(variable_name)
      self._variable_client = variable_utils.VariableClient(
          client=self._variable_source,
          key=self._keys,
          update_period=self._config.update_period)

    params = self._variable_client.params
    device_idx = self._call_cnt % len(self._devices)
    # Select device via round robin, and update its params if they changed.
    if self._device_params_ids[device_idx] != id(params):
      self._device_params_ids[device_idx] = id(params)
      self._device_params[device_idx] = jax.device_put(
          params, self._devices[device_idx])

    # Return the params that are located on the chosen device.
    device_params = self._device_params[device_idx]
    if len(self._keys) == 1:
      return device_params
    return device_params[self._keys.index(variable_name)]

  def _build_handler(self, handler: Callable[..., Any]) -> Callable[..., Any]:
    """Builds a batched handler for a given callable handler and its name."""

    def dereference_params_and_call_handler(*args, **kwargs):
      with self._mutex:
        # Dereference args corresponding to params, leaving others unchanged.
        args_with_dereferenced_params = [
            self._dereference_params(arg) for arg in args
        ]
        kwargs_with_dereferenced_params = {
            key: self._dereference_params(value)
            for key, value in kwargs.items()
        }
        self._call_cnt += 1

        # Maybe update params, depending on client configuration.
        if self._variable_client is not None:
          self._variable_client.update()

      op = handler(*args_with_dereferenced_params,
                   **kwargs_with_dereferenced_params)

      op = jax.tree_util.tree_map(lambda x: list(x), op)
      return op

    return lp.batched_handler(
        batch_size=self._config.batch_size,
        timeout=self._config.timeout,
        pad_batch=True,
        max_parallelism=2 * len(self._devices))(
            dereference_params_and_call_handler)

def postprocess_data(data):
  if type(data) is dict:
    data = {k: postprocess_data(v) for k, v in data.items()}
    return data
  elif type(data) is list:
    return jnp.array(data)
  elif type(data) is hk.LSTMState:
    return hk.LSTMState(
        hidden=jnp.array(data.hidden), cell=jnp.array(data.cell))
  else:
    raise ValueError(f'Unsupported data type: {type(data)}')

You might have to modify postprocess_data based on the data you pass to the inference server.

Cool, thanks a bunch! I ended up with a similar solution, posting here in case its helpful to you or the next person. Uses this gist that stacks arbitrary pytrees, and then unstacks them to return a list of values. I needed to do some other postprocessing to deal with how acme stacks the observations, but I think that was unavoidable.
# Copyright 2018 DeepMind Technologies Limited. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Defines Inference Server class used for centralised inference."""

import dataclasses
import datetime
import threading
from typing import Any, Callable, Generic, Optional, Sequence, TypeVar
import acme
from acme.jax import variable_utils
import jax
import launchpad as lp

import numpy as np

from jax import numpy as jnp
# from jax.lib import pytree
from jax.tree_util import tree_flatten, tree_unflatten

def tree_stack(trees):
  """Takes a list of trees and stacks every corresponding leaf.
  For example, given two trees ((a, b), c) and ((a', b'), c'), returns
  ((stack(a, a'), stack(b, b')), stack(c, c')).
  Useful for turning a list of objects into something you can feed to a
  vmapped function.
  """
  leaves_list = []
  treedef_list = []
  for tree in trees:
    leaves, treedef = tree_flatten(tree)
    leaves_list.append(leaves)
    treedef_list.append(treedef)

  grouped_leaves = zip(*leaves_list)
  result_leaves = [jnp.stack(l) for l in grouped_leaves]
  # return treedef_list[0].unflatten(result_leaves), treedef_list[0]
  return treedef_list[0].unflatten(result_leaves)

def tree_unstack(tree):
  """Takes a tree and turns it into a list of trees. Inverse of tree_stack.
  For example, given a tree ((a, b), c), where a, b, and c all have first
  dimension k, will make k trees
  [((a[0], b[0]), c[0]), ..., ((a[k], b[k]), c[k])]
  Useful for turning the output of a vmapped function into normal objects.
  """
  leaves, treedef = tree_flatten(tree)
  n_trees = leaves[0].shape[0]
  new_leaves = [[] for _ in range(n_trees)]
  for leaf in leaves:
    for i in range(n_trees):
      new_leaves[i].append(leaf[i])
  new_trees = [treedef.unflatten(l) for l in new_leaves]
  return new_trees

tree_stack = jax.jit(tree_stack)
tree_unstack = jax.jit(tree_unstack)

@dataclasses.dataclass
class InferenceServerConfig:
  """Configuration options for centralised inference.

  Attributes:
    batch_size: How many elements to batch together per single inference call.
        Auto-computed when not specified.
    update_period: Frequency of updating variables from the variable source.
        It is passed to VariableClient. Auto-computed when not specified.
    timeout: Time after which incomplete batch is executed (batch is padded,
        so there batch handler is always called with batch_size elements).
        By default timeout is effectively disabled (set to 30 days).
  """
  batch_size: Optional[int] = None
  update_period: Optional[int] = None
  timeout: datetime.timedelta = datetime.timedelta(days=30)

InferenceServerHandler = TypeVar('InferenceServerHandler')

def reverse_oar_thing(oar_thing):
  from acme.wrappers.observation_action_reward import OAR
  num_things = len(oar_thing.action)
  new_oars = [OAR(
    action=oar_thing.action[i],
    reward=oar_thing.reward[i],
    observation=oar_thing.observation[i]
    ) for i in range(num_things)]
  return new_oars

class InferenceServer(Generic[InferenceServerHandler]):
  """Centralised, batched inference server."""

  def __init__(self, handler: InferenceServerHandler,
               variable_source: acme.VariableSource,
               devices: Sequence[jax.xla.Device],
               config: InferenceServerConfig):
    """Constructs an inference server object.

    Args:
      handler: A callable or a mapping of callables to be exposed
        through the inference server.
      variable_source: Source of variables
      devices: Devices used for executing handlers. All devices are used in
        parallel.
      config: Inference Server configuration.
    """
    self._variable_source = variable_source
    self._variable_client = None
    self._keys = []
    self._devices = devices
    self._config = config
    self._call_cnt = 0
    self._device_params = [None] * len(self._devices)
    self._device_params_ids = [None] * len(self._devices)
    self._mutex = threading.Lock()
    self._handler = jax.tree_map(self._build_handler, handler, is_leaf=callable)

  @property
  def handler(self) -> InferenceServerHandler:
    return self._handler

  def _dereference_params(self, arg):
    """Replaces VariableReferences with their corresponding param values."""

    if not isinstance(arg, variable_utils.VariableReference):
      # All arguments but VariableReference are returned without modifications.
      return arg

    # Due to batching dimension we take the first element.
    variable_name = arg.variable_name[0]

    if variable_name not in self._keys:
      # Create a new VariableClient which also serves new variables.
      self._keys.append(variable_name)
      self._variable_client = variable_utils.VariableClient(
          client=self._variable_source,
          key=self._keys,
          update_period=self._config.update_period)

    params = self._variable_client.params
    device_idx = self._call_cnt % len(self._devices)
    # Select device via round robin, and update its params if they changed.
    if self._device_params_ids[device_idx] != id(params):
      self._device_params_ids[device_idx] = id(params)
      self._device_params[device_idx] = jax.device_put(
          params, self._devices[device_idx])

    # Return the params that are located on the chosen device.
    device_params = self._device_params[device_idx]
    if len(self._keys) == 1:
      return device_params
    return device_params[self._keys.index(variable_name)]

  def _build_handler(self, handler: Callable[..., Any]) -> Callable[..., Any]:
    """Builds a batched handler for a given callable handler and its name."""
    print('[inference_server] calling _build_handler')
    def dereference_params_and_call_handler(*args, **kwargs):
      with self._mutex:
        # Dereference args corresponding to params, leaving others unchanged.
        args_with_dereferenced_params = [
            self._dereference_params(arg) for arg in args
        ]
        kwargs_with_dereferenced_params = {
            key: self._dereference_params(value)
            for key, value in kwargs.items()
        }
        self._call_cnt += 1

        # Maybe update params, depending on client configuration.
        if self._variable_client is not None:
          self._variable_client.update()
      params = args_with_dereferenced_params[0]
      oar_thing = args_with_dereferenced_params[1]
      reversed_oar = reverse_oar_thing(oar_thing)
      recurrent_state_thing = args_with_dereferenced_params[2]
      reversed_oar_stacked = tree_stack(reversed_oar)
      recurrent_state_thing_stacked = tree_stack(recurrent_state_thing)
      to_return = handler(params, reversed_oar_stacked, recurrent_state_thing_stacked)
      unstacked_to_return = tree_unstack(to_return)
      print('[inference_server] returning unstacked')
      return unstacked_to_return
      # return handler(*args_with_dereferenced_params,
      #                **kwargs_with_dereferenced_params)

    to_return = lp.batched_handler(
        batch_size=self._config.batch_size,
        timeout=self._config.timeout,
        pad_batch=True,
        max_parallelism=2 * len(self._devices))(
            dereference_params_and_call_handler)
    return to_return

Great!! BTW if you don't mind, please do share how the performance compares with the standard CPU based inference in your case and whether using InferenceServer helped or not.

We're getting marginally better performance with the inference_server compared to without (2700 FPS vs 2200 FPS, as well as slightly better training steps/second). The key was to instantiate multiple copies of the inference server. I noticed that inference_server had very poor GPU utilization on its own. Ideally we figure out why that is instead of doing multiple.

I managed to get the inference server up. But it gets stuck at the action selection step. Based on my understanding, launchpad only supports calling a CourierNode using python types. However, when passing observations and LSTM states which are usually numpy or jax type objects, the system stops.
Any hints on how this can be handled? I tried using pickle to serialize and deserialize the objects but launchpad doesn't seem to accept byte type objects.

Hey @kinalmehta did you ever figure out how to pass around numpy arrays (or non-python primitives in general) using courier? I am able to pass around python ints and floats, but need to pass around np uint arrays, but as you said, doing that causes the system to stop.

Hi @abagaria, As mentioned here, launchpad seems to work fine with Jax arrays, so i use Jax arrays instead of numpy arrays.


chore(main): release 1.0.0

:robot: I have created a release beep boop
1.0.0 (2024-09-02)
⚠ BREAKING CHANGES

remove verbose type annotation and old testing

Features

add Client class to init (da37298)
check for correct requst encoding (358c3eb)
improve type annotations (d35d015)
simplify config.lua (df80a1c)
updated deprecated vim.fn.json_encode/decode (209fede)

Bug Fixes

add on_exit to chat_completion_create (e20f0cc)
docs: minor typos in ai.txt (ffc1bd8)
env var for groq api key in gh action (fe6cc8e)
regex in match for stdout (f010441)
tutorial on_chat_completion_chunk (67d5eab)
type checking for lua-lang-server (6527047)

Code Refactoring

remove verbose type annotation and old testing (cc5f9e3)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v1.0.0
:sunflower:


add column / badge / check for https://ci.appveyor.com/

Which repos use this, at the moment?

Hm, no idea, actually.  Do you know @dignifiedquire?  or @whyrusleeping?

Looks like only go-ipfs. https://github.com/search?q=user%3Aipfs+appveyor&type=Code&utf8=✓

ok, if only one repo, and no serious plans for more, maybe we should ignore and close this issue.


JOSS paper edits/comments by Chris

Replicating Chris's PR to point to joss-paper
Hi @ashjbarnes @navidcy
Following @aekiss and making my comments through a PR on a separate branch.
I've made a few mostly minor modifications to the paper.md file. I've included a referece to Mike Herzfeld's work developing the original implementation of the radiation boundary conditions in MOM4, which includes a number of rules-of-thumb regarding regional domain parameters (grid resolution, time step, etc..). I also agree with @aekiss that there was a lot of useful information in the commented out sections of the paper, that, if space isn't an issue, I think could be included.
A few brief comments

Worth noting that MOM6, while improving some aspects of the regional modelling, has also lost some capabilities. Noteably, a number of radiative schemes are yet to be implemented on the C-grid. Not sure if we need this level of detail in the paper.
The major advantage of using MOM6 in regional modelling is to access the advantages of the new ocean model (ALE, better tracer advection schemes enabling larger time-steps, etc...);
Do we need step-by-step guide to what inputs are required, and what the expected outputs are? Or is this best handled within the code itself?
How removed from the NCI/Gadi environment do we need to be to make this work open for a general audience?

Great work so far. I don't think you are far from having something ready to submit.

Worth noting that MOM6, while improving some aspects of the regional modelling, has also lost some capabilities. Noteably, a number of radiative schemes are yet to be implemented on the C-grid. Not sure if we need this level of detail in the paper.

True. But let's not start comparing MOM5 and MOM6 in this paper. It's beyond the scope. We should only mention what is relevant for the package.

The major advantage of using MOM6 in regional modelling is to access the advantages of the new ocean model (ALE, better tracer advection schemes enabling larger time-steps, etc...);

Good point!

Do we need step-by-step guide to what inputs are required, and what the expected outputs are? Or is this best handled within the code itself?

It can go either way. At the moment we mention briefly and point to the documented examples.

How removed from the NCI/Gadi environment do we need to be to make this work open for a general audience?

We need to be totally removed! A package cannot be only applicable to particular machine. Imagine the Nature paper titled "Array programming with NumPy on Australia's Gadi HPC". I doubt it would have the same audience...
Why you ask @ChrisC28 -- did you have anything in mind? As it stands now the package is completely removed from NCI-specifics. Only one of the two examples is NCI-specific, the one that uses ACCESS-OM2 output as forcing. But our plan is to remove this example from the package's documentation and move it to the cosima-recipes (see https://github.com/COSIMA/cosima-recipes/issues/326) and then add a link to the cosima-recipes in this package's docs.

Thanks Chris! I suggest we have a discussion here and resolve Chris's dot points one by one.
Regarding the commented out sections, given the feedback of @aekiss and @ChrisC28, I'll put them back in in this PR and then @navidcy perhaps we could then re-trim them with any information you think is excessive?

I tend to agree that these details might be beyond what we need to include
This is a good point though and helps to contextualise why it's worth investing in MOM6 tools|
Inputs should be clear from the README of the package itself, but I hadn't thought about the outputs. I think the output files themselves ought to be expanded on in the documentation, if not the paper. Do you think it's sufficient that we say the package generates everything that's needed to run MOM6 except the executable itself without listing and explaining all of the components?
At this stage it's pretty devoid of NCI specific stuff (except for the access om2 example which we're still trying to migrate to cosima examples). One payu-centric thing is still present ( #93 )

Let's merge this and then bring back the commented txt after we first ensure that appropriate modifications occur so that the text flows?

Let's merge this and then bring back the commented txt after we first ensure that appropriate modifications occur so that the text flows?

Sure sounds good! I'm happy with Chris's changes but can't approve now that it's my PR of course. I'll take your lead on bringing back the text since I'm sure I'll make a big git mess...

@ashjbarnes I approved the PR but I also made some suggestions. Could you have a look and commit them if you agree or modify wherever you feel?


Regional news feed name

The feed_name param was missing for the regional news item added in #266
http://gitlab.mobicage.com/rogerthat/apps/commit/b62ce5cd083648e08e150ad23883d546809d4466

http://gitlab.mobicage.com/rogerthat/app-configurator/merge_requests/60


bogus debug information repeated less than 1ms appart

Expected Behavior
Getting none duplicated messages almost instantly
...
Actual Behavior
getting lots of duplicated messages
...
Steps to Reproduce the Problem

run docker image v0.24.0

Logs, error output, etc.
2018-10-25 10:59:37.423 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10155 ms for the next connection 2018-10-25 10:59:37.423 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10155 ms for the next connection 2018-10-25 10:59:37.423 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10155 ms for the next connection 2018-10-25 10:59:37.424 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10154 ms for the next connection 2018-10-25 10:59:37.424 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10154 ms for the next connection 2018-10-25 10:59:37.424 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10154 ms for the next connection 2018-10-25 10:59:37.424 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10154 ms for the next connection 2018-10-25 10:59:37.424 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10154 ms for the next connection 2018-10-25 10:59:37.425 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10153 ms for the next connection 2018-10-25 10:59:37.425 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10153 ms for the next connection 2018-10-25 10:59:37.425 [info] <0.1250.0>@aec_peers:on_add_peer:1048 Peer "pp_xpDYTSi...Yva4xN2" - ignoring peer address changed from <IP_ADDRESS>:3015 to <IP_ADDRESS>:3015 by <IP_ADDRESS> 2018-10-25 10:59:37.425 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10153 ms for the next connection 2018-10-25 10:59:37.426 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10152 ms for the next connection 2018-10-25 10:59:37.426 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10152 ms for the next connection 2018-10-25 10:59:37.426 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10152 ms for the next connection 2018-10-25 10:59:37.426 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10152 ms for the next connection 2018-10-25 10:59:37.427 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10152 ms for the next connection 2018-10-25 10:59:37.427 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10151 ms for the next connection 2018-10-25 10:59:37.427 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10151 ms for the next connection 2018-10-25 10:59:37.427 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10151 ms for the next connection 2018-10-25 10:59:37.427 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10151 ms for the next connection 2018-10-25 10:59:37.428 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10150 ms for the next connection 2018-10-25 10:59:37.428 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10150 ms for the next connection 2018-10-25 10:59:37.428 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10150 ms for the next connection 2018-10-25 10:59:37.428 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10150 ms for the next connection 2018-10-25 10:59:37.429 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10149 ms for the next connection 2018-10-25 10:59:37.429 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10149 ms for the next connection 2018-10-25 10:59:37.429 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10149 ms for the next connection 2018-10-25 10:59:37.429 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10149 ms for the next connection 2018-10-25 10:59:37.429 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10149 ms for the next connection 2018-10-25 10:59:37.430 [debug] <0.1250.0>@aec_peers:schedule_connect:723 Waiting 10148 ms for the next connection
This will flood the disk with logs so fast
Specifications
Virtualization: version 18.06.1-ce, build e68fc7a
Hardware specs:
RAM: 4gb
CPU: 2.4GHz 2xCores
OS: Centos 7
Node Version: aeternity/epoch:latest (36c969d29950) 0.24

I found out there is a PR for a Log level configuration at #841 and it has been completed, but I can't find any examples anywhere on how to use it, and I tried adding "debugging:" and "level: "error"" to the yaml file and it removed the messages from the log files.

I found out there is a PR for a Log level configuration at #841 and it has been completed, but I can't find any examples anywhere on how to use it, and I tried adding "debugging:" and "level: "error"" to the yaml file and it removed the messages from the log files.

I'm not sure what you mean, but to lower the log level you could use:
logging:
    level: warning

or
logging:
    level: error

In your configuration file.

yeah, that is what i did, but it still shows a lot of info messages on docker logs. why does it have to tell me repeatedly how many miliseconds it has to wait several times per milisecond?


Vote buttons status doesn't change when downvote is turned to upvote or vice-versa.

Fixed in d9baf6458bb8c127e513d355afa39740a940ecad.


Batch cherrypick default-value prs to release-5.2

What problem does this PR solve?

This is the batch cherry-pick of #3846 #3930
close issue：#3793 #3929 #3918
Release note
Fix column default value type unsupported problem and data inconsistency issue.

/run-all-tests

/run-verify

/run-verify

/run-verify

/run-cla

/run-all-tests

/run-integration-test

Codecov Report

:exclamation: No coverage uploaded for pull request base (release-5.2@ee1ad70). Click here to learn what that means.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             release-5.2      #5156   +/-   ##
================================================
  Coverage               ?   57.6721%
================================================
  Files                  ?        193
  Lines                  ?      19434
  Branches               ?          0
================================================
  Hits                   ?      11208
  Misses                 ?       7235
  Partials               ?        991

/run-all-tests

/run-kafka-integration-test
/run-leak-test

/run-all-tests

/run-kafka-integration-test

/run-kafka-integration-test

/merge

/run-integration-tests


Add categories for the password list to sort them better.

Maybe it's easier to save something like a path to every password item and use it while loading the treeview, instead of saving the hole thing as a tree structure.


Upgrade KPL from 0.12.7 to 0.12.11

See https://github.com/awslabs/amazon-kinesis-producer#release-notes

Thanks!


Farmer's Delight Update Broke cutting board recipes

The newest update broke all the recipes for cutting boards/using cutting boards. Just letting you know

Appreciate the interest, I'm fully aware of the update. It didn't break anything, as it doesn't apply to knives :)

Err, it does apply to knives. I just checked. Filets/stuff from aquaculture aren't working currently.

That may be because you aren't using a fillet knife

Right, I got a filet knife, put it on cutting board and attempted to use it for filet, didn't work

Most of the cutting board recipes are default recipes for farmer's delight

Ok, that's quite odd. I do not have the same issue at all.

Make sure you have all your mods up to date and to rule out all other possible causes. Reinstall the mod, maybe...

There really isn't a way for it to work for me but not for you

corrupted download, on my end.
my bad


Fix Style/ClassEqualityComparison autocorrection within module

In the situation where Module.nesting is not empty, bar.class.name == 'Bar' and bar.instance_of?(Bar) yield different results.
This is a simple example of the problematic case:
(In reality, it is more complicated because constant search is done by tracing back to ancestor inheritance tree)
module Foo
  class << self
    def bar1?(value)
      value.instance_of?(Bar)
    end

    def bar2?(value)
      value.class.name == 'Bar'
    end
  end

  class Bar
  end
end

class Bar
end

p Foo.bar1?(Bar.new) #=> false
p Foo.bar1?(Foo::Bar.new) #=> true

p Foo.bar2?(Bar.new) #=> true
p Foo.bar2?(Foo::Bar.new) #=> false

So I changed it to prepend :: in those situations.

Before submitting the PR make sure the following are checked:

[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Wrote good commit messages.
[ ] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[x] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

Good catch! Thanks!


Remove a bunch of deprecated methods from GVRHybridObject

GearVRf-DCO-1.0-Signed-off-by: Mihail Marinov<EMAIL_ADDRESS>

If there are no comments, will merge lunch-time on Tuesday.


[BEAM-1336] Separate StateSpec and KeyedStateSpec

Before this change, almost all uses of state had a type variable that
existing only to support the esoteric use of a KeyedCombineFn in
a state cell. Now those cases use a more verbose form of KeyedStateSpec.
Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

[x] Make sure the PR title is formatted like:
[BEAM-<Jira issue #>] Description of pull request
[ ] Make sure tests pass via mvn clean verify. (Even better, enable
Travis-CI on your fork and ensure the whole test matrix passes).
[x] Replace <Jira issue #> in the title with the actual Jira issue
number, if there is one.
[x] If this contribution is large, please file an Apache
Individual Contributor License Agreement.

Run Dataflow ValidatesRunner

Run Flink ValidatesRunner

Coverage increased (+0.004%) to 70.295% when pulling c05bda1a5922e18ab29022403f7b9e00f4cea941 on kennknowles:StateSpec into b3827955e3898b5f39d5b45db40c884b92cd3cef on apache:master.

This will be revamped after #2636 removes the need for keys entirely.

This is now just including #2636 to get ahead of the conflict resolution that is be needed.

Coverage decreased (-0.01%) to 70.134% when pulling 741a88b0e7a1d6b7e81ba5dffa44a30a21e20cbf on kennknowles:StateSpec into 1197bef19b3ef974cdab39bd0468050586f17649 on apache:master.

run dataflow validatesrunner

There a (slim) chance that this might pass without a worker build. Most of the rawtypes should be the same. To avoid so much churn there, I'll iterate a couple times to see if I can get runtime compatibility while other PRs go through the new worker process.

run dataflow validatesrunner

R: @tgroh it looks like it is still bytecode compatible, huzzah.

The only failure in the postcommit was the new AvroCoder test, which fails in that context.

Coverage decreased (-0.001%) to 69.841% when pulling 190422cac34732ad722d58d2fecf03571f5f08e9 on kennknowles:StateSpec into eec903fb538eb9c3d41d737dba94a41f7c1c469e on apache:master.


Adding version 1.31

I’m trying to play LAN online with friends. But our version is 1.31.
Could you help to update it to work with the version we use.
https://drive.google.com/file/d/1L3H2U7S4X3LxDZpHM0sYINtbzjcC6B5V/view?usp=sharing
here is our warcraft version. Thank you so much.

For WC3, you do not need this program anymore. Blizzard integrated Bonjour Service in the last versions of WC3, allowing automatic discovery of hosted WC3 games on a local network.


Adding link to demo website on website top menu

Adding the link to the demo website - https://try.a11y-theme-builder.finos.org/
I wonder if this is the right syntax, and if there are better ways to do this in mkdocs; maybe there is a better way to show it, like ribbons?

Sorry Mao, was laid up for a week and just got around to trying this.  It certainly works, so the code is fine.  I'll discuss at tomorrow's meeting to get usability feedback.  When the user clicks on "Demo", it is not opening a new window containing the demo but rather replacing the docs site with the demo, which might confuse a user since the  "Demo" menu item looks like all of the other menu items.  We could maybe put an icon next to it to indicate that it launches something, I don't know.  Will ask the experts.

maybe there is a better way to show it, like ribbons?

Can you expand on what you meant about "ribbon"?  If you can give me an example, I'm happy to pass that on to our usability people during our discussion.  Thanks!

Hi @aaronreed708 ! Agreed on opening the link on a new tab, and signal that it's an external link, somehow; I've never used mkdocs, so I'll defer to you on how to accomplish it.
Re. ribbons, this is what I meant - https://github.blog/2008-12-19-github-ribbons/ ; not sure if mkdocs provides support for similar elements.
Thanks!

I have not yet figured out how to add an icon to the nav bar.  We could either bring the link down into the left nav on the main page or it might be possible to open a link in the top nav bar in a new browser window and we just do that for now until we can configure the icon.

I have not yet figured out how to add an icon to the nav bar. We could either bring the link down into the left nav on the main page or it might be possible to open a link in the top nav bar in a new browser window and we just do that for now until we can configure the icon.

Sounds like a plan, thanks @aaronreed708 !

I think that this PR can be closed.  This work was completed on https://github.com/finos/a11y-theme-builder/pull/821 and is currently on the dev branch.


Error exec $SHELL on elementaryos

i am elementary user, i want to install rbenv with this tutorial https://gorails.com/setup/ubuntu/16.04
but if i run exec $SHELL, error like this:
suganda@toshiba:~$ exec $SHELL
bash: /home/suganda/.bashrc: line 171: syntax error near unexpected token PATH="$HOME/.rbenv/bin:$PATH"' bash: /home/suganda/.bashrc: line 171: esacexport PATH="$HOME/.rbenv/bin:$PATH"'
how to fix this?

Add a newline between asac and export.
I think your .bashrc did not have final newline before echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc.

ok, thank you. works!

This can be closed.


Feature/frontend/schedule

Description

Create a schedule for employee
Show the schedule in calendar format
show the appointment history
Calculation the salary base on appointment and method user chosen

Related Jira Issue (ID/URL)
https://rtterror.atlassian.net/jira/software/projects/RTTER/boards/1?selectedIssue=RTTER-209
https://rtterror.atlassian.net/jira/software/projects/RTTER/boards/1?selectedIssue=RTTER-409
Related GitHub Issues

This fixes #5.

Checklist

[x] Code compiles correctly
[ ] Code is covered by current tests or new tests
[x] Code is formatted correctly
[ ] Extended the README / documentation, if necessary

Comment/Discussion

@kimchhengheng there is conflict. please resolve it


Check if we actually have the language before giving it to a user

Users from GB or CA are currently being assigned languages we don't support when they register (Thor), drupal gives them English instead of Global english.
We should have checks to prevent this from happening and give them global english instead.

@mikefantini says this is blocking prod deploy


Add elm-live functionality.

Self explanatory from readme.
BTW, testbox is pretty broken. I want to try and cobble something together of it.
What is your intended difference between lightbox and testbox?

I redepolyed your Lightbox.sol contract. For some reason your add_ function always returned zero.

Thanks @JasoonS
Most of my testing and fiddling is happening under Lightbox. Testbox existed mainly to give @ngmiller a way to mess around without disrupting each other's contract interfaces.
The naming is admittedly odd. It originates from a contract I had called HodlBox, which I "lightened" up to use as the basis for an elm-web3 test contract. Things have since changed greatly, and will continue to do so till I am satisfied with the coverage attained. I will then start working on a more static test suite (see wiki), which will be much cleaner and will not be subject to much change (unless API changes are made).
I'll merge this since the changes are pretty marginal (and elm-live is nicer than my current SimpleHTTP 👍 ) , but the contract will change as time goes on.
My goal is to have a contact which covers all the variety of possible return types, as well as the variety of event return types.

Ok, np :)
Interesting regarding the tests, I'll be interested in seeing that all tie together.
I think it is good practice to always commit the contract abi and deployed address with any changes to the contract anyway for the sake of collaboration.
I want to work out lists as inputs and returns of solidity functions, so I'll add that to the contract too.


Finally, after #21, updating the URL of the TIF to this own repo

Finally, after #21, updating the URL of the TIF to this own repo

I couldn't make all these changes on a single PR with github
Basically this PR concludes PR #21


Latest SDK implementation

Login with the latest sdk.openlogin.com.

Use AuthenticationServices for in-app authentication with shared browser storage.

Improve API (inspired from Auth0).

Refactor project structure.

Add docs in code comments (IDE/XCode quick helps).

Notes: This PR doesn't support iOS <=11 yet, there will be another PR for that.

Closed in favor of #4


Great work, consider adding a feature to rotate background images on an interval

I use variety for my desktop backgorund. I'd love to be able to point atom at my directory of background images and have it rotate through those images on a timer.  Ideally when changing background, it should do a smooth blended transition.

this is really good idea thanx :+1:

closing, cleaning


Cannot mock some things becuase they are extension methods

I notice that you do have a IValidator which is great because I can mock them in a unit test. But for some of the documented methods they are extension methods in DefaultValidatorExtensions.
Is there a particular reason for this? What I want to be able to do is test my business service to ensure the correct rule is being applied without acutally having to have the instance (just using a mock). For example using Moq and Xunit I have a test like this:

        [Fact]
        public void GetPurchasePrice_ReturnsErrorResult_NoValidPurchasePrice()
        {
            //arrange
            var portfolioProperty = new PortfolioPropertyModel()
            {
                PropertyDetail = new PropertyDetailModel
                {
                    LastPurchasePrice = -1M
                }
            };

            var validationResult = new ValidationResult(new List<ValidationFailure>
                                    {
                                        new ValidationFailure("Property","Error")
                                    });

            _portfolioPropertyCalculationPropertyValidator.Setup(pv =>
                    pv.Validate(It.Is<PortfolioPropertyModel>(v => v == portfolioProperty),
                                It.Is<string>(v => v == ValidationRuleSets.PortfolioPropertyModelForCalculationValidator.HAS_VALID_PURCHASE_PRICE)))
                                .Returns(validationResult);

            _calculationResultFactoryMock.Setup(tc =>
                    tc.CreateFromError<decimal>(It.Is<IList<string>>(v => v.First() == validationResult.GetErrorStrings().First())))
                    .Verifiable();

            IPortfolioPropertyCalculationEngine sut = new PortfolioPropertyCalculationEngine(_propertyCalculatorMock.Object,
                                                             _calculationResultFactoryMock.Object,
                                                             _loanCalculationEngine.Object,
                                                             _portfolioPropertyToWithCalculationsTranslator.Object,
                                                             _portfolioPropertyCalculationPropertyValidator.Object);

            //act
            var result = sut.GetPurchasePrice(portfolioProperty);

            //assert
            _calculationResultFactoryMock.VerifyAll();
            Assert.True(result.Error);
        }

This is not possible however since the overload with ruleSet parameter is a static extension method... Is there any reason why it couldn't be on the IValidator interface?
Incidentally that was the mistake I had make in the other issue I opened.. Not including FluentValidation namespace correctly.

I really wouldn't recommend this approach.
Don't try and mock individual aspects of FV...either hide the entirety FV
behind your own interface, or better still, have some test helpers for
building valid/invalid objects, so you don't have to mock FV at all.
Mocking tends to lead to very brittle tests, so I'd suggest avoiding it
unless absolutely necessary.

Thanks for that. I ended up going that way and just using the actual validator instances in the business logic that was using it.
Is that what you meant? OR am I misunderstanding your comment.

Mocking in this ay tends to lead to very brittle tests
Could you please elaborate on this?

So far I can easily mock validators derived from AbstractValidator. As long as I am not using RuleSet's...
Unfortunately using real validators in unit tests is cumbersome due to fact that they do have additional dependencies that needs to me mocked.

Mocking is for testing how your code interacts with a particular contract or protocol.
As an example, if you have some code that interacts with a web service and you want to test how your code acts depends on different responses from this service, then you'd extract the true implementation of the web service API behind an interface (the contract), and supply a mock version that can supply different results in your test. This is an appropriate use of mocking as you're testing the interaction with a contract (the interface) not a concrete implementation.
Don't mock classes. A class is not a contract- it's an implementation.
As I mentioned above, I'd suggest using the real validator instances. If this really won't work for you then define an interface contract for validation, hide FluentValidation behind this and mock this in your tests. Don't mock FV directly.

Don't mock classes.

I don't :). I am mocking IValidator. Which lack easy way of mocking RuleSet calls. Since they are dispatched via extension.

you can use rulesets without these extension methods by just building up a ValidationContext

I saw this way when I was digging into extension methods. I don't want to use this approach exactly because extension methods exists: it is requires more code to use it. And what is more important: mocking & putting expectation on IValidator.Validate(ValidationContext context) method is much more complicated.
At the moment I am using following mock when rule sets are used:
var validator = MockRepository.GenerateStrictMock<IValidator<IModel>>();
validator.Expect(b => b.Validate(Arg<ValidationContext>.Is.Anything))
    .Return(new ValidationResult());

However with this approach I am lacking check on rule name. I may mock it that way with rule name check:
validator.Expect(b => b.Validate(Arg<ValidationContext>.Is.Anything))
    .Callback((ValidationContext vc) => ((RulesetValidatorSelector)vc.Selector).RuleSets.Contains("Delete"))
    .Return(new ValidationResult());

But this is fall under 'do not depend on internal behavior of library'.


Statusbar sometimes not hidden on Android

Code to disable status bar completely:
SystemChrome.setEnabledSystemUIOverlays([]);
On iOS it works perfect.
On Android most of the time as well. If I opened the keyboard, it gets messy and it's not hidden anymore.
Workaround: closing the app or putting it in the background - but it should not be like that
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.3 18D109, locale de-CH)
    • Flutter version 1.2.1 at /Users/defuns/Development/Tools/flutter
    • Framework revision 8661d8aecd (4 weeks ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/defuns/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/defuns/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/defuns/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 33.4.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

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

[✓] Connected device (1 available)
    • Philippe • 00008020-000A615C11E2002E • ios • iOS 12.1.4

• No issues found!

Happens to me as well.
Can you fix this or provide a workaround?
@Android Galaxy S8

related ticket Keyboard appearance destroys SystemUIOverlays settings https://github.com/flutter/flutter/issues/24494

Merging into 28426


Allow selecting directories.

Currently, you can only select files.

As of now, I was able to drag and drop folders.


[Draft][ENG-688] Validated Form-Controls

Purpose
In preparation for registries submission forms, we need to create form controls that take a changeset and output a group of form elements.
Summary of Changes

Add form-controls component
Add form-controls section to handbook
Update x-input-wrapper on the validated-input component to take in an optional id param

Side Effects
N/A
Feature Flags
N/A
QA Notes
This isn't being used anywhere on the site yet, so it shouldn't need QA.
Ticket

https://openscience.atlassian.net/browse/ENG-688
Still to do

[ ] Add tests
[ ] Update changelog
[ ] Put back form elements (recaptcha)

Reviewer Checklist

[ ] meets requirements
[ ] easy to understand
[ ] DRY
[ ] testable and includes test(s)
[ ] changes described in CHANGELOG.md

Pull Request Test Coverage Report for Build 3165

6 of 7 (85.71%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.04%) to 75.556%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

lib/osf-components/addon/components/form-controls/component.ts
6
7
85.71%

Totals

Change from base Build 3163:
-0.04%

Covered Lines:
6867

Relevant Lines:
7989

💛  - Coveralls


Custom Algorithm To Generate One Hash For All Files

How do I  configure cache buster to use an algorithm that returns ONE  hash to be used across all files.

I have the same question.


How to have multiple view linked to the same viewmodel

I have a decently complex model, that need translating into a proper viewmodel. Maping array of numbers to rgb colors, populating attributes that makes sense for the viewmodel but not the model.
Theres different view of that viewmodel that I would like to do, whats the proper way?
for example, I want to do a listbox displaying a simple view of the object, and on the side a detailed view of the selected one. The master/detail sample only show simple items that need no viewmodel in the listbox and I havent found another place where different view are linked to a viewmodel.

I'd probably write that VM as an object which inherits from PropertyChangedBase, then write two VM's (one for the master, one for the detail) which both expose this VM as a property. Those master/detail views can bind through into this shared VM as needed
There's no out-of-the-box support for multiple views per VM, simply because the built-in view location logic can't support it. If you want to write your own view-location logic, implement your own IViewManager (there's an example of this in the samples folder).


UI constraint for EditFragment

There are UI issues when using devices with smaller screens. For example the emotion grid view appears off screen.

Great job @graysongermsheid "Oh, I think I fixed it... oh wait... nvm..." #128


remove angle bracket when "set wrap"

Instructions: Replace the template text and remove irrelevant text (including this line)
Describe the bug
As shown in the below scrrenshot, vim is adding "<" (angle bracket) when "set wrap", which makes it difficult to copy text.
To Reproduce
Expected behavior
Screenshots

Environment (please complete the following information):
remote:
by ssh

VIM - Vi IMproved 7.4
OS: 3.18.6-2.el7.centos.x86_64

local:

OS: ubuntu 16.04
Terminal: GNOME Terminal

Additional context

Are you talking about > at the end of a line, when there is a double-width char that does not fit? Why are you not copying using the clipboard?

Indeed, to copy text to the clipboard by Vim means, visually select what you want to copy, then use "+y or (in gvim) Edit→Copy. These "filler halfwidth characters" won't be copied.

aha.. looks this is not a problem ..
i guess you used to use 'mouse' to select & copy, right ? otherwise, how came that '>' copied,
if so, just 'cat' and/or 'less' it first, problem solved ! :) :) :)


breadcrumbs.selectEditor command doesn't work when focused on last element

What is your assigned keybinding? Is it Esc or all those buttons together? Are you really pressing Shift, Ctrl, Alt, and Esc at the same time?

All keybinding are default. I'm pressing

ctrl + shift + . to focus on the breadcrumb
esc for breadcrumbs.selectEditor

Still unclear if you press just ESC or ESC with Shift, Ctrl, Alt held?

Just Esc in the gif Shift, Ctrl, Alt are grayed out which means not pressed.

Ok, does ESC work inside the editor? E.g select text and press ESC? What version is this? Does this happen without extensions enabled?

Also, run F1 > Log Level > Trace, then repro this issue and open the Window Log. It should show what it has executed, something like this
[2019-06-07 17:56:34.688] [renderer1] [trace] telemetry/workbenchActionExecuted {"id":"breadcrumbs.focusAndSelect","from":"keybinding"}
[2019-06-07 17:56:34.688] [renderer1] [trace] telemetry/breadcrumbs/select {"type":"symbol"}
[2019-06-07 17:56:36.277] [renderer1] [trace] CommandService#executeCommand breadcrumbs.selectEditor
[2019-06-07 17:56:36.281] [renderer1] [trace] telemetry/workbenchActionExecuted {"id":"breadcrumbs.selectEditor","from":"keybinding"}

Yes esc works in the editor
Version 1.35
Doesn't happen with extensions disabled because then the last element with the symbols list is not available
Logs aren't really helpful, when I press esc doesn't show nothing

[2019-06-07 11:12:00.768] [renderer1] [trace] CommandService#executeCommand _executeCodeLensProvider
[2019-06-07 11:12:01.760] [renderer1] [trace] CommandService#executeCommand breadcrumbs.focusAndSelect
[2019-06-07 11:12:02.694] [renderer1] [trace] CommandService#executeCommand _executeCodeLensProvider
[2019-06-07 11:12:03.391] [renderer1] [trace] CommandService#executeCommand list.focusDown
[2019-06-07 11:12:03.690] [renderer1] [trace] CommandService#executeCommand _executeCodeLensProvider
[2019-06-07 11:12:03.781] [renderer1] [trace] CommandService#executeCommand list.focusUp
[2019-06-07 11:12:04.421] [renderer1] [trace] CommandService#executeCommand list.focusDown
[2019-06-07 11:12:05.197] [renderer1] [trace] CommandService#executeCommand _executeCodeLensProvider

Doesn't happen with extensions disabled because then the last element with the symbols list is not available

Well, you should always see the file path with its last element. When it comes to ESC there is no difference if its a file or symbol. So, please try that again

Doesn't happen with extensions disabled because then the last element with the symbols list is not available

⬆ This only happens when I tested it with a C++ project.
With a typescript project (vscode project) it happens even with extensions disabled because I still get the symbols list.

Well, idk - it seems like Esc isn't being dispatched at all. Does it work with other things? Eg. select some text in the editor, hit Esc, and the selection should collapse back into a cursor

Yes, Esc works as expected in any other case. In the gif you can see I use it to close the notifications and also when invoking breadcrumbs.selectEditor on the browser and repl.ts breadcrumbs but does not work when SelectReplAction and run breadcrumbs are focused (symbols list displayed).

@jrieken  I did some debugging and found the root cause. It's because the BreadcrumbsOutlinePicker tree is using OutlineNavigationLabelProvider which has a method mightProducePrintableCharacter that calls this which is saying the esc key is a printable character causing abstractTree to catch that keydown event and calling stopPropagation().

Wow - that's a solid investigation. Thanks. The context is that when pressing a key we need to know if you wanna filter/find in the tree or not. That's why we call the infamous mightProducePrintableCharacter function. If we believe that you are typing "visible" characters the tree consumes the event and start filtering - in your case using Esc. Now the question is why is that? We do have a native module that computes what physical key (and key combination) produces what character. Can you check this troubleshooting guide which is about keybinding issues: https://github.com/microsoft/vscode/wiki/Keybinding-Issues#troubleshoot-linux-keybindings. Can you also debug till here https://github.com/microsoft/vscode/blob/402aa47b262601bf7569a5558d42b398e418361e/src/vs/workbench/services/keybinding/browser/keybindingService.ts#L444 and share the keyInfo, esp its value?

I followed the guide and tried using "keyboard.dispatch": "keyCode" but didn't help.
keyInfo.value =>

Also the keyboardNavigationLabelProvider provided to the BreadcrumbsFilePicker tree doesn't have a mightProducePrintableCharacter method  and uses this one from listWidget instead here.

@jrieken Summarizing what I found until now:

OutlineNavigationLabelProvider doesn't need to have mightProducePrintableCharacter defined because it will be overwritten here either way https://github.com/microsoft/vscode/blob/3718e799834243b2124e51a1505bc13d796d3eb8/src/vs/platform/list/browser/listService.ts#L215-L222
BreadcrumbsFilePicker works as expected because the underlying tree which is AsyncDataTree ignores the mightProducePrintableCharacter method
https://github.com/microsoft/vscode/blob/6a7020dd4a11e0f33b157b3df4baeec90d85701b/src/vs/base/browser/ui/tree/asyncDataTree.ts#L227-L231 and uses this one instead https://github.com/microsoft/vscode/blob/6a7020dd4a11e0f33b157b3df4baeec90d85701b/src/vs/base/browser/ui/list/listWidget.ts#L326-L334

Yeah, the irony is that the simple implementations, as in listWidget, are actually more error prone because they miss things like ü, ß, ø etc. That's why we use information "from the keyboard/os" instead of just assumptions.
So, the real question is still why doesn't Esc produce a printable character on your machine and how can we workaround this. We could simply hardcode Esc to be ignored - I think that's a fair assumption and I don't know anyone that rebinds Esc to lets say "f"

I have pushed a workaround, this is something @rebornix or @alexandrudima need to look into tho. Not sure if this is an issue with our key mapping or your setup...


Different background color to even and odd rows in ListView

Category
[? ] Enhancement
[? ] Question
Version
Please specify what version of the library you are using: [    3.6.0     ]
Expected / Desired Behavior / Question
Is there a way to Style even and odd rows in ListView with different color?

@Ofer-Gal thanks for the suggestion.
@milanholemans more than happy to get a PR with the change :) Any improvements are welcome.
Please just keep in mind to make the property optional and disabled by default, so anyone upgrading versions would not experience a different behaviour by default.

@AJIXuMuK
What will the property be? or How would I get it to work?

As far as I know I'm afraid the answer is no. Although this seems relatively easy to implement by exposing an extra property called 'onRenderRow' used in this example. I can add this, but it's not up to me to decide whether or not to add it.

@Ofer-Gal you can use the same approach as in the example linked above.

Hi @milanholemans,
The example given at example is not working for listView control. It is giving below error. Can you please check?

Hi @SharePointReady, I think the issue is that an SPFx web part and PnP SPfx controls are targeting a different version of fluent UI. An SPFx web part uses version ^8.106.4, SPFx controls use 8.106.4 strictly.
I suggest that you run npm i<EMAIL_ADDRESS>-SE so you're always on the same version of Fluent UI.


Code cleanup?

I was wondering if you’d be interested in some code clean-up?
There are currently a few issues that make maintaining the code hard:

duplicate calls (e.g. Setting HTML in Line 795 but again in Line 92 from within a function call)
generally repeated code in different if-else branches
not clearly named variables
Very mixed indentation

This was a bit confusing when I submitted the PR for the community lists. If you prefer it that way, no sweat, just thought I’d post an issue to offer doing some clean-up ;)
If you would like that, two options:

A giant PR that mostly fixes all of those
several smaller PRs, one for indentation, one per function cleaned, etc.

In case I do that, it might also be best to coordinate that no major functionality work happens at the same time, I’d guess I could get through that in one day.

Hey, that's a really nice offer! I am admittedly a very much an amateur at all of this so my code is spaghetti and all my college computer science courses didn't stick because I never used them beyond my small amateur attempts at doing things. I write powershell and bash scripts normally!  I'm a sysadmin that is honestly just playing around. So, anyone that is used to this work like yourself I whole definitely welcome. I am however worried that if the code was "cleaned up" that I would just junk it up again due to being such an amateur and I would hate to waste someones time on that. So, currently I am a yes for your offer but I really would never want someone to waste their time and effort... If you did clean it up I would try my best to keep it in line with what you would provide. Alternatively, waiting for this to develop further may be of benefit before it is cleaned up as to not make it necessary again in the relatively short future. I am learning as I am going and I believe I am getting better with each iteration I am doing and I know I need to make it more readable to someone else.
Let me know your thoughts and thank you so very much.

I lied! I did a small commit this evening! Thank you for the communityArray join help. I was intending to figure out how to fix that... eventually. Viele danke!

Eh, I very much appreciate the work you have already done. I’m not one for maintaining or starting such projects :D
The longer one waits, the harder it actually becomes. Even just incremental cleaning after a few weeks is far easier than figuring it out later ;) I should be pretty free on Sunday, so I’ll target that day for now :)

I was bored because the twitch stream I normally watch in the morning had technical issues, and so I started on this ;) The current version is here:
https://github.com/Christoph-Wagner/LemmyTools/blob/cleanup/lemmyTools.js
It is very buggy right now, something is going on with the animations that breaks things (honestly, CSS animations are not something I ever understood how to use :D), and none of the sidebar things work properly. But this version now has proper scripts instead of strings added to the document (I’m guessing there’s some permission issue that’s wreaking havoc because of that), which already allowed my IDE to find several issues automatically.

Hey that's awesome. I'll check this out when I'm home later or tomorrow. I was just about to push an update later today but I might wait. I wrote an open all images button (or setting) that lots of people have been asking about. I'm excited to see what you've done. Thank you.

@Christoph-Wagner THIS IS SO GREAT! THANK YOU. I got to take a look at it tonight. Very cool! I am not going to push anything for the next few days so please feel free to do your thing if you feel like it and then we can work on taking it back together and runnign with. Don't worry, I can handle the CSS. I know you could figure it out if you wanted to learn. It is confusing because there isn't any logical code to follow.
I did push <IP_ADDRESS> that added some new features tonight. Hope that wasn't a problem. No more from me for a few days. Thanks again.

Everything but search seems to be working, once that does, I’ll need to do some testing of all the features. Then I’ll add your last change.
I’m making lunch now, should be able to finish everything later today. Feel free to look through the code if there’s anything that’s not clear to you.

Looking good! I am going to really dive into it later this evening or tomorrow to try and understand. It appears to be working and you are doing things in much more efficient and "smarter" ways than I was. And to be honest, teaching me a ton! Getting rid of the `` blocks is so much easier. It's going to take me a bit to understand everything but It's fantastic and much clearer code.
This is the first time I've ever collaborated with someone on anything I've done and I truly appreciate you.
More to come when I get some time to "digest" this code!

Closing issue.


PCL compatibility

Hey, is there a way to add ZXing.Net.Mobile to a PCL library project?

ok nervermind, just saw #148


cmd/compile: slicing rules too restrictive for generic slice operands

Reminder issue.
Currently not permitted (no structural type):
func _[S []byte|string](s S, i, j int) S {
   return s[i : j]
}

A little bit tricky to get right because we sometimes have to preserve the string type.

Is this the same problem?
func Entry[T []int | map[int]int](c T, i int) int {
	return c[i] // invalid operation: cannot index c (variable of type T constrained by sliceOrMap
}

Not quite the same problem (simple indexing rules are more relaxed) but similar: we don't allow mixing maps with non-map types for indexing. Maps just behave very differently than slices. Also, we don't have strong reasons (yet) that suggest that this must be permitted.
We are aware that per the generics proposal this could or even "should" work.  But the generics proposal is not very specific with the rule details. For 1.18 and the spec (in the process of being written) we need to be very specific.
In short, for 1.18 we play it somewhat conservative. It's easy to relax the rules down the road, but impossible to change if we make a mistake by being overly broad. Thanks.

The proposal does provide such an example, but I think now the proposal has been outdated.
OK, I will submit a proposal to support this.


Add Duration etc... argument resolvers

Helpful informations:
Duration parser: https://github.com/Rollczi/LiteCommands/blob/master/litecommands-core/src/dev/rollczi/litecommands/time/DurationParser.java
Package with basic arguments.

Register argument:

What about using https://github.com/BlackBaroness/duration-serializer-java/? I am ready to add more formats if necessary. I just would more flexible
I am going to implement this

Okay then. Assign this to me if possible please, I will do this in a couple of days

Okay then. Assign this to me if possible please, I will do this in a couple of days

One PR is already created https://github.com/Rollczi/LiteCommands/pull/227 (only for Duration)
But still no for Period or other time units like Instant, LocalTime etc...

Assuming how Period creation works, I don't see real difference between Duration and Period parsers

Duration - short units as seconds, minutes, hours, days etc.
Period - long units as days, weeks, months, years etc.
1 month in Period depending on the current time context it may represent after conversion to Duration e.g 28 days 30 days or 31 days

Also, https://docs.rollczi.dev/documentation/litecommands/features/argument-time-types.html documentation part says that LiteCommands already has mentioned types support

Documentation is not updated yet :/

Hello! I will finish this with Period Argument support.
Sorry for taking issue from You BlackBaroness

TODO Period


backslash fixup applies to all ninja-based generators, not just the basic one

Resolves issue reported here.

+1


Designer XML/JSON not Autosaved.

If you make changes in XML or JSON view, and just click the [Diagram] button, and click back to XML, all your changes is lost.
Please prompt for Auto save, when doing this.

@janborup All fixed. Can you pull the latest version and test it please? Here are the use cases to test:

Edit Xml switch to diagram
Edit Xml switch to graph
Edit Xml switch to json
Edit Json switch to diagram
Edit Json switch to graph
Edit Json switch to xml

Perfect. 🗡  👌


Question: manif Bundle<> or other ways to support composite/compound state.

Dear, @artivis
I followed your discussion here regarding the need for composite/compound state support. I also see that in the manif repo, there is a way to do so with the Bundle<>. But there is no example in this repository of how to do that. Are there any impediments invisible to me that prevent using composite states?
The idea is to use manif/kalmanif for a practical application with a heterogeneous state:
SE(3) - robot pose().
SO(3), SE(3) - sensor locations, orientations.
1D vectors, or scalars - sensor biases.
(Optionally) 2D matrix - more complex sensor calibrations, homography, maybe members of other groups such as SIM(3).
Looking forward to your answer!
Best regards,
Alex

Are there any impediments invisible to me that prevent using composite states?

No impediments found.

Hi @slovak194,
My apologies for the late reply. The Bundle class was developed so that it has the same API as any other group so it should indeed be usable with kalmanif.
The main 'issue' I can think of is that one has to write the models (system/measurements) with respect to the entire Bundle state which leads to a lot of zeros and thus inefficiencies. This also isn't great in terms of code reusability.

Hi, @artivis ,
Thank you for getting back!
I think it is worth reopening this issue as @joansola has added valuable comments here: https://github.com/artivis/kalmanif/issues/10#issuecomment-1346174269
And I see now, that my statement above (No impediments found.) is not correct.
I have to admit, that even after reading the Micro Lie Theory paper my overall understanding of the topic may be too shallow. Please, consider my inputs as from the user/application point of view, which may not coincide with the strategy of the manif/kalmanif development.
From the practical point of view, I'd like to have a way to quickly specify real-world states, which are usually not just individual group members, but many heterogeneous fields. Here is a simple example, and in my case, I'm going to have a few times more.
using SFWA_StateVector = UKF::StateVector<
    UKF::Field<LatLon, UKF::Vector<2>>,                 /* Latitude and longitude (rad) */
    UKF::Field<Altitude, real_t>,                       /* Altitude above the WGS84 ellipsoid (m) */
    UKF::Field<Velocity, UKF::Vector<3>>,               /* Velocity (NED frame, m/s) */
    UKF::Field<Acceleration, UKF::Vector<3>>,           /* Acceleration (body frame, m/s^2) */
    UKF::Field<Attitude, UKF::Quaternion>,              /* Attitude as a quaternion (NED frame to body frame) */
    UKF::Field<AngularVelocity, UKF::Vector<3>>,        /* Angular velocity (body frame, rad/s) */
    UKF::Field<AngularAcceleration, UKF::Vector<3>>,    /* Angular acceleration (body frame, rad/s^2) */
    UKF::Field<WindVelocity, UKF::Vector<3>>,           /* Wind velocity (NED frame, m/s) */
    UKF::Field<GyroBias, UKF::Vector<3>>                /* Gyro bias (body frame, rad/s) */
>;

For that purpose Bundle looked great at first.

But now I see, that what I (and may be other people) need - is the simple "set" which just applies box+- (and maybe other) operators to it's individual fields separately and the interaction between its components is carried only in the system/measurement model explicitly by the user (i do not bother referring to individual elements of a bundle) or through the cross-covariance update during the a_posteriory step.
I take the risk to refer this repository ukf which I and my colleagues find very handy to work with. It requires the very minimum boilerplate code from the user side to implement complex real-world filters. However, nothing is ideal and the support of quaternions there is not correct from our point of view.

The main 'issue' I can think of is that one has to write the models (system/measurements) with respect to the entire Bundle state which leads to a lot of zeros and thus inefficiencies. This also isn't great in terms of code reusability.

That is not a big issue from my point of view, as in general, the state transition function takes the time delta, current state, and control input to integrate the state of the system forward.

The Bundle class was developed so that it has the same API as any other group so it should indeed be usable with kalmanif.

If I correctly understood the answer from @joansola in another issue, this is not the case.

For some bundles, e.g. SO3xR3, we want composition to work as in SE3

As for me, it brakes the statement written here:

Best regards,
Alex

It looks my initial understanding was correct.


Mega Loot Bags

Cant seem to get the mega loot bags to work at all.  it has not increased. Was wondering if there is any mod conflicts that would prevent it from working or if i downloaded it wrong. I downloaded and unzipped directly into the mod folder

Yes, please make sure you have it installed correctly. It's working as expected here.


Wrong image range before vae encoding in gradio demo script

Hi, guys. Thanks for your great jobs. I notice a possible problem when running demo_gr.py. The init_image only rescale to [0, 1], but I think the right range is [-1, 1]. Another case is when setting Noising strength=0 in img2img mode with flux-dev model, we got a overexposed pictures, the vae reconstruction seems fail.
Here is a part of code from demo_gr.py, line 71-79.
if isinstance(init_image, np.ndarray):
    init_image = torch.from_numpy(init_image).permute(2, 0, 1).float() / 255.0
    init_image = init_image.unsqueeze(0)
init_image = init_image.to(self.device)
init_image = torch.nn.functional.interpolate(init_image, (opts.height, opts.width))
if self.offload:
    self.ae.encoder.to(self.device)
init_image = self.ae.encode(init_image.to())

In demo_st.py, we can find the image rescale to [-1, 1] in get_image() function before vae encoding. We can obtain a normal result.
def get_image() -> torch.Tensor | None:
    image = st.file_uploader("Input", type=["jpg", "JPEG", "png"])
    if image is None:
        return None
    image = Image.open(image).convert("RGB")

    transform = transforms.Compose(
        [
            transforms.ToTensor(),
            transforms.Lambda(lambda x: 2.0 * x - 1.0),
        ]
    )
    img: torch.Tensor = transform(image)
    return img[None, ...]

@apolinario can you take a look?