Network failure occurs when loading zero123

`[INFO] loading zero123...
Traceback (most recent call last):
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connectionpool.py", line 404, in _make_request
self._validate_conn(conn)
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1058, in _validate_conn
conn.connect()
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connection.py", line 363, in connect
self.sock = conn = self._new_conn()
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f33c0792cd0>: Failed to establish a new connection: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen
retries = retries.increment(
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/bennyguo/zero123-xl-diffusers (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f33c0792cd0>: Failed to establish a new connection: [Errno 110] Connection timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 901, in
gui.train(opt.iters)
File "main.py", line 875, in train
self.prepare_train()
File "main.py", line 145, in prepare_train
self.guidance_zero123 = Zero123(self.device)
File "/home/lancer/dreamgaussian/guidance/zero123_utils.py", line 29, in init
self.pipe = Zero123Pipeline.from_pretrained(
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/diffusers/pipelines/pipeline_utils.py", line 939, in from_pretrained
cached_folder = cls.download(
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/diffusers/pipelines/pipeline_utils.py", line 1441, in download
info = model_info(
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1697, in model_info
r = get_session().get(path, headers=headers, timeout=timeout, params=params)
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send
return super().send(request, *args, **kwargs)
File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/bennyguo/zero123-xl-diffusers (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f33c0792cd0>: Failed to establish a new connection: [Errno 110] Connection timed out'))"), '(Request ID: ac1df403-7df9-489f-b9c9-7f9d7ad8cd24)')
`
Can I git zero123 to the specified folder myself to solve this problem?

@TsingyuanChou
Hi Chou,  I have the same issue.  Have you fixed it？

`[INFO] loading zero123... Traceback (most recent call last): File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connectionpool.py", line 404, in _make_request self._validate_conn(conn) File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1058, in _validate_conn conn.connect() File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f33c0792cd0>: Failed to establish a new connection: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/bennyguo/zero123-xl-diffusers (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f33c0792cd0>: Failed to establish a new connection: [Errno 110] Connection timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "main.py", line 901, in gui.train(opt.iters) File "main.py", line 875, in train self.prepare_train() File "main.py", line 145, in prepare_train self.guidance_zero123 = Zero123(self.device) File "/home/lancer/dreamgaussian/guidance/zero123_utils.py", line 29, in init self.pipe = Zero123Pipeline.from_pretrained( File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/diffusers/pipelines/pipeline_utils.py", line 939, in from_pretrained cached_folder = cls.download( File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/diffusers/pipelines/pipeline_utils.py", line 1441, in download info = model_info( File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1697, in model_info r = get_session().get(path, headers=headers, timeout=timeout, params=params) File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/home/lancer/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/bennyguo/zero123-xl-diffusers (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f33c0792cd0>: Failed to establish a new connection: [Errno 110] Connection timed out'))"), '(Request ID: ac1df403-7df9-489f-b9c9-7f9d7ad8cd24)') `
Can I git zero123 to the specified folder myself to solve this problem?

Hey! I met the same problem and cannot solve it. I wonder if you solved the problem and could provide some suggestions.


add timestamp for most recent pull of data

A timestamp of the time data was queried would be helpful to notify users of how current the data is that they are being shown

[ ] add timestamp of when data was pulled

resolved by afc262fa2f641a785bbaa99975a7fb2bf188caee


Auto-completion doesn't offer def __post_init__() for data classes

__post_init__() is a dunder method available in data classes.
While trying to implement it, I've noticed that the code-completion feature is unaware of it.
 Code Snippet
from dataclasses import dataclass

@dataclass
class MyClass:

    def __p...  # <- Code-completion offers the __repr__ method instead of __post_init__

 Environment data

Language Server version: 2024.2.2
OS and version: linux x64
Python version (and distribution if applicable, e.g. Anaconda): 3.12
python.analysis.indexing: true
python.analysis.typeCheckingMode: basic

Auto-completion works only for method overrides. The parent class in this case doesn't implement a __post_init__ method, so there will be no auto-completion for this method.

I understand, but I think that's actually something that should be addressed, considering it's working flawlessly in PyCharm:

Thanks again and have a great day.


Global Context doesn't seem to switch correctly when building Desktop First

Using singularitygs 1.6.2
Following the documentation on the section of Responsive Grids i made the following declarations to setup my grid with Desktop First in mind.
I changed the value of the breakpoint variable to max-width as it was mentioned and mobile first to false.
$breakpoint-default-feature: 'max-width';
@include sgs-change('mobile first', false);
//  Breakpoints
$tablet: 768px;
$mobile: 380px;
@include add-grid(12);
@include add-grid(4 at $tablet);
@include add-grid(2 at $mobile);
@include add-gutter(1/4);
@include add-gutter-style('opposite');
Then i added these lines of code
@include breakpoint($tablet) {
.test {
@include grid-span(4,1);
}
}
@include breakpoint($mobile) {
.test {
@include grid-span(2,1);
}
}
I was expecting both grid-spans to give me width: 100%
Only the $mobile breakpoint works.
When i checked the css file, the media query outputed for tablet was 2 columns wide and not 4 as expected.
Also
I read the documentation again and in another place it mentions the following:
Be aware this will only work with min-width media queries!
But in the Responsive Grid section it states (from what i made out) it works with both max-width and min-width media queries provided you do the mobile first switching.
I also tried an @include background-grid() but again doesn't work correctly. It outputs the media queries in the wrong order so it only displays the gradient for the tablet.
Worth mentioning is that when i used the Mobile First approach everything worked

Looks like the issue is not yet fixed. I have the same issues.

Singularity will continue to work as normal, but further development will stop.


Add Introduction UI, adjust font styling

This PR:

Introduces the Introduction UI, per the designs

This includes a Skip button, which is rendered only when this functionality is available

Adds new class-based styles for font sizes / weights, as these are divorced from the semantics of the elements in some cases

I've given this a quick test run, here's my thoughts:

.mfa-block-heading font weight is a little stronger than the designs. Perhaps we could try 500 instead.

I've given this a quick test run, here's my thoughts:

.mfa-block-heading font weight is a little stronger than the designs. Perhaps we could try 500 instead.
.mfa-feature-list-title same as above. Maybe 400 for this one?
The line height feels a little condensed to me. How about 24px instead of 20?
Maybe we could remove the margin: auto from .mfa-app-title
Find out more link needs a full stop at the end

@robbieaverill Is this after removing the Watea-specific font?

@Cheddam oh FYI I'm using the starter theme

@robbieaverill I've addressed the majority of your feedback, and left some responses where I wasn't so sure about the suggested changes.
I think we should give the typography another path once Accessway is in place - for now, the sizes and weights that were defined by Jared are what I've applied.


[Android] Fix the crash issue when exiting fullscreen for video.

This patch is to fix the crash issue when exiting fullscreen for video.
In the native code, fullscreen requests have been moved to render frame,
then tear down ContentVideoView from content-layer to reduce code
duplication.
Android content embedder has no responsibility for releasing the surface
when exiting fullscreen.
BUG=XWALK-3796
(cherry picked from commit cf4cf2173617e35b352b5aa480aa9f5b4d973865)

@rakuco Please merge this patch to crosswalk-13, thanks.

Does it apply to crosswalk-12 as well?

This issue occurs after canary 13.41.318.0.


precondition-sql-check raises liquibase.exception.ChangeLogParseException

Environment
Liquibase Version: 4.11.0
Liquibase Integration & Version: CLI
Liquibase Extension(s) & Version:
Database Vendor & Version: Any
Operating System Type & Version: MacOS 12.0.1
Description
Any SQL changeset with a precondition-sql-check fails
Steps To Reproduce

Create a SQL changeset with a precondition-sql-check and run any CLI commands (e.g. liquibase update or liquibase status)

Actual Behavior
Caused by: liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException:  Unexpected formatting at line 846. Formatted SQL changelogs require known formats, such as '--property name=<property name> value=<property value>' and others to be recognized and run. Learn all the options at https://docs.liquibase.com/concepts/changelogs/sql-format.html 	at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25) 	at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:369) 	at liquibase.Liquibase.lambda$update$1(Liquibase.java:224) 	at liquibase.Scope.lambda$child$0(Scope.java:180) 	at liquibase.Scope.child(Scope.java:189) 	at liquibase.Scope.child(Scope.java:179) 	at liquibase.Scope.child(Scope.java:158) 	at liquibase.Liquibase.runInScope(Liquibase.java:2405) 	at liquibase.Liquibase.update(Liquibase.java:211) 	at liquibase.Liquibase.update(Liquibase.java:197) 	at liquibase.integration.commandline.Main.doMigration(Main.java:1869) 	at liquibase.integration.commandline.Main$1.lambda$run$0(Main.java:398) 	at liquibase.Scope.lambda$child$0(Scope.java:180) 	at liquibase.Scope.child(Scope.java:189) 	at liquibase.Scope.child(Scope.java:179) 	at liquibase.Scope.child(Scope.java:158) 	at liquibase.integration.commandline.Main$1.run(Main.java:397) 	... 24 more
The line referred in the error message is the third line of the following changeset causing the issue:
-- changeset author:name context:XXX
-- preConditions onFail:MARK_RAN onError:MARK_RAN
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) from TABLE where CODE = 'CODE'
INSERT INTO TABLE (ID, CODE, DESCRIPTION) VALUES (SEQ_NAME.nextVal, 'CODE', 'DESCRIPTION');

