Connection checks for Dynatrace environments

Summary
Currently when adding a new environment or switching between them there is no connectivity check done. Similarly, our status bar shows "Connected to X" but that doesn't carry out any checks. This can be improved by some initial API call to validate it, and the status bar reflecting the actual status - a bit like a health indicator since this will impact most project features.
Expected Behavior

When adding new environments

After URL is entered, a simple web request should be carried out to check if reachable

Potentially an API call to cluster/time since this is an unauthenticated endpoint

In case of failures, there's no point adding this environment

When switching environments

API call to cluster/time should be made to check connection

Status bar indicating "Connected to X"

Status bar text might be better rephrased as "Using X"
Status bar could change color based on connection status

If the last connection status is negative, retry every X seconds
If the last connection status is positive, no additional checks needed

Status bar command can stay as is, allowing quick switch to another tenant

Should not show anything though if user only has 1 tenant (currently it's empty list)

Additional context
Users have been in the situation where a corporate proxy is blocking VS Code connections. So they appeared as having internet access, but all of our requests were blocked (socket hang up). Maybe some messaging around this situation could be also included in this improvement.

part of 2.0.0


Possibility to add a redis password

Describe the bug
When using redis as cache/session driver, one might need to add a password for the redis connection, there is no variable in the config or any mention in the db file
Steps To Reproduce
Steps to reproduce the behavior:

Change drivers to redis
Look for the place to put the password

Expected behavior
Either have a REDIS_PASSWORD variable or use something like REDIS_SERVERS=:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}
Your Configuration (please complete the following information):

Exact BookStack Version (Found in settings): v0.25.1
PHP Version: 7.2
Hosting Method (Nginx/Apache/Docker): apache in a docker container behind nginx reverse proxy

Additional context
Hope I didn't miss something

Hope I didn't miss something

No, Just don't used redis that often myself so did not know it could be commonly used with a password.
Thanks for reporting, Should be a fairly quick thing so have marked for the next minor release.

Great, thanks!

The new format will be HOST:PORT:DATABASE:PASSWORD, Where :PASSWORD is optional.
Just about to merge in the code updates for this, Will be in the next patch release.
Notes for release
Previously specifying multiple redis servers did not actually seem to do anything, Only the first was used. Code is now updated to auto-use a cluster if more than one server is provided.
The REDIS_CLUSTER has now been removed.


Implemented calls to API to extract categories

Using Volley for asynchronous networking and JSON/GSON

@Niedzielski updated code here, I think it works. Thanks for all the help! :)
I might still have to look into the synchronization that you requested, though I'm not really sure what you mean by that?


Add gradient accumulation and optimizer step limits to Brain class

This PR is based on discourse conversation. The PR provides a possibility to stop training depending on optimizer step count. For some cases (listed in the discourse topic) it's more handy than the epoch counter.
This PR also adds a gradient accumulation inspired by the CommonVoice ASR transformer recipe. It's easier to configure training with optimizer step limit while gradient accumulation is enabled. The existing approach (based on epoch counter) requires calculations every time you want to tweak batch size keeping the same number of optimization steps.
I've also made a branch with tests: https://github.com/kokamido/speechbrain/tree/grad_acc_and_iter_stop_tests
Tests run deterministic training pipeline with various combinations of gradient accumulation factor and optimizer step limit then check that logged validation losses are the same.
You can run the tests as
cd speechbrain/tests/grad_acc_test/
sh test_grac_acc.sh

Two GPUs are required for testing due to DP/DDP scenarios.
I hope you’ll find this convenient

Hey! Thank you so much, these directions look cool and may interest @Gastron and @pplantinga

The looks good to me, but @TParcollet do you think we should update all the recipes that use gradient accumulation to this?

I'm fine with these changes.

As for the gradient accumulation, we already considered adding it in the fit_batch function of core.py.  However, as you can see there is often the need to override the fit_batch method within the recipe script. For instance, in the CommonVoice Transformer recipe, we need to override it because we have a learning rate annealing done at every update (not supported by the version in core.py).
In this case, we have to re-implement the gradient accumulation again in train.py.

As it is basically very hard to write a fit_batch function that meets everyone's needs, our approach was to keep in core.py a basic version of it and leave users all the freedom to customize   fit_batch  based on their needs in train.py. Gradient descends only require a couple of lines of code, so it shouldn't be too hard to add.  Said that I'm fine adding it core.py as well if this is considered useful by the users.

So @Gastron, there is not need to update the existing recipes because they already have to override fit_batch.

Right! I think this makes sense to include, and I like how this PR deals with the two different but connected improvements. Merging!

One slight issue I want to point out is that if one is comparing builds with different amounts of gradient accumulation then in, the current implementation, the loss will be scaled differently making it harder to compare.
The correct thing to do is to sum the loss across the different forward-backward steps (until one does one optimizer step). But I can understand avoiding that because it makes the code more ugly.

@RuABraun could you elaborate a little, I'm not sure if I understand. I think with this current scaling, with gradient accumulation factor x, the loss will be the sum of x batches' losses, each divided by x, which I think should keep the same scale as training without gradient accumulation. (I suppose this assumes loss reduction is mean-based or some such.)

You're write sorry! misread the code

Phew, well thanks for double checking this!


Update labels for m1 runners

Update labels for m1 runners

already merged

Current changes are already part of release/0.18 - https://github.com/pytorch/vision/blob/release/0.18/.github/workflows/build-conda-m1.yml#L49


Documentation

[x] Add a document for app requirements and Specification
[x] Document all the app functionalities including variables and props

The documents were created and have the required info added in them.


False negative for University of Stirling

http://dspace.stir.ac.uk/handle/1893/22039 is not detected at http://api.oadoi.org/v2/10.1111/1467-856X.12057 although it's in https://www.base-search.net/Record/fa44a34e280af486bce6688006e6e8486c6a9caccb5372ab798ee4e8b39c114a/ and has
<meta name="citation_pdf_url" content="http://dspace.stir.ac.uk/bitstream/1893/22039/1/BJPIR%20FINAL%206th%20June%202014.pdf" />

It looks like the the dspace record is now found by oadoi/unpaywall, see the second "oa_location" in https://api.unpaywall.org/v2/10.1111/1467-856X.12057.
Would you like to close the issue, @nemobis?

thanks very much for following up on this issue @ioverka!


Error on unused variable

sources/libs/brutal/ds/range.c:117:17: error: unused variable 'range' [-Werror,-Wunused-variable]
vec_foreach(range, self)

This bug seems to happen when using older clang versions, what is the output of clang --version?

Apple clang version 13.0.0 (clang-13<IP_ADDRESS>)

Solved the issue by installing llvm 12 with homebrew and adding<EMAIL_ADDRESS>to the path.


V3 dev

i need source code please

Any idea when this will be merged?

sorry @REJack, I had the wrong version of node-sass

Closing PR due conflicts


PUPIL-959 feat(results): add printable results page behind feature flag

Description
Music year: 2020

List of changes

Issue(s)
Fixes #
How to test
Acceptance criteria

[x]  hidden behind a feature flag
[x]  stores results in local storage using provider
[x]  clicking opens a new tab with the printable results
[x]  test coverage

on OWA the button should be available; going to https://eu.posthog.com/project/124/feature_flags/32707 you can switch the button on and off by disabling the feature flag

Go to https://deploy-preview-2766--oak-web-application.netlify.thenational.academy/pupils/programmes/maths-primary-year-6/units/use-knowledge-of-part-whole-structure-to-solve-additive-problems/lessons/explain-how-a-combination-of-different-parts-can-be-equivalent-to-the-same-whole/review?update_tracking_profile=true
Click on "share lesson result" button
You should see results page opened in a new tab

Screenshots
How it used to look (delete if n/a):
{screenshots}
How it should now look:
{screenshots}
Checklist

[ ] Added or updated tests where appropriate
[ ] Manually tested across browsers / devices
[ ] Considered impact on accessibility
[ ] Design sign-off
[ ] Approved by product owner
[ ] Does this PR update a package with a breaking change

I don't understand "NOTE NEEDS A MERGE FROM oak-pupil-client repo" . If this is the case then the PR is not ready for review.

There should be an equivalent production feature flag with the same name. Can you link to it here so that it can be reviewed.

Those conflicts will require mashing both bits of code together so be careful

Final one - can we have a look at  src/browser-lib/pupil-api/PupilClientProvider.tsx . I'm not convinced that we need this wrapper. But in any case it needs to be renamed to something less confusing.

@benprotheroe looking good. From an accessibility point of view does the button need to open the results in a new tab? If so can we add some warning text for screen readers to inform the user that the results will be displayed in a new tab - e.g.
<button
  class="sc-jxOSlx sc-gFAWRd fcakBG iAbZPB internal-button"
  type="button"
  aria-label="Printable results, opens in a new tab"
  title="Printable results (opens in a new tab)">

    Printable results

</button>

Also adding a visual cue that the results open in a new tab could be useful -

Further information about opening links in new tabs here:
https://www.digitala11y.com/external-links-in-or-out/

@benprotheroe looking good. From an accessibility point of view does the button need to open the results in a new tab? If so can we add some warning text for screen readers to inform the user that the results will be displayed in a new tab - e.g.
<button
  class="sc-jxOSlx sc-gFAWRd fcakBG iAbZPB internal-button"
  type="button"
  aria-label="Printable results, opens in a new tab"
  title="Printable results (opens in a new tab)">

    Printable results

</button>

Also adding a visual cue that the results open in a new tab could be useful -

Further information about opening links in new tabs here:
https://www.digitala11y.com/external-links-in-or-out/

really good point; when i was building i didnt think of it as a link; because the it calls a function which stores the lesson attempt; but then once its stored it open the page; but i guess from a ux it feels like a normal link; would it be suficient from an accessibility pov to add the external link logo; and add a note for the screenreader which says will open a new tab with reults on it. or do we have to change the role of the button to link as well?

@benprotheroe looking good. From an accessibility point of view does the button need to open the results in a new tab? If so can we add some warning text for screen readers to inform the user that the results will be displayed in a new tab - e.g.
<button
  class="sc-jxOSlx sc-gFAWRd fcakBG iAbZPB internal-button"
  type="button"
  aria-label="Printable results, opens in a new tab"
  title="Printable results (opens in a new tab)">

    Printable results

</button>

Also adding a visual cue that the results open in a new tab could be useful -

Further information about opening links in new tabs here:
https://www.digitala11y.com/external-links-in-or-out/

really good point; when i was building i didnt think of it as a link; because it calls a function which stores the lesson attempt; but then once its stored it open the page; but i guess from a ux it feels like a normal link; would it be suficient from an accessibility pov to add the external link logo; and add a note for the screenreader which says will open a new tab with reults on it. or do we have to change the role of the button to link as well?

Yeah from a user point of view it feels like the behaviour is closer to a link rather than a button, its navigating to a new tab with a different url so it would make sense from a semantic point of view for it to be anchor () tag rather than a button

