Execute code on releaseContext

Hello,
I'm trying to use Koin with MVVM (android components) and Realm.
Realm forces a get an instance that has to be released to maintain the reference count.
I'm trying to figure out how to adquire koin in my scenario.
I have the following structure (simplified for the sake of the example)

class ArchersViewModel: ViewModel()
{

 val mDb: Realm

    val viewModelDao
    init {
        mDb = Realm.getDefaultInstance()
        viewModelDao = ArcherDao(mDb)
    }
    override fun onCleared() {
        mDb.close()
        super.onCleared()
    }
}

class ArcherDao(realm: Realm): RealmObjectDao<Archer>(realm, Archer::class.java)
{
  //methods to retrieve data
}

class ArchersFragment:Fragment()
{
lateinit var realmObjectListViewModel: ArchersViewModel
  override fun onActivityCreated(savedInstanceState: Bundle?) {
        super.onActivityCreated(savedInstanceState)
        realmObjectListViewModel = ViewModelProviders.of(this).get(ArchersViewModel::class.java)

}

So to start using koin I adapt the classes to use a koin module:

val archersModule = applicationContext {
   context("ArcherContext")
   {
       viewModel { ArchersViewModel(get())}
       bean { ArcherDao(get()) }
       provide { Realm.getDefaultInstance() as Realm}
   }
}

So I can modify the classes:
class ArchersViewModel(val viewModelDao: ArcherDao)
{
 ....
}
class ArcherDao(realm: Realm): RealmObjectDao<Archer>(realm, Archer::class.java)
{
  //methods to retrieve data
}
class ArchersFragment:Fragment()
{
    val realmObjectListViewModel by viewModel<ArchersViewModel>()

}

But now I have two doubts:

Where I should release the context and
How to force to close the realm instance when release the context

Any suggestion?
Thank in advance
Regards

Hello,
For your question 1. : the releaseContext() function is entirely agnostic. It allows being used when you really need it. on ViewModel lifecycle, one easy way to drop any instances would be on the onClear() from ViewModel. From this point, you know that all will be released and your view is being dropped.
For such usage, add the KoinComponent to your ViewModel class, else you won't be able to run the releaseContext function.
for your 2nd point: the context release will drop all instances from the context and child contexts. This mean that Koin will drop ArcherDao and Realm instances as soon as you call the releaseContext. Next time you will ask for those components, Koin will recreate new instances.
Do you have to call a special API on Realm drop?
To process components lifecycle, we have 2 ways:

Use factory instead of bean or provide to provide a factory definition - the problem is that you will have a new instance each time you ask for this component
Use a context (as you've already done), to gather definitions of components to be dropped in some lifecycle. The idea is that you have to share instances for an amount of time, before dropping them.

You can write an abstract ViewModel class to embed releaseContext behavior.

Hello again,
Thank you very much for your detail explanation.
I already have a base viewmodel that will be the one to release the context by name, I just tried to simplify the example, at this moment all my viewmodels are dependant class from
abstract class RealmViewModel: ViewModel()
{

    val mDb: Realm

    init {
        mDb = Realm.getDefaultInstance()
    }

    override fun onCleared() {
        mDb.close()
        super.onCleared()
    }

}

What I would do is change that class by something like:
abstract class ContextAwareViewModel(): ViewModel(), KoinComponent
{
   abstract fun getContextName():String
    override fun onCleared() {
        releaseContext(getContextName())
        super.onCleared()
    }
}

Refarding realm, it is mandatory that for each "mdb = Realm.getDefaultInstance()" call a "mdb.close()" call  has to be made.
So it is not enough to "release" the instance, an specific call must be made.
How can I do it on the releasecontext?
Regards
Gabriel

There is no hook system on releaseContext. You have to write your own component that will call the releaseContext() and your mDb.close(). Koin gives the function to call it. You make your own component hierarchy/lifecycle.
Your ContextAwareViewModel should extend RealmViewModel, or you should write a mix of those 2 classes.
Question: does the Realm.getDefaultInstance() give you a new instance each time?

Hello,
I agree with you, and I already realized that.
Also I'm reviewing the realm code, and it seems that I could just use the same realm instance created at application level (and in this case the applicationcontext would suffice) and release it with the application.
My error was to try to directly use the same structures adding just a di framework but as the di framework ensures me that the realm instance is called just one and is on the needed thread, I could just try to use the injected realm at an application level.
However, I think it would be nice to have some kind of hook when the instances are released by the context to just allow to do some cleaning if needed.
Now I'm trying to figure out the best way to pass the property id on details viewmodels as I'm using simple-stack to handle the navigation.

For last release, I've just added a context callback interface, to be notified on context release.
Just call the registerContextCallBack() function to register it
You will be also able to use parameters to viewModel like: viewmModel{ params -> MyViewModel(params["id"])}
and provide "id" parameter with :  val myVM : MyViewModel by inject( parameters = mapOf("id" to id))

That is awesome!!
Just a question regarding the vierwmodel params, before koin I used a viewmodel factory that would add the parameters on the build of the viewmodel, so if the factory was called with two differents id, two different viewmodel instances were being created.
With the new implementation (0.9.0) will be behave the same way? if not I need to figure out how to inject two different vm instances of the same class.
(When the 0.9.0 version will be released  ? )
Thanks!

Yes exactly, it will run like your old viewmodel factory. I'm currently finalizing the feature.
0.9.0 will be released end of this week or next week.

I have a question about viewModels with params:
If I want to share a viewModel between an activity and its fragments but the param is only known in the activity (because it is an intent extra). am I able to reuse it even when the injection is different??
In my activity:
val myVM : MyViewModel by inject( parameters = mapOf("id" to id))

in my Fragments:
val myVM : MyViewModel by inject()

Hello,
I guess that it would behave the same way as in the "viewmodel factory" pattern. They will be two different viewmodels instances.
You will need to pass the id parameter to the fragment somehow, so it can ask for the vm properly.
Again, If I'm right, the parameters are just "constructor" parameters, so if you are calling the di using two different constructors (one with parameter id and one without parameter) they will be different, and also you will need two constructors.
Imagine that in the activity you want two instances of the vm with different parameters:
val myVM : MyViewModel by inject( parameters = mapOf("id" to id))
val myVM2 : MyViewModel by inject( parameters = mapOf("id2" to id))

That is an acceptable scenario. When the fragment ask for the viewmodel which one has to be returned?
So, at the end what do you need is a mechanism to share the id between the activity and the fragment.

I can share the id with fragments using Fragment().withArguments(....) and take them in fragments via arguments.
Hum… this way I'll need to write a lot more than just using id as a var and initializing it in my activity onCreate() :p
To get different viewModels instances I can use the “name” argument. So If I don’t provide any name then all shared viewModels should be the same, right?
If we just use a different dataStructure to store parameters in the viewModels KoinFactory ??
If we distinct the viewModels parameters by class name and provided name??
It will look like this:
internal val parameters: Map<String,ParameterMap>
What do you think??

The by viewModel() and getViewModel() functions will be able to have a key (ViewModelFactory instance key) and a name (Koin beande finition name).

I close the issue


app often just hangs/stops working

4.0.5~f03b7dd8d, Android 12
I regularly suffer from a problem where the app just hangs (current upload doesn't go on anymore), I don't see why. I then do have enough space and often extra rebooted before. I normally choose 10-20 files (as I saw the app regularly uses junks of 4 files at once). The only solution then is de- and reinstall. (stop/start is of no success). Any hints? --~~~~

anyone? :(

Does it also happen if you only upload 4 at a time after reinstalling?
Uploading more than 5 pictures is unfortunately not well supported.

Really? Why? I wasn't aware of that. Will try. But sometimes it indeed does work with my 10-20 files at once. Also the field can be, say 10 MB...
Perhaps it can be "upgraded"?

We are not sure why, but we observed that various bugs start to appear from time to time when uploading more than 5 at a time. We hope some very skilled Android developer will have a look at the issue some day, but we are all volunteers so it is hard to progress fast. Thank you for your patience!

Thanks! Ok, knowing this limit surely is of help. My wish for uploading would be, say, 50-100 :) including automatic numbering of course (the app sees a syntax like (01) and automatically names the following files - and skips these annoying single location check, where you always have to cancel the question (instead of one  when the location is the same).

@subbass1 What has been your experience afterwards? Did the frequency of the hangs get lower when uploading around 5 pictures instead of around 10-20? Thank you for your valuable feedback!

In the meantime I didn't have problems anymore, uploading regularly, say, max 10-15 files at once (but not so much as in the months before). It's also possible that this was a local problem with my phone, storage nearly fully loaded. I experienced a few strange things then. I keep watching. Thanks for the work.


⚠ Community has degraded performance

In 12ff467, Community (https://community.wrk.com/health) experienced degraded performance:

HTTP code: 200
Response time: 167 ms

Resolved: Community performance has improved in 5c859f0.


Should we define the input encoding?

Tried to compile this sample code on my machine using xelatex (W10, new installation of miktex).
It gave an error " LaTeX Error: Command `\eth' already defined".
Here is the code:
\documentclass[english,12pt,a4paper,roman]{moderncv}
%% math and physics packages:
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[english]{babel}
%\usepackage{mathspec} % conflicts with 'unicode-math'
%\usepackage{fontspec} % is loaded automatically by 'unicode-math'
\RequirePackage{unicode-math}
\setmainfont{Calibri}
\setmathfont{Latin Modern Math}
\begin{document}
Hello World.
\end{document}
(Pretty sure it's moderncv's fault here, because when I change to article, everything works)

If you want to use XeTeX (or LuaTeX) with proper unicode for math, use this:
\usepackage{fontspec} % optional to load, but if do it before unicode-math, don't load mathspec

\usepackage{amsmath}  % for math commands
\usepackage{unicode-math}  % for math symbols, use instead of amssymb

\setmainfont{Calibri}
\setmathfont{Latin Modern Math}

I think the error is because you use
\usepackage{amssymb}
\RequirePackage{unicode-math}

RequirePackage will just result in unicode-math being loaded. However the goal of unicode-math is to use unicode symbols in math mode. However afaik, amssymb conflicts with that as it doesn't work that way. If you use unicode-math, you can essentially drop amssymb. There are minor differences between the two packages, and in case you need something from amssymb, don't load unicode-math.

Ah, I missed the part where you state the article works fine. I think in this case RequirePackage probably shouldn't do anything, but I'm not sure. Using amssymb and unicode-math should clash.
Look here:
https://github.com/moderncv/moderncv/blob/167c9e439524ea5ba9c6f1a4f0ab764c7f433cf0/moderncv.cls#L99-L113
When loading moderncv with XeTeX or LuaTeX, unicode-math will be loaded.
Btw I'll suggest not to use Calibri in MWEs as it is non-free and not everyone can test it.

I posted a question on stack exchange, https://tex.stackexchange.com/questions/614961/moderncv-and-xelatex-command-definition-clash. The problem is that moderncv already defines some symbols that amssymb defines as well.
Also, it has something to do with moderncv being updated lately (July, I think), because this wasn't a problem before the update.
About the font, you can change Calibri to any font, it won't matter.

Yes so as I said.
The question is if we should do this at all or not. I'm still convinced, that the definition we do is correct. However, the real question is whether or not we should define a font at all.

OK, the best solution would be one that would "just work", regardless of the author uses amssymb, xelatex, etc. Another option is to add an explanation of a work around in the official package manual.


Multiple queries?

I'll post the log to this issue in the morning, but it seems that Bookshelf is issuing several queries when it should only dispatch one.
I'm dealing with several related models, all capable of being joined on their primary key. And yet, when I query using withRelated, it issues one query per table.
What am I missing? Do the normal this.belongsTo and this.hasMany handle joins as I expect, or is there some additional magic I need to employ?

It's not really possible to do a single query to retrieve all instances and relations without requiring a large amount of processing. For instance, imagine the following:
House.fetchAll({withRelated: ['rooms', 'residents']}).then(...

// select * from houses;
//  returns houses with ID 1,2,3
// select * from rooms where house_id in (1,2,3)
// select * from residents where house_id in (1,2,3)

Hi @nicholaswyoung, did my response answer your question? You're welcome to propose optimizations here. Otherwise I'd like to close this issue if you feel it's resolved.

@rhys-vdw All good here. Thanks for following up!


build(ide): add run config to locally compare bundle size

To avoid having to wait for CI pipeline hence providing a shorter feedback loop

Current dependencies on/for this PR:

main

PR #168   👈

This stack of pull requests is managed by Graphite.


JsonSerializerSettings.ReferenceResolver Isn't Fully Backwards Compatible

Json.net 7.0 added the ReferenceResolverProvider to JsonSerializerSettings, and made ReferenceResolver obsolete.  However, the new implementation of ReferenceResolver is not 100% backwards compatible with old versions.
If a library using the 6.0 version is redirected to the 7.0 version by binding redirect, and this library sets ReferenceResolver = null, deserialization will fail with the following error:
Reference resolver cannot be null.
Parameter name: value
   at Newtonsoft.Json.JsonSerializer.set_ReferenceResolver(IReferenceResolver value)
   at Newtonsoft.Json.JsonSerializer.ApplySerializerSettings(JsonSerializer serializer, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonSerializer.CreateDefault(JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Couchbase.Core.Serialization.DefaultSerializer.Deserialize[T](Stream stream) in C:\Users\bburnett\Source\Repos\couchbase-net-client\Src\Couchbase\Core\Serialization\DefaultSerializer.cs:line 172
   at Couchbase.Linq.Proxies.DocumentProxyDataMapper.Map[T](Stream stream) in C:\Users\bburnett\Source\Repos\Linq2Couchbase\Src\Couchbase.Linq\Proxies\DocumentProxyDataMapper.cs:line 57
   at Couchbase.N1QL.QueryClient.ExecuteQuery[T](IQueryRequest queryRequest) in C:\Users\bburnett\Source\Repos\couchbase-net-client\Src\Couchbase\N1QL\QueryClient.cs:line 362

The previous behavior when this property was set to null was to not pass a ReferenceResolver to the JsonSerializer.
An example use case can be found here: https://github.com/brantburnett/couchbase-net-client/blob/extendeddeserialization/Src/Couchbase/Core/Serialization/DefaultSerializer.cs#L249.
In this case, a specific workaround is already put in place to avoid the issue.  The specific use case in question was cloning a JsonSerializerSettings object to a new instance so that some minor modifications could be made without affecting the original object.  If the original object had a null ReferenceResolver, this issue occurred.

Fixed


[WIP] Cassandra config fix

Work In Progress
I noticed our docker containers are not working anymore since the Cassandra driver update has been merged.
I tried to fix things (see commits for details) but still have following issues:

[ ] zipkin-collector can't connect to cassandra: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /<IP_ADDRESS>:9042 ...
[ ] zipkin-query throws a ClassCastException probably because of config change:
Exception in thread "main" java.lang.ClassCastException: scala.runtime.BoxedUnit cannot be cast to com.twitter.zipkin.builder.Builder   at com.twitter.zipkin.query.Main$.main(Main.scala:39)

These issues happen both when using deploy.sh script and when using docker-compose.

oh! didn't realize that there were copies of the scala files here.. sorry about that!

working on this now cc @michaelsembwever


Blazor WebAss embly template missing in VS  2019  preview 16.6

I have just installed VS 2019 preview 16.6.NET, 5.0 preview 1 SDK and the WebAssembly  3.2 preview 2 template, but when I try to create a new Blazor WebAssembly app in VS, the template is not available.

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

ID: c07e57dc-526f-9479-4695-de7d8f06eb9a
Version Independent ID: 8226ed72-69b2-3c93-a931-218bd11cf9c8
Content: Get started with ASP.NET Core Blazor
Content Source: aspnetcore/blazor/get-started.md
Product: aspnet-core
Technology: aspnetcore-blazor
GitHub Login: @guardrex
Microsoft Alias: riande

5.0 preview 1 SDK

Hello @uzabumuhire ... The SDK should be 3.1.102 (check dotnet --version to confirm). If that's correct, next try re-installing the template (run the command in Step 2 again). If you're still having trouble getting it to show up in VS under *Blazor App > Configure your new project > Create a new Blazor app, then open an issue for the product unit at https://github.com/dotnet/aspnetcore/issues.


[Bug] Databricks SQL syntax error in marketo__lead_history

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the issue
I am working on implementing the Marketo package in a dbt instance using Databricks. The marketo__lead_history model is failing, and so far I have been able to pinpoint two issues.

fivetran_utils.dummy_coalesce_value macro is not working properly when applied to 'lead_status' which is a string field.

This macro is called in the backfill cte , and is used to coalesce a dummy value, which in this case would be "DUMMY STRING", but is instead returning nothing, causing the coalesce to fail.

When correcting for the failing macro, the SQL still fails because it appears that the IGNORE NULLS statement in the window function is not recognized in Databricks.

Relevant error log or model output
dummy_coalesce_value macro (abbreviated for relevance):

{% macro dummy_coalesce_value(column) %}

{% set coalesce_value = {
 'STRING': "'DUMMY_STRING'",
 'BOOLEAN': 'null',
 'INT': 999999999,
 'FLOAT': 999999999.99,
 'TIMESTAMP': 'cast("2099-12-31" as timestamp)',
 'DATE': 'cast("2099-12-31" as date)',
} %}

{% if column.is_float() %}
{{ return(coalesce_value['FLOAT']) }}

{% elif column.is_numeric() %}
{{ return(coalesce_value['INT']) }}

{% elif column.is_string() %} -- this is the problematic statement
{{ return(coalesce_value['STRING']) }}

{% endif %}

{% endmacro %}

model output:

, backfill as (

   select
       date_day,
       lead_id
       -- For each lead on each day, find the state of each column from the next record where a change occurred,
       -- identified by the presence of a record from the SCD table on that day

       , nullif(
           first_value(case when new_values_present then coalesce(lead_status, ) end ignore nulls) over (
               partition by lead_id
               order by date_day asc
               rows between current row and unbounded following),  ) -- nothing in the coalesce, causing failure
       as lead_status

syntax error:

16:12:08 Databricks adapter: <class 'databricks.sql.exc.ServerOperationError'>:
[PARSE_SYNTAX_ERROR] Syntax error at or near 'ignore'.(line 60, pos 100)

, nullif(
            first_value(case when new_values_present then coalesce(lead_status, 'DUMMY_STRING') end ignore nulls) over (
----------------------------------------------------------------------------------------------------^^^
                partition by lead_id
                order by date_day asc
                rows between current row and unbounded following),
            'DUMMY_STRING')
        as lead_status

Expected behavior

dummy_coalesce_value macro recognizes the 'lead_status' string, and inserts "DUMMY STRING" into the coalesce.

Expected Output:
nullif(
first_value(case when new_values_present then coalesce(lead_status, 'DUMMY_STRING') end ignore nulls) over (
partition by lead_id
order by date_day asc
rows between current row and unbounded following),
'DUMMY_STRING')
as lead_status

When I edit the macro from this:
{% elif column.is_string() %} -- this is the problematic statement
{{ return(coalesce_value['STRING']) }}

to this:
{% elif column.data_type|lower == 'string' %}
{{ return(coalesce_value['STRING']) }}
The dummy string is inserted properly into the coalesce. This indicates there is an issue with the column.is_string()
note: This fix only works when I edit the dummy_coalesce_value macro found in the fivetran_utils package, even though the macro also exists in the marketo package. Also, this isn't a permanent fix, because the file exists within a package, so any changes will be wiped out whenever dbt deps is run.

Once the above 'fix' is implemented, we run into a syntax error:

looks like ignore nulls is not allowed within a window function in Databricks, as far as I can tell. The following SQL may be a solution:

, COALESCE(
first_value(CASE WHEN new_values_present THEN lead_status ELSE NULL END) OVER (
partition by lead_id
order by date_day asc
rows between current row and unbounded following
),
'default_value' -- or however you wish to handle cases that would have relied on ignoring nulls
) AS lead_status

I think that it's possible that there could be a config that I may be missing here, but as you can see below, I have followed the dispatch config instructions provided with the package.

dbt Project configurations
vars:
fivetran_log:
fivetran_log_using_transformations: false
fivetran_log_using_triggers: false
fivetran_platform_database: raw # default is your target.database
fivetran_platform_schema: fivetran_log # default is fivetran_log
fivetran_platform_using_destination_membership: false # this will disable only the destination membership logic
fivetran_platform_using_user: false # this will disable only the user logic
marketo__enable_campaigns: true
marketo__enable_programs: true
marketo_database: raw
marketo_schema: marketo
dispatch:

macro_namespace: fivetran_utils
search_order: ['spark_utils', 'fivetran_utils']
macro_namespace: dbt_utils
search_order: ['spark_utils', 'fivetran_utils', 'dbt_utils']

Package versions
packages:

package: fivetran/salesforce_formula_utils
version: 0.9.3

package: dbt-labs/dbt_utils
version: 1.1.1

package: calogica/dbt_expectations
version: 0.10.3

package: dbt-labs/codegen
version: 0.12.1

package: data-mie/dbt_profiler
version: 0.8.1

package: dbt-labs/audit_helper
version: 0.10.0

package: fivetran/marketo
version: 0.10.0

package: dbt-labs/spark_utils
version: 0.3.0

package: fivetran/fivetran_log
version: 1.5.0

What database are you using dbt with?
databricks
dbt Version
dbt cloud version 1.7
Additional Context
No response
Are you willing to open a PR to help address this issue?

[ ] Yes.
[X] Yes, but I will need assistance and will schedule time during our office hours for guidance
[ ] No.

Hi @fivetran-catfritz, thanks for getting back to me.  Looks like our runtime is 13.3 LTS (see the screenshot below).
We experimented with pointing dbt to an all-purpose cluster yesterday, and the issue persisted.
Let me know if there is more helpful information I can provide.

Hi @cdey-a16z thank you for the info and trying that out on the all-purpose cluster! I was able to recreate the issue on our all-purpose cluster as well. While we do not have plans to address general Databricks SQL Warehouse compatibility, any issues that persist on a Databricks all-purpose cluster will definitely be addressed. We'll prioritize addressing the ignore nulls issue in our upcoming sprint cycle, which would be approximately mid/end-March.

@fivetran-catfritz sounds great I appreciate your help with this. Will I be updated here when this is fixed?

Yes we'll post here when the update is released!

Hi @cdey-a16z to update you, I have found a work-around for the issue you mention. I added this cte that removes the need for an ignore nulls statement and also makes the dummy string issue you found to be moot. If you would like to try out my updates, you can install my test branch using the below code in place of the marketo lines in your packages.yml file.
- git: https://github.com/fivetran/dbt_marketo.git
  revision: bug/databricks-syntax
  warn-unpinned: false

If you try it out, I'd love to hear how it works for you! If not, no worries, we'll proceed with release in the coming week or so and update you when it's released.

Hi @fivetran-catfritz, thanks for getting back to me. I just tested your test version, and it worked! The only thing I noticed was that I had to update field from marketo__leads called unsubscribed to is_unsubscribed. I'm not sure if that's related at all, but just wanted to call that out in case it is.
Looking forward to implementing the completed package!

@cdey-a16z Thank you for trying that out and confirming! Glad that it worked. We'll proceed with release in the coming days and post back here once it's live.
Regarding the is_subscribed column, I confirm we updated the source package to rename boolean columns to the format is_*. If you're interested, there are more details in the source changelog we plan to release alongside this update.

@cdey-a16z To update you, the new version has been released! You can install it with the below range:
packages:
  - package: fivetran/marketo
    version: [">=0.11.0", "<0.12.0"]

I am closing out this issue, but feel free to ping us here if you have any additional questions or feedback.


Fix a crash when toString does not exist in the prototype (for custom…

… objects)
Fix for https://github.com/flitbit/diff/issues/52

+1

While you’re at it, might as well check that toString is actually a function.


WIP: Add support for Tags to OpenIDConnectProvider

Description of your changes

Fixes # #1133
I have:

[x] Read and followed Crossplane's contribution process.
[ ] Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Accepting help with finishing this implementation.

looks like have now 2 open PR for this https://github.com/crossplane/provider-aws/pull/1059

Closing in favor of #1059


not working on Server Sider Rendering

cannot manage to get it working on SSR build, the local dev version works

actually a mere import will break the app, is not a build time error, but a runtime error

My bad, i found the solution: i removed "lodash-webpack-plugin" from my webpack config and it works fine.


Add str pure methods + tests

Can you please fold your 13 commits into a single commit? I don't think that it's worth to have so many small commits.
Anyway, it's cool to get contributions, thanks :-)

Created a new PR: #9


[BUG] Custom quirks not working in HA 2023.03

Recently in HA v2023.03, the ZHA integration has stopped working due to issues with some user-installed custom quirks.
The issue is caused by some changes made to Tuya's MCU device implementations. These changes (necessary and brilliantly implemented) could have been deployed in a different way to avoid the impact on integration and the noise generated.
This could be fixed with PR #2242, but it only mitigates the effect of possible changes.
It should be said that the use of custom quirks implies (or should imply) some technical knowledge about what is being done and about the analysis of the incidents that can be generated. On many occasions the problem has been detected and corrected by the users, but not all users are the same.
My intention is to collect here the problem that occurred, the possible solutions and lessons learned.
The first thing is to identify the origin (or origins) of the problem.
I have detected mainly 2:

PR #2043 that removes the dp_type from the DPToAttributeMapping class
PR #2017 that implements the autodetection of the Tuya data type from the value type

Nothing to reproach the changes. I gave them my approval myself.
But it is clear that we underestimate the impact of change. Although all the code implemented in the library was modified according to the new implementation, the custom quirks hosted in the user installations have not, and these have affected the integration.
In order to mitigate this type of problem, it would have been convenient to grant a deprecation time to the implemented changes. It will not always be achievable, but at least we should considerate it.
Let it be clear that this issue is only addressed to myself and that he only seeks to collect my comments on it.

The ZHA is loading custom quirks i think it shall throwing one warning for every quirk that is loaded from the custom directory so the user is not forgetting that is one test function  and not one permanent solution that is making on PR for betting it main ZHA.
One plus experience user can easy see that the quirk is loaded and dont need digging deep in the HA log for see it :-))
As sad custom quirks is user supported and only warning if knowing some is braking is needed then making changes but in the first row is Zigpy / zha for getting the system working well and its one must doing large complex changes that can being only 95% tested before merger them.
By the was great thanks for the work on tuya MCU command part that was very needed as the implanting of quirk device classes for matching functions in ZHA !!!

I am sure that any measure will not cover all cases, but if the avalanche of "ZHA breaks in version XX" incidents can at least be avoided, it is worth it. (And on a personal level I will know that I have tried to avoid it).
In my head it would be easy if we warn users were it bother more, in the HA notifications panel:

I think that is a interesting approach for all these 'hit & run' users, but not enough time or enough knowledge to explore that approach and do it myself.
I don't like the idea of quirks failing 'silently' but totally against that a quirk (and even worse, a custom quirk) breaking the ZHA integration.
Thanks for your words. I really appreciate it.

In setting > system > Repairs looks being one good place putting custom quirks warnings then the user can muting it to next manor update and its being re triggered like having portainer installed in one container and have suprevised HA installed or skipping updates of HA and addons.

Hmm, I don't think a PR with those changes would be accepted. Custom quirks are considered to be similar to custom integrations. See: https://github.com/home-assistant/home-assistant.io/pull/23884#discussion_r955050091

Wish full thinking from my side ;-)
So ZHA throwing warning in the log is the only realistic option.

There was a similar change some time ago (I think something in zigpy got deprecated) and there were still reports of custom quirks breaking when it was finally removed in zigpy (even though there was a warning log message before).

Yeah, warnings won't help as much as they should. I deprecated zigpy.zcl.foundation.Command in favor of zigpy.zcl.foundation.GeneralCommand in December of 2021. When I finally removed it in December of 2022 (over a year later!), it still broke a ton of installs and generated a lot of issues because many custom quirk users are non-technical and do not read warnings to begin with.
There isn't really much that can be done other than merging the custom quirks into the main repo, or letting things break (either explicitly or silently). I also agree with @TheJulianJES regarding custom quirks integrating with the frontend: they're 100% meant for development and quick testing, not for general use.
I vote for merging #2242 to at least prevent blocking startup and upgrading the warnings to errors.

Is there an easy was to see if a custom quirk was PRed? I think if quirk was added to connect a device that previously had no quirk at all - it should even be quite easy for Hass to perform a check and inform user, saying something "Hey, you're using a custom quirk for device X but we now support it officially" or something like that.
If a custom quirk was used to fix a bug for a device that already has a quirk - well, probably not much to do here, but maybe there's some elegant solution to this as well.

Im not sure if this is the right place or what i need tosupply but none of my  zha quirks are working as of yesterday, this is my 2 gang switch:
Device info
TS0012
by _TZ3000_18ejxno0
Connected via Zigbee Coordinator
Zigbee info
IEEE: a4:c1:38:c4:84:e0:00:9f
Nwk: 0xc292
Device Type: EndDevice
LQI: Unknown
RSSI: Unknown
Last Seen: 2023-04-16T14:27:37
Power Source: Battery or Unknown
Quirk: zhaquirks.tuya.ts001x.TuyaDoubleNoNeutralSwitch_2
and my three gang switch:
TS0013
by _TZ3000_qewo8dlz
Connected via Zigbee Coordinator
Zigbee info
IEEE: a4:c1:38:ba:03:4e:ae:bc
Nwk: 0x5d57
Device Type: EndDevice
LQI: Unknown
RSSI: Unknown
Last Seen: 2023-04-16T14:28:21
Power Source: Battery or Unknown
Quirk: Tuya_3_gang_switch.TuyaTripleNoNeutralSwitchVar02

Your 3 gang is a local quirk. Have you tried the fix from this post?
Maybe even is not needed nowadays if your device is already in the current version.
The 2 gang don't have a local quirk, so if there is a problem you should open a new issue with all the required info, in example, what is not working.


Fix the recycling-rule bug in specific cases of pow_int

Fixes #1395

@paciorek I think this is good to merge of have you do any code review or checking of test coverage.

Sorry, typo, "of" --> "or". Basically I'm fine with it but I'm not sure if you've given it a code review or feel that would be useful.


Use proper URLs

This fixes a failure where linking a page that has a name that differs from its url will make the plugin create a broken link.

Tanks :)


Make it clear this is for user token aquisition and NOT daemon.

[Enter feedback here]
Make it clear this is for user token acquisition and NOT daemon and that AquireTokenForClient uses application cache and AquireTokenSilently uses application cache.

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

ID: 32e61dfb-6e76-57b6-d9bb-91bd942b90a6
Version Independent ID: a7db156a-58a7-574d-8e77-19909a638db4
Content: Acquire a token from the cache (MSAL.NET) - Microsoft identity platform
Content Source: articles/active-directory/develop/msal-net-acquire-token-silently.md
Service: active-directory
Sub-service: develop
GitHub Login: @mmacy
Microsoft Alias: marsma

@mack0196
Thanks for your feedback! I've assigned this issue to the author who will investigate and update as appropriate.

@mack0196 Sean, thanks for the issue. Tracking this and #86129 together. For clarity, I'd like to confirm:
By your statement here (emphasis mine):

Make it clear this is for user token acquisition and NOT daemon and that AquireTokenForClient uses application cache and AquireTokenSilently uses application cache.

You'd actually meant this:

Make it clear this is for user token acquisition and NOT daemon and that AquireTokenForClient uses application cache and AquireTokenSilent uses the user token cache.

...as discussed in AcquireTokenForClient uses the application token cache section of the daemon/console scenario doc.

@mack0196 I've added this issue to the following ADO work item (Microsoft-internal) future sprint planning. Closing the issue here and we'll track it internally here:

ID
Title

1809631
[ISSUE][86129] documentation around token caching is not clear

@Dickson-Mwendia, this is related to #https://github.com/MicrosoftDocs/azure-docs/issues/86129 and will fall under GTD workstream Consolidation, subcategory Auth SDK documentation improvement.
#please-close


Create type definitions for expensify-common

This is part of Expensify/App#16665 issues. The plan is to write type definitions only for the files that are used in App.
Fixed Issues
$ #547
Tests

[x] - Check that type declarations (.d.ts files) are correctly typed and in sync with Javascript implementations.
[x] - Check that types work as expected in the App

QA
N/A

I have read the CLA Document and I hereby sign the CLA

recheck

@hayata-suenaga

expensify-common doesn't have index.js that exports everything? (or do we have a script that generates index.js???)

That's correct, there is no such file. I don't see any script for that as well.

I was wondering that we might need index.d.ts from which we export all types (i.e. types used in App). but I guess if the library itself doesn't have index.js file, then we don't need to do this?

We don't need this as there is no index.js.

also, we have index.js specified as the main file in package.json. I believe libraries also usually have to specify types or typings field for the main d.ts file that is used when the main file is imported. But as we actually don't have index.js file, we don't have to specify types field?

Exactly, no need to specify it as there is no main index.js file.

@blazejkustra thank you for the great job and quick fix 🙌
Just a small adjustment left: I realized that types are still left in JSDoc comments in CONST.d.ts
Is it possible to remove them? 🙇
also @mountiny suggested here to add a new line at the end of each file. Unless it's a conversion not to include a new line in d.ts files, let's add new lines for the sake of consistency with other files 👍

This PR seems pretty crazy... I was on-board with approach only as a temporary measure, but seeing the actual PR is quickly dissuading me again

It seems like creating and maintaining this definition file is as much or more work than just re-writing this code using TypeScript and publishing the package as JS
It's also much less valuable since we have skipLibCheck set to true in our E/App tsconfig, so errors in these type declaration files will be ignored.

What would be the consequence if we just didn't do this at all right now, then properly implemented TypeScript in expensify-common at a slower pace?

This PR seems pretty crazy... I was on-board with approach only as a temporary measure, but seeing the actual PR is quickly dissuading me again

The approach to write type declarations is only a temporary solution, expensify-common will be migrated to Typescript right after App migration is finished.

It seems like creating and maintaining this definition file is as much or more work than just re-writing this code using TypeScript and publishing the package as JS

Yes this brings more work, but it is a temporary solution and eventually declaration files will be replaced with TS implementations.
These declaration files (.d.ts) were generated with tsc - meaning that I have .ts files which are almost ready (there are some TS warning/errors that would have to be fixed). The problem is that expensify-common is quite outdated and  Typescript setup in this repo would require much more changes like removal of grunt, babel, CI/CD changes and more. We agreed that E/App is the priority and type declarations in this repo will be eventually replaced with Typescript implementations. That's why I believe it is better to just stick to type declarations for now.

It's also much less valuable since we have skipLibCheck set to true in our E/App tsconfig, so errors in these type declaration files will be ignored.

Even with skipLibCheck: false Typescript doesn't check type declaration files with it's Javascript implementations. This flag is more about conflicts between different packages.

What would be the consequence if we just didn't do this at all right now, then properly implemented TypeScript in expensify-common at a slower pace?

A lot of @ts-ignore/@ts-expect-error annotations in E/app, and possibly some runtime errors that comes from wrong function usage. Type declarations are much better than nothing in my opinion.
cc @hayata-suenaga @roryabraham

@roryabraham thank you for sharing your concern, and I apologize if we haven't communicated to you well the reasoning behind why we agreed upon creating declaration files for expensify-common.

Type declarations are much better than nothing in my opinion.

I agree with @blazejkustra on this. There is no option to start migrating NewDot without doing anything to expensify-common. Anything is better than no type information.
So there are only two options:

Halt NewDot migration until we perfect typings of expensify-common and onyx
Create type declaration files for exposed functions/methods and push forward NewDot TS migration.

An important point to keep in mind is that type declaration files don't compromise type safety.
What do you think @roryabraham ❓

@roryabraham thank you for sharing your concern, and I apologize if we haven't communicated to you well the reasoning behind why we agreed upon creating declaration files for expensify-common.

Type declarations are much better than nothing in my opinion.

I agree with @blazejkustra on this. There is no option to start migrating NewDot without doing anything to expensify-common. Anything is better than no type information.
So there are only two options:

Halt NewDot migration until we perfect typings of expensify-common and onyx
Create type declaration files for exposed functions/methods and push forward NewDot TS migration.

An important point to keep in mind is that type declaration files don't compromise type safety.
What do you think @roryabraham ❓

@blazejkustra So you copied contents of .js files to .ts files and added types so that tsc can create d.ts files? Nice idea and thank you for your work 🙌

That's exactly what I did, maybe not the fastest way but it works 😄

I'm going to merge this because 4 of us agree it's good to go and I want to keep things moving. We can always do minor fixes in follow ups if needed.


Added Support Command In DM Bot

Type

[ ] Functions: <Function Name>
[ ] Callbacks: <Callback Name>
[ ] Handlers: <Handler Type>
[x] Others: pls Support Command/anything On DM Bot :(

Description
Please Add So We Can Use Command/or anything in DM Bot Pls, OnlyGuilds: false But It Doesn't Work

already possible, use support channels in Discord

btw its
guildOnly: false

already possible, use support channels in Discord

Oh. 🤐

issue solved


Internal Error (no-unused-imports)

The command:
# ktlint -a -F **/*.kt
/Users/alsk/Projects/hb_ep/modules/common/src/debug/java/net/easypark/android/extensions/RxExtensions.kt:1:1: Internal Error (no-unused-imports). Please create a ticket at https://github.com/pinterest/ktlint/issues (if possible, provide the source code that triggered an error) (cannot be auto-corrected)

The code:
package net.easypark.android.extensions

import io.reactivex.Observable

internal fun log(tag: String, value: Any) {
    println("$tag: $value")
}

fun <T> Observable<T>.dump(tag: String): Observable<T> =
    this
        .doFinally { log(tag, "doFinally") }
        .doOnNext { log(tag, "onNext: ${it.toString()}") }
        .doOnError { er -> log(tag, "onError: $er") }
        .doOnSubscribe { log(tag, "onSubscribed") }
        .doOnDispose { log(tag, "onDisposed") }
        .doOnComplete { log(tag, "onComplete") }

Version of ktlint used: 0.40.0
Operating System and version: MacOS: 10.15.7

Duplicates #996 and will be resolved in version 0.41

Duplicates #996 and will be resolved in version 0.41

Yep, this was already fixed, you could try the snapshot in the meantime

Yep, this was already fixed, you could try the snapshot in the meantime


Json Viewer improvements: VSCode theme, large font-size and line-height, and size of JSON data

I would like to suggest this feature might be helpful to every developer

Json Viewer theme - must include the vs theme style colors for key and value
Line-height and font size - font size 14 and line height should be 1.5 It will be increase the readability.
Show the size of json about the each curly bracket and total size of json.

hope this will be update soon.
Regards,
Prathamesh Shende

Thank you for the feature request. These improvements sound good to me. I'll make sure this item is added to our backlog for future prioritization and implementation.

Closing since JSON Viewer has been deprecated and removed from Microsoft Edge.


Fix build on mac

Please provide a description of this PR:

cc @bleggett, seems very related to the work you've been doing recently.

Yep, this is a no-op on non-linux, this file doesn't get built on non-linux, and we don't do any CNI builds at all for non-linux, so it makes sense that I missed this.

This has happened several times before and is not easily noticeable in linux environments.

Agree. I used to run Mac builds often and found these issues. Since we can no longer use Docker Desktop internally, I have moved to a Linux VM on my Mac so don't find these issues anymore.


Changes on external files not sync'd with LS state

Let's make sure issue is not already fixed in snapshots first.

[x] I verified I can reproduce this issue against latest snapshots build

Steps to reproduce
From a fresh installation and clean workspace:

Open a basic external Java file with File > Open File
Verify hover works (so LS is connected)

I tried

modify the file (eg change a method reference)
retry usual features (eg hover)

I expected: fresh results according to the change
But got: no change in returned results, the LS is not sync'd with the editor
Here is some relevant log output form (<workspace>/.metadata/.log)
I've debugged it and see that the document used by the editor is not the same as the one used internally by JDT-LS.
The expectation is that both share the same document. We'll need to investigate why a new document is created (by the editor apparently, JDT-LS's one seems created earlier) instead of the existing one being reused.
Tested under this environment:

OS & version: Fedora latest
Eclipse IDE/Platform version: Eclipse latest I-Build
...

Community

[x] I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.

Patch submitted upstream: https://github.com/eclipse-jdtls/eclipse.jdt.ls/pull/2885

Fixed upstream


New version: Transducers v0.4.80

Registering package: Transducers
Repository: https://github.com/JuliaFolds2/Transducers.jl
Created by: @MasonProtter
Version: v0.4.80
Commit: 69ee5665836da15989e1948cfb827088de25e022
Reviewed by: @MasonProtter
Reference: https://github.com/JuliaFolds2/Transducers.jl/commit/69ee5665836da15989e1948cfb827088de25e022#commitcomment-131759159
Description: Forked successor of https://github.com/JuliaFolds/Transducers.jl

Oops. Superseded by https://github.com/JuliaRegistries/General/pull/94786


Add support for Unix sockets

Description
This PR add a new case for the ClientRequest.Options which is socketPath(String)
Motivation and Context
It resolves issues #212
How Has This Been Tested?
NA
Checklist:

[x] I have submitted a CLA form
[x] If applicable, I have updated the documentation accordingly.
[x] If applicable, I have added tests to cover my changes.

@adellibovi The build is failing on Linux Trusty with:

/home/travis/build/IBM-Swift/Kitura-net/Sources/KituraNet/ClientRequest.swift:411:45: error: use of unresolved identifier 'CURLOPT_UNIX_SOCKET_PATH'
curlHelperSetOptString(handle!, CURLOPT_UNIX_SOCKET_PATH, UnsafePointer(socketPath))

Perhaps you'll have to import something #if os(Linux)?

@quanvo87 it works fine with Docker and Ubuntu 16.04, could it be something related to that specific image?

If you look at the Travis logs, it looks like the 2 failing environments are Swift 3 & 4 on Ubuntu 14.04. It is passing on Ubuntu 16.04.

CURLOPT_UNIX_SOCKET_PATH was introduced in curl v7.40.
Ubuntu 16.04 has curl v7.47 which includes this but 14.04 has curl v7.35 which does not.

In this case, what should we do? Find a way to dinamicaly support or not this feature depending on the availability of CURLOPT_UNIX_SOCKET_PATH? Or should we require a minimum version of Curl?

We could not require curl >7.40 as that would break support for ubuntu 14.04.
IMO, dynamically checking for the availability would be the way to go, but I am not aware of a way to do that using swift preprocessor conditionals. I think it would need to be done using a c helper function, for example in https://github.com/IBM-Swift/CCurl/blob/master/shim.h

I would try adding some logic for this in shim.h. In that file you could test if the appropriate define is defined.

Ok, I opened this PR: https://github.com/IBM-Swift/CCurl/pull/13, I will update this PR to momentary point to that a branch with that change.

I opened a PR about it: https://github.com/IBM-Swift/CCurl/pull/13 but I am not sure how to check for the availability of CURLOPT_UNIX_SOCKET_PATH

Codecov Report

Merging #213 into master will decrease coverage by 0.29%.
The diff coverage is 33.33%.

@@            Coverage Diff            @@
##           master     #213     +/-   ##
=========================================
- Coverage   74.03%   73.74%   -0.3%
=========================================
  Files          31       30      -1
  Lines        4152     4087     -65
=========================================
- Hits         3074     3014     -60
+ Misses       1078     1073      -5

Flag
Coverage Δ

#CHTTPParser
56.04% <ø> (-0.28%)
:arrow_down:

#KituraNet
73.74% <33.33%> (-0.3%)
:arrow_down:

Impacted Files
Coverage Δ

Sources/KituraNet/ClientRequest.swift
83.16% <33.33%> (-1.33%)
:arrow_down:

...ces/KituraNet/Server/ServerLifecycleListener.swift
79.16% <0%> (-4.17%)
:arrow_down:

Sources/KituraNet/FastCGI/FastCGIServer.swift
64.34% <0%> (-1.05%)
:arrow_down:

Sources/KituraNet/IncomingSocketHandler.swift
76.99% <0%> (-0.94%)
:arrow_down:

...urces/KituraNet/FastCGI/FastCGIServerRequest.swift
79.87% <0%> (-0.85%)
:arrow_down:

Sources/CHTTPParser/http_parser.c
55.84% <0%> (-0.28%)
:arrow_down:

Sources/KituraNet/HTTP/KeepAliveState.swift

Sources/KituraNet/HTTP/HTTPServerResponse.swift
79.41% <0%> (+0.36%)
:arrow_up:

Sources/KituraNet/HTTP/HTTPServer.swift
81.45% <0%> (+0.45%)
:arrow_up:

... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e04ee59...f269267. Read the comment docs.

Hi everyone, sorry for the waiting. I could fix the compiling error with Ubuntu 14.04 😄 It is dependent on https://github.com/IBM-Swift/CCurl/pull/13: How could we move this forward with the review? (I changed momentarily the dependencies to point to my CCurl branch in order to pass travis)
/cc: @kweinmeister

@billabt or @carlbrown, sorry for bothering, some of you could help with this, please? 😄

I’ll try an’ take a look tomorrow morning.

@adellibovi Apologies that this stalled for so long. I'd like to resurrect this work as part of adding Unix sockets support to Kitura. If you are still interested in making this contribution, please could you sign the CLA?
I would like to make some changes on top of this so that it is non-breaking: https://github.com/djones6/Kitura-net/commit/357806e0b491f6afcae235644a6e0d0fa8b31e24

Delivered via #296


locales folder

Could you please advise where the locales folder is to translate this plugin into hu (Hungarian - magyar) locale? Thank you

Hi @ovari , we are in the developing phase, as soon as possible we shipped the most stable version, we will inform and help you for local translation.

@HMarzban are you planning to ship the most stable version before any translations are accepted?

unfortunately, we didn't develop a structure for local translation yet.
I put this feature on top of my list.


Updating Docker Compose

Hello @jshaughn  and @lucasponce
Modifications:

Cassandra Images Updated to 3.0.12 (https://github.com/hawkular/hawkular-metrics#about)
Adding JAVA_OPTS environment variable for scaling java virtual machines.

LGTM. Thanks @gbaufake !


Changing default end date for event to match start date

Closes #918

marked as WIP in hopes steve/someone can do the other part I added to issue

@tonysurma Updated per feedback. Currently on loosing focus from the startdate box I have set the end date to the same value.
Is having a time against an event still valid our would just selecting the date be enough? With tasks then bounding the specific timings for things to occur within that date range? That might be a feature story if it needs to change but thoughts I'd ask.
Currently the field is set as date time so the time element is editable via the browser implementation of the date/time control.

events need dates and times and yes in tasks should have to fall within those bounds generally - but it gets funky as different folks do different things for tasks like setup and teardown (do you put event 9a-5p and setup 8a-9a or do you then make the event 8a-5p even tho only one tasks goes outside of the 'published' times for the event for example)

Not sure if event can span multiple days but if not, then Event StartDateTime and EndDateTime can be replaced with EventDate, StartTime and EndTime. This makes the implementation more explicit.
For tasks, the editor can use the EventData, StartTime and EndTime as a default, but the validation should be relaxed so tasks are not restricted to be inside the Event Start and End time. Hence allowing setup or teardown tasks.


Request upgrade ajv version: Synk Failing - Prototype Pollution - High Severity

Currently, we are having some security warning in synk. It's requesting upgrade ajv version of angular-devkit to 6.12.3 from 6.12.0
Current ajv version by angular-devkit
https://github.com/angular/angular-cli/blob/d5847623d9ebc7f4f7d116370baf06c74b50e56e/package.json#L126
Error message
<EMAIL_ADDRESS>Prototype Pollution [High Severity][https://snyk.io/vuln/SNYK-JS-AJV-584908] in<EMAIL_ADDRESS>introduced by<EMAIL_ADDRESS>><EMAIL_ADDRESS>and 1 other path(s)
This issue was fixed in versions: 6.12.3

Closed via the above referenced PRs.


Add bower checker, update travis to use it and add separate testing script

Continuation of https://github.com/exercism/purescript/pull/72

Add dependency checker to the build which would confirm that all exercises are using the same versions as the common bower.json
Update documentation for contributing to mention the additional restrictions
Adds test-separate.sh that can be used to compile and test all exercises separately, instead of merging them like test.sh used in Travis build does. Had it built for previous testing, so figured I can include it. Might be useful down the road...

This completes things mentioned in https://github.com/exercism/purescript/pull/71.
@lpil please check if all good when you get a chance.

Thanks @lpil!


Add flag to sort groups by name, by default sorting is disabled

In request to issue #26 and for my usage :)

Awesome. Looks good to me! Can you do me a favor and rebase this down into one commit, just to keep git history clean?
:green_apple:

Sure i just writing tests now :) So give me one more second.

Done ;)

This looks good. One question, though -- the title of the PR says by default sorting is disabled, but, looking at the code, it looks like it's enabled by default, and you opt-out with the flag --no-sort-by-name?

@marklarr Yep sorry for inconsistent, first version was with disabled, but i change it and forget to edit PR title :)

Sweet! Looks good. I'll release this tonight.

0.2.0 released


WIP: Added new static Chord function to provide chord possibilities from [Notes]

To help make #17 a reality, @aure and I are working on a new static function in Chord that can take an array of Note and provide ranked possible chords. This is still WIP (specifically around the demo portion of the code) but currently passing new test and will open up alot of possibilities.

Nice guys!! Excited to test this


Zone processing fix

Given that there hasn't been any progress on this, I'm going to close this pull request. I'm probably going to pull zone record processing out of ZDNS for version 1.0 since the code is in poor shape and I'd like to focus on fixing other issues (e.g., fixing ALOOKUP module). We can ship it in a future release once it's been rewritten.


Allow collecting from Values as well as  Option<value>

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
I would like to create integer arrays out of iterators of integers rather than an iterator of Option<integer>
Specifically I would like to do something like this:
let column_a = vec![1, 2, 3, 4].into_iter().collect::<Int32Array>();

To collect a vector of integers into a Int32Array with no null values. However, this results in a compiler error:
error[E0277]: the trait bound `{integer}: Borrow<Option<i32>>` is not satisfied
  --> src/main.rs:53:49
   |
53 |     let column_a = vec![1, 2, 3, 4].into_iter().collect::<Int32Array>();
   |                                                 ^^^^^^^ the trait `Borrow<Option<i32>>` is not implemented for `{integer}`
   |
   = help: the following implementations were found:
             <&T as Borrow<T>>
             <&mut T as Borrow<T>>
             <Arc<T> as Borrow<T>>
             <Box<T, A> as Borrow<T>>
           and 16 others
   = note: required because of the requirements on the impl of `FromIterator<{integer}>` for `PrimitiveArray<datafusion::arrow::datatypes::Int32Type>`

The FromIter implementation that is provided uses Option<i32> so this does work
let column_a = vec![Some(1), Some(2), Some(3), Some(4)].into_iter().collect::<Int32Array>();

Describe the solution you'd like
I would like a FromIter impementation for the various types that allows the following to work:
    // signed
    let column_a = vec![1, 2, 3, 4].into_iter().collect::<Int8Array>();
    let column_a = vec![1, 2, 3, 4].into_iter().collect::<Int16Array>();
    let column_a = vec![1, 2, 3, 4].into_iter().collect::<Int32Array>();
    let column_a = vec![1, 2, 3, 4].into_iter().collect::<Int64Array>();
   // unsigned
    let column_a = vec![1, 2, 3, 4].into_iter().collect::<UInt8Array>();
    let column_a = vec![1, 2, 3, 4].into_iter().collect::<UInt16Array>();
    let column_a = vec![1, 2, 3, 4].into_iter().collect::<UInt32Array>();
    let column_a = vec![1, 2, 3, 4].into_iter().collect::<UInt64Array>();
   // floats
    let column_a = vec![1, 2, 3, 4].into_iter().collect::<Float32>();
    let column_a = vec![1, 2, 3, 4].into_iter().collect::<Float64>();
    let column_a = vec![1.0, 2.0, 3.0, 4.0].into_iter().collect::<Float32>();
    let column_a = vec![1.0, 2.0, 3.0, 40].into_iter().collect::<Float64>();
   // strs
    let column_a = vec!["foo", "bar", "baz"].into_iter().collect::<Float32>();

Additional context
Add any other context or screenshots about the feature request here.

I'd like to contribute to this feature. Can you assign this issue to me?

That is great to hear @arucil  -- I have assigned the ticket to you as requested

I couldn't figure out how to add another impl FromIterator for PrimitiveArray. At first I simply copy the impl block of FromIterator<Option<T>> and delete Option,
impl<T: ArrowPrimitiveType, Ptr: Borrow<Option<<T as ArrowPrimitiveType>::Native>>>
    FromIterator<Ptr> for PrimitiveArray<T>
{ ... }

impl<T: ArrowPrimitiveType, Ptr: Borrow<<T as ArrowPrimitiveType>::Native>>
    FromIterator<Ptr> for PrimitiveArray<T>
{ ... }

however this yields a

conflicting implementations of trait std::iter::FromIterator<_> for type array::array_primitive::PrimitiveArray<_>

error.
Then I changed Option<T> to an additional generic parameter U: Into<Option<T>>,
impl<T: ArrowPrimitiveType, Ptr: Borrow<U>, U: Into<Option<T::Native>>>
    FromIterator<Ptr> for PrimitiveArray<T>
{ ... }

This didn't work either. This yields a the type parameter U is not constrained by the impl trait, self type, or predicates error.
Any help is appreciated.

Hi @arucil  -- this is a tricky one for sure. My Rust Fu this afternoon is not quite up to the task
I think I was making progress by defining a marker trait so we could have a single FromIter implementation
Something like this:
// Define a marker trait so we can implement FromIter for wrapped
// Options variants as well as non Option variants
// https://stackoverflow.com/questions/39159226/conflicting-implementations-of-trait-in-rust
trait IntoPrimitiveOption : Sized {
    type Primitive;

    // Convert self into an Option
    fn into_primitive_opt(&self) -> Option<Self::Primitive>;
}

...
impl<T: ArrowPrimitiveType, P: IntoPrimitiveOption<Primitive=T>>
    FromIterator<P> for PrimitiveArray<T>
{
...
}

However,  my attempts to define IntoPrimitiveOption correctly for ArrowPrimitiveType was not getting anywhere. Maybe we need to do it for individually for each type that implements ArrowPrimitiveType? I am not sure though.
This didn't work

impl <T: ArrowPrimitiveType> IntoPrimitiveOption for T{
    type Primitive = T::Native;

    fn into_primitive_opt(&self) -> Option<Self::Primitive> {
        let v:T = *self;
        Some(v)
    }
}

impl <T: ArrowPrimitiveType> IntoPrimitiveOption for Option<T>{
    type Primitive = T::Native;

    fn into_primitive_opt(&self) -> Option<Self::Primitive> {
        self.cloned()
    }
}

FYI @jorgecarleitao

Note I also just found from_iter_values() -- https://github.com/apache/arrow-rs/blob/master/arrow/src/array/array_primitive.rs#L112-L124 which is basically made for this usecase 🤔

So this doesn't work because specialization isn't done yet... the problem is that if these two trait implementations:
impl<T: ArrowPrimitiveType, Ptr: Borrow<Option<<T as ArrowPrimitiveType>::Native>>>
    FromIterator<Ptr> for PrimitiveArray<T>
{ ... }

impl<T: ArrowPrimitiveType, Ptr: Borrow<<T as ArrowPrimitiveType>::Native>>
    FromIterator<Ptr> for PrimitiveArray<T>
{ ... }

were allowed, then someone could come along and add:
impl Borrow<Option<i32>> for Integer32 { ... }
impl Borrow<i32> for Integer32 { ... }

and then Rust wouldn't know which FromIterator implementation to use.
@shepmaster helped with this answer; I only got as far as "I think it's specialization related, but I don't know why" ;)
He also pointed me to https://stackoverflow.com/questions/37347311/how-is-there-a-conflicting-implementation-of-from-when-using-a-generic-type, perhaps that will be of some help to someone.
I'm working with @shepmaster on a way around this but we might not be able to finish it until Wednesday.

I've been working on an Arrow implementation for applications with statically known data types. The way that I've managed to express this is by adding a boolean const generic to array types that indicate the nullability of an array (true indicates nullable). This makes nullable and non-nullable arrays different types allowing:
impl FromIterator<Option<Foo>> for FooArray<true> { ... }
impl FromIterator<Foo> for FooArray<false> { ... }

Type check fails when you attempt to collect the iterator in an array type with the wrong nullability generic value.
#[derive(Array, Copy, Clone, Default)]
struct Foo {
    a: bool,
}

// Fails to type check
let array = [Foo::default(); 4]
    .iter()
    .copied()
    .collect::<StructArray<Foo, true>>();

// Compiles
let array = [Foo::default(); 4]
    .iter()
    .copied()
    .collect::<StructArray<Foo, false>>();

a value of type `StructArray<Foo, true>` cannot be built from an iterator over elements of type `Foo`
the trait `FromIterator<Foo>` is not implemented for `StructArray<Foo, true>`

This would work for a nullable array:
let array = [Some(Foo::default()); 4]
    .iter()
    .copied()
    .collect::<StructArray<Foo, true>>();

Currently const arguments cannot be inferred by the compiler, but that might be possible in the future making this more ergonomic.
let array = [Foo::default(); 4]
    .iter()
    .copied()
    .collect::<StructArray<Foo, _>>();


New package: CGAL v0.1.0

Registering package: CGAL
Repository: https://github.com/rgcv/CGAL.jl
Created by: @rgcv
Version: v0.1.0
Commit: 524fb04a754555a3e31ed73e0dec356e9c111357
Reviewed by: @rgcv
Reference: https://github.com/rgcv/CGAL.jl/commit/524fb04a754555a3e31ed73e0dec356e9c111357#commitcomment-40574111

[noblock] I probably should do a package announcement on discourse, but I'll take the time to talk about it a bit here.
First off, hello everyone!
I've been hammering away for quite a while now mapping CGAL types, functions, and algorithms to julia for my sake. Nonetheless, I'd like to make it available for anyone and everyone who would be interested in using it.
It currently makes available most, if not all, kernel objects, a few packages, albeit not entirely mapped due to some technical limitations, along with intellectual ones (I'm not that smart of a cookie). Documentation is relatively lacking, only having some reference docs available. Future work, I suppose.
Part of making it widely available also consequently allows me to use it as a dependency without creating an entire separate registry, cutting that extra overhead off.


Strange Numba behaviour

I recently installed numba 0.24
I am seeing an error which I never encountered before

from numba import njit
@njit
def foo(c):
    @njit
    def bar(i):
        return 2 * i
    return bar(c + 1)
foo(1)
--------
    252             ts = "offset=%d opcode=0x%x opname=%s"
    253             tv = offset, opcode, dis.opname[opcode]
--> 254             raise NotImplementedError(ts % tv)
    255         if info.argsize:
    256             arg = self.read_arg(info.argsize)

NotImplementedError: offset=9 opcode=0x84 opname=MAKE_FUNCTION

But if I define bar outside foo then there is no error! Is this intentional? Is this a bug? Was this already in previous versions of numba or did it break only in 0.24?

This was already in previous versions. Basically you can't define a function inside a JITted function.


Update sbt-scalajs, scalajs-compiler to 1.1.1

Updates

org.scala-js:sbt-scalajs
org.scala-js:scalajs-compiler

from 0.6.33 to 1.1.1.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scala-js" } ]

labels: library-update, semver-major

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Config parsing fails when i18n is set to duplicate

Describe the bug
As per #7291 upon recently trying to configure a i18n site with the new i18n: duplicate value on a per-field basis as per the i18n Documentation, I discovered it causes my config to fail to parse.
Expected behavior
Setting i18n: duplicate should not cause config to fail to parse and should duplicate fields in a read-only fashion in the cloned page.
Screenshots

Applicable Versions:

Decap CMS version: decap-cms 3.4.0
Git provider: GitLab
OS: Linux
Browser version Firefox 115.14
Site generator: Hugo
Decap Setup: Hugo Module headless-cms

CMS configuration
  locale: "en"
  i18n:
    structure: multiple_files
    locales: [en, de]
    default_locale: en
  slug:
    encoding: "ascii"
    clean_accents: true
    sanitize_replacement: "-"
  collections:
    - name: "blog"
      label: "Blog"
      label_singular: "Blog"
      folder: "content/blog"
      path: "{{slug}}"
      widget: "list"
      create: true
      i18n: true
      editor:
        preview: true
      preview_path: "blog/{{slug}}"
      media_folder: '/static/uploads'
      public_folder: '/uploads'
      fields:
        - label: "Title"
          name: "title"
          widget: "string"
          i18n: true
        - label: "Draft"
          name: "draft"
          widget: "boolean"
          default: true
          i18n: true
        - label: "Image"
          name: "banner"
          widget: "image"
          required: false
          default: "/uploads/placeholder.jpg"
          choose_url: true
          media_folder: '/static/uploads'
          public_folder: '/uploads'
          i18n: true

If I change any of the i18n: true values in the fields to i18n: duplicate I get the broken config parsing error shown above.

@privatemaker it seems that the problem is with the widget list. This one does not support i18n: duplicate. Itself and all its children should thus have i18n: true.
This is mentioned in docs like this:

List widgets only support i18n: true. i18n configuration on sub fields is ignored.

I would say that the docs are ok, but we could improve the error message.

Thanks for investigating. I did get it working by trial and error of eliminating all instances of it and slow re-adding on different fields. But this is a bit random and wacky.
So, I think the docs could be improved a bit and will send a pull-request 😄


Refactoring: remove critical sonar issues

Codecov Report

Merging #23 into master will decrease coverage by -0.53%.
The diff coverage is 50.38%.

@@             Coverage Diff             @@
##             master     #23      +/-   ##
===========================================
- Coverage     48.93%   48.4%   -0.53%
+ Complexity      439     435       -4
===========================================
  Files            84      84
  Lines          2152    2161       +9
  Branches        122     127       +5
===========================================
- Hits           1053    1046       -7
- Misses         1036    1048      +12
- Partials         63      67       +4

Impacted Files
Coverage Δ
Complexity Δ

...om/axibase/tsd/example/AtsdClientWriteExample.java
0% <0%> (ø)
0 <0> (ø)
:x:

...com/axibase/tsd/example/AtsdClientReadExample.java
0% <0%> (ø)
0 <0> (ø)
:x:

...java/com/axibase/tsd/example/ExportCsvExample.java
0% <0%> (ø)
0 <0> (ø)
:x:

...axibase/tsd/example/AbstractAtsdClientExample.java
0% <0%> (ø)
0 <0> (ø)
:x:

.../axibase/tsd/model/data/command/GetAlertQuery.java
0% <0%> (ø)
0 <0> (ø)
:x:

...a/com/axibase/tsd/client/IgnoringTrustManager.java
0% <0%> (ø)
0 <0> (ø)
:x:

...ase/tsd/model/data/command/GetPropertiesQuery.java
73.52% <100%> (ø)
14 <6> (ø)
:x:

...e/tsd/model/data/filters/DeletePropertyFilter.java
58.33% <100%> (-14.4%)
9 <2> (-1)

...ibase/tsd/model/data/command/GetMessagesQuery.java
55.1% <100%> (-8.17%)
17 <0> (-2)

...n/java/com/axibase/tsd/client/MetaDataService.java
79.03% <100%> (+2.41%)
33 <1> (+1)
:white_check_mark:

... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a3cedf...0adbe43. Read the comment docs.


Recheck datatypes

In general, datatypes should be checked/discussed again. A specific case that was observed:
The range is not explicitely specified for hasSymbol. See here. I am not sure if this is an issue for the ontology itself, but an explicit specification is needed for owlready2 to parse the term. I added the following line to test:
        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>

and owlready2 parsed it as expected.

[ ] hasSymbol (string)
[ ] hasValue (?)
[ ] hasReference (string)
[ ] hasSpaceGroupSymbol (string)


Feature/custom snapshot launch

Description

Added a public string CustomSnapshotPath variable to the GdkToolsConfiguration class and a public const string CustomSnapshotPath to the DefaultValues class.

Added a "Custom snapshot path" field to the "GDK Tools Configuration" window. The field is disabled and can be only be edited via a file picker.

Added a private static GdkToolsConfiguration gdkToolsConfig variable to the LocalLaunch class, used to load the custom snapshot path. I've also split some code from the LaunchLocalDeployment method for code reusability.

Tests
Performed manual tests only with snapshots created with the snapshot generator. If an invalid snapshot is loaded the default error from the launcher is shown in the editor.
Documentation
No documentation yet
Primary reviewers
If your change will take a long time to review, you can name at most two primary reviewers who are ultimately responsible for reviewing this request. @ mention them.

Need to resolve the CHANGELOG.md conflicts and update the entry a little bit then I think this is good to go 😄


Post most mentioned stocks of reddit in channel

r/wallstreetbets, r/stocks, r/StockMarket, r/investing, r/options
Just like https://twitter.com/stockmentionbot?ref_src=twsrc^google|twcamp^serp|twgr^author

Get the tickers from tradingview and then check if they are in post title + text


Sigset conveniance

Adds convenience functions for dealing with SigSet.
let mut sigset = SigSet::empty();
sigset.add(SIGINT);
pthread_sigmask(SigmaskHow::SIG_SETMASK, Some(&sigset), None)

becomes
let sigset = SigSet::from(SIGINT);
pthread_sigmask(SigmaskHow::SIG_SETMASK, Some(&sigset), None)

let mut sigset = SigSet::empty();
sigset.add(SIGINT);
sigset.add(SIGUSR1);
sigset.wait();

becomes
(SIGINT | SIGUSR1).wait();

Seems worthwhile to add a changelog note about this. Otherwise looks good, thanks!

@rtzoeller Added change logs notes.

@rtzoeller Could you please re-review.

Except for that duplicate CHANGELOG section, this PR LGTM
BTW, nice improvement!

@SteveLauC

### Addded has already been added:

Yeah but I didn't add it, there where 2 ### Added sections before this PR.

Yeah but I didn't add the 2nd one, there where 2 ### Added sections before this PR.

Get it, would you like to fix them in this PR? Merging them as-is still LGTM, then I will fix it in another PR

The current CHANGELOG.md mode is indeed bad, making contributing experience suck, I hope we can switch to towncrier as soon as possible...

Yeah but I didn't add the 2nd one, there where 2 ### Added sections before this PR.

Get it, would you like to fix them in this PR? Merging them as-is still LGTM, then I will fix it in another PR
The current CHANGELOG.md mode is indeed bad, making contributing experience suck, I hope we can switch to towncrier as soon as possible...

I think it would make sense to fix this in a specific PR.

Thanks!


Questions about the dimension of W_up and W_down

Thanks for your great work, ZeroI2V! The idea is quite impressive. I just have a few quick questions about your linear adapter.

You have mentioned in your paper:
W_new = W_Adapter * W_old = (I + W_up * W_down)*W_old
So assume W_old's dimension is m * n
Your W_new is also m * n, is that correct?
Then in this case W_up should be m * k and W_down should k * m and W_Adapter is a square matrix here, is this correct?

Why does LoRA require more tuning parameters comparing with linear adapter?
Really appreciate your help and your work! Thanks!

You're absolutely right.
In the same bottleneck, the parallel LoRA needs to fit $W_{m \times 4m}$, while the  linear adapter still only needs to fit $W_{m \times m}$, which causes more tuning parameters.

Thanks for your prompt reply!
Sorry I may miss something for my second question. Given W_old is a m x n matrix. Linear Adapter required two matrices, W_up and W_down which has m x k and k x m dimension. So the additional tuning parameters are 2 x m x k.
For LoRA, W_up and W_down dimension are m x k and k x n, so the additional tuning parameters are (m + n) x k.
I'm not sure why is there a 4m?
Thanks!

Sorry for your confusion, for MLP in transformer, W_up^mlp are mx4m.

Got it! Thanks for the prompt clarification!


Remove isSupportedFileKind since it must always return true.

Also move DefinitionFileKind to the only file it's used in.

:+1:


embedded mode not use leader elect

It help for debug, otherwise it fault  leaderelection lost for cattle-controllers

@better0332 you can set the envvar CATTLE_DEV_MODE which will give you hours before you hit this issue. https://github.com/rancher/norman/blob/master/leader/leader.go#L56

Closing based off previous comment


Typo "[@name = ]"→"`[ @name = ]"

https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-set-database-firewall-rule-azure-sql-database?view=azuresqldb-current

@hyoshioka0128 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Thanks @hyoshioka0128!
#sign-off


Add AndersonWrapper

I added AndersonWrapper class to accelerate Jaxopt optimizers with Anderson acceleration.
Several modifications have been made:

AndersonWrapper and its tests
AndersonWrapper documentation
AndersonWrapper example on Block CD
AndersonAcceleration refactorization
pytree are supported in history => no need for tree_collapse or tree_uncollapse
scalar are now supported in Anderson (not only arrays)

Issue introduced:

as result of pytree usage, the linear system is slower to solve: building GTG is a bit more expansive (see TODO).

By default I put this feature in V0.1 (in changelog) but I can move it to 0.2 if necessary.
Todo list (in future PR ?):

correct speed issue
add option for modulo in Anderson

I forced push some modifications to solve the speed issue.
Speed in main for anderson_tests: 17s
Speed before correction: 31s
Speed after correction (current state of my PR): 21s

After further reflexion, it appears that a single pytree with batched leafs is more Jax-like than a list of pytrees with unbatched leafs. It allows to benefit from hardware acceleration much more easily when params is big. This new push reflects this change in history.


Addes=>Data Structures=>Trie Data Structure(Java)

Assigned Issue Number ?
#1527
Language Opted ?
Java
Number of files added or updated ?
1
Name of these files ?
Addes=>Data Structures=>Trie Data Structure(Java)
Checklist

[x ] I've read the contribution guidelines.
[x] I've referred the correct issue number.
[x ] I've fill up this entire template correctly.

Ok


bash syntax highlighting incorrect

not sure if this is the right place, but the bash syntax highlighter breaks if command substitution is done inside parameter expansion
foo=${foo:-$(date | awk '{print $0}')}

# now everything is messed up
for f in ./*.js; do
  echo "$f"
done

The curly braces inside the awk command throw off the outside curly braces used around the variable it seems

Linguist only selects the grammar to highlight the language based on the detection results. atom/language-shellscript is used to highlight Bash code. You should open an issue there ;)

I believe this is now fixed. Please re-open if not!


DISTINCT COUNT/SUM/AVG NULL support.

Codecov Report

Merging #11348 (d44c872) into master (f25f3ed) will decrease coverage by 53.83%.
Report is 3 commits behind head on master.
The diff coverage is 0.00%.

@@              Coverage Diff              @@
##             master   #11348       +/-   ##
=============================================
- Coverage     68.46%   14.64%   -53.83%
+ Complexity     6535      494     -6041
=============================================
  Files          2233     2159       -74
  Lines        119952   116852     -3100
  Branches      18191    17769      -422
=============================================
- Hits          82128    17112    -65016
- Misses        31984    98325    +66341
+ Partials       5840     1415     -4425

Flag
Coverage Δ

integration1
?

integration2
?

java-11
14.64% <0.00%> (-53.77%)
:arrow_down:

java-17
?

java-20
?

temurin
14.64% <0.00%> (-53.83%)
:arrow_down:

unittests1
?

unittests2
14.64% <0.00%> (-0.02%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed
Coverage Δ

...gregation/function/AggregationFunctionFactory.java
0.00% <0.00%> (-83.62%)
:arrow_down:

...tion/BaseDistinctAggregateAggregationFunction.java
0.00% <0.00%> (-50.83%)
:arrow_down:

...ation/function/DistinctAvgAggregationFunction.java
0.00% <0.00%> (-86.67%)
:arrow_down:

...ion/function/DistinctAvgMVAggregationFunction.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...ion/function/DistinctCountAggregationFunction.java
0.00% <0.00%> (-80.00%)
:arrow_down:

...n/function/DistinctCountMVAggregationFunction.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...ation/function/DistinctSumAggregationFunction.java
0.00% <0.00%> (-85.72%)
:arrow_down:

...ion/function/DistinctSumMVAggregationFunction.java
0.00% <0.00%> (-100.00%)
:arrow_down:

... and 1702 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Chess:+Move+D2+to+D3

Please+do+not+change+the+title.+Just+click+"Submit+new+issue".+You+don't+need+to+do+anything+else+:D

@BeniNobel Sorry, I can't understand the command. Please try again and do not modify the issue title!


[DOCUMENTATION] Revisions for docgen

This PR should not yet be merged, it is still a WIP. We are making changes to improve docgen

Docstrings must have blank lines between the description and the parameter markup
Types, when possible, should be linked with class markup
Docstrings should no longer have lines that extend beyond 100 chars

Remaining concerns:

How to handle multiple types for a parameter or return value (e.g. twin operations, message operations)
Consistency of detail. Some docs are extremely in depth re: explaining IoTHub functionality, some assume IoTHub literacy. We should be consistent.
Validity of docs. Some of them need revision for accuracy of content.
Classmethod documentation is not yet being generated correctly wrt the cls arg

THIS PR HAS BEEN CARRIED OVER TO MAIN PYTHON REPO (https://github.com/Azure/azure-iot-sdk-python/pull/295)

Please move this to the azure/azure-iot-sdk-python repository

This PR carried over into new repo (https://github.com/Azure/azure-iot-sdk-python/pull/295)


time sync

Issue Description
Type: feature request
Describe what feature you want
for kubernetes ,time sync is very import, so we need used ntpd or better ?
Additional context
Add any other context or screenshots about the feature request here.

@cuisongliu ,this issue is duplicate  with the #308 ,and i am working on it now.


Is it possible to know the neighbor triangle of each edge in a triangle?

Thank you.

See https://mapbox.github.io/delaunator/

Can I contribute to this issue


fix: standardise the usage of url validator

Details

This PR fixes the broken URL validation while adding a bank account. Instead of using a new Regex to validate the URL, I'm making use of the existing one in the expensify-common library.
Fixed Issues

$ https://github.com/Expensify/App/issues/17205
PROPOSAL: https://github.com/Expensify/App/issues/17205#issuecomment-1503353523
Tests

Open the Settings menu.
Click on "Workspaces."
Select "Connect Bank Account."
Click on "Company Information (step 2 of 5)."
Click on “Company Website”.
Enter any URL but remove the dot (.) from it.

Verify that error shows up correctly stating the URL as invalid.

[x] Verify that no errors appear in the JS console

Offline tests

N/A
QA Steps

Open the Settings menu.
Click on "Workspaces."
Select "Connect Bank Account."
Click on "Company Information (step 2 of 5)."
Click on “Company Website”.
Enter any URL but remove the dot (.) from it.

Verify that error shows up correctly stating the URL as invalid.

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

https://user-images.githubusercontent.com/30054992/232696117-ed5552b2-c93b-4daf-8505-44322c77e7d8.mov

Mobile Web - Chrome

https://user-images.githubusercontent.com/30054992/232696217-4acc5598-d95d-47df-aacd-4ab0b5a0a825.mov

Mobile Web - Safari

https://user-images.githubusercontent.com/30054992/232696291-e3c8c9f1-841d-44ef-9d92-bbc282fb0373.mov

Desktop

https://user-images.githubusercontent.com/30054992/232696351-b118c6fb-0d6a-4064-8649-34e9e890e51e.mov

iOS

https://user-images.githubusercontent.com/30054992/232708270-a1e80046-8ff7-472d-8dc2-4f956af844ad.mov

Android

https://user-images.githubusercontent.com/30054992/232696420-23ea8d2a-b399-4c11-a132-3e6b5cbef7fd.mov

@puneetlath @thesahindia One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

Ok, cool. I think those changes make sense. So we should make the expensify-common update first and then use this PR to up the expensify-common version used in App, yeah?

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/puneetlath in version: 1.3.7-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


change library to AboutLibraries for licenses 2

Issue

#592

JaCoCo Code Coverage 77.22% :white_check_mark:

Class
Covered
Meta
Status

  Generated by :no_entry_sign: Danger

Snapshot diff report

File name
Image


Fix strokeStyle documentation

See #13024. It seems the documentation for the strokeStyle constructor option of ol/layer/Graticule is misleading.

Funny.  I just left another comment on the support request about permanently queued Code scanning results / CodeQL check - and then returned here to find they were now marked as complete!


implement simulation mode switches

C++ code generation lacks switching between spike generation modes and execution modes such as spiking execution and real-valued execution. this should be done from the python side without changing c++ code templates.

solved with [commit]


proof of stake in besu

In which file can I find proof of stake algorithm mechanism?
for example I found pow in ethash.java file.
@non-fungible-nelson

@garyschulte
Do you know what should I do?


Revert "Disabled MVU tests for sys-dm_exec_sessions-dep, sys-host_nam…

…e, forjsonauto (#3123)"
This reverts commit 81de5b90af7dc46a07d80803d566162b56c401d7.
Description
[Describe what this change achieves - Guidelines below (please delete the guidelines after writing the PR description)]

What is the change? This is best described in terms of “Currently, Babelfish does X. With this change it now does Y.” Think of “What did it used to do?” and “What does it do now?”

Why was the change made? What drove our desire to put effort into the change?
How was the code changed should only appear for large commits. This can serve as a rough roadmap to what’s contained in the commit. It should be very high level; if it’s directly referencing code it’s probably too detailed. It’s also critical that this section of a commit message does not try to replace proper code documentation (ie, block comments or README files). Generally, this section should only appear if the commit itself is large enough that it’s helpful to provide a roadmap to someone looking at the commit.
The last descriptive piece is the “title” for the commit: the very first line of the commit message, which should typically be less than 80 characters. A good title is critical, because it’s the only thing that shows up in places like the Github commit listing. No one’s got time to read through full commit messages when trying to find a single commit out of dozens.

Issues Resolved
[List any issues this PR will resolve]
Test Scenarios Covered

Use case based -

Boundary conditions -

Arbitrary inputs -

Negative test cases -

Minor version upgrade tests -

Major version upgrade tests -

Performance tests -

Tooling impact -

Client tests -

Check List

[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>1
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 74.654%

Totals

Change from base Build<PHONE_NUMBER>8:
0.0%

Covered Lines:
46024

Relevant Lines:
61650

💛  - Coveralls


Cannot convert value of type 'Promise' to expected argument type '(Any) throws -> Void' Error in Swift

                getAllUsers(gsuiteName: gsuiteName).then(uploadUsers(arr1: currentUsersEM,arr2: currentUsersUS)).then(newScreen())
Am trying to use this library for the first time and am running into this error when chaining promises together:

Cannot convert value of type 'Promise' to expected argument type '(Any) throws -> Void' Error in Swift

Here is the code for getAllUsers() and uploadUsers():
` func getAllUsers(gsuiteName: String) -> Promise{
    Database.database().reference().child("Messages").child(gsuiteName).child("USERS").observe(.value) { (snapshot) in
        //when(
        for child in snapshot.children{
            self.currentUsersEM.append((child as AnyObject).value as String)
            self.currentUsersUS.append((child as AnyObject).key as String)
        }
        self.currentUsersEM.append((Auth.auth().currentUser?.email)!)
        self.currentUsersUS.append(self.username.text!)
    }
    return Promise {
        return nil
    }
}
func uploadUsers(arr1: Array<String>, arr2: Array<String>) -> Promise<Any>{
    for usCount in 0..<(arr1.count){
        print("USERNAME\(arr1[usCount] as! String)")
        print("EMAIL\(arr2[usCount] as! String)")
        //Database.database().reference().child("Messages").child(gsuiteName).child("USERS").setValue([currentUsersUS[usCount] as! String :currentUsersEM[usCount] as! String])
    }
    return Promise{
        return nil
    }
}
func newScreen(){
    let changeRequest = Auth.auth().currentUser?.createProfileChangeRequest()
    changeRequest?.displayName = self.username.text
    changeRequest?.commitChanges { (error) in
        self.performSegue(withIdentifier: "goToChat", sender: self)
        //}
    }
}`

You should take a look at Creating promises closely.
Promise { nil } is correct in your situation.
let yourObject: Any
//or
let yourError: Error
It should either be Promise(yourObject) or Promise(yourError).
If you want to return Promise(nil), then your function should return Promise<Any?> type.

You should take a closer look at Creating promises.
return Promise {
  return nil
}

This is not a valid declaration.
It should Either be
return Promise { () -> Any
  return yourAnyObject
}

or
return Promise<Any> { fulfill, reject in
  fulfill(yourAnyObject)
}

If you want to return nil, then your Promise type should be Promise.

Hi Darrow8,
I recommend taking a closer look at Creating promises.
return Promise {
  return nil
}

This is not a valid declaration.
It should Either be
return Promise { () -> Any
  return yourAnyObject
}

or
return Promise<Any> { fulfill, reject in
  fulfill(yourAnyObject)
}

If you want to return nil, then your Promise type should be Promise<Any?>.


Fires query too often - need limit of concurrent/close calls

We would like to control how often search queries hit the server.  We do not want to fire more than one per second, regardless of how fast the user types.  Is this possible?

Take a look at the rateLimitWait option.