This changeset, and all other affected, had always run until now (before updating to 4.11.0 fro 4.9.1) and it seems to me that they strictly follow the example available at:
https://docs.liquibase.com/concepts/changelogs/sql-format.html
Expected/Desired Behavior
The error is no more raised

Same here on Windows 10/11.
Latest version working with precondition-sql-check is 4.9.1

Same here on Linux on latest liquibase version, had to revert to previous version

I think this was fixed by #3037 in 4.14.0. I can't replicate the problem with the current build.

i can confirm that the issue is fixed as of release 4.14.0, thanks


add action supporting generation of randomized metadata groups

Resolves #47
This allows users to create one or more ~randomized~ shuffled categorical sample metadata columns, with the number of groups and the count of samples assigned to each group matching that of the input metadata column.
An example of how this can be used with the Moving Pictures data is as follows.
qiime metadata shuffle-groups --m-metadata-file sample-metadata.tsv --m-metadata-column body-site --o-shuffled-groups rand-md.qza

qiime diversity alpha-group-significance --i-alpha-diversity core-metrics-results/faith_pd_vector.qza --m-metadata-file rand-md.qza sample-metadata.tsv --o-visualization core-metrics-results/ags.qzv

First, alpha-group-significance on the body-site column:

Next, on a randomized metadata column modeled on the body-site column:

On it.


Include associated headers first

This prevents missing dependencies in the header files.

Which header is missing? This looks like what you'd actually want to do is add missing #include statements to the *.hh files.

Nothing is missing. It's a change to prevent masking missing dependencies in header files in the future. Currently, it possible to introduce a change that inadvertently includes a dependency of a header file by way of another header file or a source file rather than including it in the header file where it's needed.

FYI - https://github.com/include-what-you-use/include-what-you-use

@doctaweeks I don't understand what you mean. Is this about *.d files? In what way are they different when you include the headers in a different order? If everything else is correct, then changing the order of #include statements should not have any consequences. If it makes a difference then this is very likely a symptom of another problem (like missing #include statements in header files), in which case the other problem should be fixed.