It cant be a anchor tag because the href doesnt exiat until you ve clicked the button; the callback function creates the href;

:tada: This PR is included in version 1.547.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Fix default options pass to xfvb-run command

Fix tests for this pull request
https://github.com/mikehaertl/phpwkhtmltopdf/pull/126

Thanks. I'll prepare a release with this change shortly.


[FormRecognizer] Addressing architect feedback (1/2)

Addressing architect feedback + some renaming for consistency with other languages.
In addition to multiple renames, the only major changes included in this PR are:

Added class TrainingDataContentSource as a base class to BlobContentSource and BlobFileListContentSource. It will serve as a polymorphic type in multiple parts of the code.
Added a new overload to BuildDocumentModel that takes a TrainingDataContentSource object. Tests for this overload will be added in a future PR.

API change check
APIView has identified API level changes in this PR and created following API reviews.
Azure.AI.FormRecognizer


How to see 'live' energy usage on Sonoff POW R2?

Is it possible to see the live energy usage as in the eWeLink App?
I find this useful especially to see what single devices connected to a powerstrip are using by switching them on and off and comparing the delta.

yes, you can but you need to call the service to get fresh data

Yes, go to Home - Click on + and then add an entity. Select your POW as the device and add the power attribute you want displayed:

Hi guys. I am new to HA and trying to learn.
How do i call a service???
Thanks

What are you trying to do? To display live power usage follow my instructions in my previous post above.

@alexdj71 There is no need to call the service for live energy. Service is needed for consumption.

@alexdj71 There is no need to call the service for live energy. Service is needed for consumption.

without calling the service wasn-t able to get fresh data.
in the documentation is also reported to do that. @AlexxIT can you check it?
moreover seems working only if you have Sonoff Cloud active in the HA

@mtosin live energy works only with cloud (or lan+cloud) connection.

@mtosin live energy works only with cloud (or lan+cloud) connection.
https://github.com/AlexxIT/SonoffLAN/releases/tag/v2.3.1

it's fine but is not mentioned here and check below... is requiring to call the service to pull data...not sure if you implemented that
Sonoff Pow Power Consumption
For update power consumption of all your Pow devices you can call sonoff.update_consumption service.
The device attributes will display data for the last 100 days. The first element is today's data. It's up to you how often to call updates and what to do with this data later.
### Remember, without calling the service, there will be no values. Use automation.

I think the question is about live (instant) energy usage - power param.
Consumptions is about the total energy consumption over a period of time.

@AlexxIT I am facing the following problem with POW R2.
I have 2 devices in HA that only start showing current and power when I open the ewlink app on my cell phone.
For example.
at 8am, everyday I turn on a certain equipment and I wait for the feedback from the power/current status bagde on my home panel to update. unfortunatelly it doesn't so I open the ewlink app on my phone and voilà it starts showing, and only then it records on the graph.
what am I doing wrong?

@alexdj71 I this you use mode: local

@alexdj71 I think you use mode: local

Yes I do, should I change it back to cloud? I thought cloud and local was only responsible for switch and toggle directly from HA, so know you tell me it also interferes with the power/amp status?
Is there a way to overcome this limitation?
Thanks for your prompt answer,

@alexdj71 I think you use mode: local

and this is my yaml
#SonOff
sonoff:
username<EMAIL_ADDRESS>password: kosher5781
scan_interval: '00:01:00'  # (optional) default 5 minutes
mode: local
reload: always  # update device list every time HA starts
sensors: [temperature, humidity, power, current, voltage]
devices:
1000bd9199:
name: Resistencia
force_update: True
1000bd95ce:
name: Ventoinha
force_update: True

@alexdj71 I think you use mode: local

And this is my YAML file
#SonOff
sonoff:
username: "username"
password: "pass"
scan_interval: '00:01:00'  # (optional) default 5 minutes
mode: local
reload: always  # update device list every time HA starts
sensors: [temperature, humidity, power, current, voltage]
devices:
1000bd9199:
name: Resistencia
force_update: True
1000bd95ce:
name: Ventoinha
force_update: True

You need mode: auto

hey @AlexxIT i did several tries over the past 2 weeks, but i didn't figured it out yet, my pow r2 didn't send a consumption attribute like so :

thank you for this amazing hacs integration 👍

hey @AlexxIT i did several tries over the past 2 weeks, but i didn't figured it out yet, my pow r2 didn't send a consumption attribute like so :

thank you for this amazing hacs integration 👍

@mohssinDR you need to get consumption manually by calling service as said in readme.

@mohssinDR you need to get consumption manually by calling service as said in readme.

sorry for my misunderstanding, im newbie here, what do you mean by calling a service manually? isn't that what i already did when i add (service: sonoff.update_consumption) to my yaml config ?

sorry for my misunderstanding, im newbie here, what do you mean by calling a service manually? isn't that what i already did when i add (service: sonoff.update_consumption) to my yaml config ?

@mohssinDR no. Your YAML wrong


[MIGRATION] Issue with quote table

SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (Connection: mysql, SQL: alter table quotes add constraint quotes_companies_id_foreign foreign key (companies_id) references companies (id) on delete cascade)
at vendor\laravel\framework\src\Illuminate\Database\Connection.php:829
825▕                     $this->getName(), $query, $this->prepareBindings($bindings), $e
826▕                 );
827▕             }
828▕
➜ 829▕             throw new QueryException(
830▕                 $this->getName(), $query, $this->prepareBindings($bindings), $e
831▕             );
832▕         }
833▕     }

introduce foreign key impose to link id
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (erp_8_2024.purchases, CONSTRAINT purchases_companies_contacts_id_foreign FOREIGN KEY (companies_contacts_id) REFERENCES companies_contacts (id) ON DELETE CASCADE)
i must to be add defaut contact and adress to table


Extend matrix.to URL scheme and update spec

There is a current proposal by design to extend the URL scheme for a smoother user experience by adding a client parameter and an inviting-user parameter.
The client parameter will help matrix.to select a sensible default client for the room redirect. It will also help private matrix instance with custom clients pass that information to new users.
The optional inviting-user parameter was intended to provide a visual preview of the inviting user as seen here: https://www.figma.com/file/WSXjCGc1k6FVI093qhlzOP/04-Recieving-share-link?node-id=148%3A341/. However, there is currently no way to do that without opening many forms of phishing attack. I doubt this will make it to the spec.

A spec proposal may be written up for this


Dimension field validation