If it makes a difference then this is very likely a symptom of another problem (like missing #include statements in header files), in which case the other problem should be fixed.

@cliffordwolf Agreed. However, the current order means the scenario you describe could be masked if the header file is not included first in the source file. For example, if configuration.hh needed string for some reason it should be included there but say the author forgets. You would expect to get an error when compiling configuration.cc because string is missing in the associated header. However, chipdb.hh already includes string and appears before configuration.hh so it will mask the problem.
Include order local to global prevents masking problems like this.


rotate a 2d field by 90 degree

In the issue 1089  @mlstowell wrote "To get the magnetic field from A_z you take its gradient and then rotate it by 90 degrees.".
I successfully get the gradient of the magnetic potential but I can't figure how to rotate by 90.
Can you explain how to rotate by 90 degree?
The gradient is computed using a RT finite element space and shown below. Once rotated I expect the arrow to point in the direction of the magnetic field which is supposed to circulated around the center rectangle having a current of 1A in z direction.

Thank you very much for your help,
Denis

I have tried accessing the data vector of the grid function and swap elements x and y, but the resulting figure is not as expected.
Here D is the gridfunction with the gradient of the magnetic potential.
Vector Data = D.GetTrueVector();
{
int Size = Data.Size();
int vdim = D.VectorDim();
assert(Size%vdim==0);
double temp;
  for(int i=0; i<Size; i+=2) {
     temp=Data[i];
     Data[i]=Data[i+1];
     Data[i+1]=temp;
  }

}
GridFunction ROT90(&fespace_rt, Data);

Hi, @denislachapelle,
The rotation is deceptively simple but I should have mentioned how to do this. If A_z is computed as an H1 field then compute its gradient as a Nedelec field. The result should look exactly as you show above. The next step is to just copy the Nedelec DoFs to a Raviart-Thomas vector. In 2D (and only in 2D) these should have the same number of DoFs ordered in the same manner and the basis functions for the RT space (F) are equal to those of the ND space (W) but rotated using $F = \hat{z}\times W$. I may have the direction of the rotation incorrect so double check this and multiply by -1 if necessary.
Best wishes,
Mark

I should also mention that the reason to compute the gradient as a Nedelec field is that the Nedelec basis functions contain the gradients of the H1 basis functions so no global solve is necessary. The Nedelec gradient can be computed using a LinearInterpolator rather than a BilinearForm (see https://mfem.org/lininterp/) and no global solve will be necessary.

Thank you for your answer. There should be something I get wrong....
I change the code and get the gradient of the potential ok in Nedelec FE space.

Then I create another fe space based on RT using the following code.
Vector Data( nd_fespace.GetVSize());
D.GetTrueDofs(Data);
RT_FECollection rt_fec(nd_order, dim);
FiniteElementSpace rt_fespace(&mesh, &rt_fec);
GridFunction ROT90(&rt_fespace, Data);
Note that D is the gridfunction of the nedelec fe space.
It compile and execute fine but the resulting ROT do not make sense.
Your help is greatly appreciated.
Denis

I always forget the reason for this but the RT space should use nd_order-1.

It is confusing, but the standard terminology for the lowest-order spaces is RT_0 and ND_1

Its all work fine now.
To get the gradient of the scalar field I use the GradientInterpolator as suggested in this issue and from example 24; the code snippet is shown below.
ND_FECollection nd_fec(nd_order, dim);
FiniteElementSpace nd_fespace(&mesh, &nd_fec);
GridFunction D(&nd_fespace);
DiscreteLinearOperator dlo(&Afespace, &nd_fespace);
dlo.AddDomainInterpolator(new GradientInterpolator());
dlo.Assemble();
dlo.Mult(u, D);
To ratate by 90 degrees I copy the nedelec dofs to a raviart thomas dofs, as explain in this issue; the code is shown below.
/*
Note the order of RT FE is nd_order-1.
*/
Vector Data( nd_fespace.GetVSize());
D.GetTrueDofs(Data);
RT_FECollection rt_fec(nd_order-1, dim);
FiniteElementSpace rt_fespace(&mesh, &rt_fec);
//Create a GridFunction for rt fe space with the dofs of the nedelec.
GridFunction ROT90(&rt_fespace, Data);
Thank you for your help.
Denis


Modelica.Mechanics.MultiBody.Examples.Constraints.*

Reported by christian.schubert on 27 Dec 2012 14:33 UTC
The initial system of the models
Modelica.Mechanics.MultiBody.Examples.Constraints.ConstrainRevoluteJoint
Modelica.Mechanics.MultiBody.Examples.Constraints.ConstrainSphericalJoint
Modelica.Mechanics.MultiBody.Examples.Constraints.ConstrainUniversalJoint

is reported to be over-determined with 6 equations too many.
This is due to the explicit initialiation of the translational quantities (r_rel_a, v_rel_a) in the freeMotionScalarInit.
Since the constraint joint permits no relative translation (x_locked=y_locked=z_locked=true) position and velocity of bodyOfConstraint.frame_a are already known and thus the initial system is over-determined.
Thus, it would be best to not initialize the translational variables in freeMotionScalarInit.

Migrated-From: https://trac.modelica.org/Modelica/ticket/944

Comment by otter on 1 Jan 2013 21:06 UTC
Fixed in 6d32b321d0e70181fd8ff14b6ed6bc0b363db8fa:
Removed redundant (over-constraint) initial conditions as suggested in the ticket.


Use v0.0.13 protoc-java-resource-names-plugin

That dep just got an implementation to process regular resource names as fixed resource names if applicable.
This will allow us to fully remove fixed_name_resource_whatever from pubsub_gapic.yaml and gapic-generator.

Tested with a locally-built artman docker image.

PTAL


feat: add --output-dir on template command

Resolves #629

Hello @mumoshu ,
I have added a unit test. Can you check if it looks OK ?


Add LocalEndpoint property

Add a LocalEndpoint property for servers as another alternative for listening on a specified IP address.

After listening has started it should return the endpoint on which it is listening - or null if multiple

For clients it can be used as the IP to connect from?  Let's take a peek at all the properties to see how this could be worked out.

Rather than making a property - created a method call ConnectFrom to allow controlling the local network interface on the client.


Any objection at me moving the language directory out of themes?

I'm looking around to f**ck things up a bit more than already are. :laughing:
I was thinking to actually drop a bit of the stuff going on with themes dir, but then I realized it may be a bit too much... (unless there are no objections, that is), so I started looking at languagedir and the idea to move it out of the default theme directory and simplify a bit something (not sure what).

I have no objection .... I think its a good idea TBH 👍

And while I'm at it... am I allowed drop the help? :angel:

Sure, why not, there are no rules here !

That was done in #3540


Fix "method_lines" issue in src/features/github/functions/get-humanized-release-notes.ts

Function getHumanizedReleaseNotes has 30 lines of code (exceeds 25 allowed). Consider refactoring.
https://codeclimate.com/github/Sonia-corporation/il-est-midi-discord/src/features/github/functions/get-humanized-release-notes.ts#issue_5e81d19376162700010000b8

Too old.


Convert timeout

Can it have an timeout config? Looks like something in my setup has changed and its now getting stuck when converting PDF files, other files works fine.
When converting other files, this process starts and ends just fine:
image
But when it is PDFs, this process starts and never ends:
image
There is no error, the worker just never resolves the promise.

An option for timeout is welcome! Will work on this feature this weekend!

@JVKdouk any progress?


Create plot_lightcurves notebook

Based on a comment made in our MAST developers meeting, I've made a short notebook describing how to plot exoplanet light curves from two different sources: the MAST API and lightkurve.
There's a few pending questions about scope (e.g., whether this should be its own notebook to begin with!), but if this notebook seems like it's going in the right direction, I can get going on adding exercises.

@arjunsavel , please incorporate Tom's comments.


feat: CSS tokenizer

This pull request adds a new css-parser package that exposes a tolerant CSS tokenizer for the complete CSS3 specification.
TODO:

Implement parser.
Add exhaustive tests.
Further verify spec compliancy.

Thank you for doing this, it looks great! I don't have any notes other than if any of the tests would value from using t.inlineSnapshot instead of t.looksLike?

@sebmck good call. Ideally I'd like to revisit the tests as a whole in a followup PR to fully hit each token's edge cases. I'll be sure to use inlineSnapshot to keep things tidy.

Sure! I'll merge this and rebase #717 to make it use the new ParserCore methods I added.

Thank you!


Commands depend on invalid command line arguments of zls

My zls config generated by zls config:
{
  "zig_exe_path": "/home/xzhan/Development/Packages/software/zig/zig",
  "zig_lib_path": "/home/xzhan/Development/Packages/software/zig/lib",
  "enable_snippets": true,
  "warn_style": true,
  "enable_semantic_tokens": true,
  "operator_completions": true,
  "include_at_in_builtins": false,
  "max_detail_length": 1048576
}

I installed zls manually (following this instruction) for use inside NeoVim and VS Code. However, when I tried to start the server by invoking "Zig Language Server: Start Server," I was greeted by
an error:

The same goes for "Zig Language Server: Open ZLS Config":

zls-vscode assumes you are using a build from master and not the old 0.9.0 release which is very outdated and should only be used if you are using the 0.9.x zig compiler as well.
You can either compile from source yourself (instructions) or use the command Zig Language Server: Install Server in vs-code which installs the latest prebuild binary for you.

Thanks for the clarification! I guess this "assumption" could be mentioned somewhere in the README, though.


Align InChIKey14 Map to CP Repurposing Profiles

closes #11 (finally!)
Some summary statistics:
Broad ID Summary

count

Unique Broad IDs
1514

Broad IDs with Complete MOA/Target
1234

Missing InChIKey14
18

Broad IDs with Only Missing MOA Info
1

Broad IDs with Only Missing Target Info
228

Broad IDs Missing Both MOA and Target
33

Resolution Summary

count

All Unique Broad IDs
1514

One-to-One Mapping (With Some Missing Data - see above)
1444

Missing InChiKey14
18

Duplicate InChIKey14 with both MOA/Target Missing
17

Duplicate InChIKey14 requires alternative MOA/Target annotations
35

Thanks for comments @niranjchandrasekaran ! I believe I have addressed them in my last two commits. Ready for re-review


FCstd color support

This uses the module OfflineRenderingUtils from freecad in order for it to load the GuiDocument.xml file that contains information about color and visibility of 3D objects, that freecad does not usually load if there is no GUI for freecad running.

TODO still:

visible state does not seem correct at initialization
shapeToMesh is being called way too often than it should
allow for picking colors from the GUI?
the bounding box should be computed from only visible meshes
what do we do with the visible state coming from the object (not from guidata)?

This is ready for review.
The two remaining points from the comment above:

first one is not related to this PR, it should be fixed separately
second one could be implemented in a separate PR.

Galata update snapshots

Galata please update snapshots

Thanks @martinRenou


Cannot properly read some empty cells

When trying to read some empty cells like this, following error occurs:
async function foo(sheet){
    await sheet.loadCells();
    let value = sheet.getCell(1,1).value; // here occurs error
    // some code
}

TypeError: Cannot read property 'effectiveValue' of undefined
at GoogleSpreadsheetCell.get value [as value] (/app/node_modules/google-spreadsheet/lib/GoogleSpreadsheetCell.js:38:24)
One weird thing is that, for the similar code which accesses the other worksheet of same document, the value of empty cells is null and the code works fine.
Maybe there is a problem getting CellData of empty cells...

Ah I think I know what's going on. It has to do with fetching all cells (ie no filter) in an empty sheet. In the meantime

Try putting in a range to fetch sheet.loadCells('A1:Z100')
Try putting a value way down in the bottom right of the sheet so the sheet isnt empty

Work well with the 2nd solution. Thanks.

I'm trying to recreate this so I can fix it, but am having trouble. Was there anything special about the sheet that you were reading from? Maybe you can share it (or a copy of it) with me -<EMAIL_ADDRESS>

OK, I just invited you to share the copy of the sheet.

For me it's calling loadCells twice for empty cells causes a TypeError on access
When cell is initialized with constructor default cellData is an empty {}, but when updated it's undefined in:
https://github.com/theoephraim/node-google-spreadsheet/blob/786be59c75f34c9deae0b184885173c6812583ad/lib/GoogleSpreadsheetWorksheet.js#L78

thanks @vogre! I'll take a look

deploying this fix shortly. Thanks folks!


Use discords Timeout

Is your feature request related to a problem? Please describe.
Given discord now has Timeouts built-in, I feel this should be an option/plugin.
Describe the solution you'd like
A simple plugin, possibly inheriting from the custom tracker and implementing timeouts as simple as registering the plugin.
Describe alternatives you've considered
Making people write it themselves, fun I know.

This will be added in 1.2.2, and will become the default in 1.3.0


Use redux-saga-requests instead of constants/actions/reducer/saga quadruple

Is your feature request related to a problem? Please describe.
The idea is to use redux-saga-requests. It helps avoid the boilerplate code for constants, actions, reducers and sagas for simple (and also more sophisticated) web requests.
Describe the solution you'd like
An excerpt from the https://github.com/klis87/redux-saga-requests README
  import axios from 'axios';
- import { takeEvery, put, call } from 'redux-saga/effects';
+ import { createRequestInstance, watchRequests, requestsReducer } from 'redux-saga-requests';
+ import { createDriver } from 'redux-saga-requests-axios';

  const FETCH_BOOKS = 'FETCH_BOOKS';
- const FETCH_BOOKS_SUCCESS = 'FETCH_BOOKS_SUCCESS';
- const FETCH_BOOKS_ERROR = 'FETCH_BOOKS_ERROR';

- const fetchBooks = () => ({ type: FETCH_BOOKS });
- const fetchBooksSuccess = data => ({ type: FETCH_BOOKS_SUCCESS, data });
- const fetchBooksError = error => ({ type: FETCH_BOOKS_ERROR, error });
+ const fetchBooks = () => ({
+   type: FETCH_BOOKS,
+   request: {
+     url: '/books',
+     // you can put here other Axios config attributes, like method, data, headers etc.
+   },
+ });

- const defaultState = {
-   data: null,
-   pending: 0, // number of pending FETCH_BOOKS requests
-   error: null,
- };
-
- const booksReducer = (state = defaultState, action) => {
-   switch (action.type) {
-     case FETCH_BOOKS:
-       return { ...defaultState, pending: state.pending + 1 };
-     case FETCH_BOOKS_SUCCESS:
-       return { ...defaultState, data: action.data, pending: state.pending - 1 };
-     case FETCH_BOOKS_ERROR:
-       return { ...defaultState, error: action.error, pending: state.pending - 1 };
-     default:
-       return state;
-   }
- };
+ const booksReducer = requestsReducer({ actionType: FETCH_BOOKS });

- const fetchBooksApi = () => axios.get('/books');
-
- function* fetchBooksSaga() {
-   try {
-     const response = yield call(fetchBooksApi);
-     yield put(fetchBooksSuccess(response.data));
-   } catch (e) {
-     yield put(fetchBooksError(e));
-   }
- }
-
  function* rootSaga() {
-   yield takeEvery(FETCH_BOOKS, fetchBooksSaga);
+   yield createRequestInstance({ driver: createDriver(axios) });
+   yield watchRequests();
  }

Describe alternatives you've considered

Generate actions manually. (this is what I do now...)
Write a generator: https://github.com/react-boilerplate/react-boilerplate/issues/2662

Advantage of the library would be, that we have less code, in the end. The generators might also be a little brittle, when manual code is added in the file as well.

Additional context
It would also help to use GraphQL endpoints: https://github.com/klis87/redux-saga-requests/tree/master/packages/redux-saga-requests-graphql
PS: I would be willing to work on it as well.

Having less boilerplate code would be great and I think there's a way to do this. I'm not sure we should do it with redux-saga-requests though.
A few thoughts on why:

It has a large API surface and long docs => Big learning curve
It has excellent coverage and might be well tested but is it used in production by any big teams? AFAIK, almost all our dependencies are industry-standards and have been vetted by large companies and exposed to millions of users.
It's not entirely clear if this is a replacement for all the sagas you might need to write or if it only covers some use cases. And if all one does with redux-sagas is fetch data from an API, then using redux-sagas is total overkill in the first place.
It also "hides" some things. So, for example, you're forced to consult its docs to know what your store looks like after coming out of a requestsReducer. Otherwise you might not know what keys are inside.

IMO, a "write less boilerplate" solution which might make more sense for us is one which simplifies the creation of the { actions, constants, reducer } tuple (without touching the sagas side of things).
I would love to find a tool which allows us to do something like this:
const initialState = {
  /* ... */
};

const { actions, constants, reducer } = magicFunctionOfMyDreams(initialState, {
  FETCH_REPOS: {
    produce: store => {
      store.loading = true;
      store.error = false;
    },
  },
  FETCH_REPOS_SUCCESS: {
    // When you need to pass data in your action creator in addition to the type
    action: data => ({ data }),
    produce: (store, action) => {
      store.loading = false;
      store.error = false;
      store.data = action.data;
    },
  },
  FETCH_REPOS_ERROR: {
    produce: store => {
      store.loading = false;
      store.error = true;
    },
  },
});

// Pass actions to your component, reducer for async injection and constants for watching in sagas or any other middleware
export {actions, constants, reducer};

(Btw, either as an alternative or in addition to the above, one could also write a generator which frees the dev from writing a lot of boilerplate.)

Thank you for the elaborate feedback. I see your point, especially that it hides things. As I have not tested the redux-saga-request-library myself, I cannot really advocate for it.
As for your proposal, I think it would reduce the boilerplate code a great amount and it is very interesting approach. I think it is a good way to group constants, reducer and actions, since they always come together.
Since there are other issues which discuss reducing boilerplate, we should maybe continue the discussion there, and close this issue? What do you think?

There are other issues which discuss reducing boilerplate? Active ones? I'm not aware 😅

Well one ^^ (afaik).  There hasn't been any activity there in quite a while. We can continue chatting here.

@julienben I like your proposal, but, aren't we going to loose our IDEs autocompletion in such a way ?

Good point! You'd also lose some of the benefits of linting, right? (i.e. if you accidentally used an action which doesn't exist or just misspelled its name.)
TBH, I just wrote the above quickly without giving it a lot of thought. I'm sure it would have to be improved many times over before it could become a real library.

Closing this for lack of activity. Please open a new issue if you'd like to continue discussing this and eventually propose a PR. (FYI, I think redux-starter-kit might be an interesting tool to look at.)


Flashy, Hashy, Cachey

compileLibrary now takes a parameter CacheLibrary which decides whether or not the compiled stuff ends up in JETSKI_HOME (default $HOME/.jetski) or in TMPDIR.
If it goes in TMPDIR then it still gets deleted as usual, otherwise we just leave it be.
The hash includes the source code and the options used to build.
I won't merge this until I've checked everything works well in icicle / ice, but feel free to review the actual code.
! @amosr @tranma

amazing 💯


[Extensibility Enhancement] Page 300 - Ship-to Address - OnBeforeOnNewRecord/OnAfterOnNewRecord

Add the current page Rec to these events on Page 300 "Ship-to Address".
Currently these events don't allow us to default additional fields from the Customer; I'm having to use OnBeforeInsert instead and get the Customer again.
trigger OnNewRecord(BelowxRec: Boolean)
var
    Customer: Record Customer;
begin
    if not Customer.Get(GetFilterCustNo) then
        exit;

    OnBeforeOnNewRecord(Rec, Customer); // Added Rec

    Validate(Name, Customer.Name);
    Validate(Address, Customer.Address);
    Validate("Address 2", Customer."Address 2");
    "Country/Region Code" := Customer."Country/Region Code";
    City := Customer.City;
    County := Customer.County;
    "Post Code" := Customer."Post Code";
    Validate(Contact, Customer.Contact);

    OnAfterOnNewRecord(Rec, Customer); // Added Rec
end;

[IntegrationEvent(false, false)]
local procedure OnAfterOnNewRecord(var ShipToAddr: Record "Ship-to Address"; var Customer: Record Customer)
begin
end;

[IntegrationEvent(false, false)]
local procedure OnBeforeOnNewRecord(var ShipToAddr: Record "Ship-to Address"; var Customer: Record Customer)
begin
end;

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


Investigate posible merge with https://github.com/SotiriosVrachas/jekyll-theme-startbootstrap-agency

https://github.com/SotiriosVrachas/jekyll-theme-startbootstrap-agency is based on Bootstrap 4 version of Start Bootstrap - Agency

I'd like to know if anything's happening here. I'm deciding which template to use, and this one seems unmaintained recently.

raviriley/agency-jekyll-theme/
I wanted to use this theme but saw that this and SotiriosVrachas's versions are both outdated and not maintained, so I decided to convert the newest Bootstrap code to a Jekyll theme from scratch. Then, once I started using the theme, I realized I could make some additions to make the original theme more useful, such as Google Analytics support, an actually functional contact form, customizable styling, etc.
Check out the details here!
https://github.com/raviriley/agency-jekyll-theme/

@raviriley Awesome, I'll check it out for sure!


Should we highlight all CSS discrete values?

Split from the discussion in #3601:
I'm not even yet convinced that all values should be highlighted.  Highlighting a thing well is as much about what one chooses to highlight as what one does not.
In rethinking this just now I'm not sure we should even add colors - unless we first think whether the plan is to include a list of ALL discrete values.  I think before we go down that road I'd want to know how large a size change this is... would the CSS grammar going to be 10% larger or 200%?

Hint at valid CSS and valid CSS properties and values

We're not interested in what is "invalid" as this is very hard to do with pattern matching across ALL grammars - and we desire consistency in features we add to the library.  If adding invalid to all grammars would be difficult, we're not interested in adding it to only a few (just because they are easy).
Originally posted by @joshgoebel in https://github.com/highlightjs/highlight.js/issues/3601#issuecomment-1242987936

Things we need to know:

The full list of all valid named CSS values
What scope should we use for values? literal, built-in, string, etc?

So far we're in good company with GitHub, who also does NOT highlight values: https://github.com/highlightjs/highlight.js/blob/main/demo/style.css

I think many things are on as needed basis and I think may be the case here.
But there is a distinction, even Github makes.
In this case, as pointed out, CSS attribute values haven't been universally highlighted. Some values are highlighted while some are not.
See exhibit A for values currently highlighted:
  // attribute values
  {
    begin: ':',
    end: '[;}]',
    contains: [
      modes.HEXCOLOR,
      modes.IMPORTANT,
      modes.CSS_NUMBER_MODE,

Case:
If a theme author wants to highlight property names they have the class hljs-attribute. If they want to highlight style values they don't have a class for that but some values do get highlighted (numbers, colors, etc).

Things we need to know:
The full list of all valid named CSS values
What scope should we use for values? literal, built-in, string, etc?
Considerations:
Yet another huge list means additional maintenance in the future...

Agreed. In my humble opinion, a list of valid CSS values would be too large and would need patterns to match things like matrix values, rotation, gradients, variables and all that. For colors, you could parse the list
I would simply have a fall back match for any string up to the semicolon. But maybe I'm missing something. What do you mean by "discrete values"?

and would need patterns to match things like matrix values, rotation, gradients, variables and all that.

Those would indeed require separate modes and might be in-scope... we already match some of this with our support for "functions", etc...

I would simply have a fall back match for any string up to the semicolon.

There is no guarantee of a semi-colon.  Any changes we make to CSS must also be applicable to the CSS-variants which do not have such syntactic elements.  #2269   The simplest way to guarantee consistent behavior across all 4 grammars is with explicit lists of keywords.

What do you mean by "discrete values"?

I mean known/named values: block, left, auto, etc...

I'd like to add that not all property names are highlighted. See Exhibit A:
https://github.com/highlightjs/highlight.js/issues/3606
So, if the highlighter is highlighting by known CSS styles it will miss some. If you or we decide to highlight non number or color values should we also highlight non known property names?

This is on-purpose to support all 4 CSS like grammars - where you cannot use syntactic elements (like :) to "guess" at what a thing is or isn't.
One could for sure write a pure CSS grammar this way (indeed years go that may even have been the case, I forget), but that's not the direction we chose here - because of the desire/need for consistent behavior across all 4 grammars.

I would simply have a fall back match for any string up to the semicolon.

There is no guarantee of a semi-colon. Any changes we make to CSS must also be applicable to the CSS-variants which do not have such syntactic elements. https://github.com/highlightjs/highlight.js/issues/2269 The simplest way to guarantee consistent behavior across all 4 grammars is with explicit lists of keywords.

That case was mentioned in the docs. That you have a begin but not an end.

That case was mentioned in the docs. That you have a begin but not an end.

Not sure I follow?

There was a comment in documentation on specifically that case. Where you'd have a style rule where the style name and value would be present but may or may not have an ending semicolon. It sounded like the CSS rule match allowed for that case. I'll see if I can find it.

Then I can't comment on the difficulty of that.

It might be doable, but it's more complex - and we need the keyword lists anyways for auto-detection support.  So we need to maintain a pretty large list in any case (as long as we do autodetect).  So as there are multiple reasons for the keyword lists, we just use them.

but may or may not have an ending semicolon.

Right, but again we have to support CSS-like grammars with no ;, no :, no {... so really we can't depend on such things to tell us what is a property or a value, etc.

but it seems the attribute value is already being matched.

We don't match "values" generically, we match known types of patterns/values like 32px, "blah" (string), etc...  take a custom name like "blah-blah"... now tell me is that a value, an attribute or a custom HTML tag name?  There is no way to know... hence any generic rule matching IDENT as "string" is a non-starter...

Closing for lack of activity.


OLS-201: Fix: No linefeed in OpenAPI JSON

Description
Fix: No linefeed in OpenAPI JSON. That string is passed directly into OpenAPI endpoint, including all linefeeds etc. It makes it unreadable.
Type of change

[ ] Refactor
[ ] New feature
[x] Bug fix
[ ] CVE fix
[ ] Optimization
[ ] Documentation Update
[ ] Configuration Update
[ ] Bump-up dependent library

Related Tickets & Documents

Related Issue #OLS-201

Checklist before requesting a review

[x] I have performed a self-review of my code.
[x] PR has passed all pre-merge test jobs.

Testing

Run the service and access /openapi.json

/lgtm

/approve


chore: bdd-spring-1588128037 to 0.0.1

chore: Promote bdd-spring-1588128037 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


DigiExpress demo environment

DigiExpress demo environment that we could use for. Realistic target would be to have v1.5 running in this environment

Showing the latest stable digiExpress functionalities (excluding integrations)
Configuring against specific sales cases

[ ] Setting up environment in Hetzner for deploying DigiExpress modules. Pubsub needs to be replaces with Redis of similar

[ ] Setting up authentications for client portal & front office portal. We should not use Suomi.fi because we might run to some bureaucratic issues but we should use the NETS mock up that we created to HB. @patope is this possible?

PubSub replacement is code change, not a infrastructure issue. NETS mock has no use here. It's for document signing.


feat: removed statsd related code and references

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.2%) to 87.591%

Totals

Change from base Build<PHONE_NUMBER>:
0.2%

Covered Lines:
6247

Relevant Lines:
7132

💛  - Coveralls


Feature request : let me add a custom label to each link, instead of the link type

In TheBrain, I can have a library of link types; in my case "partner", "manager", etc.
When I create a "manager" link, I can customise its label with a different value. In some cases, the manager is a "President", in others a "CEO", etc.
I would like to be able to overload an instance of a link in a given document with a custom label in Excalibrain.
It could be achieved with a syntax such as "Parent::[doc]".
This would display "label" on the link in the drawing.
I would also need a more detailed setting to choose :

display or hide the default link type ("manager")
instead, display the custom link label ("label")
give an option to view the link type ("manager") and label ("label") only when I hover over the link : this would be better for heavily loaded graphs with many relations

PS : there are often many friend-related nodes, and links to those could be displayed without their type or label when there are too many (eg more than 10). This could also be a setting.

Here's an example :

The link between John Kerry and Laurent Tapie (left) is labelled "employé".
All other links, especially the siblings, are not labelled : that would overload the graph. But I can hover over them to view their values in the TheBrain sidepane.


Empty file in torrent causes infinite loop

Creating a v2 torrent from a folder with an empty file causes an infinite loop in MerkleHash.TryHash() because src.Length == 0. This test repros the problem in master and release-v3.0.0-beta-0034.
[TestFixture]
public class EmptyFileInTorrentTests
{
    [Test]
    public void EmptyFileInTorrent ()
    {
        var dir = new DirectoryInfo ("Data");
        if (!dir.Exists)
            dir.Create ();

        var emptyFile = new FileInfo (Path.Combine (dir.FullName, "Empty.file"));
        File.WriteAllText (emptyFile.FullName, "");

        var nonEmptyFile = new FileInfo (Path.Combine (dir.FullName, "NonEmpty.file"));
        File.WriteAllText (nonEmptyFile.FullName, "aoeuaoeu");

        emptyFile.Refresh ();
        Assert.AreEqual (0, emptyFile.Length);

        ITorrentFileSource fileSource = new TorrentFileSource (dir.FullName);
        TorrentCreator torrentCreator = new TorrentCreator (TorrentType.V1V2Hybrid);
        var creationTask = torrentCreator.CreateAsync (fileSource);

        bool completed = creationTask.Wait (10000);
        Assert.IsTrue (completed);

        var torrent = creationTask.Result;
        Assert.IsNotNull (torrent);
    }
}

I spent some time debugging, but I don't know enough about how empty files are supposed to be hashed to provide a fix. If there's more I can do to help diagnose, please let me know. Thanks for your help!

Hah, whoops! I thought i had empty files covered, but obviously not for the V2 case!
In BitTorrent V1 empty files can exist anywhere in the torrent dictionary. MonoTorrent handles these by treating them as if they all existed at the start of the file (i.e. it sorts empty files so they're all at the start of TorrentManager.Files and Torrent.Files lists). This makes some of maths/calculations easier later on.
The same should be true for BitTorrent V2, with the additional support for completely skipping empty files when generating the V2  infohash. It should be more or less a 1 liner somewhere... let's see...

This should be fixed in master! Let me know if you have any issues, and thanks for the bug report!

Thanks for fixing the create with an empty file. That seems to be working as intended. I can create a torrent with an empty file now.
I'm having problems seeding and downloading the torrents now. I think it's still related to the empty files, but the test matrix is a bit confusing.

V1 torrents with empty files aren't creating the empty files. The do set Completed=true though
V2/Hybrid torrents with empty files don't want to enter a seeding state
V2 (but not hybrid) files without empty files, but more than 1 non-empty files, don't download. With 1 file they do work though

Here's some integration tests that hopefully demonstrate what I'm seeing. For the various scenarios mentioned, they create files and attempt to seed and download. Let me know how I can help here.

[TestFixture]
public class EmptyFileInTorrentTests
{
    public EmptyFileInTorrentTests ()
    {
        _tracker = GetTracker (_trackerPort);
    }

    const int _trackerPort = 40000;
    const int _seederPort = 40001;
    const int _leecherPort = 40002;
    private readonly TrackerServer _tracker;

    [Test]
    public async Task DownloadFileInTorrent_V1 () => await CreateAndDownloadTorrent (TorrentType.V1Only, false);

    [Test]
    public async Task DownloadFileInTorrent_V2 () => await CreateAndDownloadTorrent (TorrentType.V2Only, false);

    [Test]
    public async Task DownloadFileInTorrent_V2_OnlyOneNonEmptyFile () => await CreateAndDownloadTorrent (TorrentType.V2Only, false, nonEmptyFileCount: 1);

    [Test]
    public async Task DownloadFileInTorrent_V1V2 () => await CreateAndDownloadTorrent (TorrentType.V1V2Hybrid, false);

    [Test]
    public async Task DownloadEmptyFileInTorrent_V1 () => await CreateAndDownloadTorrent (TorrentType.V1Only, true);

    [Test]
    public async Task DownloadEmptyFileInTorrent_V2 () => await CreateAndDownloadTorrent (TorrentType.V2Only, true);

    [Test]
    public async Task DownloadEmptyFileInTorrent_V1V2 () => await CreateAndDownloadTorrent (TorrentType.V1V2Hybrid, true);

    public async Task CreateAndDownloadTorrent (TorrentType torrentType, bool createEmptyFile, int nonEmptyFileCount = 2)
    {

        var dir = new DirectoryInfo (nameof (CreateAndDownloadTorrent));
        if (dir.Exists)
            dir.Delete (true);

        dir.Create ();
        var seederDir = dir.CreateSubdirectory ("Seeder");
        var leecherDir = dir.CreateSubdirectory ("Leecher");

        var emptyFile = new FileInfo (Path.Combine (seederDir.FullName, "Empty.file"));
        if (createEmptyFile)
            File.WriteAllText (emptyFile.FullName, "");

        var nonEmptyFiles = new List<FileInfo> ();
        for (int i = 0; i < nonEmptyFileCount; i++) {
            var nonEmptyFile = new FileInfo (Path.Combine (seederDir.FullName, $"NonEmpty{i}.file"));
            File.WriteAllText (nonEmptyFile.FullName, $"aoeu{i}");
            nonEmptyFiles.Add (nonEmptyFile);
        }

        var fileSource = new TorrentFileSource (seederDir.FullName);
        fileSource.TorrentName = nameof (CreateAndDownloadTorrent);
        TorrentCreator torrentCreator = new TorrentCreator (torrentType);
        torrentCreator.Announce = $"http://localhost:{_trackerPort}/announce";
        var encodedTorrent = await torrentCreator.CreateAsync (fileSource);
        var torrent = Torrent.Load (encodedTorrent);

        using ClientEngine seederEngine = GetEngine (_seederPort);
        using ClientEngine leecherEngine = GetEngine (_leecherPort);

        var seederManager = await StartTorrent (seederEngine, torrent, seederDir.FullName);
        var leecherManager = await StartTorrent (leecherEngine, torrent, leecherDir.FullName);

        Assert.AreEqual (TorrentState.Seeding, seederManager.State);

        Stopwatch sw = Stopwatch.StartNew ();
        while (!leecherManager.Complete && sw.Elapsed.TotalSeconds < 5) {
            await Task.Delay (100);
        }

        Assert.IsTrue (leecherManager.Complete, "Torrent should complete");

        foreach (var file in nonEmptyFiles) {
            var leecherNonEmptyFile = new FileInfo (Path.Combine (leecherDir.FullName, file.Name));
            Assert.IsTrue (leecherNonEmptyFile.Exists, $"Non empty file {file.Name} should exist");
        }

        var leecherEmptyFile = new FileInfo (Path.Combine (leecherDir.FullName, emptyFile.Name));
        Assert.AreEqual (createEmptyFile, leecherEmptyFile.Exists, "Empty file should exist when created");
    }

    private TrackerServer GetTracker (int port)
    {
        var tracker = new TrackerServer ();
        tracker.AllowUnregisteredTorrents = true;
        var listenAddress = $"http://*:{port}/";

        var listener = TrackerListenerFactory.CreateHttp (listenAddress);
        tracker.RegisterListener (listener);
        listener.Start ();
        return tracker;
    }

    private ClientEngine GetEngine (int port)
    {
        // Give an example of how settings can be modified for the engine.
        var settingBuilder = new EngineSettingsBuilder {
            // Use a fixed port to accept incoming connections from other peers for testing purposes. Production usages should use a random port, 0, if possible.
            ListenEndPoint = new IPEndPoint (IPAddress.Any, port),
            ReportedAddress = new IPEndPoint (IPAddress.Parse ("<IP_ADDRESS>"), port),
            AutoSaveLoadFastResume = false,
        };
        var engine = new ClientEngine (settingBuilder.ToSettings ());
        return engine;
    }

    private async Task<TorrentManager> StartTorrent (ClientEngine clientEngine, Torrent torrent, string saveDirectory)
    {
        TorrentSettingsBuilder torrentSettingsBuilder = new TorrentSettingsBuilder () {
            CreateContainingDirectory = false,
        };
        TorrentManager manager = await clientEngine.AddAsync (torrent, saveDirectory, torrentSettingsBuilder.ToSettings ());
        await manager.HashCheckAsync (true);
        return manager;
    }
}

I should add that I put this here because I think it's related to the empty file issue that started this thread. If you'd rather a separate issue, please let me know. Happy to move it.

https://github.com/alanmcgovern/monotorrent/pull/565

Amazingly, there were three distinct failures and each fix caused one or two tests to go green. Phew!
The first 3 patches are the important ones, the final one is just a cleanup to avoid adding an unneeded empty dictionary to the torrent metadata. Thanks for writing up those tests, it was pretty easy so spelunk through the code to figure out where each failure was occurring!
By the way, if you feel comfortable enough submitting PRs with failing tests, I'm more than happy to add fixes to the PRs (or review any fixes you add)!

Thanks for the idea. I'm happy to submit a PR with integration tests if you're willing to make them pass. I'm not familiar enough with the details of the library to be likely to fix something without introducing new bugs. It looks like most of the existing tests are more focused unit tests, so I'll create a new project unless you have a better idea where to put them.

Thanks for the fix! Things are looking good!
Are there plans for an updated beta nuget package? If not, I can build my own, but hoping maybe it's as simple as 1 CI click for you. Thanks again!


GPMDP does not consistently load correctly when "Automatically launch when I turn my computer on" is checked

OS:
Windows 7
Issue Descriptions:
When my computer starts up, GPMDP starts up automatically.  However, more often than not it shows the spinning loading indicator, then shows a white screen with the "Welcome to version X.X.X" popup.  The version number on that popup is the previous version, though, not the most recent version that is installed.  For example, it is showing 3.5.0 when I have 3.6.0 installed.    So I have to close the app and reopen it.  At that point it shows the "Welcome to version X.X.X" popup with the correct version this time (even though it's not the first time I've run that version) and everything loads properly.  Once in a while, it will start automatically without any problems but that is the exception.
Steps to Reproduce:
Have the "Automatically launch when I turn my computer on" option enabled.
Start your computer and see if the app loads correctly

This is a bug that was fixed in 3.6.0
Unfortunately to apply the fix you have to turn off auto-launch and then re-enable it
It's due to how auto-launch launches the old version instead of the updated version

Hi, following your suggestion fixed the issue with the new version dialog popping up.  However, I continue to get a white screen occasionally with the "Automatically launch..." option enabled.  I wonder if it has to do with home fast my internet connects upon startup.


HSEARCH-3898 Change the explain API so that the type name is used

https://hibernate.atlassian.net/browse/HSEARCH-3897
https://hibernate.atlassian.net/browse/HSEARCH-3898
I created the follow up (not solved here): HSEARCH-3899.
To use the entity id instead of the document id for the same API.

Thank you for the review @yrodiere. I think I've addressed the comments here.

Merged, thanks!


[ARITH]add simplify rule for div

Thanks for contributing to TVM!   Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.
@tqchen @yzhliu please review

cc @yongfeng-nv @yzhliu @zhiics @wweic @junrushao1994 please help to take a look

cc @zhiics @yongfeng-nv @merrymercy @jroesch please help to take a look

LGTM now. @yongfeng-nv @merrymercy @junrushao1994 any of you wants to take a quick look?

Arith simplification are key to the correctness so it would be great if we can be extra careful here. It would be great if we can write down a proof for the rule, or at least try to enumerate two tabular values to see if all of the possibilities within a range holds.

cc @spectrometerHBH @Hzfengsy would be great if you can also help  to check the proof

@xqdan sorry for the delayed reply. I take a closer look, and unfortunately the new rules may not be correct.
    TVM_TRY_REWRITE_IF(
        truncdiv(x + c1, c3) - truncdiv(x, c3), truncdiv(truncmod(x, c3) + c1, c3),
        CanProveGreaterEqual(x.Eval(), 0) && c1.Eval()->value >= 0 && c3.Eval()->value > 0);

In particular, the new rule is closely related to the above rule(which is on top of the current rule. Pay attention to the special case of truncmod(x, c3) in the above term.
In particular, let us say c3=3, c1=1, x = 11, then
truncdiv(11 + 1, 3) - truncdiv(11, 3) = 4 - 3 = 1 = truncdiv(truncmod(11, 3)+1, 3)

Let x =y * c4 + c5 and replace y by x, we can derive a counter-example for the listed rule.  To re-use the above rule a bit, a likely generalization should be.
It is not too hard to prove the above rule(by decomposing x into z * c3 + r).
To get to a similar rule that applies to your case, we could replace x by x + c4, then get to
    TVM_TRY_REWRITE_IF(
        truncdiv(x + c4 + c1, c3) - truncdiv(x + c4, c3), truncdiv(truncmod(x + c4, c3) + c1, c3),
        CanProveGreaterEqual((x + c4).Eval(), 0) && c1.Eval()->value >= 0 && c3.Eval()->value > 0);

=>
    TVM_TRY_REWRITE_IF(
        truncdiv(x + c5, c3) - truncdiv(x + c4, c3), truncdiv(truncmod(x + c4, c3) + (c5-c4), c3),
        CanProveGreaterEqual((x + c4).Eval(), 0) && (c5 - c4).Eval()->value >= 0 && c3.Eval()->value > 0);

@xqdan sorry for the delayed reply. I take a closer look, and unfortunately the new rules may not be correct.
    TVM_TRY_REWRITE_IF(
        truncdiv(x + c1, c3) - truncdiv(x, c3), truncdiv(truncmod(x, c3) + c1, c3),
        CanProveGreaterEqual(x.Eval(), 0) && c1.Eval()->value >= 0 && c3.Eval()->value > 0);

In particular, the new rule is closely related to the above rule(which is on top of the current rule. Pay attention to the special case of truncmod(x, c3) in the above term.
In particular, let us say c3=3, c1=1, x = 11, then
truncdiv(11 + 1, 3) - truncdiv(11, 3) = 4 - 3 = 1 = truncdiv(truncmod(11, 3)+1, 3)

Let x =y * c4 + c5 and replace y by x, we can derive a counter-example for the listed rule. To re-use the above rule a bit, a likely generalization should be.
It is not too hard to prove the above rule(by decomposing x into z * c3 + r).
To get to a similar rule that applies to your case, we could replace x by x + c4, then get to
    TVM_TRY_REWRITE_IF(
        truncdiv(x + c4 + c1, c3) - truncdiv(x + c4, c3), truncdiv(truncmod(x + c4, c3) + c1, c3),
        CanProveGreaterEqual((x + c4).Eval(), 0) && c1.Eval()->value >= 0 && c3.Eval()->value > 0);

=>
    TVM_TRY_REWRITE_IF(
        truncdiv(x + c5, c3) - truncdiv(x + c4, c3), truncdiv(truncmod(x + c4, c3) + (c5-c4), c3),
        CanProveGreaterEqual((x + c4).Eval(), 0) && (c5 - c4).Eval()->value >= 0 && c3.Eval()->value > 0);

@tqchen thanks for reply.
I get your point, but what we seek is to eliminate 'x' here,
The new rule 2 above (not in the code) can exclude the case you post, since (11+1 - 11) %3 == 0 is not satisfied.

It would be great to elaborate your conditions in 1, and 2 a bit and write down a new rule :) I can double check a bit later


Update log4j-over-slf4j, slf4j-api to 2.0.13

About this PR
📦 Updates

org.slf4j:log4j-over-slf4j
org.slf4j:slf4j-api

from 2.0.9 to 2.0.13
Usage
✅ Please merge!
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!

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

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.slf4j" }
}]

labels: test-library-update, early-semver-patch, semver-spec-patch, commit-count:1

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
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 89.319%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
669

Relevant Lines:
749

💛  - Coveralls

Superseded by #262.


handle reportLocation cmd

I ran into an issue where my ios device kept getting a 400 response from the orion server. It turns out it was sending a command like
{'action': 'reportLocation', 'topic': 'owntracks/user/device/cmd', '_type': 'cmd'}

The server was responding with status=400, message='Not a location publish.' and all the actual location publishes seem to have backed up behind this. Once I set the server to response with a 200, it started flushing the backed up location publishes

Coverage decreased (-0.3%) to 80.18% when pulling 181f27d0065d6e5a7785a237295760d6a6061ee9 on brian123zx:bugfix/reportLocation into 1f3a45a84f7bcfe69d04d9c0221229932aedec6f on LINKIWI:master.

Interesting, thanks for patching. Can you add a unit test for this? If you're not familiar I can take care of that.

I'll take a stab at it later today

@LINKIWI Wrote a test

Thanks!


Added option to change the first day of the week in the calendar.

Trello Link (if applicable): https://trello.com/c/c1QvrwAo
Explanation of Bugfix/Feature/Enhancement:
Some users outside the US are used to the week starting on Monday, and this gives them flexibility to choose the start day.
Recommended Release Notes:
Added option to change the first day of the week in the calendar.

Thank you!


only update the excludeTracks when it is not undefined

trying to fix
https://github.com/driftyco/ionic-conference-app/issues/92

Thanks for the PR!


Raspbian platform

Sorry for lag on first pull request.  Missed the message.  New pull request with tests.

Thanks!


Remove highlights from @mentions

Assuming nick is the nick of the current user:

nick triggers a highlight
@nick triggers a highlight, even though starting with @ prevents the auto-complete to show up
@@nick does not trigger a highlight
nicki-minaj-is-my-hero... does trigger a highlight...

This PR removes the second case. I don't see a value in highlighting @nick, unless we want to give a GitHub look-and-feel, in which case we should also enable in auto-complete, ... Not sure we want that, after all this is not how IRC deals with nicks, as opposed to, say, GitHub and Twitter.
But maybe I'm very wrong, let the caucus decide :-)

I agree that it's "incorrect" to use @nick in IRC, but on the other hand, I'd like to be highlighted even if someone happens to do that. In that sense I don't see it as an issue that @nick causes a highlight.

Just as a quick note, as far as I know, most IRC clients highlight for the literal string, even if it is included in another word.

They often do, but the good ones try to avoid highlighting if the user's nick is immediately preceded or followed by a character that would be valid in a nickname.

I personally like having my name highlighted no matter what, as some people do use @ GH-style. :-1: for me

Seeing how discussion in #159 and on the IRC channel are going, it looks to me that this is not the way to go. @maxpoulin64, feel free to close this as is or to request any further change. It could be that this PR (or its short-term evolution) is a temporary change until better comes in, or not. I'll let you decide and I'll adapt :-)

Yeah I will close this and make a PR later to match under any circumstances instead. I think this is what people expect, and also what other IRC clients do in general.


net.peer.* vs net.host.*

lib/opentelemetry_plug.ex reads wrong to me:
    attributes = [{"http.target", conn.request_path},
                  {"http.host",  conn.host},
                  {"http.scheme",  conn.scheme},
                  {"http.user_agent", user_agent},
                  {"http.method", conn.method},
                  {"net.peer.ip", to_string(:inet_parse.ntoa(peer_ip))},
                  {"net.peer.port", adapter.peer_data.port},
                  {"net.peer.name", host},
                  {"net.transport", "IP.TCP"},
                  {"net.host.ip", to_string(:inet_parse.ntoa(conn.remote_ip))},
                  {"net.host.port", conn.port} | optional_attributes(conn)
                  # {"net.host.name", HostName}
                 ]

vs the semantic conventions spec:

Attribute name
Notes and examples

net.transport
Transport protocol used. See note below.

net.peer.ip
Remote address of the peer (dotted decimal for IPv4 or RFC5952 for IPv6)

net.peer.port
Remote port number as an integer. E.g., 80.

net.peer.name
Remote hostname or similar, see note below.

net.host.ip
Like net.peer.ip but for the host IP. Useful in case of a multi-IP host.

net.host.port
Like net.peer.port but for the host port.

net.host.name
Local hostname or similar, see note below.

… and the semantic conventions for HTTP spec, from which I lack the time to extract the right bit, and Plug.Conn:

remote_ip - the IP of the client, example: {151, 236, 219, 228}. This field is meant to be overwritten by plugs that understand e.g. the X-Forwarded-For header or HAProxy's PROXY protocol. It defaults to peer's IP

If conn.remote_ip has the apparent client IP address from X-Forwarded-For, that should go in http.client_ip, which you did by other means, not in net.host.ip. So there'll be some cleaning up in there.

I've raised elixir-plug/plug#948 to see if we can get the sock out of conn.adapter via official means rather than rummaging, matching the use of Plug.Conn.get_peer_data/1 in #4.

Aah, I get it now. "host" != "server". For spans sent by an HTTP client, the HTTP client is the host and the HTTP server is the peer. For spans sent by an HTTP server, the HTTP client is the peer and the HTTP server is the host.


Feature/facebook profile

Shows the Facebook user id used to login to Messenger app

Solves https://github.com/timotoots/iphonebackuptools/issues/6

Awesome!


Crashes very often while editing files on ftp

hi,
very nice package, but makes my Atom crash too often
i am editing files on server via ftp ( https://atom.io/packages/Remote-FTP ) and have 2 tabs opened .css & .php file (but inside is plain html, no php function, will add them in future). So when i am opening 3 tab - atom-html-preview it works ok.
But after 2-3rd save of .css .php files it starts to show not real situation and i must restart tab via ctrl + shift + h.
then sometimes up to 10-12 times at hour Atom crashes entirely, no error msgs. Maybe somewhere in logs. I've started to use Atom very recently but it started to crash only after i've started to use atom-html-preview.
Sorry for so generic issue.
I can upload any log if you will say to me from where i can take them/ make them.
I don't have many packages. can list them all. but i repeat crash of entire Atom happens only with enabled atom-html-preview as 3 tab.
All 3 tabs are splitted. 1/3 of screen. Win7

Is this possible to have a key command for a package reload without the need to do same command twice ( ctrl+shift+h) ? how i've already after some save made it starts to show not real stuff. Force Reload would be nice.


feat: float filter button on mobile collection activity page

Thank you for your contribution to the KodaDot NFT gallery.
👇 _ Let's make a quick check before the contribution.
PR Type

[ ] Bugfix
[x] Feature
[ ] Refactoring

Context

[x] Closes #5359
[ ] Requires deployment <>

Before submitting pull request, please make sure:

[x] My contribution builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[x] I've tried to respect high code quality standards
[x] I've didn't break any original functionality
[x] I've posted a screenshot of demonstrated change in this PR

Optional

[x] I've tested it at </bsx/collection>
[x] I've tested PR on mobile
[ ] I've written unit tests 🧪
[ ] I've found edge cases

Had issue bounty label?

[x] Fill up your KSM address: Payout

Community participation

[x] Are you at KodaDot Discord?

Screenshot 📸

[x] My fix has changed something on UI; a screenshot is best to understand changes for others.

https://user-images.githubusercontent.com/128157824/230609671-444e8387-84b0-40ec-95c3-48b502dfba2f.mp4

good!
can we please make the space disappear after the burger menu is not displayed? - I mean the space between tab switch and white line

good! can we please make the space disappear after the burger menu is not displayed? - I mean the space between tab switch and white line

@exezbcz fixed:

@leo-anderson-x yes, good job!

pay 30 usd


[Vite] TailwindCSS 2.2 JIT no longer tracks updated Svelte files

Since 2.2 (tailwindlabs/tailwindcss#4514) the JIT engine switches to using the "tracking" context by default instead of "watching" context, which requires support in Vite. There's an issue about this filed at tailwindlabs/tailwindcss#4683 but I figure it's good to track this here as well.
Current workarounds:

Use TAILWIND_MODE=watch env var, which is ugly and not cross-platform without cross-env, and apparently doesn't trigger HMR
Start a separate tailwind process with npm-run-all
Downgrade tailwind to 2.1

Proper Fix:
https://github.com/vitejs/vite/commit/6eaec3ab74d126310d93f8a93f8577bed1c3f474 should in theory fix this, although I can confirm that the CI failing tests on Windows is not a fluke, I can replicate it on my machine.

Can confirm I'm running into this issue as well.
The TAILWIND_MODE=watch trick is a lifesaver though 👍

@GrygrFlzr Windows fix might have just been checked in - https://github.com/vitejs/vite/commit/41b193c8500b28efc3e61a0387498ded3840c6a1

Putting

const mode = process.env.NODE_ENV;
const dev = mode === "development";
process.env.TAILWIND_MODE = dev ? "watch" : "build";

in svelte.config.js (or svelte.config.cjs for people using non-SvelteKit Vite) fixes it.

Also note that due to #58, this project currently isn't able to produce a JIT Tailwind setup because svelte-add doesn't have an argument parser to detect that --jit is even being passed (and implementing this is harder than it sounds which is why it hasn't happened yet). An empty JIT config can be found here: https://github.com/svelte-add/tailwindcss/blob/76a390563f3b9d34938178b44c2b1a3c4f2d3eeb/__run.js#L38-L50

Alternatively, https://github.com/sveltejs/kit/pull/1715


Release 0.0.7 ?

@rmonat would you be fine with making a new release that includes the C implementation ?
Thanks!

@AltGr I think you have all the rights to perform one. If needed I can do it at the end of this week.

Added + https://github.com/ocaml/opam-repository/pull/26738 (in progress)


[Question]  How to use KeepSynced()?

[REQUIRED] Please fill in the following fields:

Unity editor version: 2021.1.3f1
Firebase Unity SDK version:7.2.0
Source you installed the SDK: unitypackage (.unitypackage or Unity Package Manager)
Problematic Firebase Component: Database(Auth, Database, etc.)
Other Firebase Components in use: Database(Auth, Database, etc.)
Additional SDKs you are using: AdMob(Facebook, AdMob, etc.)
Platform you are using the Unity editor on: Windows(Mac, Windows, or Linux)
Platform you are targeting: Android(iOS, Android, and/or desktop)
Scripting Runtime: IL2CPP(Mono, and/or IL2CPP)

[REQUIRED] Please describe the question here:
I use OrderByKey().EndAt(lastKey).LimitToLast(10)
My DB is big so I use that code to only get 10 keys each time instead of the entire snapshot.
But it returns an old DataSnapshot and doesn't return new Keys unless I reset the app.
The solution is to add KeepSynced()
My question is how should I use KeepSynced()?
When I use it on the entire location- It made my app slow because I have a big DB
DatabaseReference dtr = FirebaseDatabase.DefaultInstance.GetReference(path);
dtr.KeepSynced(true);
dtr.OrderByKey().EndAt(lastKey).LimitToLast(10) .GetValueAsync().ContinueWith(t => t);
or should use it as a query for every 10 items?-
var query = dtr.OrderByKey().EndAt(lastKey).LimitToLast(10)
query.KeepSynced(true);
query.GetValueAsync().ContinueWith(t => t);

Take a look at the quick start app to see an example
https://github.com/firebase/quickstart-unity/blob/86f5b37cf8f643089c6302c9cb2add423cb0a5e6/database/testapp/Assets/Firebase/Sample/Database/UIHandler.cs#L74
What this does is assign a callback function to the ValueChanged listener. Whenever a value changes at that reference the database will call that callback and you can react to it however you want.
Listeners are generally the preferred way to receive updates from the database rather than polling with GetValueAsync. If, for example, the network request hangs for an indeterminate amount of time there's no way to cancel the call to GetValueAsync. Listeners are easier to add and remove and better at communicating errors.

I understand that, but my app doesn't need only new values or updates.
I have a database that stores cars for sale-  I want the user to see all the cars that were posted in the last month, retrieving 10 cars each time sorted by the newest.
GetValueAsync can get what already exists in the DB and that's what I need to show the user.
A listener in that case is good for only newer posts/updates since the user's last query.
Keep synced was perfect because every time the user entered the app and clicked Search, they saw everything in the DB including new posts.
Also, isn't it the same thing- adding a listener to the entire path or using keepSynced, in terms of large local cache ?

I have too many entries, sub entries and users (DB of car posts, DB for comments for a car post, DB for user's posts, DB for likes for a comment of a car post), it sounds too much to set listeners for everything. Some paths are not that important to be subscribed to, but I still want to retrieve updated values when entering there. Firebase makes it so hard for us.
Was I wrong in choosing real-time database for my app? Is firestore a better solution? It sounds so wrong to create listeners for every random path on my DB

Okay, I think I had my wires crossed yesterday. Yeah, since the location you're keeping synced has the relevant filters applied to it I'm not sure why that wouldn't work. The local cache should only contain the values you request, respecting the filters you're applying.
This snippet:
var query = dtr.OrderByKey().EndAt(lastKey).LimitToLast(10)
query.KeepSynced(true);
query.GetValueAsync().ContinueWith(t => t);

Looks like it should keep just the values you care about in memory, so the cache shouldn't grow without bound. How are you profiling this to determine that the issue with the DB? It's possible that the DB isn't evicting fields that it should, but it would be good to verify with some kind of minimal example that can reproduce the issue. (unfortunately the DB's api doesn't give you good access to the internal state so it's hard to see what is actually being cached on disk and in memory)
To clarify, is this slowdown happening on a desktop platform or on a mobile device?

To clarify- I use EndAt(lastKey).LimitToLast(10), meaning at first I retrieve the 10 last items, and then 10 items before that, etc... (depends how much the user scrolls down the list, I keep calling that command to get 10 more items from the DB, saving the last key)
So you recommend the second snippet? KeepSynced only a query of every 10 items? It looks kind of strange, to call KeepSynced   on every 10 items and not the entire node.
I know it's an issue with the DB, because after GetValueAsync nothing happens, no task result, nothing, but suddenly after 40 seconds it suddenly returns. It only happens with large nodes.
To be honest, it happens mostly on Desktop, but I suspect that it affects the android somehow as well not that long.
But it became impossible for me to use Unity Editor, I can't wait so long to get data, it's crazy and wasn't like that in the begining.

Hi @shlighter,
The second snippet is more recommended because you're downloading less data compared to when using the first snippet.
In analyzing why retrieving your data takes too long, you may profile your database using a tool built into the Firebase CLI so that you can measure its performance. It's possible that you're exceeding or getting close to the database's limits, so you may consider scaling with multiple databases for optimal performance.


API Resource Carbon Dates rendering as full arrays

Laravel Version: 5.5.40
PHP Version: 7.2.7
Database Driver & Version: MySQL 5.7.22

Description:
Laravel API Resource exports Carbon dates as arrays.
Steps To Reproduce:
As illustrated in the code, sending back $this->created_at will actually dump the entire Carbon object as an array, rather than the string version.
<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\Resource;

/**
 * Resource designed to work with Eloquent Model
 *
 * @package App\Http\Resources
 */
class DemoResource extends Resource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request $request
     *
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
            'deleted_at' => $this->deleted_at,
        ];
    }
}

Steps To Resolve:
Typecasting (string) for the Carbon Dates fixes it.   If this is intended, that's fine, it just seems really odd to do this extra step. It gives more flexibility, but it kind of takes the whole Laravel Magic out of things.
<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\Resource;

/**
 * Resource designed to work with Eloquent Model
 *
 * @package App\Http\Resources
 */
class DemoResource extends Resource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request $request
     *
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'created_at' => (string) $this->created_at,
            'updated_at' => (string) $this->updated_at,
            'deleted_at' => (string) $this->deleted_at,
        ];
    }
}

The magic is getting a carbon object from a date field in your database. If you don't want dates to be cast into carbon objects, don't add them to the model's $dates array.

You can choose another HTTP response representation by calling Illuminate\Support\Carbon@serializeUsing(). e.g., put the following in your AppServiceProvider:
Carbon::serializeUsing(function (Carbon $timestamp) {
    return $timestamp->toIso8601ZuluString();
});

which is more moment.js-friendly.

You can also do it this way in your model :
https://laravel.com/docs/7.x/eloquent-serialization#date-serialization


Update c3 servers to new build system & allow TwitterHandle routing

Hi Joe, I would love to be able to direct Google Adwords to https://wevote.guide/Defenders (our c3 servers). The changes you made on the c4 servers are working well.

@DaleMcGrew I just updated the c3 server - please take a look and see if everything seems to be working correctly.

Thank you @josephevans! The twitter handle shortcut works like a charm -- I'll let the Google Adwords team know they can launch their campaign. :)