Issue description:
Hello Aris and congrats for your awesome work.
Just one small issue. Dimension field CSS validation always return true.
After debug in aristath/kirki/controls/js/script.js in kirkiNotifications function (line 1847) and cssValue function (line 1401), I changed the IF condition operator in line 1408
From:
if ( 'string' !== typeof value || 'number' !== typeof value ) {
To:
if ( 'string' !== typeof value && 'number' !== typeof value ) {
.. everything works as expected.
Can you change in next release?
Thanks.
Version used:
3.0.39 master branch (packagist)
Using theme_mods or options?
theme_mods

Hey there @k3x4
Good catch, this has already been fixed in the develop branch and will be included in v4.0
However it's going to be a while before that new version is ready because it's a major rewrite of a lot of things. Each control is its own module now in packagist - and so are modules. I'm making the structure more modular and versatile so if one only needs a couple of controls and modules they'll be able to just install those specific packages instead of the whole plugin.
It requires a lot of refactoring and structural changes and it takes some time 'cause if we're not careful there's a high risk of breaking existing themes and nobody wants that. :+1:


Epic: Riot Data Jobs

Related Stories, tasks and bugs

[x] #39
[x] #40
[x] #38
[x] #37
[x] #57
[x] #80
[x] #83
[x] #102
[x] #120
[x] #10
[x] #158
[x] #159
[x] #166

Completed


When changing optionality of an indexed property, migration creation will not proceed without dropping the index

When changing a type like:
  abstract type Sortable {
    required position: int32 {
      default := 0;
    }
    index on (.position);
  }

to be not required:
  abstract type Sortable {
    position: int32 {
      default := 0;
    }
    index on (.position);
  }

The migration tool gives the following unhelpful feedback:
did you make property 'position' of object type 'default::Sortable' optional? [y,n,l,c,b,s,q,?]
> y
edgedb error: EdgeDB could not resolve migration with the provided answers. Please retry with different answers.

The solution, in this case, was to drop the index and readd it in a separate migration.
Relevant Discord discussion: https://discord.com/channels/841451783728529451/1301832354444349481

Additionally, a similar unhelpful feedback is given when going the other way around and adding the required. This time the migration tool simply rejects the correct fill_expr:
did you make property 'position' of object type 'default::Sortable' required? [y,n,l,c,b,s,q,?]
> y
Please specify an expression to populate existing objects in order to make property 'position' of object type 'default::Sortable' required:
fill_expr> <std::int32>0
edgedb error: EdgeDB could not resolve migration with the provided answers. Please retry with different answers.

Ideally this automatically drops and re-adds the index, but in case this causes concern for some specific cases, a better message guiding the user would be appreciated.

This time the migration tool simply rejects the correct fill_expr:

Just a note: It's possible that these messages are not directly responding to the fill_expr, notice that the first one gives the same error message, but there is no "provided answer".


WIP - Permissions boundary UI

I'm assuming that the design for this might be related to (https://github.com/Netflix/consoleme/pull/9072), so I created this branch from that work, for now.

[ ] Hook up to backend with real data
[ ] If tabs are the chosen UI, ensure that horizontal overflow is accounted for
[ ] Verify design

I'm going to close this PR, in favor of the work done in https://github.com/Netflix/consoleme/pull/9094


Update DompdfWrapper.php

See issue #17

Closes #{put_issue_number_here}
Subject

Thanks @tgeber

You're welcome @core23


Add ids to every section on main page, for better linking

This will make easier to someone link different section on home page
e.g.
https://picsum.photos/#random-image

@DMarby

Hi @iamandrewluca!
Thank you for your contribution!


table method

I want a pretty print method like octave/mathematica has.
somthing that goes through all values swees which cell needs most space
and then sprintf every cell to that format so values are arrayd in columns and rows with big spaces.
I already have a simple version of the code but needs much refinement.
are you allright with the name?

What about pretty-print ?

table is not quite right but still mire descriptive.  why not overload fmt in some clever way?

In fact, i'm also thinking of pretty print because of your first statement, you said:

I want a pretty print method...
So i was thinking of pretty print, and it would do exactly that

and it is nice to look at but i dont know

after talking with #perl6 .gist has won, its the perl 6 standard for this,
btw we have to change .perl too to met perl 6 standards i do that today


add micro-ROS wifi transport and ldlidar stl drivers

add the micro-ROS udp4/wifi transport support to bringup
add ldliar stl drivers including ld06, ld19, stl-27l with serial and udp/tcp server/client transports support.

These patches are needed to run esp32 in wifi mode.
Cheers,
Thomas Chou

I modified one line. A single micro-ROS agent with udp4/wifi transport can handle multiple micro-ROS clients connections. When a micro-ROS udp4 agent is already running, we can skip the launch of another micro-ROS agent during bringup by setting micro_ros_transport:=false (ie, something except serial and udp4).

Thanks @hippo5329 . This LGTM. Before I merge, could you add the new sensor installation and updates to the following pls:

(MANUAL INSTALLATION GUIDE) https://github.com/linorobot/linorobot2/blob/humble/ROBOT_INSTALLATION.md
(DOCKER SCRIPT) https://github.com/linorobot/linorobot2/blob/humble/docker/install_sensors.bash

Thank you!

Sure.

Please check this update with docker script and manual installation guide.


EAs can see who has voted in an election

EAs can see who has voted in an election so that they can decide whether to get the result of the election.

We aspire to ...

add a boolean approved flag to the Ballot model
Enable a user to mark their ballot as approved in the web ui
Enable a user to mark their approved ballot as unapproved in the web ui
Show EA's who among their election's electorate has marked their ballot as approved. (updating the existing API for returning the viewed/accepted info per voter per election)

@neckberg I added an API for it:
GET election//voter_details
It's a lot like the "GET election//voter_status" API you've been using, but for each category, it returns a list of voters instead of a count of voters in that category.  For example, you might get something like this:
{u'approved_none': [{u'name': u'User 2', u'email'<EMAIL_ADDRESS>u'outstanding_invites': [], u'approved_previous': [], u'approved_current': []}
There's one caveat: when the voters are in the "outstanding_invites" category, the "name" field will be null.  That's because the invitee might not have created an account yet, so we only know their email (not their name).  So you need to make sure your code using the API handles that.


moment(1568959200000).format("YYYY-MM-DD HH:mm") not right

Describe the bug
when i use :
moment(1568959200000).format("YYYY-MM-DD HH:mm") ,
（1568959200000 is millisecond）i get the result  is  "2019-09-20 06:00" , it is not correct.  it should be " 2019-09-20 14:00 " . i dont know why it is 2019-09-20 06:00???
Expected behavior
i hope use moment's method can get " 2019-09-20 14:00 ".
Moment-specific environment
version<EMAIL_ADDRESS>
The time zone setting of the machine the code is running on
Beijing
The time and date at which the code was run
moment(1568959200000).format("YYYY-MM-DD HH:mm")
Other libraries in use (TypeScript, Immutable.js, etc) 👍
TypeScript with react-native
Please run the following code in your environment and include the output:

console.log((new Date()).toString())  //  Wed Mar 11 2020 09:34:36 GMT+0800 (CST)
console.log((new Date()).toLocaleString())  //  3/11/2020, 9:34:36 AM
console.log((new Date()).getTimezoneOffset()) // -480
console.log(navigator.userAgent) // undefined
console.log(moment.version) // 2.24.0

Additional context
no.

@sunny635533 I get the result is  2019-09-20 14:00. version<EMAIL_ADDRESS>Moment-specific environment

Other libraries in use (TypeScript, React, etc)

Thanks @Alanscut
Please re-open if you still have issues.

@sunny635533 I get the result is 2019-09-20 14:00,You probably used UTC (instead of the original moment time) to display the moment.
Moment-specific environment

Other libraries in use (TypeScript, React, etc)

 console.log('时间：',  moment(1568959200000).format("YYYY-MM-DD HH:mm")) // 2019-09-20 14:00
 console.log('时间UTC：',  moment(1568959200000).utc().format("YYYY-MM-DD HH:mm")) // 2019-09-20 06:00

Thanks！Now i know why，thank very much！


Docker leackage

Dockers in Jenkinsfile are leaking.

Is this still an issue? @mmalohlava @abal5 ?

@navdeep-G @mmalohlava last few times I checked it was not the case so closing. Reopen if they do still leak.


Need to change from docker-compose to docker compose

Hi everybody,
I have download to jupyter-docker-compose to use in my docker with container based on ubuntu18.04 and python3.10.
However, I have learnt that docker-compose no longer being updated, so it has give me the following error while using command docker-compose build

oot@31ad2d8c4434:/wizdir/jupyter-docker-compose# docker-compose build
Traceback (most recent call last):
File "/usr/local/bin/docker-compose", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/compose/cli/main.py", line 81, in main
command_func()
File "/usr/local/lib/python3.10/site-packages/compose/cli/main.py", line 200, in perform_command
project = project_from_options('.', options)
File "/usr/local/lib/python3.10/site-packages/compose/cli/command.py", line 60, in project_from_options
return get_project(
File "/usr/local/lib/python3.10/site-packages/compose/cli/command.py", line 152, in get_project
client = get_client(
File "/usr/local/lib/python3.10/site-packages/compose/cli/docker_client.py", line 41, in get_client
client = docker_client(
File "/usr/local/lib/python3.10/site-packages/compose/cli/docker_client.py", line 124, in docker_client
kwargs = kwargs_from_env(environment=environment, ssl_version=tls_version)
TypeError: kwargs_from_env() got an unexpected keyword argument 'ssl_version'

After I have read the advice to use "docker compose build" instead of "docker-compose build" as suggested by Migrate to Compose V2, I got the following error:

root@31ad2d8c4434:/wizdir/jupyter-docker-compose# docker compose build
[+] Building 0.0s (0/0)
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

What to be done with this kind of problem?
BTW, the requirement packages in my system are:
python3.10 -m pip index versions numpy => 1.26.4
python3.10 -m pip index versions pandas => 2.2.3
python3.10 -m pip index versions matplotlib => 3.9.2

It should work with both, I updated however the readme.
Are there any additional changes in your Dockefile?


Question: How to scale application depending on websocket connections to clients

In my FastAPI based application using tiangolo/uvicorn-gunicorn-fastapi:python3.8-2020-06-06 Docker image, I maintain a websocket with each client.
Depending on the input arriving from the webasocket of one client, I might need to relay that data to another client via that client's websocket. The naïve implementation is like this:
client_websockets = dict[str, websocket]
I simply look up the unique ID string of the client to get access to the websocket object that I then use to send the data there.
The problem is of course as FastAPI is multi process and/or multi threaded in nature, the client_websockets will be instanciated many times and is not universally accessible accross process/thread/instance boundaries.
So my question is, what mechanisms exist for me to successfully overcome this?
The most trivial I can think of is to simply limit my install to one instance. So how can I tell FastAPI to only ever use one process/thread?
Next, I thought there might be a native way I can perform sharding on client ID. How can I tell, for example via HTTP headers or URL which FastAPI instance should receive a request?
And on the more utipian/optimistic side, are there any ways I could propegate websocket state between the instances?
Any suggestions are welcome!

This is a well known and explored problem that is not at all specific to FastAPI, but any application that uses websockets.
Realistically you need to decouple your application and the websockets, many articles explore this, here is one: https://hackernoon.com/scaling-websockets-9a31497af051

This is a well known and explored problem that is not at all specific to FastAPI, but any application that uses websockets.
Realistically you need to decouple your application and the websockets, many articles explore this, here is one: https://hackernoon.com/scaling-websockets-9a31497af051

Thanks for the help here @Mause ! 👏  🙇
If that solves the original problem, then you can close this issue @garlopf  ✔
The way to tell FastAPI to use one single thread would be to start one single Uvicorn process without workers and use only async functions. Of course, you would have to deal with making sure your code is async compatible, that you are not blocking the main event loop, etc.
You might also want to check out https://github.com/encode/broadcaster
And if you need to implement it yourself, you would probably do it with some type of Redis.

Sorry for the long delay! 🙈  I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.


Unsupported config option for services service: 'php'

Docker installation appears correct but I can't up the container.
(is my first experience with docker)
Bellow: run hello-world, compose-up and service status
# sudo docker-compose up -d php nginx mysql

Unsupported config option for services service: 'php'

# sudo docker run hello-world

Hello from Docker.
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker Hub account:
 https://hub.docker.com

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

# sudo service docker status

● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running) since Seg 2016-05-09 11:51:31 BRT; 32min ago
     Docs: https://docs.docker.com
 Main PID: 14963 (docker)
   CGroup: /system.slice/docker.service
           ├─14963 /usr/bin/docker daemon -H fd://
           └─14968 docker-containerd -l /var/run/docker/libcontainerd/docker-containerd.sock --runtime docker-runc

Mai 09 12:10:49 atlantis docker[14963]: time="2016-05-09T12:10:49.597980312-03:00" level=info msg="No non-localhost DNS nameservers are left in resolv... <IP_ADDRESS>]"
Mai 09 12:10:49 atlantis docker[14963]: time="2016-05-09T12:10:49.598038718-03:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers ...60::8844]"
Mai 09 12:15:15 atlantis docker[14963]: time="2016-05-09T12:15:15.996799926-03:00" level=info msg="No non-localhost DNS nameservers are left in resolv... <IP_ADDRESS>]"
Mai 09 12:15:15 atlantis docker[14963]: time="2016-05-09T12:15:15.996842607-03:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers ...60::8844]"
Mai 09 12:18:12 atlantis docker[14963]: time="2016-05-09T12:18:12.873627344-03:00" level=info msg="No non-localhost DNS nameservers are left in resolv... <IP_ADDRESS>]"
Mai 09 12:18:12 atlantis docker[14963]: time="2016-05-09T12:18:12.873664671-03:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers ...60::8844]"
Mai 09 12:20:15 atlantis docker[14963]: time="2016-05-09T12:20:15.750808986-03:00" level=info msg="No non-localhost DNS nameservers are left in resolv... <IP_ADDRESS>]"
Mai 09 12:20:15 atlantis docker[14963]: time="2016-05-09T12:20:15.750861523-03:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers ...60::8844]"
Mai 09 12:20:21 atlantis docker[14963]: time="2016-05-09T12:20:21.872485224-03:00" level=info msg="No non-localhost DNS nameservers are left in resolv... <IP_ADDRESS>]"
Mai 09 12:20:21 atlantis docker[14963]: time="2016-05-09T12:20:21.872527121-03:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers ...60::8844]"
Hint: Some lines were ellipsized, use -l to show in full.

Solution


[DRAFT] deps: remove cross-env, upgrade eslint HAUKI-672

Remove unnecessary cross-env package
Upgrade eslint to 8.57.1

Fixes vulnerability:

https://github.com/City-of-Helsinki/hauki-admin-ui/security/dependabot/98

HAUKI-ADMIN-UI branch is deployed to platta: https://hauki-pr415-admin-ui.dev.hel.ninja :rocket::rocket::rocket:

e2e tests result is success for https://hauki-pr415-admin-ui.dev.hel.ninja :laughing::tada::tada::tada:


fix JSON syntax typo in tutorial examples

What changed? Why?
In this PR, the word jason has been corrected to json in several tutorial code examples. This was done to ensure consistency and accuracy in the documentation, as json is the correct term for the JavaScript Object Notation format used in the examples.
Notes to reviewers
Please review all code examples in the affected tutorial sections to ensure that the correction does not impact other content. The change is purely cosmetic and should not affect the functionality or logic of the tutorial.
How has it been tested?
The change has been reviewed manually by checking all affected sections. Since this is a typo fix, no additional testing is required beyond reviewing the content to ensure clarity and correctness.

🟡 Heimdall Review Status

Requirement
Status
More Info

Reviews

🟡
0/1

Denominator calculation

Show calculation

1 if user is bot
0

1 if user is external
0

From .codeflow.yml

1

Additional review requirements

Show calculation

Max
0

0

From CODEOWNERS

0

Global minimum
0

Max

1

1

1 if commit is unverified
0

Sum
1


Remove Box component before v1

Box was introduced as this was used in inside components, but maybe we can postpone release of it a bit till we have better understanding of usage?

Meeting with @Barsnes , @eirikbacker , @mimarz , @Febakke
26.08.24:
We decided to remove the box component before V1.


Unable to download pretrain model.HTTP error 409

thanks for your delicate project.when I ran the evluate.py , it brake off at  model-downloading stage. The error message was Traceback (most recent call last):   File "/data/Graphormer/graphormer/evaluate/evaluate.py", line 130, in <module>     main()   File "/data/Graphormer/graphormer/evaluate/evaluate.py", line 120, in main     eval(args, True, logger=logger)   File "/data/Graphormer/graphormer/evaluate/evaluate.py", line 27, in eval     model = task.build_model(cfg.model)   File "/data/Graphormer/graphormer/tasks/graph_prediction.py", line 229, in build_model     model = models.build_model(cfg, self)   File "/data/fairseq/fairseq/models/__init__.py", line 105, in build_model     return model.build_model(cfg, task)   File "/data/Graphormer/graphormer/models/graphormer.py", line 149, in build_model     return cls(args, encoder)   File "/data/Graphormer/graphormer/models/graphormer.py", line 43, in __init__     self.load_state_dict(load_pretrained_model(args.pretrained_model_name))   File "/data/Graphormer/graphormer/pretrain/__init__.py", line 15, in load_pretrained_model     return load_state_dict_from_url(PRETRAINED_MODEL_URLS[pretrained_model_name], progress=True)["model"]   File "/opt/mamba/envs/graphormer/lib/python3.9/site-packages/torch/hub.py", line 571, in load_state_dict_from_url     download_url_to_file(url, cached_file, hash_prefix, progress=progress)   File "/opt/mamba/envs/graphormer/lib/python3.9/site-packages/torch/hub.py", line 437, in download_url_to_file     u = urlopen(req)   File "/opt/mamba/envs/graphormer/lib/python3.9/urllib/request.py", line 214, in urlopen     return opener.open(url, data, timeout)   File "/opt/mamba/envs/graphormer/lib/python3.9/urllib/request.py", line 523, in open     response = meth(req, response)   File "/opt/mamba/envs/graphormer/lib/python3.9/urllib/request.py", line 632, in http_response     response = self.parent.error(   File "/opt/mamba/envs/graphormer/lib/python3.9/urllib/request.py", line 561, in error     return self._call_chain(*args)   File "/opt/mamba/envs/graphormer/lib/python3.9/urllib/request.py", line 494, in _call_chain     result = func(*args)   File "/opt/mamba/envs/graphormer/lib/python3.9/urllib/request.py", line 641, in http_error_default     raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 409: Public access is not permitted on this storage account. (graphormer) root@bohrium-17396-1029993:/data/Graphormer/graphormer/evaluate#  (graphormer) root@bohrium-17396-1029993:/data/Graphormer/graphormer/evaluate# vi /data/Graphormer/graphormer/pretrain/__init__.py (graphormer) root@bohrium-17396-1029993:/data/Graphormer/graphormer/evaluate# vi /data/Graphormer/graphormer/pretrain/__init__.py (graphormer) root@bohrium-17396-1029993:/data/Graphormer/graphormer/evaluate# wget https://ml2md.blob.core.windows.net/graphormer-ckpts/checkpoint_best_pcqm4mv1.pt --2023-07-21 15:07:36--  https://ml2md.blob.core.windows.net/graphormer-ckpts/checkpoint_best_pcqm4mv1.pt Resolving ml2md.blob.core.windows.net (ml2md.blob.core.windows.net)... <IP_ADDRESS> Connecting to ml2md.blob.core.windows.net (ml2md.blob.core.windows.net)|<IP_ADDRESS>|:443... connected. HTTP request sent, awaiting response... 409 Public access is not permitted on this storage account. 2023-07-21 15:07:37 ERROR 409: Public access is not permitted on this storage account..
When I download the model url https://ml2md.blob.core.windows.net/graphormer-ckpts/checkpoint_best_pcqm4mv1.pt  manually using wget, it gave the same HTTP error.
My question is how could I fix the bug?

Same, have you found a solution

@msftgits the issue of downloading is still ongoing. Could you solve it for once?

I also encounter this issue, how to solve it?


Update dependencies

Update: postcss-selector-parser v4 (major)
Update: postcss (patch)

I’d like to get the selector parsers in alignment for postcss-preset-env:
<EMAIL_ADDRESS>├─┬<EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>├─┬<EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>└─┬<EMAIL_ADDRESS>  └──<EMAIL_ADDRESS>

@jonathantneal  Looks good! I have added you here and on npm, please publish new version if you will have time.


Change/remove upper bound on cattrs version?

As of March 2022, cattrs has switched to calendar versioning. The upper bound here now restricts us to pretty old versions. Can you change the upper bound please? Because calendar versioning implies a plan to maintain backwards compatibility, I think it's safe to have just a lower bound now.

Hi! I've updated cattrs version constraint, but a couple of tests fail now:
FAILED tests/cattrs_extras/test_converter.py::ConverterTest::test_structure_invalid_types_messages - AssertionError: 'Cannot structure SomeDataclass: not_an_in[40 chars]int]' != 'While structuring SomeDataclass (1 sub-exception)'
FAILED tests/cattrs_extras/test_converter.py::ConverterTest::test_union_edge_cases_no_match - cattrs.errors.ClassValidationError: While structuring WorkingConfig (1 sub-exception)

Opened a draft #15 for now; gonna revisit it when I'll have some spare time.


add preset for highway=service mapped as areas

Adds a preset for highway=service objects mapped as areas. Closes #431.
Since the only concrete use case listed on the wiki is for widenings […] in an industrial estate I used the name Maneuvering Area for this. But maybe it is too specific? My concern with Service Road Area is that it could mislead many mappers to use this tag when area:highway should actually be used (and the fact that it is too similar to the name of the Road Area preset for these map features).

Maneuvering Area

this is actually quite good name and have no better ideas

Service Road Area is that it could mislead many mappers to use this tag when area:highway should actually be used

that is definitely serious problem, and I have seen this tag misused in this way, so often that it makes me dubious about adding support for it at all

Since the only concrete use case listed on the wiki is for widenings […] in an industrial estate I used the name Maneuvering Area for this. But maybe it is too specific? My concern with Service Road Area is that it could mislead many mappers to use this tag when area:highway should actually be used (and the fact that it is too similar to the name of the Road Area preset for these map features).

“Maneuvering area” could be misinterpreted as runways and taxiways. The icon may not imply anything aeronautical, but that’s no help to someone who enters “"maneuvering area"” into the Overpass turbo wizard because they’re familiar with that term. Someone attempting to map a turning circle that isn’t quite circular as an area might reach for this preset instead of Road Area.
To come up with a less ambiguous term, it would be helpful to get a more specific example of what’s considered correct usage of this tagging combination. All the examples I can think of would arguably be better represented as area:highway=service or amenity=parking areas with service ways running through them. The only term that comes to mind is “lot” (as in “parking lot” or “backlot”).

maneuvering areas in industrial sites qualify...
Maneuvering Road Area?

Yeah, the problem is that you can’t just stick arbitrary words together in any dialect of English and expect them to be intuitive, even if they would make logical sense, because the language is so rife with unpredictable compound words.

The only term that comes to mind is “lot” (as in “parking lot” or “backlot”).

“Yard” or “service yard” can ambiguously refer to either the whole industrial site (think railyard) or just the paved area usually connected to loading docks. I don’t think there’s anything more natural than that or “lot”. If we really want a preset for this, it would end up being called something unwieldy like “Vehicle Free-for-All at Industrial Site” or something that makes assumptions like “Paved Lot”. But I still don’t see a compelling case for a preset independent of the existing Road Area preset.

Sorry, I just got this one as the result from a translation service. :sweat_smile: Perhaps it was giving a result which should be only used in an airport context.
Let's try to find a better name then.

To come up with a less ambiguous term, it would be helpful to get a more specific example of what’s considered correct usage of this tagging combination.

:+1:
As far as I understood one typical use case for this is for paved areas in industrial areas where trucks halt to load/unload goods (examples: 1, 2). Another example would be for the paved area in front of fire stations, bus depots, etc. (3). Typically, in such situations there exists no clear linear linear way/path that the vehicles take. Mapping such areas as amenity=parking or area:highway doesn't really fit. I've also seen it in use for complex driveways/backyards geometries (4, 5), fuel stations (6) or turning circles (7), but at least some of these uses can be considered questionable since they could potentially also be mapped using area:highway.
The wiki also says the following:

[area](https://wiki.openstreetmap.org/wiki/Key:area)=[yes](https://wiki.openstreetmap.org/wiki/Tag:area%3Dyes) on a highway=* describes a routable highway area on which the dedicated traffic can route omnidirectionally, i.e. from any point along the edge to any other. This is typical for […] service areas where vehicles drive without prescribed lanes. The rationale is that routing engines should consider those omnidirectional objects in addition to nodes+edges in classical graph theory; thus no linear highway lines would be required within.

FWIW, I initially liked that the term maneuvering in Maneuvering Area kind of inherently conveys the omnidirectional driving on such paved areas.

If we really want a preset for this

We could also choose to not support this tag, sure. But if we don't, we must not forget to fix the issue that iD currently shows a false validation warning (Service Road should be a line, not an area) which would be automatically fixed by introducing this preset.

or something that makes assumptions like “Paved Lot”

I wouldn't mind this one. One possibility would be to use this name, but make the preset non-searchable to reduce the issue that users might apply it in potentially wrong situations?

Something like "paved service area" would probably get the idea across (assuming it's paved), but I think fundamentally we don't really have a word for this.

make the preset non-searchable

I think that it is a good idea

“Staging lot” came up in OSMUS Slack as a term for at least some of these facilities.


[Native Ad]Loading Multiple Admob Native ads in Listview

Use case
For some reason, before installing the googleads package I was expecting to be able to easily load multiple Native ads in a Listview since that's the standard for most Apps... (for example show 1 ad every 6 cards) However for my surprise that's not really the case. Documentation and examples clearly show how to put 1 ad... and that's it...

Proposal

Sure maybe there are some advanced solutions that solve this issue (still trying to figure out what solutions... there is no clear info about it) or even some StackOverflow "hacks"... but those can easily create other serious issues, including getting those ads banned for improper usage.  Would be great to load multiple ads in a listview out of the box since that's a really common scenario for a production-ready App...
And maybe the option to easily load for example 3 ads with one request to avoid lagging in the listview...
Meanwhile, what is the proper way to do it?

Hi @ldobreira, Thanks for filing the issue.  I can reproduce the issue when trying to load multiple native ads I get ad already loaded error

logs
Launching lib/main.dart on iPhone 12 Pro in debug mode...
Upgrading AppFrameworkInfo.plist
Updating project for Xcode compatibility.
Upgrading project.pbxproj
Upgrading Runner.xcscheme
Upgrading Info.plist
Warning: CocoaPods recommended version 1.11.0 or greater not installed.
Pods handling may fail on some projects involving plugins.
To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
Xcode build done.                                           27.9s
Connecting to VM Service at ws://<IP_ADDRESS>:51945/GVO_jV8vLPs=/ws
Reloaded 1 of 596 libraries in 231ms.
<Google> To get test ads on this device, set: GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ kGADSimulatorID ];
<Google> <Google:HTML> A valid SKAdNetworkIdentifier for Google (cstr6suwn9.skadnetwork) is missing from Info.plist. See [Enable SKAdNetwork to track conversions] (https://googlemobileadssdk.page.link/enable-skadnetwork)

════════ Exception caught by widgets library ═══════════════════════════════════
The following assertion was thrown building AdWidget(dirty, state: _AdWidgetState#a5cca):
This AdWidget is already in the Widget tree

If you placed this AdWidget in a list, make sure you create a new instance in the builder function with a unique ad object.
Make sure you are not using the same ad object in more than one AdWidget.

The relevant error-causing widget was
AdWidget
When the exception was thrown, this was the stack
#0      _AdWidgetState.build
#1      StatefulElement.build
#2      ComponentElement.performRebuild
#3      StatefulElement.performRebuild
#4      Element.rebuild
#5      ComponentElement._firstBuild
#6      StatefulElement._firstBuild
#7      ComponentElement.mount
...     Normal element mounting (13 frames)
#20     Element.inflateWidget
#21     Element.updateChild
#22     SingleChildRenderObjectElement.update
#23     Element.updateChild
#24     SingleChildRenderObjectElement.update
#25     Element.updateChild
#26     ComponentElement.performRebuild
#27     Element.rebuild
#28     ProxyElement.update
#29     Element.updateChild
#30     ComponentElement.performRebuild
#31     Element.rebuild
#32     ProxyElement.update
#33     Element.updateChild
#34     ComponentElement.performRebuild
#35     StatefulElement.performRebuild
#36     Element.rebuild
#37     StatefulElement.update
#38     Element.updateChild
#39     ComponentElement.performRebuild
#40     Element.rebuild
#41     StatelessElement.update
#42     Element.updateChild
#43     SliverMultiBoxAdaptorElement.updateChild
#44     SliverMultiBoxAdaptorElement.performRebuild.processElement
#45     Iterable.forEach (dart:core/iterable.dart:325:35)
#46     SliverMultiBoxAdaptorElement.performRebuild
#47     SliverMultiBoxAdaptorElement.update
#48     Element.updateChild
#49     ComponentElement.performRebuild
#50     Element.rebuild
#51     ProxyElement.update
#52     Element.updateChild
#53     SingleChildRenderObjectElement.update
#54     Element.updateChild
#55     RenderObjectElement.updateChildren
#56     MultiChildRenderObjectElement.update
#57     _ViewportElement.update
#58     Element.updateChild
#59     SingleChildRenderObjectElement.update
#60     Element.updateChild
#61     SingleChildRenderObjectElement.update
#62     Element.updateChild
#63     SingleChildRenderObjectElement.update
#64     Element.updateChild
#65     SingleChildRenderObjectElement.update
#66     Element.updateChild
#67     ComponentElement.performRebuild
#68     StatefulElement.performRebuild
#69     Element.rebuild
#70     StatefulElement.update
#71     Element.updateChild
#72     SingleChildRenderObjectElement.update
#73     Element.updateChild
#74     ComponentElement.performRebuild
#75     Element.rebuild
#76     ProxyElement.update
#77     Element.updateChild
#78     SingleChildRenderObjectElement.update
#79     Element.updateChild
#80     ComponentElement.performRebuild
#81     Element.rebuild
#82     ProxyElement.update
#83     Element.updateChild
#84     ComponentElement.performRebuild
#85     StatefulElement.performRebuild
#86     Element.rebuild
#87     StatefulElement.update
#88     Element.updateChild
#89     ComponentElement.performRebuild
#90     Element.rebuild
#91     ProxyElement.update
#92     Element.updateChild
#93     ComponentElement.performRebuild
#94     Element.rebuild
#95     StatelessElement.update
#96     Element.updateChild
#97     ComponentElement.performRebuild
#98     Element.rebuild
#99     StatelessElement.update
#100    Element.updateChild
#101    ComponentElement.performRebuild
#102    Element.rebuild
#103    ProxyElement.update
#104    Element.updateChild
#105    ComponentElement.performRebuild
#106    Element.rebuild
#107    ProxyElement.update
#108    Element.updateChild
#109    RenderObjectElement.updateChildren
#110    MultiChildRenderObjectElement.update
#111    Element.updateChild
#112    ComponentElement.performRebuild
#113    StatefulElement.performRebuild
#114    Element.rebuild
#115    StatefulElement.update
#116    Element.updateChild
#117    ComponentElement.performRebuild
#118    Element.rebuild
#119    ProxyElement.update
#120    Element.updateChild
#121    ComponentElement.performRebuild
#122    StatefulElement.performRebuild
#123    Element.rebuild
#124    StatefulElement.update
#125    Element.updateChild
#126    SingleChildRenderObjectElement.update
#127    Element.updateChild
#128    ComponentElement.performRebuild
#129    Element.rebuild
#130    ProxyElement.update
#131    Element.updateChild
#132    SingleChildRenderObjectElement.update
#133    Element.updateChild
#134    ComponentElement.performRebuild
#135    StatefulElement.performRebuild
#136    Element.rebuild
#137    StatefulElement.update
#138    Element.updateChild
#139    ComponentElement.performRebuild
#140    StatefulElement.performRebuild
#141    Element.rebuild
#142    StatefulElement.update
#143    Element.updateChild
#144    ComponentElement.performRebuild
#145    Element.rebuild
#146    ProxyElement.update
#147    Element.updateChild
#148    ComponentElement.performRebuild
#149    Element.rebuild
#150    ProxyElement.update
#151    Element.updateChild
#152    ComponentElement.performRebuild
#153    StatefulElement.performRebuild
#154    Element.rebuild
#155    StatefulElement.update
#156    Element.updateChild
#157    ComponentElement.performRebuild
#158    Element.rebuild
#159    ProxyElement.update
#160    Element.updateChild
#161    ComponentElement.performRebuild
#162    StatefulElement.performRebuild
#163    Element.rebuild
#164    StatefulElement.update
#165    Element.updateChild
#166    ComponentElement.performRebuild
#167    StatefulElement.performRebuild
#168    Element.rebuild
#169    BuildOwner.buildScope
#170    WidgetsBinding.drawFrame
#171    RendererBinding._handlePersistentFrameCallback
#172    SchedulerBinding._invokeFrameCallback
#173    SchedulerBinding.handleDrawFrame
#174    SchedulerBinding._handleDrawFrame
#178    _invoke (dart:ui/hooks.dart:151:10)
#179    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:308:5)
#180    _drawFrame (dart:ui/hooks.dart:115:31)
(elided 3 frames from dart:async)
════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by widgets library ═══════════════════════════════════
This AdWidget is already in the Widget tree
The relevant error-causing widget was
AdWidget
════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by widgets library ═══════════════════════════════════
This AdWidget is already in the Widget tree
The relevant error-causing widget was
AdWidget
════════════════════════════════════════════════════════════════════════════════

code sample
import 'package:admob_inline_ads_in_flutter/ad_helper.dart';
import 'package:admob_inline_ads_in_flutter/destination.dart';
import 'package:admob_inline_ads_in_flutter/banner_inline_page.dart';
import 'package:admob_inline_ads_in_flutter/home_page.dart';
import 'package:flutter/material.dart';
import 'package:google_mobile_ads/google_mobile_ads.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      routes: <String, WidgetBuilder>{
        '/banner': (context) =>
            BannerInlinePage(entries: Destination.samples),
        '/native': (context) =>
            NativeInlinePage(entries: Destination.samples),
      },
      home: HomePage(),
    );
  }
}

class NativeInlinePage extends StatefulWidget {
  final List<Destination> entries;

  NativeInlinePage({
    required this.entries,
  });

  @override
  State createState() => _NativeInlinePageState();
}

class _NativeInlinePageState extends State<NativeInlinePage> {
  // COMPLETE: Add _kAdIndex
  static final _kAdIndex = 4;

  // COMPLETE: Add NativeAd instance
  late NativeAd _ad;

  // COMPLETE: Add _isAdLoaded
  bool _isAdLoaded = false;

  @override
  void initState() {
    super.initState();

    // COMPLETE: Create a NativeAd instance
    _ad = NativeAd(
      adUnitId: AdManager.nativeAdUnitId,
      factoryId: 'listTile',
      request: AdRequest(),
      listener: NativeAdListener(
        onAdLoaded: (_) {
          setState(() {
            _isAdLoaded = true;
          });
        },
        onAdFailedToLoad: (ad, error) {
          // Releases an ad resource when it fails to load
          ad.dispose();

          print('Ad load failed (code=${error.code} message=${error.message})');
        },
      ),
    );

    // COMPLETE: Load an ad
    _ad.load();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('AdMob Native Inline Ad'),
      ),
      body: ListView.builder(
        // COMPLETE: Adjust itemCount based on the ad load state
        itemCount: widget.entries.length + (_isAdLoaded ? 1 : 0),
        itemBuilder: (context, index) {
          // COMPLETE: Render a native ad
          if (_isAdLoaded && (index % _kAdIndex == 0)) {
            return Container(
              child: AdWidget(ad: _ad),
              height: 72.0,
              alignment: Alignment.center,
            );
          } else {
            // COMPLETE: Get adjusted item index from _getDestinationItemIndex()
            final item = widget.entries[_getDestinationItemIndex(index)];

            return ListTile(
              leading: Image.asset(
                item.asset,
                width: 48,
                height: 48,
                package: 'flutter_gallery_assets',
                fit: BoxFit.cover,
              ),
              title: Text(item.name),
              subtitle: Text(item.duration),
              onTap: () {
                print('Clicked ${item.name}');
              },
            );
          }
        },
      ),
    );
  }

  @override
  void dispose() {
    // COMPLETE: Dispose a NativeAd object
    _ad.dispose();
    super.dispose();
  }

  // COMPLETE: Add _getDestinationItemIndex()
  int _getDestinationItemIndex(int rawIndex) {
    if (rawIndex >= _kAdIndex && _isAdLoaded) {
      return rawIndex - 1;
    }
    return rawIndex;
  }
}

cc: @jjliu15

Thank you @maheshmnj. For some reason, I keep getting the exact same error even if put the widget inside a stateful widget. Can you please show a small example?
The error is also saying that we have to assign a new ID, but how that can be done dynamically? Are not those IDs already pre-selected on Admob?!

@ldobreira I think you will needs List<NativeAd> to deal with this issue (as a workaround), Let me try and get back with a code sample

Thank you so much @maheshmnj

Exactly @maheshmnj that's the exact same issues I'm having... That's why I asked for an example...

Widget getBanerAd(double height){
  AdManagerBannerAd myBanner;
  final Completer<BannerAd> banerAdCompleter =
  Completer<BannerAd>();
  myBanner = AdManagerBannerAd(
    adUnitId:  model.bannerId!,
    sizes:   [AdSize(width: 300,height: height.toInt())],
    request: AdManagerAdRequest(),
    listener: AdManagerBannerAdListener(
        onAdLoaded: (ad){
          banerAdCompleter.complete(ad as BannerAd);
          //print("Banner Loaded from provider");
        },
        onAdFailedToLoad: (ad,error){
          print(error);
          banerAdCompleter.completeError("");
        }
    ),
  );
  myBanner.load();
  return Container(
    child: FutureBuilder<BannerAd>(
        future: banerAdCompleter.future,
        builder: (BuildContext context,
            AsyncSnapshot<BannerAd> snapshot) {
          Widget child;
          switch (snapshot.connectionState) {
            case ConnectionState.none:
            case ConnectionState.waiting:
            case ConnectionState.active:
              child = Container(
                color: Colors.blue.withOpacity(0.5),
                child: Center(child: Image.asset("assets/advertise.png",height: 50,color: Colors.white,)),
              );
              break;
            case ConnectionState.done:
              if (snapshot.hasData) {
                child =  AdWidget(ad: myBanner);
              } else {
                child = const Center(child: Text('Error loading ad'));
              }
          }
          //print("Error occured while displayig baner ad");
          return Container(
            child: child,
            height: height,
            color: const Color(0xfffffff),
          );
        }),
  );

}
For work around this may help
But it freeze the scrolling of list or gride view need more fix

cc: @jjliu15

From a best practices standpoint, you should pick an upper limit on ads within the feed and provide a distinct ad unit ID for every ad placement in the ListView. To do this, you can simply create the ad units on your AdMob or Ad Manager account. This allows you to segment performance in reporting based on the placement location. For example, if you plan to interleave 5 ad placements in a feed, you should generate 5 ad units which will each have 5 distinct ad unit IDs.
If you want to re-use the same ad unit ID, you can destroy the ad view corresponding the that ad unit ID, load a new ad, then attach it again to the view. This is more relevant if you don't want to pick an upper limit on ads. We don't recommend doing this because user ad engagement and ad viewability will probably decrease lower in the feed, which will impact your CPMs. You also you won't be able to segment performance by placement location.

From a best practices standpoint, you should pick an upper limit on ads within the feed and provide a distinct ad unit ID for every ad placement in the ListView. To do this, you can simply create the ad units on your AdMob or Ad Manager account. This allows you to segment performance in reporting based on the placement location. For example, if you plan to interleave 5 ad placements in a feed, you should generate 5 ad units which will each have 5 distinct ad unit IDs.
If you want to re-use the same ad unit ID, you can destroy the ad view corresponding the that ad unit ID, load a new ad, then attach it again to the view. This is more relevant if you don't want to pick an upper limit on ads. We don't recommend doing this because user ad engagement and ad viewability will probably decrease lower in the feed, which will impact your CPMs. You also won't be able to segment performance by placement location.

I definitely understand what you saying, and I agree, however, I was not able to find any examples of a listview using multiple Admob ads while scrolling down (something like for example Facebook)... All examples and tutorials only use 1 or 2 ads.

I agree the Flutter samples do need updating to match the format and use-case coverage of the native samples.
Until the Flutter samples are updated, the best examples we have for loading multiple ads in a scrollable view are the native examples:

iOS (TableView)
Android (RecyclerView)

I'll close this issue for tracking purposes.
An update on the Flutter app samples will be provided on #567.

Do you find the solution ? @maheshmnj @davemg3 @timothyhoang-google @ldobreira


Add Documentation for html Property in Lexical Editor Configuration

The html property in the Lexical editor configuration allows developers to add importDOM and exportDOM implementations directly, without needing node replacement. However, this property is currently undocumented, leading to a missed opportunity for users to utilize it effectively when working with HTML parsing and serialization in their editors.
Adding comprehensive documentation for the html property could benefit developers looking to manage HTML imports and exports, especially when aiming to integrate with other systems that rely on HTML or when handling complex content transformations.
Proposed Solution:

Update the Lexical documentation to include the html property in the editor configuration section.

Provide a brief example demonstrating the use of importDOM and exportDOM with html.

Originally posted by @etrepum in https://github.com/facebook/lexical/issues/6532#issuecomment-2430907600

Hi @etrepum  I was going through the docs and want to be sure if this is similar to what I am trying to add to the documentation, or what I should be adding will be an addition to this?
Link:

Yes, exportDOM is similar to the html export config
https://github.com/facebook/lexical/blob/e96ee55b749c0fed8ac03d49044dd5594f0bc32e/packages/lexical/src/LexicalNode.ts#L151-L154
https://github.com/facebook/lexical/blob/e96ee55b749c0fed8ac03d49044dd5594f0bc32e/packages/lexical/src/LexicalEditor.ts#L173-L188
There's also the import property which is similar to importDOM

Yes, exportDOM is similar to the html export config
https://github.com/facebook/lexical/blob/e96ee55b749c0fed8ac03d49044dd5594f0bc32e/packages/lexical/src/LexicalNode.ts#L151-L154
https://github.com/facebook/lexical/blob/e96ee55b749c0fed8ac03d49044dd5594f0bc32e/packages/lexical/src/LexicalEditor.ts#L173-L188
There's also the import property which is similar to importDOM

This is so cool, Hoe did you do this?

So is it safe to day, it is documented already, I should go ahead and provide examples usage on the  lexical-website package?

The html property of the editor config (CreateEditorArgs) is not documented and it does not have any examples. It has two properties, import and export. import is similar to importDOM and export is similar to exportDOM.

You can link to specific parts of a file on GitHub by clicking the line number and then shift-clicking another line number to select a range, then you click the […] button and copy the permalink. When you paste that permalink in a github issue/pr/discussion then its contents will be unfurled

You can link to specific parts of a file on GitHub by clicking the line number and then shift-clicking another line number to select a range, then you click the […] button and copy the permalink. When you paste that permalink in a github issue/pr/discussion then its contents will be unfurled

Thanks for the tips

The html property of the editor config (CreateEditorArgs) is not documented and it does not have any examples. It has two properties, import and export. import is similar to importDOM and export is similar to exportDOM.

Okay then, I will hop on it

One more question, the changes I will be making should be on the should be on the lexical-website package right? which has been written with MarkDown all through, and for the example, can I put a link to the codesandbox or add to lexical-playground package.
Noot sure how to put this question, I hope its clear enough

There are two places that this documentation can be added, one is directly in the source code via tsdoc/jsdoc block comments that get extracted by typedoc /** … */ and the other are the markdown files in lexical-website (the ones that are not automatically generated). It's up to you whether you choose to do one or both of those, any addition is a big improvement for a feature with no docs!
For an example of the feature I would recommend either adding it to one of the existing examples, the playground, or creating a new example project in the examples folder (which can be linked to in docs via stackblitz). Codesandbox examples are not great because they are not managed in the monorepo so they quickly become stale or stop working altogether when someone cleans up their account.

Hi @etrepum, just before I raise a PR for this I wanted to be sure, I am putting the brief description  and example in the right place

I don't think that package is the best place to document it because you'd be using it from either lexical's createEditor or LexicalComposer's initialConfig. Maybe https://lexical.dev/docs/concepts/serialization would be the best place alongside other importDOM and exportDOM docs.
The example code in that screenshot is not correct at all, not sure if that is just a placeholder?

I don't think that package is the best place to document it because you'd be using it from either lexical's createEditor or LexicalComposer's initialConfig. Maybe https://lexical.dev/docs/concepts/serialization would be the best place alongside other importDOM and exportDOM docs.
The example code in that screenshot is not correct at all, not sure if that is just a placeholder?

Got it! I am moving it to serialization.
yes the example is a placeholder, I wanted to be sure that, that was the best place to put it or If I should put in a different place. Then I also have a more concise docs for the HTML properties. I just need clarity on where to place the examples

I was also going throught the playground, wanted to ask about the exportDOM implementation. I left details on the screenshots @etrepum

Yes that button triggers exportDOM, indirectly via $generateHtmlFromNodes. The exportDOM method is called on each node in the document to assemble the result. The html export config allows the method to be overridden without subclassing and node replacement.

Curious if slowness of export could be an issue as e.g. it is for export as markdown:

https://github.com/facebook/lexical/issues/6256

Images can take a lot of time to encode as base64, so having some solution for this might be good (e.g. allowing export as "virtual-urls" / hooks image export, so that the user can upload/manage images by themselves) and optionally somehow being able to do the export on a worker thread

This PR doesn't really have anything to do with the bad strategy that the playground uses to represent images for demonstration purposes. If you were to change how it handles images, you would just modify that node's createDOM and exportDOM directly rather than configure exportDOM somewhere else. This configuration option is only relevant to exportDOM and is only useful for when you don't want to modify the class, but since that class isn't available on NPM and it would have to be copied into your project to use it there's no reason why you couldn't modify its exportDOM directly.


Custom InfoWindow with dynamic images

Hi,
I am looking a way to for each pin type (I would have around 50 pin types) to present different InfoWindow.
In my info window will be somehow automatically rendered based of a model of my custom pin. Also, I would have unique image in that InfoWindow for each pin getting from base64 string from my api. Can you tell me do you support such a thing?
I was investigeting XF Maps, they do customPin and InfoWindow, but they are "hardcoded" images to a Resource folder, so each pin would have the same image..
Here is my question on stack overflow

@stefancvetkovic have you find the solution ?,
me also facing the same issue


how to access accelerometer data?

Hi! I'm new here, so i'll do my best to ask clearly
Is there a function to access the accelerometer readings/data of the AR.Drone?
i have a feeling it's in the navdata part of this library, but i can't exactly find the function specifically for accelerometers

You can get the attitude of the drone, is that sufficient? It's in navdata.demo.rotation.  For example, this code (from https://github.com/wiseman/ardrone-browser-3d) computes a rotation matrix from the Euler angles in navdata.demo.rotation:
Drone.prototype.updateState = function(navdata) {
  var euler = navdata.demo.rotation;
  var m = new THREE.Matrix4();
  // I couldn't find documentation on the AR.Drone Euler angle order,
  // but this seems to work.
  m.makeRotationFromEuler(new THREE.Vector3(euler.roll * PI180,
                                            euler.yaw * -PI180,
                                            euler.pitch * PI180),
                          'YZX');
  this.matrix = m;
  this.matrixAutoUpdate = false;
  this.updateMatrixWorld(true);
};


Error: Type 'JSString' not found.   external JSArray get transports;

Invalid depfile: D:\flutter\app\test_lfm_flutter_new.dart_tool\flutter_build\551dc14c0474116e051f6a952e93f4ab\kernel_snapshot.d
Invalid depfile: D:\flutter\app\test_lfm_flutter_new.dart_tool\flutter_build\551dc14c0474116e051f6a952e93f4ab\kernel_snapshot.d
/C:/Users/myPc/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/webauthn.dart:647:20: Error: Type 'JSString' not found.
external JSArray get transports;
/C:/Users/bdCalling%20IT/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_core_web-2.16.0/lib/src/firebase_core_web.dart:176:9: Error: The getter 'globalContext' isn't defined for the class 'FirebaseCoreWeb'.

'FirebaseCoreWeb' is from 'package:firebase_core_web/firebase_core_web.dart' ('/C:/Users/bdCalling%20IT/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_core_web-2.16.0/lib/firebase_core_web.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'globalContext'.
if (globalContext.getProperty('firebase_core'.toJS) != null) {
^^^^^^^^^^^^^
/C:/Users/bdCalling%20IT/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_core_web-2.16.0/lib/src/firebase_core_web.dart:176:51: Error: The getter 'toJS' isn't defined for the class 'String'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'toJS'.
if (globalContext.getProperty('firebase_core'.toJS) != null) {
^^^^
/C:/Users/bdCalling%20IT/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_core_web-2.16.0/lib/src/interop/package_web_tweaks.dart:10:8: Error: Dart library 'dart:js_interop' is not available on this platform.
import 'dart:js_interop';
^
/C:/Users/bdCalling%20IT/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_core_web-2.16.0/lib/src/interop/package_web_tweaks.dart:18:4: Error: Couldn't find constructor 'JS'.
@JS('trustedTypes')
^^
/C:/Users/bdCalling%20IT/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_core_web-2.16.0/lib/src/interop/package_web_tweaks.dart:26:4: Error: Couldn't find constructor 'JS'.
@JS('createScriptURL')
^^
/C:/Users/bdCalling%20IT/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_core_web-2.16.0/lib/src/interop/package_web_tweaks.dart:35:4: Error: Couldn't find constructor 'JS'.
@JS('text')
^^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ajs_interop; message=StandardFileSystem only supports file:* and data:* URIs)
#0      StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:34)
#1      asFileUri (package:vm/kernel_front_end.dart:752)
#2      writeDepfile (package:vm/kernel_front_end.dart:892)

i try to
dependency_overrides:
web: ^0.4.0
but the still problem comes, i switched stable to the beta channel still not solved yet. I use firebase_auth but I see inside the firebase_auth library package by going external_libraries, open pubspec.yaml of that library, I see inside there web: ^0.5.1 available and error comes but why?

Both files definitely have an import to dart:js_interop, which should contains all of those symbols, so there's something weird going on. Maybe try clearing your pub cache? Is there a full repro you can share?


[ISSUE #7480] Fix the offset in the timerCheckPoint will not be corrected when the commitlog and consumeQueue are truncated

Which Issue(s) This PR Fixes

Fixes #7480
Brief Description

Fix the offset in the timerCheckPoint will not be corrected when the commitlog and consumeQueue are truncated
How Did You Test This Change?

Codecov Report

Merging #7488 (ae2c2b1) into develop (f0f15b5) will increase coverage by 0.04%.
Report is 4 commits behind head on develop.
The diff coverage is 9.09%.

@@              Coverage Diff              @@
##             develop    #7488      +/-   ##
=============================================
+ Coverage      42.93%   42.98%   +0.04%
- Complexity      9660     9677      +17
=============================================
  Files           1161     1161
  Lines          83930    83959      +29
  Branches       10898    10901       +3
=============================================
+ Hits           36038    36087      +49
+ Misses         43410    43399      -11
+ Partials        4482     4473       -9

Files
Coverage Δ

...che/rocketmq/acl/plain/PlainPermissionManager.java
78.37% <0.00%> (ø)

...apache/rocketmq/store/timer/TimerMessageStore.java
53.47% <10.00%> (-0.37%)
:arrow_down:

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


Stdlib update

the history here looks a bit odd. I will close the issue and update stdlib in a new PR.


request for comprehensive documentation and examples for library usage

when using the library, there is a lack of necessary documentation. additionally, some types, such as SchemaField, cannot be constructed directly. It would be helpful to provide some examples that cover various use cases, such as index creation, writing data, searching, statistical analysis, pagination, etc. Otherwise, users will need to analyze the code in order to understand how to call the relevant functions.

You are right, there is much room for improvement. But unfortunately, the day has only 24 hours. This is what we have got so far:
Client

Library docs
Usage examples
Examples faceted search

Server

REST API documentation
Examples
Interactive examples (use with VSC extension "Rest client" to execute API calls and inspect responses)
Build a Wikipedia search engine with the SeekStorm server
Build a PDF search engine with the SeekStorm server

We will improve it over time, in parallel to the ongoing development.


Updated so the ABM title is always in focus

If window is too narrow the title overlaps with the buttons in the header


Read-Only based on state value

Is there any simple way to set field as read-only based on another attribute value (for example status/state), and how i can check if field is readonly? It will be extremly helpful in my form.

I'm going to close this as it's gone pretty stale. Feel free to reopen if your issue isn't resolved in the latest Reform release.


Conversion stops at CreateMultiMarkers if neither BoundingBox nor Curve are set

When converting the file GlycolysisLayout_small.sbml.xml from data the conversion stops at edu.ucsd.sbrg.escher.converter.SBML2Escher createMultiMarkers --- INFORMATION: creating multi-markers from species reference glyph (SpeciesReferenceGlyph_01). This is probably because in this SpeciesReferenceGlyph BoundingBox is not set and while isSetCurve = true, getCurve = [] .

Trying to solve this has lead to many more problems so I leave it this way for now. For anyone in the future working on this: the problem is in edu.ucsd.sbrg.escher.converter.SBML2Escher.createMultiMarkers. The number of curve segments is only 1 sometimes which leads to a for-loop from i = 0 with i < 0.


launch app when using manifold run windows; handle localhost

Hi @alxlu, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Alex Lu). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

Hey Alex, does the HWA package give you feedback if it fails?  For example, if you already have a package installed with that package ID, does it pass the error up to the user?

If you have a package installed with the same ID, it will uninstall the old package first.


Errors when running UDregenerator

I tried to run UDregenerator in Colab. When I ran
!node variationsFromText.js file.txt

I met following errors.
*** Creating file.conllu
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn ./text2ud.py EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -13,
  code: 'EACCES',
  syscall: 'spawn ./text2ud.py',
  path: './text2ud.py',
  spawnargs: [ 'en', 'file.txt' ]
}

What do these information mean? How could I fix with it?

Kunze
there seems to be a problem when you are launching "text2ud.py" which takes for granted that "Stanza" (the Stanford dependency parser) is already installed. I suggest the you test "text2ud.py" alone before you try using it from "variationsFromText.js"
Guy

Thank you, Guy!
I'm not sure where the problems lie. Today, I ran it again on my colab notebook, it works well. When I ran
!node variationsFromText.js -q file.txt

results were as follows.
# id   = 1.0
# text = The white cat sits on the mat.
# TEXT = The white cat sits on the mat.
# WAS  = What sits on the mat?  => the white cat
# WAD  = What does the white cat sit?  => on the mat

1 UD dependencies processed
2 questions

Anyway, thanks for your help!!!

Kunze
great! if you need the dependency trees themselves, you can add the the "-t" option to the call to variationsFromText.js
Guy


Parser does not recognize tag if bbcode is used in option

As said above:
I´m trying to use a "quote" CodeDefinition that can be used with or without option!
Both work, but when I want to use other jBBCode tags inside the option parameter of the quote tag, the first tag in the option loses its opening bracket and the parser can`t recognize the quote tag itself because of it!
E.G:
[quote=[b]test[/b]]testing[/quote]
Output:
[quote=b]test[/b]]test123[/quote]
I tried using quotation in the option, but it was the same result!
Anyone got an idea how I could fix/make a workaround for this?

Don't do that. You shouldn't markup the option parameter as you wouldn't markup it in HTML.
E.g. this isn't useful too: <blockquote cite="parameter">content

The option paramter shouldn't contain content. It should only contain metadata about the "real content".


Crash nil pointer during storage accounts scan

Expected Behavior
During Storage Account scan inside a resource group, script crashes
2023/02/08 16:39:15 Analyzing SQL in Resource Group RG_CONTAINER_REGISTRY
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0xed53ff]
goroutine 290 [running]:
github.com/cmendible/azqr/internal/scanners.(*StorageScanner).Scan(0xc000388840, {0xc000036180, 0x15})
D:/a/azqr/azqr/internal/scanners/st.go:50 +0x19f
main.reviewRunner.func1(0xc0001331c0, {0xc000036180, 0x15})
D:/a/azqr/azqr/cmd/azqr/main.go:195 +0x102
created by main.reviewRunner
D:/a/azqr/azqr/cmd/azqr/main.go:189 +0x73

Steps to Reproduce the Problem
Crash happens during scan of storage accounts (presumed by st.go error)
Version used: latest release .\azqr-windows-latest-amd64.exe
azqr version: 0.7.3
No verbose logs can be shared, so is not possible to know deeply the root cause of the issue

Duplicate of #28
Can you please check the build I posted there?


oracle entity linking annotations

Hi,
Thanks for the outstanding work your team has accomplished.
I have a question: Could you kindly explain what "Oracle Entity Linking Annotations" refer to in your work?
Thank you in advance for your time and assistance.

Setup that utilizes topic entity annotation information.

In Table 1, the result of ChatKBQA (ours) use entity similarity and relation similarity, while the result of ChatKBQA (ours)* use oracle entity linking annotations and relation similarity. Do I understand correctly?

Yes.

Excuse me, based on the code below, I'd like to know if 'Oracle Entity Linking Annotations' refers to the process of extracting entities from the SPARQL provided by the dataset to replace the method of using entity similarity for entity search.
`
def extract_mentioned_entities_from_sparql(sparql:str) -> List[str]:
"""extract entity from sparql"""
sparql = sparql.replace('(',' ( ').replace(')',' ) ')
toks = sparql.split(' ')
toks = [x.replace('\t.','') for x in toks if len(x)]
entity_tokens = []
for t in toks:
if t.startswith('ns:m.') or t.startswith('ns:g.'):
entity_tokens.append(t[3:])
entity_tokens = list(set(entity_tokens))
return entity_tokens

`


[Bug] Controller window is expanding...

@chrisgoringe Help 😅
https://github.com/user-attachments/assets/05b8e734-18c1-4430-8f2c-64655d869d47

ok, I've backed the rescaling out until I work this out!

It's still expanding!

sorry - broke it again - try now

Fixed now!

Yes It's fixed.
I still have as scaling issue in a specific workflow ( https://github.com/chrisgoringe/cg-controller/issues/195#issuecomment-2432189479 ) that's probably something workflow related ( it's al older workflow ).


Create .csharpierrc.yaml

:white_check_mark: Build GuiStracini.Mandae 8.0.53 completed (commit https://github.com/guibranco/GuiStracini.Mandae/commit/44ab7bf0b3 by @guibranco)


ZDB client bugs

Similar to https://github.com/threefoldtech/jumpscaleX_core/issues/242
start zdb on the default port 9901, and get the admin client and do a ping. Everything works fine.
Stop zdb, change the port and save. Then try to start zdb, it will fail to start at the port where it gets the client admin, because it uses the old port.
SX> j.servers.zdb.default.start()
JSX> client = j.servers.zdb.default.client_admin_get()
JSX> client.redis
Redis<ConnectionPool<Connection<host=<IP_ADDRESS>,port=9901,db=0>>>
JSX> client.ping()
True
JSX> j.servers.zdb.default.stop()
JSX> j.servers.zdb.default.port
9901

JSX> j.servers.zdb.default.port = 9900
JSX> j.servers.zdb.default.save()
JSX> j.servers.zdb.default.start()
Sun 17 16:42:04 /redis/connection.py - 543 - connect                            : EXCEPTION:
    ConnectionError('Error 111 connecting to <IP_ADDRESS>:9901. Connection refused.',)
--TRACEBACK------------------
<stdin> in <module>
    1
/sandbox/lib/jumpscale/Jumpscale/servers/zdb/ZDBServer.py in start
    53    self.client_admin_get()  # should also do a test, so we know if we can't connect
/sandbox/lib/jumpscale/Jumpscale/servers/zdb/ZDBServer.py in client_admin_get
    90    cl = j.clients.zdb.client_admin_get(addr=self.addr, port=self.port, secret=self.adminsecret_, mode=self.mode)
/sandbox/lib/jumpscale/Jumpscale/clients/stor_zdb/ZDBClientFactory.py in client_admin_get
    63    cl.auth()
/sandbox/lib/jumpscale/Jumpscale/clients/stor_zdb/ZDBAdminClientBase.py in auth
    10    self.redis.execute_command("AUTH", self.secret_)
/usr/local/lib/python3.6/dist-packages/redis/client.py in execute_command
    836    conn = self.connection or pool.get_connection(command_name, **options)
/usr/local/lib/python3.6/dist-packages/redis/connection.py in get_connection
    1081    connection.connect()
/usr/local/lib/python3.6/dist-packages/redis/connection.py in connect
    543    raise ConnectionError(self._error_message(e))
-----------------------------

Error 111 connecting to <IP_ADDRESS>:9901. Connection refused.

Another bug: if the client port is updated at any point, the redis instance still point to the old port even though the instance itself has the right port.
JSX> j.servers.zdb.default.start()
JSX> j.servers.zdb.default.port
9900
JSX> j.clients.zdb.admin.ping()
True
JSX> j.clients.zdb.admin.redis
Redis<ConnectionPool<Connection<host=<IP_ADDRESS>,port=9900,db=0>>>
JSX> j.clients.zdb.get("admin", port=9901).save()
JSX> j.clients.zdb.admin.redis
Redis<ConnectionPool<Connection<host=<IP_ADDRESS>,port=9900,db=0>>>
JSX> j.clients.zdb.admin
# JSXOBJ:
## .zdb.client.1
ID: 91
 - name                : admin
 - addr                : <IP_ADDRESS>
 - port                : 9,901
 - secret_             : 123456
 - nsname              : default
 - admin               : True
 - mode                : SEQ

On top of that, because in the init of the zdb client, redis tests the connection and in case of the admin sends an auth, so even if you do a get with right port, it will fail, because the object is first retrieved from bcdb with the old values, then tries to update it, so while getting it, it will fail in the init. Also, if you try to delete the instance, it will also crash, because the delete does a get first.
A proposed solution:

Here https://github.com/threefoldtech/jumpscaleX_core/blob/development/JumpscaleCore/clients/stor_zdb/ZDBClientFactory.py#L60 we need to pass all the other arguments too, in case the server values changed. And make sure to check all places where this function is used, and make sure to pass all arguments, otherwise we'll end up with defaults from the function signature. But even with this change, like I mentioned above, the get will still fail with the old values during the init.
Make redis a property, like in the gedis client, that uses a variable. Reset the variable when the object is saved. This, however, won't fix all the problems because, we will still have the issues mentioned above related to connecting using redis in the init.

Fix for the second proposed solution https://github.com/threefoldtech/jumpscaleX_core/commit/16c88a2c3112c6e5cdc47dc4ed9549f9bbc18a25 however if someone changes the port property on the object cl.port = newvalue and doesn't save, redis instance wont be reset.

this can wait, we need to work with static 3bot config, ZDB does not need to have changing ports

we're not trying to support different configs, but this bug which is also present in gedis client, caused issues in 3bot deployments on the cockpit/explorer and deployments failed because of it. But sure, it can wait. Now that we are aware of it, we know how to avoid it.

Added triggers to handle both property change and save https://github.com/threefoldtech/jumpscaleX_core/commit/247286cd7e661f3c403b7ce26b5f08ba156aaa99


Not Working on Expo Web

Hi !
This is not really an issue, rather a question.
Do you know how to obtain the exact same behaviour on Expo Web ?
This does work like a charm on a mobile device, in an application, but it does not work at all when running on Expo Web on a browser.
If you have any clue, I would be happy.
Thanks

Solution found.
For those using Expo Web and looking for the same behaviour working on a browser, here are the tiny changes required:

instead of using Linking from 'react-native' => import * as Linking from "expo-linking";
instead of using Platform from 'react-native' => import * as Device from "expo-device";

`const maybeOpenURL = async (
url,
{ appName, appStoreId, appStoreLocale, playStoreId }
) => {
const opened = await Linking.openURL(url);
if (!opened) {
if (Device.osName === "iOS") {
const locale =
typeof appStoreLocale === "undefined" ? "us" : appStoreLocale;
    Linking.openURL(
      `https://apps.apple.com/${locale}/app/${appName}/id${appStoreId}`
    );
  } else {
    Linking.openURL(
      `https://play.google.com/store/apps/details?id=${playStoreId}`
    );
  }
}

};`
The function openInStore remains unchanged.


Add sample Java projects with frontend resources

sample projects run a GET Rest Endpoint that returns products; frontend code retrieves them as JSON and compute the total cost.
maven-yarn: build the frontend with Yarn
gradle-node: build the frontend with NPM

Checklist

[x] I have viewed, signed, and submitted the Contributor License Agreement.
[ ] I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
[ ] I have added an integration test, if necessary.
[x] I have reviewed the styleguide for guidance on my code quality.
[x] I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@dmikusa there are 2 issues before merging:

EasyCLA has issues...
I need to update java_test with at least 1 of those samples

@anthonydahanne Gotcha. Let me know when you're happy with the PR and I can re-review.

all good now! @dmikusa or @pivotal-david-osullivan !!!


Add support for proxies

Add support for proxies / loading external .obj's as instances

Any news on this feature?

This hasn't been implemented in Blenderseed, our Blender plugin, that said two things have changed recently:

That feature is now supported by appleseed core;
The Blenderseed plugin development was recently resumed thanks to a couple new volunteers joining the team. Interested in helping?

I'm not coder, but of course can help with testing!

Cool, want to join our Slack team? That's where all the development discussions are happening nowadays, for appleseed and the related plugins (including blenderseed). Let me know, I'll be happy to send you an invite by mail.

Please do it.

I would need your email address to send you an invite. You can actually request an invite by clicking on the pink badge that says "slack" on the GitHub page here: https://github.com/appleseedhq/appleseed

I'm going to close this one as archive assemblies can be used in the Python branch

Cool, want to join our Slack team? That's where all the development discussions are happening nowadays, for appleseed and the related plugins (including blenderseed). Let me know, I'll be happy to send you an invite by mail.

I would like to get an invite to join your slack channel please send me an invite (mgold10000 at gmail.com)


Delete All Button Required

Delete All button should be there to delete all todo tasks at once.
Please assign this issue to me with Hacktoberfest label.

Please assign this issue to me with Hacktoberfest tag.

@VIJAYKATARI23 what if you only showed the delete all button if you have more than one task on the lists?

Ok sir I will add this condition sir now Im in college sir tonight I will
do sir please give sometime sir.
On Wed, Oct 12, 2022, 7:44 AM zenocodes @.***> wrote:

@VIJAYKATARI23 https://github.com/VIJAYKATARI23 what if you only showed
the delete all button if you have more than one task on the lists?
—
Reply to this email directly, view it on GitHub
https://github.com/chintan0513/ToDo-List/issues/18#issuecomment-1275494792,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A3L7CKMUVNK3PPLW3VK7ZE3WCYNHJANCNFSM6AAAAAARCSB6H4
.
You are receiving this because you were mentioned.Message ID:
@.***>


build.sh fails, Error in build() method

Hi,
I got the error below while I was trying to run build.sh and thus I wasn't able to build.
[202/469] CXX obj/third_party/googletest/googletest/googlemock/test/gmock_all_test.gmock-generated-matchers_test.o
ninja: build stopped: subcommand failed.
crashpad/20200624@orbitdeps/stable:
crashpad/20200624@orbitdeps/stable: ERROR: Package 'c7f7792208a14227efdf8360c42b28462d7faba0' build failed
crashpad/20200624@orbitdeps/stable: WARN: Build folder /home/aimad/.conan/data/crashpad/20200624/orbitdeps/stable/build/c7f7792208a14227efdf8360c42b28462d7faba0
ERROR: crashpad/20200624@orbitdeps/stable: Error in build() method, line 164
	self.run("ninja -j%d -C %s" % (tools.cpu_count(), self._build_name), run_environment=True)
	ConanException: Error 1 while executing ninja -j6 -C out/Conan

Hey, sorry for the late response.
You should be able to build by disabling crashpad, as described in #3232.