RuntimeError: Unable to initialize backend 'tpu': module 'jaxlib.xla_extension' has no attribute 'get_tpu_client' (set JAX_PLATFORMS='' to automatically choose an available backend)

Description
%%capture
!pip install --upgrade pip # To support manylinux2010 wheels.
!pip install --upgrade jax jaxlib # CPU-only
!pip install flax
!pip install jax
!pip install optax
!pip install transformers
!pip install datasets
!pip install -U jax[cuda11_cudnn82] -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
!pip install -U jax[tpu] -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
!git clone https://github.com/huggingface/transformers.git
!python run_t5_mlm_flax.py
--output_dir="./norwegian-t5-base"
--model_type="t5"
--config_name="./norwegian-t5-base"
--tokenizer_name="./norwegian-t5-base"
--dataset_name="oscar"
--dataset_config_name="unshuffled_deduplicated_no"
--max_seq_length="512"
--per_device_train_batch_size="8"
--per_device_eval_batch_size="8"
--adafactor
--learning_rate="0.005"
--weight_decay="0.001"
--warmup_steps="2000"
--overwrite_output_dir=True
--logging_steps="500"
--save_steps="10000"
--eval_steps="2500"
--num_train_epochs=3 \
What jax/jaxlib version are you using?
jax v0.4.7
Which accelerator(s) are you using?
TPU
Additional system info
Google Colab
NVIDIA GPU info
No response

Also note "Google Colab"
Note that JAX has dropped support for Colab (Remote) TPUs in 0.4. If you want a hosted notebook with TPUs, you can either (a) downgrade to 0.3.25, or (b) use Kaggle TPUs, which are fully supported by JAX 0.4.
Hope that helps!

Closing. Feel free to comment further if the suggestions above don't help.


controlnet training

Can you add a training example for controlnet similar to your excellent DreamBooth training scripts?

🥹

did you also use DDPMScheduler for controlnet training?


log format for redirection logs from nginx proxy manager

Is this the correct format for the redirection logs from nginx proxy manager?
[22/May/2022:00:35:23 -0400] 307 - GET https w.example.ccom "/" [Client <IP_ADDRESS>] [Length 168] [Gzip -] "HetrixTools Uptime Monitoring Bot. https://hetrix.tools/uptime-monitoring-bot.html" "-"

log_format [%d:%t %^] %^ - %m %^ %v "%U" [Client %h] [Length %b] [Gzip %^] "%u" "%R"

Very close, only missing the status code. This should do it:
goaccess access.log --log-format='[%d:%t %^] %s - %m %^ %v "%U" [Client %h] [Length %b] [Gzip %^] "%u" "%R"' --date-format=%d/%b/%Y --time-format=%T

Appreciate the quick response!


Entities

In the XML parser, handle character entities: —

The XML parser needs to test support for character entities

These tests are in the conformance suite, so ignore previous message


Decode call sign from PI

According to the NRSC-4 standard for the U.S., the PI for a station is based on its call sign, according to a formula in the standard : http://www.nrscstandards.org/SG/nrsc-4-B.pdf (see section 7.12). Most stations here in the U.S. (commercial ones, in any case) use PS either for a slogan (as suggested by the NRSC document) or as a 'poor man's RadioText+'. This leads to interesting results when a radio manufacturer doesn't account for this (the radios in BMWs have had this issue before).
It would be nice, perhaps when the -u switch is used, to have the PI decoded into a string like 'WFOO' or 'KBAZ'. This is makes things more consistent when trying to use redsea output to identify stations.

Thanks, great idea!

There's now preliminary support for this. A JSON field callsign will appear in the data when the -u option is used. I've tested it to work with the examples provided in that PDF - hope it works with real signals as well!
And by the way, I don't have any real data from the US. I'd be grateful for a minute's worth of hex output of some stations with the -x switch, if you have time :)

Wow, that was fast! Testing shows me that it works in nearly all cases. One case, where the proper call sign is WYYY, shows up as "KCMQ". It is very possible that the station is simply transmitting incorrect information: this happens more often than you might think (the AF for WCNY is transmitted as 89.7 but is actually 89.5, and they don't put their third alternate in there at all). I have attached some recordings as you requested, including from WYYY. All the others show up correctly. Nice work, and thank you.
By the way, if you are interested, WYYY transmits TMC data, as do most Clear Channel Communications-owned radio stations in the U.S. The data is encrypted, but may be of interest to you since I know redsea does handle TMC data.
Another possible interesting US-specific bit is emergency alerts. https://en.wikipedia.org/wiki/Emergency_Alert_System These can be delivered by RDS, I believe. Whether they are or not, I don't know.
WAER-FM.txt
WCNY-FM.txt
WNTQ-FM.txt
WTKW-FM.txt
WYYY-FM.txt
WZUN-FM.txt

WYYY has PI code 1690 which indeed decodes to KCMQ, as if they didn't follow the call sign encoding practice.
Thanks a lot for the data, very useful!

I just noticed this is actually covered by that document . Stations may use a 1 as the first nibble for better compatibility with a wider range of TMC receivers. They don't offer any easy fix for detecting this. Perhaps the field name could be changed to callsign_uncertain or something when the PI starts with 1 and there is a TMC app present.


fixed the alignment in home page,

removed unnecessary code.

Yo! Giri already on it :)
Best,
Praveen
https://pkp.io
On Mar 13, 2016 8:07 PM, "ssnow"<EMAIL_ADDRESS>wrote:

removed unnecessary code.
You can view, comment on, or merge this pull request online at:
https://github.com/praveendath92/coursestats/pull/5
Commit Summary

fixed the alignment in home page,

File Changes

M app/user/includes/default.html
https://github.com/praveendath92/coursestats/pull/5/files#diff-0
(13)
M app/user/index.html
https://github.com/praveendath92/coursestats/pull/5/files#diff-1 (5)

Patch Links:

https://github.com/praveendath92/coursestats/pull/5.patch
https://github.com/praveendath92/coursestats/pull/5.diff

—
Reply to this email directly or view it on GitHub
https://github.com/praveendath92/coursestats/pull/5.

haha :+1:  i checked it and it does't have any side effects.
I think it would be nice to send pull req, so that u will know where and what code I'm changing , just to be sure we are on same page :)

Hmm. That sounds like a good idea.

Problem with layout of course result page


formatted_initials without content

So far noticed only in draft-andersen-arc-01.yaml.

There's not even a name inside this block:
    name:
      given:
        formatted_initials:
          language:
          - en
      surname:
        content: None
        language:
        - en
      completename:
        content: None
        language:
        - en

The root cause is this:
In the original RFC XML, there is an "author" that is an organization, not a person:
https://www.ietf.org/archive/id/draft-andersen-arc-01.xml
  <front>
    <title abbrev="ARC">Authenticated Received Chain (ARC)</title>

    <author initials="." surname="OAR-DEV Group">
      <organization>OAR-DEV Group</organization>
      <address>
<EMAIL_ADDRESS>      </address>
    </author>
    <author initials="K." surname="Andersen" fullname="Kurt Andersen">
      <organization>LinkedIn</organization>
      <address>
        <postal>
          <street>2029 Stierlin Ct.</street>
          <city>Mountain View</city>
          <region>California</region>
          94043
          <country>USA</country>
        </postal>
<EMAIL_ADDRESS>      </address>
    </author>

There is no way for us to tell this is not a person, because it has initials and surname.
Can I propose the correct outcome to be the following?
    name:
      given:
        formatted_initials:
          content: .
          language:
          - en
      surname:
        content: OAR-DEV Group
        language:
        - en

Adjustments welcome.

There's not even a name inside this block:
    name:
      given:
        formatted_initials:
          language:
          - en
      surname:
        content: None
        language:
        - en
      completename:
        content: None
        language:
        - en

@ronaldtse I did raise the issue only about the schema deliberately. Schema mismatch may break data loaders/deserializers (also raises the question as to how did this pass through serialization mechanism without failures, apparently some code doesn’t validate that formatted_initials is a valid formatted string?)
Unlike the schema, the issue with the data is separate, it doesn’t break anything and can be fixed at any time…
But if we are talking about data, why do you include given name and formatted_initials  in your output since it seems like you only put there a full stop as a placeholder? I think it can be omitted and we could just have surname and completename left.
      given:
        formatted_initials:
          content: .
          language:
          - en

why do you include given name and formatted_initials in your output since it seems like you only put there a full stop as a placeholder? I think it can be omitted and we could just have surname and completename left.

@strogonoff could you re-read my original message? There is some misunderstanding here. This question makes no sense. The fullstop is from original data.

@ronaldtse we use the command rsync -avcizxL rsync.ietf.org::bibxml-ids ./bibxml-ids to get source files. The source content of the reference.I-D.draft-andersen-arc-01.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<reference anchor="I-D.andersen-arc">
   <front>
      <title>Authenticated Received Chain (ARC)</title>
      <author initials="" surname="None" fullname="None">
         </author>
      <author initials="K." surname="Andersen" fullname="Kurt Andersen">
         </author>
      <author initials="J." surname="Rae-Grant" fullname="John Rae-Grant">
         </author>
      <author initials="B." surname="Long" fullname="Brandon Long">
         </author>
      <author initials="J. T." surname="Adams" fullname="J. Trent Adams">
         </author>
      <author initials="S. M." surname="Jones" fullname="Steven M Jones">
         </author>
      <date month="February" day="1" year="2016" />
      <abstract>
	 <t>   Authenticated Received Chain (ARC) permits an organization which is
   creating or handling email to indicate their involvement with the
   handling process by adding a cryptographically signed header (or
   headers) in a manner analagous to that of DomainKeys Identified Mail
   (DKIM).  Assertion of responsibility is validated through a
   cryptographic signature and by querying the Signer's domain directly
   to retrieve the appropriate public key.  Changes in the message which
   may break DKIM, may be tracked through the ARC set of headers.

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-andersen-arc-01" />
   <format type="TXT" target="https://www.ietf.org/archive/id/draft-andersen-arc-01.txt" />
</reference>


Checks reporting config differences when there aren't any

Problem Description
When I configure a repo with its existing branch protection config, there are two items which show as changed in the PR check which haven't changed.
What is actually happening
It looks like the comparison being done here https://github.com/github/safe-settings/blob/main-enterprise/lib/mergeDeep.js#L120-L126 is showing differences for some items when the config should be the same. The two example differences I am seeing are:
From github REST API (target):
"enforce_admins": {
	"url": "https://api.github.com/repos/Introhive/introhive/branches/master/protection/enforce_admins",
	"enabled": false
},

Is being compared with config (source):
"enforce_admins": false,
-----and-----
From github REST API(target):
"required_status_checks": {
	"url": "https://api.github.com/repos/Introhive/introhive/branches/master/protection/required_status_checks",
	"strict": false,
    "contexts": [
      "task-list-completed",
      "codeclimate"
	],
	"contexts_url": "https://api.github.com/repos/Introhive/introhive/branches/master/protection/required_status_checks/contexts",
	"checks": [
    {
      "context": "task-list-completed",
      "app_id": null
    },
    {
    	"context": "codeclimate",
    	"app_id": null
    }
]

Is being compared with (source):
"required_status_checks": {
   "strict": false,
   "contexts": [
     "task-list-completed",
     "codeclimate"
	]
}

What is the expected behavior
I would expect the comparisons above to be done in a manner that doesn't indicate there are config changes.
Error output, if available
Branch Protection : introhive : Followings changes will be applied to the branch protection for archived_develop branch = { "additions": { "required_status_checks": { "strict": false } }, "modifications": { "enforce_admins": true } }

Branch Protection : introhive : Followings changes will be applied to the branch protection for master branch = { "additions": { "required_status_checks": { "strict": false }, "restrictions": { "teams": [ "committers", { "name": "Committers", "id": {{REDACTED}}, "node_id": ""id": {{REDACTED}}", "slug": "committers", "description": "Members who can merge PRs into master.", "privacy": "closed", "url": "https://api.github.com/organizations/({REDACTED}}/team/({REDACTED}}", "html_url": "https://github.com/orgs/Introhive/teams/committers", "members_url": "https://api.github.com/organizations/({REDACTED}}/team/({REDACTED}}/members{/member}", "repositories_url": "https://api.github.com/organizations/({REDACTED}}/team/({REDACTED}}/repos", "permission": "pull", "parent": null } ] } }, "modifications": { "enforce_admins": false } }

Context
We would like to be able to validate that these checks to show no changes as we roll safe-settings out for all repositories in our org.
Are you using the hosted instance of probot/settings or running your own?
Running our own
If running your own instance, are you using it with github.com or GitHub Enterprise?
github.com
Version of probot/settings
    "probot": "12.2.0"

safe-settings is synced up to the latest from the main-enterprise branch as of today.
Version of GitHub Enterprise
N/A

@dan-ih, Thanks for the detailed issue. I'll look at it and let you know in a couple of days.

Hi @dan-ih.
The same thing here.
I would like to ask you, do you have a basic configuration for the organization and another one specific for repositories?. We have observed that it takes the one from the repository directly, and therefore fails because required fields are missing, which are in the basic configuration. Have you seen something similar?. Thanks :)


The training problem

I found that the number of output channels of STDiT-v3 is 8, but in the training phase, only the former 4 channels are computed in  the loss function.

Thanks. Would you please help me pinpoint where you identified this issue? I saw this but failed to locate where channel selection happened.

The training of open sora v1.2 used the rectified flow scheduler in this.

In the DiT training code, the purpose of setting sigma is to learn the mean and variance of the noise, and then calculate the KL loss with the gold standard. The code sets pred_sigma to True by default, but directly uses the mean (the first 4 channels) as the predicted noise.

The model released is also 8 channels (including mean and variance). Why set the model to predict mean and variance, but do not calculate the loss of variance.

The model released is also 8 channels (including mean and variance). Why set the model to predict mean and variance, but do not calculate the loss of variance.

I also want to know. @JThh Is there any reason to do this?

In the DiT training code, the purpose of setting sigma is to learn the mean and variance of the noise, and then calculate the KL loss with the gold standard. The code sets pred_sigma to True by default, but directly uses the mean (the first 4 channels) as the predicted noise.

so why?the output dimensions is? input is ?

I felt the same doubt.

I felt the same doubt. why Just use out_channel=8 ,uses the mean (the first 4 channels) ,dorpout bias? Maybe,Update latent_z by grad without bias
      dt = timesteps[i] - timesteps[i + 1] if i < len(timesteps) - 1 else timesteps[i]
      dt = dt / self.num_timesteps
      z = z + v_pred * dt[:, None, None, None, None]

This issue come from pixart-alpha which align with the original DiT. (https://github.com/PixArt-alpha/PixArt-sigma/issues/81#issuecomment-2100610843)

i see


Decide what value to use for infinite max depth / repeat

Options

None as current.

Doesn't read well with repeat and the new depth (rather than max_depth). Unless we rename these to something like limit? But I think this is less descriptive.

math.inf

mypy doesn't allow floats as literals.

A new special value, Unlimited?

Should None be retained as a synonym?
Pros:

Easy to use.

Cons:

Doesn't read well, None sounds like zero rather than infinity.

numpy/scipy has precedents in both directions.

None seems fine until further notice.

I'm not sure of the context of this issue, but it seems like the Ellipsis object might be semantically appropriate.


Expose sqlite3.OPEN_FULLMUTEX

This can be used as an integer, but it'd be nice if there was a property for it.

+1
As in (https://github.com/mapbox/node-sqlite3/blob/d5b59c3133f22fd9eefd74c6bd7f702b65601a00/src/node_sqlite3.cc#L21-L23), OPEN_FULLMUTEX is not exposed.
However, in (https://github.com/mapbox/node-sqlite3/blob/d5b59c3133f22fd9eefd74c6bd7f702b65601a00/src/database.cc#L121), default mode is OPEN_READWRITE | OPEN_CREATE | OPEN_FULLMUTEX.
How can I new Database('xx.db', OPEN_READWRITE | OPEN_CREATE | OPEN_FULLMUTEX) in JavaScript side?

OPEN_READONLY: 1
OPEN_READWRITE: 2
OPEN_CREATE: 4

I guess value of OPEN_FULLMUTEX  is 8. So we have the workaround. ;)

This is also missing in wiki.

This is now exposed here and the wiki has been updated 🙂


Put finishing touches on Bigtable Cluster.

In particular, updating the class docstring and passing the current cluster in when creating a new Operation from a cluster operation.
These were noticed when updating the system tests in the gcloud-python-bigtable project.

LGTM


Windows Installer for non-tech user

Feature request
Simple enough Windows installer that a very non-technical business user can have OpenAdapt running in 5 minutes. There should be no configuration options by default, only hidden under 'Advanced'. Includes skeleton terms of service. Easy to customize for white-labelling.
Motivation
Business users have no time, skills, or inclination to deal with a setup process in a Terminal. They expect it to "just work".

Related: https://github.com/OpenAdaptAI/OpenAdapt/issues/574

Implemented in https://github.com/OpenAdaptAI/OpenAdapt/pull/618


Problem clicking after blur event

Hi!
I have a problem when clicking on datepicker after blur events occurs, this is due to auto close directive is set true, on last version 2.1.3. I have to click to any other DOM element before click on input date to get show datepicker component. Can anyone help me to get fix this pls?
Thanks in advance.

I was also hit with this issue as recently as this afternoon. I think this will fix the issue.change the bind event form focus to click
https://github.com/g00fy-/angular-datepicker/blob/master/dist/angular-datepicker.js#L950

Anyway after commit, I still have this problem ? Any solution ? Need lose focus after date selected (auto-close=true).


Check if failing E2E tests are false positive, if so tell Gil we can release

tested on dev-17

mobile - checkout-flow is just inconsistent, therefore false-positive
mobile - order-history-no-orders is worrisome, I think it is just an error related to the test, because it says bad credentials when trying to login after registering, will test manually.
payment-method is inconsistent, therefore false-positive (too slow / too fast)
sitecontext - language-myaccount is checking for the wrong month (new month is july, and its checking for june), therefore false-positive


Character moves in top down mode even with scripts attached

Describe the bug
I am porting a game I made in GB Studio 1 to GB Studio 2, and one scene uses a modified version of this text input system. It turns the player character into a cursor, and uses scripts to lock it to the positions of the background letters. When the A button is pressed, it enters a character based on the cursor's position. The issue is that this is broken in GB Studio 2 because, instead of the "Attach Script to Button" action replacing other inputs, it sends it, then the input is done, in this case the cursor moves by itself in addition to being moved a certain distance.
To Reproduce
Steps to reproduce the behavior:

Make a blank project in GB Studio 1
Attach scripts to each directional button that puts up a dialogue box that says what was pressed.
Test in v 1. Each button will bring up a dialogue box, but the arrow will stay still
Migrate to v 2 and test. The arrow will move and the dialogue box will appear.

Expected behavior
As previously stated, movement should be cancelled by the script.
Screenshots
Screenshots will not accurately portray the issue, but I will link a video if requested.
Platform (please complete the following information):

OS: Windows 10
App version: 2.0

Seems like a duplicate of #452


Add possibility to change detectIndent option

Hey 👋
Internal write-json-file has a detectIndent option to detect indentation of existing file which is false by default. write-pkg provides this option which is hardcoded to true.
If existing file has empty {} contents inside, added fields will be saved as a single line:
{"name":"test","version":"1.0.0"}

It's impossible to fix such file indentation using any indentation options, the only way is to remove file and regenerate it. It would be nice to have detectIndent not hardcoded and have possibility to overwrite it.

I think it would be better to fix your specific issue instead. We could just default to 2-space indentation if the existing indentation could not be detected.

@sindresorhus can you give more details? Do you mean check indentation using detect-indent and then pass other options in this package or something else?

Actually, I do think its better to fix this using the linked PR. I can give you another use case - you can have badly indented package.json and want to fix it using indent: 2 for example. It also won't work because detectIndent is set to true.
There may be another use cases, I do think it's a better idea to give control and choice to a developer.
I've changed the issue name, maybe it gave false meaning, the PR doesn't remove default true option, it just gives you a way to change it if needed.

Actually, I do think its better to fix this using the linked PR.

The linked PR is not fixing it. It's giving you the ability to work around it. That's different. I want to actually fix it so everyone doesn't have to specify the option to get the expected behavior when the package.json is empty.

you can have badly indented package.json and want to fix it using indent: 2 for example. It also won't work because detectIndent is set to true.

I'm not a big fan of doing changes based on imaginary scenarios. There's also no indent option here.

The linked PR is not fixing it. It's giving you the ability to work around it.

Oh, I see what you mean, totally understandable :)

I'm not a big fan of doing changes based on imaginary scenarios. There's also no indent option here.

I'm using indent option from write-json-file, which sets indentation to 2. My use case is:
No matter what indentation is in existing file, set indentation to 2 spaces. It works with detectIndent: false + indent: 2 combo. So, the first issue is with {}, second is with non-updatable indentation.
I see by default you set detectIndent to true to respect existing indentation, however I don't need to use existing indentation and my use case won't work if detectIndent is true.
Suggest how to solve this to work both ways, I'll update PR :)

Sorry, I totally missed your comment. Yes, that plan sounds good.


getDisplayStack Performance Issue

Any way this can be improved?

Does this fix my issue?

@Deo3560 I'm still yet to investigate that one, probably not but possibly, I need to setup a test server.


Adds video demo to landing page and updates how to images and text

Preview Link

Click to demo updates
Description

Updates the images and text in the "How to use" section of the landing page
Adds the video demo to the landing page

Motivation and Context

Closes #1763
How has this been tested?

Tested manually
Screenshots (if appropriate):

Types of changes

Breaking change (fix or feature that would cause existing functionality to not work as expected)

looks great! we may need to update alt text for all screenshots? for example the incarceration screenshot still shows "Map Example Screenshot, Data Tracker map of Covid-19 rates of all racial groups" please confirm i'm looking at that correctly.
i can provide language for alt text

@jgonzalezmsm Good catch, sure, ill put it in when you have it

alt text for screenshots:
Search by completing the sentence
alt text: no change
Use filters to go deeper
change from: "Search Example Screenshot: Compare Rates of option Covid-19 between two locations" -->  to "Example Screenshot: Select demographic variables by interacting with the dropdown menu and other filters."
Explore maps and graphs
change from: "Map Example Screenshot, Data Tracker map of Covid-19 rates of all racial groups" --> to "Example Screenshot:  Map of individuals in prison per 100k in the state of Georgia."
we could possibly do more accessibility updates around this in a future release ..further reading: https://moz.com/blog/seo-accessibility-images-video

@jgonzalezmsm Thanks, updated the alt text


Tracking session specific download URL creation

Context
As we prepare for cart level downloads we will run into a limitation about the maximum download size we should be able to support. In order to understand that we need to collect some usage data tied to a user's download token. In order to avoid using tokens as user identifiers on 3rd party tooling we want to track this information internally.
This will inform limitations on the dataset model that has yet to be proposed.
Problem or idea
In order to track users download behavior we should create a new table that essentially counts download urls that are generated and sent to the requester and associate them with the download configuration. We will also want to get some other basic information such as disease / subtype.
This information will not be 100% what users are downloading because we have implemented eagerly creating the download url in order to allow them to click to copy the authenticated link. However this will give us some insight into user behavior on a per session basis.
Solution or next step

create token downloads table
create or update entry whenever a download url is generated for a specific computed file

Closed with #1031


Pods stuck in ContainerCreating after enabling Dashboard

Hi guys,
I just installed microk8s to test it for our use-case.
However, I am not able to get the dashboard running. I invested about 2-3 hours into this but with no result. Everytime I enable the dashboard the Pods will get stuck at ContainerCreating (same goes for other services I enable):
microk8s.kubectl get pods -A
NAMESPACE     NAME                                        READY   STATUS              RESTARTS   AGE
kube-system   dashboard-metrics-scraper-59f5574d4-n2242   0/1     ContainerCreating   0          46m
kube-system   kubernetes-dashboard-6d97855997-q9wn9       0/1     ContainerCreating   0          46m
kube-system   metrics-server-c65c9d66-dqzvg               0/1     ContainerCreating   0          46m

I think I definitely identified our company proxy as the problem, as I found problems with pulling images inside the inspection tarballs i analysed. Although I followed every configuration here https://microk8s.io/docs/install-proxy and even followed some steps here https://rahulsharma.page/2018-12-25-running-microk8s-behind-proxy/ the pods will simply stay in this state forever.
Can you help me out here?
Collected Tarball:
inspection-report-20200707_094008.tar.gz

Hi @OheyThere
I see your flanneld did not came up. It reports:
Jul 07 09:39:39 mikrok8stest microk8s.daemon-flanneld[12673]: Error:  client: etcd cluster is unavailable or misconfigured; error #0: client: endpoint https://<IP_ADDRESS>:12379 exceeded header timeout
Jul 07 09:39:39 mikrok8stest microk8s.daemon-flanneld[12673]: error #0: client: endpoint https://<IP_ADDRESS>:12379 exceeded header timeout

etcd does not look healthy either:
Jul 07 09:30:45 mikrok8stest microk8s.daemon-etcd[30240]: WARNING: 2020/07/07 09:30:45 grpc: addrConn.createTransport failed to connect to {<IP_ADDRESS>:12379 0  <nil>}. Err :connection error: desc = "transport: Error while dialing failed to do connect handshake, response: \"HTTP/1.1 503 Service Unavailable\\r\\nContent-Length: 3447\\r\\nContent-Type: text/html;charset=utf-8\\r\\nDate: Tue, 07 Jul 2020 09:49:30 GMT\\r\\nMime-Version: 1.0\\r\\nServer: squid/3.5.21\\r\\nX-Squid-Error: ERR_CONNECT_FAIL 111\\r\\n\\r\\n\\n\\n<meta type=\\\"copyright\\\" content=\\\"Copyright (C) 1996-2016 The Squid Software Foundation and contributors\\\">\\n<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\">\\n<title>ERROR: The requested URL could not be retrieved</title>\\n\\n\\n
\\n
ERROR
\\n
The requested URL could not be retrieved
\\n
\\n
\\n\\n
\\n
The following error was encountered while trying to retrieve the URL: <a href=\\\"<IP_ADDRESS>:12379\\\"><IP_ADDRESS>:12379
\\n\\n
\\n
Connection to [unknown] failed.
\\n
\\n\\n
The system returned: (111) Connection refused
\\n\\n
The remote host or network may be down. Please try the request again.
\\n\\n
Your cache administrator is <a href=\\\"mailto:OperationsNetwork<EMAIL_ADDRESS>id=\\\"footer\\\">\\n
Generated Tue, 07 Jul 2020 09:49:30 GMT by opspsrv032 (squid/3.5.21)
\\n\\n
\\n\\n\"". Reconnecting...

Is it possible you proxy all traffic including the one going towards local services?

Well,
I won't say it's not possible. Should I specify NO_PROXY inside /var/snap/.../containerd-env ?
My /etc/environment file is correctly configured and has a no_proxy field...

Yes, please try that.
On the etcd logs the message failed to connect to {<IP_ADDRESS>:12379 ... X-Squid-Error: ERR_CONNECT_FAIL probably means that your local traffic goes through the squid proxy (but I am not a network expert).

Well, I tried it with no success, this is my containerd-env file:
# To start containerd behind a proxy you need to add an HTTPS_PROXY
# environment variable in this file. HTTPS_PROXY is of the following form:
# HTTPS_PROXY=http://username:password@proxy:port/
# where username: and password@ are optional. eg:
#
HTTPS_PROXY=http://mycompanyproxy.com:3128
NO_PROXY=localhost,<IP_ADDRESS>,::1
#
#
# Remember to restart the containerd daemon after editing this file:
#
# sudo systemctl restart microk8s.daemon-containerd
#
#

# Attempt to change the maximum number of open file descriptors
# this get inherited to the running containers
#
ulimit -n 65536 || true

# Attempt to change the maximum locked memory limit
# this get inherited to the running containers
#
ulimit -l 16384 || true

And the problem remainds. Those errors you pointed out inside the inspection files were still there...
The machine itself does not use a proxy for addressing local services, only microk8s seems to do so...

@OheyThere in your /etc/environment what does no_proxy look like?
May want to add your local network's subnet for example <IP_ADDRESS>/8. Atleast that's what i do.

@balchua That was the solution :) Thank you guys very much!


Added a period.

Why:
Closes [issue link]

What's being changed:

Check off the following:

[x] I have reviewed my changes in staging (look for "Automatically generated comment" and click Modified to view your latest changes).
[ ] For content changes, I have completed the self-review checklist.

Writer impact (This section is for GitHub staff members only):

[ ] This pull request impacts the contribution experience

[ ] I have added the 'writer impact' label
[ ] I have added a description and/or a video demo of the changes below (e.g. a "before and after video")

Accept.

@samuelajala01
This seems to be opened accidentally, I am going to close it now :yellow_heart: Take a look at the contributing.md to learn how to contribute in this repo. You can open a discussion if you have any questions :sparkles:

Ok
On Tue, Nov 9, 2021, 7:34 AM Ramya Parimi @.***> wrote:

@samuelajala01 https://github.com/samuelajala01
This seems to be opened accidentally, I am going to close it now 💛 Take
a look at the contributing.md
https://github.com/github/docs/blob/main/CONTRIBUTING.md/ to learn how
to contribute in this repo. You can open a discussion
https://github.com/github/docs/discussions if you have any questions ✨
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/github/docs/pull/11781#issuecomment-964109316, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AWJBFGDTWHA4NHS63OZ2GJ3ULEINNANCNFSM5HTCSBLA
.


pilot/pkg/model: make synchronization canonical

Please provide a description of this PR:
This is a minor fix observed in google/gvisor#7721.
To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[X] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

Please check any characteristics that apply to this pull request.

[X] Does not have any user-facing changes. This may include CLI changes, API changes, behavior changes, performance improvements, etc.

Hi @amscanne. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Thanks!
/ok-to-test

/retest


Question about redundancy of code in user.py

Hi,
I see that in user.py script, lines 228 to 234 are same as lines 236 to 242.
if torch.cuda.is_available():
torch.cuda.synchronize()
res = time.time() - end
print("Network seq", path_seq, "scan", path_name,
"in", res, "sec")
end = time.time()
cnn.append(res)
Why is the code repeating twice, or is it by mistake that this piece of code is written twice, or is there any interpretation to it?
Someone please help!

It was clearly a case of mistake. You can delete the extra one and do a PR if you'd like


DNN-8725 Fix to update password issue

Fix to ensure update password (as initiated by an admin) is not subject to a time out like reset password is.

Can you redo this commit?  I can't tell where the actual changes are and what are just formatting changes.  This makes it extremely difficult to perform a code review.

it'd be nice if the whitespace was fixed, but you can see the changes by suppressing whitespace from the diff: https://github.com/dnnsoftware/Dnn.Platform/pull/1506/files?w=1

Because of conflicts in the PR, I had to do it through command line. The PR is in development branch now under this commit https://github.com/dnnsoftware/Dnn.Platform/commit/9d5fc9826f63fb18a6b1fe91aa91617094fcd78e


Updating entity broken in 1.4.1 (after 6a6d4eb maybe)

Updating a JobOffer with the same remoteId (i.e. remoteId doesn't change but property state is MODIFIED) causes a foreign key constraint error in JobOfferStats.
@Table(name = "IJobOffer")
@Entity(cacheable = false)
interface JobOffer : Parcelable, Persistable {
    @get:Key
    @get:Generated
    @get:Column(name = "_id")
    var localId: Int

    @get:Column(name = "id")
    var remoteId: Int?
}

@Table(name = "IJobOfferStats")
@Entity(cacheable = false)
interface JobOfferStats : Parcelable, Persistable {
    @get:Key
    @get:Generated
    @get:Column(name = "_id")
    var localId: Int

    @get:ForeignKey(
            update = ReferentialAction.CASCADE, referencedColumn = "id",
            references = JobOffer::class)
    var jobOfferId: Int
}

Stacktrace:
android.database.sqlite.SQLiteException: foreign key mismatch -
        "IJobOfferStats" referencing "IJobOffer" (code 1): , while compiling:
        update IJobOffer set authorId = ? ,banned = ? ,createdAt = ? ,description = ? ,endsAt = ? ,
        gender = ? ,id = ? ,localCanContributeToNotifications = ? ,localSeen = ? ,
        localShouldShowNotification = ? ,offerDuration = ? ,offerUntil = ? ,pendingCreate = ? ,
        pendingRequestId = ? ,pendingRetry = ? ,pendingStatus = ? ,place = ? ,salaryUnit = ? ,
        salaryValue = ? ,showCandidatesDuration = ? ,showCandidatesUntil = ? ,startsAt = ? ,
        status = ? ,updatedAt = ? where _id = ?
    at io.requery.android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
    at io.requery.android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:919)
    at io.requery.android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:522)
    at io.requery.android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:598)
    at io.requery.android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:59)
    at io.requery.android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:37)
    at io.requery.android.database.sqlite.SQLiteDatabase.compileStatement(SQLiteDatabase.java:985)
    at io.requery.android.sqlitex.SqlitexPreparedStatement.<init>(SqlitexPreparedStatement.java:39)
    at io.requery.android.sqlitex.SqlitexConnection.prepareStatement(SqlitexConnection.java:121)
    at io.requery.sql.ConnectionDelegate.prepareStatement(ConnectionDelegate.java:225)
    at io.requery.sql.PreparedQueryOperation.prepare(PreparedQueryOperation.java:58)
    at io.requery.sql.EntityUpdateOperation$1.evaluate(EntityUpdateOperation.java:51)
    at io.requery.sql.EntityUpdateOperation$1.evaluate(EntityUpdateOperation.java:40)
    at io.requery.query.BaseScalar.value(BaseScalar.java:48)
    at io.requery.sql.EntityWriter.update(EntityWriter.java:632)
    at io.requery.sql.EntityWriter.update(EntityWriter.java:542)
    at io.requery.sql.EntityDataStore.update(EntityDataStore.java:243)
    at io.requery.sql.KotlinEntityDataStore.update(KotlinEntityDataStore.kt:126)
    at XXX

Expected behavior:
No error because CASCADE kicks in.
Workaround:
Revert code in 6a6d4eb.

I'm affected by this bug, too.
Reverting to release 1.4.0 also works around the issue ;-)

This is happening because your foreign key jobOfferId is referencing a non-key column JobOffer.remoteId (id) See http://www.sqlite.org/foreignkeys.html#fk_indexes. Reverting that change is probably not a good idea as enabling foreign key constraints is required in order to get correct foreign key behavior in sqlite. This had been correct in the standard sqlite data source, but not the sqlcipher and sqlite-support sources which is what that change fixes.
If you need to keep this behavior you can override onConfigure and not enabled the constraints, however this means constraints will not be enforced correctly.


Prototype support

A user asked for running the timer in a Figma Prototype. I‘m not sure if that’s supported by the API but we could reach out to Figma and ask them if that’s something on their Roadmap

This would be so useful for creating a realistic prototype.

Hi @astromentals, thank you for sharing this! Do you have examples of use cases for this? 👀 This will help inform a solution!

One use case I have (in conjunction with issue #26 ) is a prototype that shows the duration of a phone call in progress.


Cannot access request header fields after connection is set

Attempting to execute:
"http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en".httpGet().response { request, response, result ->
     println(request)
     println(response)
}

produces:
java.lang.IllegalStateException: Cannot access request header fields after connection is set
     at com.github.kittinunf.fuel.toolbox.HttpClient.executeRequest(HttpClient.kt:69)
     at com.github.kittinunf.fuel.core.requests.TaskRequest.call(TaskRequest.kt:16)
     at com.github.kittinunf.fuel.core.requests.AsyncTaskRequest.call(AsyncTaskRequest.kt:13)
     at com.github.kittinunf.fuel.core.requests.AsyncTaskRequest.call(AsyncTaskRequest.kt:6)
     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
     at com.github.kittinunf.fuel.core.FuelManager$executor$2$1$1.run(FuelManager.kt:49)
     at java.lang.Thread.run(Thread.java:761)

Using the cUrlLoggingRequestInterceptor I got the following curl that when executed on a terminal it works:
curl -i -H "Accept-Encoding:compress;q=0.5, gzip;q=1.0" "http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en"

I cannot reproduce your error. What I did is following;
Go to sample folder in Fuel project and change the https://github.com/kittinunf/Fuel/blob/508dd2e05b7b88d1a3edb3fdc63d1861cecd89fd/sample/src/main/kotlin/com/example/fuel/MainActivity.kt#L44-L55 to

Then, the emulator show the result as expected. (I clicked button multiple times)

Is there anything more into this so I can reproduce the error?

Hey @kittinunf, Seems I'm not the only one. #229 is having the exact same exception. I'm using Fuel's latest version on Android Studio 3.0 Beta 3, com.android.tools.build:gradle:3.0.0-beta3. I tried the same and it's the same. I didn't even had to modify it, the same isn't working at all.

Also, Fuel seems to be the only library having this issue. I tried both, Retrofit and OkHttp, and all of them are working fine.

Author of #229 here.
Quite the same situation. Other libraries work fine, only the first request with Fuel succeeded any subsequent one fails with this error.

Hi, all! @apognu or @mradzinski, if you can reproduce this error may be you can to try fix one and create merge request. We will glad to merge it.

@KucherenkoIhor, well, I actually had to move away from Fuel due to this issue. As for reproducing it: Just download the sample from this repo, update its gradle & kotlin dependency and run it; Hint: It'll fail.

@mradzinski I think the sample fails because of other issues. Let's us focus on your issue first, shall we?
I will try to mimic your situation as much as possible.
I have create this test repo.
I have push the commit I tested with your API endpoint. But I am unable to reprouce your issue. If you don't mind, could you please try in that repo and show it to me whether you could make it work or not.

Is there any update on your side @mradzinski ?

I have exactly the same problem, but that isn't appeard whenever, i can't figure out where it depends.

Hello there, this problem happen on my Pixel (Android 8.0) and not happen on Samsung S7 (Android 7)

@PichuChen that is a bit weird. Do you know what could possibly trigger the problem? I have made the repo here. If you do have time, even better if you could come up with a test that fails?

@kittinunf Testing result on Pixel is successful, is really weird...
I will try to copy my code to reproduce this problem.

I also faced this exception. But it happens only when i enable advanced profiling. With disabled profiler it works well.

I've faced the same problem a few days ago. From my point of view there was a problem with the ide (android studio 3.1.3) and the used kotlin plugin. I could solve it by updating kotlin and the plugin to 1.2.50 and then all used com.android.support* libraries to 27.1.1. In addition i've cleaned my project entirely (fresh clone of repo) after a new build of the application the problem disappeared.

is this still an issue?

Let's close this as it looks quite stale to me.


refactor(plugin-legacy): build product file name optimization

Description
#15106
Additional context
The default value of the parameter defaultFileName of the getLegacyOutputFileName method has been changed:
[name]-legacy-[hash].js -> [name]-[hash]-legacy.js

What is the purpose of this pull request?

[ ] Bug fix
[ ] New Feature
[ ] Documentation update
[x] Other

Before submitting the PR, please make sure you do the following

[x] Read the Contributing Guidelines, especially the Pull Request Guidelines.
[x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
[x] Update the corresponding documentation if needed.
[x] Ideally, include relevant tests that fail without this PR but pass with it.

@patak-dev

I don't think this is correct. We should only fix for [hash].js, which gets turned into [hash]-legacy.js

@bluwy There is a question why the 'legacy' in the variable 'defaultFileName' should be placed between '[name]' and '[hash]'?
I think it is also appropriate to splice legacy in front of .[ext] or .min.[ext]

Because -legacy is an extension of [name]. When you have a chunk named foo, the legacy variant is foo-legacy. In the case where there's no [name], we need to guess still where it looks more correct. If it's closer to the [name] case when it exists, the better and more consistent the output will be.

This one custom[hash].[format] -> custom-legacy[hash].[format] could also look a bit strange depending on what custom is but I don't think it is bad enough to justify changing it.
About releasing the change to remove the leading - for [hash]xxx patterns, have we changed these output file names in a plugin legacy minor before?

How about returning to the v4 strategy? Except for the situation where [name] clearly exists, don’t guess about other situations.

The previous strategy could also give unwanted results and it isn't aligned with the way it normally works when there is a [name] now.
Could you list other edge cases you found?
The one I can think of is:
custom_[hash].[ext] -> custom_-template[hash]

So it may be good to also support this one
Maybe for the [hash] branch, we could do:
if (fileName.startsWith('[hash]')) {
  fileName = `legacy-${fileName}`
}
else if (fileName.includes('/[hash]')) {
  fileName = fileName.replace('/[hash]', '/legacy-[hash]')
}
else {
  // abcd[hash]  -> abcd-legacy[hash]
  // abcd-[hash] -> abcd-legacy-[hash]
  // abcd.[hash] -> abcd-legacy.[hash]
  // abcd_[hash] -> abcd-legacy_[hash]
  fileName = fileName.replace(/[^\w\d]?\[hash\]/, '-legacy$&')
}

@patak-dev Thanks, I'll try it later

@patak-dev @bluwy I've done and should work fine

@patak-dev

About releasing the change to remove the leading - for [hash]xxx patterns, have we changed these output file names in a plugin legacy minor before?

There's only two PR that changed the output file names in plugin legacy: #11599 (5.0.0), #4122 (1.4.4)
I feel the second one is more a bug fix than a breaking change. So I think we only changed in a major version.

Could you list other edge cases you found?

Another edge case is when hash length is specified (e.g. [hash:10]).

@patak-dev @sapphi-red
The latest changes only include the following two points:

The threshold for entering the [hash] branch has been raised: there needs to be at least one character in front of the [hash] and it cannot be immediately adjacent to /
Compatible with [hash:10]

ps:
I don't think it's important to have too much discussion here. Not many people really care about the product name, and probably even fewer people care about the splicing position of legacy.
If must pay attention to splicing position, then the best advice I can provide is to always splice legacy before .[ext] or .min.[ext].
No matter how we make changes here in the future, can we solve the initial strange problem now?
assets/[hash].[ext] -> assets/-legacy[hash].[ext]

We should extract these regexes to be reused before merging. To me, I think it is ok to move forward with these two changes and merge them in the next plugin-legacy minor.

We should extract these regexes to be reused before merging.

@patak-dev Which file should the regexes be extracted to? To snippets.ts?

@jiadesen they can be extracted to the same index.ts file after the imports. Example https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/css.ts#L162

No, you can extract both regex as is. It is about avoiding the creation of new regexes on each check, and not about reusing that part of the regex.
const nonLeadingHashInFileNameRE = /[^/]+\[hash(?::\d+)?\]/
const prefixedHashInFileNameRE = /[.-]?\[hash(:\d+)?\]/


chore: use empty.png from resources folder

I think is a nice idea to do it like this. I have changed so much in the other branch. So main is quite outdated, perhaps is best I PR to main first and you rebase this PR.

@gschennersie please rebase on main and then re-request a review, thanks!

wont fix for now.


Performance Optimisation

Client side optimisation hunt: Reduce calls as best as possible

[x] Debounce state request upon submissions, every 0.5s could be reasonable
[x] Reduce ping (currently every second, could be every 10 seconds)

Stresstest viewers and investigate where and why the clock doesn't properly update

This has been implemented on dev. The way it work is that the timer (ever 1s) and the regular state updates to WebSocket messaging (random) are now debounced. Furthermore, if a state update is triggered by WebSocket that state is not explicitly queried again but reused instead. This should minimize overhead significantly when high load is generated due to a lot of submissions.
Needs extensive testing!

Sounds good. Have you had a chance to test if the countdown now works properly even under a high submission load?

It seems to be able to cope just fine with the load generated by your script.


Added Angular.js usage example.

PR updated

Do we really want examples of how to use it with a specific framework? I feel like how to use easy libraries in combination with a specific framework isn't something the library should document - rather something the framework's community should be aware of.
I feel like if we start doing this we can add examples for every JavaScript framework out there...

I would usually agree, but Angular is super popular, so why not. If we get many more I'll just move them to links at the bottom instead.


sx1262 support

Hi, I will be getting my T3-S3 devices with sx1262 lora module in couple of weeks. I don't see any code related to sx1262 in the repo, and one post from March about it, so I assume work is still in progress. How can I help to take it forward?
Do we have anything that needs to be tested on this module? - I can do that when my hardware arrives.
Do we have some code that needs to be completed? - I can give it a try.
Thanks!

My hardware has arrived. Let me know if I can help with anything.

I have good news, yesterday I wrote an sx1262 driver that is API compatible
with the one in FreakWAN and today I’ll start incorporating it to FreakWAN,
so soon we will be able to support such devices.
Salvatore Sanfilippo
"My task is not difficult; all I would need is to be immortal to accomplish
it." -- Jorge Luis Borges.
On Tue, 30 Jan 2024 at 05:43, Siddharth Karandikar @.***>
wrote:

My hardware has arrived. Let me know if I can help with anything.
—
Reply to this email directly, view it on GitHub
https://github.com/antirez/freakwan/issues/13#issuecomment-1916065685,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAQAYDGGGCUABEYRNDSEVDYRB277AVCNFSM6AAAAABAWJDVASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJWGA3DKNRYGU
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Awesome timing. 😃
I will try it out immediately after you finish with your integration work. Thanks a lot!

Thanks! For now the driver lives here: https://github.com/antirez/t-watch-s3-micropython, but the official source will be this repository soon. For the T3-S3 it should be very simple because the display and all the rest is likely the same? I'm not sure. Anyway once we support the t-watch here, to port to T3-S3 will be a matter of messing a bit around. Cheers.

Dear @siddharth178, now in the t-watch branch there is everything you should need to make it working. Please, if you are able to do a devices/device_config.py for your device (see the examples inside), I would love if you could contribute yours for your device. I'm here if you need any help. Thanks.

if you are able to do a devices/device_config.py for your device - yes, definitely. i will give it a try soon. haven't got my setup working with devices yet.

Thanks, in the meantime everything got merged into the main branch.
On Thu, Feb 1, 2024 at 4:20 PM Siddharth Karandikar <
@.***> wrote:

if you are able to do a devices/device_config.py for your device - yes,
definitely. i will give it a try soon. haven't got my setup working with
devices yet.
—
Reply to this email directly, view it on GitHub
https://github.com/antirez/freakwan/issues/13#issuecomment-1921573670,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAQAYFHLVBAX722VV3APJLYROXD5AVCNFSM6AAAAABAWJDVASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRRGU3TGNRXGA
.
You are receiving this because you commented.Message ID:
@.***>

--
Salvatore Sanfilippo
"My task is not difficult; all I would need is to be immortal to accomplish
it." -- Jorge Luis Borges.

I am not able to flash my board (LILYGO T3S3 v1.2) with pre-built firmware from micropython's site.
Here is actual command and corresponding error. (I tried both 0x0000 and 0x1000 addresses as it was discussed in on of LILYGO threads).
~/lilygo-t3s3$ sudo -E env PATH=$PATH esptool.py -b 115200 --port /dev/ttyACM0 write_flash -z 0x1000 LILYGO_TTGO_LORA32-20240105-v1.22.1.bin
esptool.py v4.7.0
Serial port /dev/ttyACM0
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.1)
Features: WiFi, BLE, Embedded Flash 4MB (XMC), Embedded PSRAM 2MB (AP_3v3)
Crystal is 40MHz
MAC: dc:54:75:e1:9c:44
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Unexpected chip id in image. Expected 9 but value was 0. Is this image for a different chip model?

A fatal error occurred: LILYGO_TTGO_LORA32-20240105-v1.22.1.bin is not an ESP32-S3 image. Use --force to flash anyway.

If the firmware is not available, can it be built for ESP32S3?
Where can I find instructions to do the same?

Don’t bother with the Firmware for the old boards, just install the generic
MicroPython firmware for the esp32 s3 following the instructions on the
MicroPython page.
Salvatore Sanfilippo
"My task is not difficult; all I would need is to be immortal to accomplish
it." -- Jorge Luis Borges.
On Sun, 4 Feb 2024 at 06:29, Siddharth Karandikar @.***>
wrote:

I am not able to flash my board (LILYGO T3S3 v1.2) with pre-built firmware
https://micropython.org/download/LILYGO_TTGO_LORA32/ from micropython's
site.
Here is actual command and corresponding error. (I tried both 0x0000 and
0x1000 addresses as it was discussed in on of LILYGO threads).
~/lilygo-t3s3$ sudo -E env PATH=$PATH esptool.py -b 115200 --port /dev/ttyACM0 write_flash -z 0x1000 LILYGO_TTGO_LORA32-20240105-v1.22.1.bin
esptool.py v4.7.0
Serial port /dev/ttyACM0
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.1)
Features: WiFi, BLE, Embedded Flash 4MB (XMC), Embedded PSRAM 2MB (AP_3v3)
Crystal is 40MHz
MAC: dc:54:75:e1:9c:44
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Unexpected chip id in image. Expected 9 but value was 0. Is this image for a different chip model?
A fatal error occurred: LILYGO_TTGO_LORA32-20240105-v1.22.1.bin is not an ESP32-S3 image. Use --force to flash anyway.
If the firmware is not available, can it be built for ESP32S3?
Where can I find instructions to do the same?
—
Reply to this email directly, view it on GitHub
https://github.com/antirez/freakwan/issues/13#issuecomment-1925587522,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAQAYEURVUWHHN2HQ6SED3YR4MDXAVCNFSM6AAAAABAWJDVASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVGU4DONJSGI
.
You are receiving this because you commented.Message ID:
@.***>

Thanks a lot @antirez
Atleast I could make some progress on flashing and getting micropython working on my board. Another thing that I was doing wrong was the uf2 image, I needed the normal .bin image and with the SPIRAM support. I didn't know my board has that. I have to understand lot more about this, but for now basic things look to be working.
$ sudo -E env PATH=$PATH esptool.py --chip esp32s3 -b 115200 --port /dev/ttyACM0 write_flash -z 0 ~/lilygo-t3s3/ESP32_GENERIC_S3-SPIRAM_OCT-20240105-v1.22.1.bin
esptool.py v4.7.0
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-S3 (QFN56) (revision v0.1)
Features: WiFi, BLE, Embedded Flash 4MB (XMC), Embedded PSRAM 2MB (AP_3v3)
Crystal is 40MHz
MAC: dc:54:75:e1:9c:44
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x0018efff...
Compressed 1631504 bytes to 1068949...
Wrote 1631504 bytes (1068949 compressed) at 0x00000000 in 14.8 seconds (effective 882.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

$ sudo ./talk32 /dev/ttyACM0 repl
Entering REPL mode: type "~~.." or CTRL+X to exit.

MicroPython v1.22.1 on 2024-01-05; Generic ESP32S3 module with Octal-SPIRAM with ESP32S3
Type "help()" for more information.
>>> 1 + 2
3
>>> import machine
>>> machine.freq()
240000000
>>> import time
>>> time.sleep(1)
>>> time.localtime()
(2000, 1, 1, 0, 4, 14, 5, 1)

@siddharth178 good! Starting from a working MicroPython, I believe you will have FreakWAN running very soon. I will document that this version is the best for the T3-S3 version. Thanks.

P.S. please note that this version of MicroPython is known to have issues with BLE, but you will be able to use FreakWAN via the Serial interface without issues. I'm also checking what is in your board to understand the hardware differences with the models we support. The SX1262 is not a problem now, but other things may be different as well.

Another info: the BUSY pin in your board should be pin 36. It is not in the image in the LILYGO site, but I found it in the example code.

@siddharth178 finally we have the T3-S3 support :) Cheers.


Small suggestion: Key controls for sandspiel

Key 1-5: Change size brush

heres a script for this that you can paste into chrome's console
document.addEventListener('keydown', function(event) {
  if(event.key === '1') {
    document.querySelector("#ui > .sizes > button:nth-child(1)").click();
  }
});

document.addEventListener('keydown', function(event) {
  if(event.key === '2') {
    document.querySelector("#ui > .sizes > button:nth-child(2)").click();
  }
});

document.addEventListener('keydown', function(event) {
  if(event.key === '3') {
    document.querySelector("#ui > .sizes > button:nth-child(3)").click();
  }
});

document.addEventListener('keydown', function(event) {
  if(event.key === '4') {
    document.querySelector("#ui > .sizes > button:nth-child(4)").click();
  }
});

document.addEventListener('keydown', function(event) {
  if(event.key === '5') {
    document.querySelector("#ui > .sizes > button:nth-child(5)").click();
  }
});

thx

thx

https://pastebin.com/xtL5TW55 heres an updated script that checks to see if a menu is open before doing the action

Was thinking about key shortcuts for selecting elements and have two alt ideas:

A: Mouse Scroll: Select elements that is at behind/front of the selected elements. If scrolling while not selecting elements
(Wind to Rocket), Selects wind. When selected element back to wind or next to rocket will make a loop.
B: Wasd/Arrow keys: Select elements that is next to selected element by pressing right arrow or D, etc...

B sounds a lot more controllable, although A would be quicker if gotten
used to, I might try to make a script to test these out when I get a chance
On Thu, Jan 5, 2023 at 3:59 PM EdHerrera123 @.***>
wrote:

Was thinking about key shortcuts for selecting elements and have two alt
ideas:

A: Mouse Scroll: Select elements that is at behind/front of the
selected elements. If scrolling while not selecting elements
(Wind to Rocket), Selects wind. When selected element back to wind or
next to rocket will make a loop.
B: Wasd/Arrow keys: Select elements that is next to selected
element by pressing right arrow or D, etc...

—
Reply to this email directly, view it on GitHub
https://github.com/MaxBittker/sandspiel/issues/248#issuecomment-1372832298,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AO4YSA5I62XYRFF2AH7WOFDWQ475RANCNFSM6AAAAAATLXDDXI
.
You are receiving this because you commented.Message ID:
@.***>


WMFJS issue when importing as a module

Error: jquery__WEBPACK_IMPORTED_MODULE_0__(...).svg is not a function
When trying to open RTF files that use WMFJS, I get this error. It occurs at: https://github.com/tbluemel/rtf.js/blob/master/src/wmfjs/Renderer.ts#L50
Seems to be that jquery.svg.js isn't getting imported correctly?
And this only occurs if I import rtf.js as a module. If I load the scripts from HTML there is no problem.

Could you please post a minimal sample which reproduces this issue? I have used rtf.js as a module successfully with webpack in the past (which is what the code sample in the Getting Startet guide was taken from), but it may well be that it doesn't work correctly with other bundlers (specifically because of the jquery plugins).

Yeah we're using ember which uses broccoli could be related to that
On Tue, Jul 24, 2018, 4:06 PM Tom Zöhner<EMAIL_ADDRESS>wrote:

Could you please post a minimal sample which reproduces this issue? I have
used rtf.js as a module successfully with webpack in the past (which is
what the code sample in the Getting Startet guide was taken from), but it
may well be that it doesn't work correctly with other bundlers
(specifically because of the jquery plugins).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/tbluemel/rtf.js/issues/42#issuecomment-407534684, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGfl6A2-9WNWCwQPFbrBYvq6DM1Tl79tks5uJ35EgaJpZM4VdIX9
.

I just created a little repo to show how it works with webpack at https://github.com/zoehneto/rtf.js-sample-webpack/tree/master . I'm not familiar with ember / ember cli so I need a minimal reproduction to help you here.

I'm getting the same problem when trying to import the module into a project with vuejs and electron-builder ... To reproduce:

install vue-cli 3
create new project with vue-cli 3: vue create newproject
enter the project folder: cd newproject
add electron-builder (select eletron 5.0): vue add electron-builder
import rtf.js into the background.js file: import {EMFJS, RTFJS, WMFJS} from 'rtf.js';
start the development server: npm run electron: serve
I got this error:
App threw an error during load
TypeError: $ .extend is not a function
    at Object.eval (webpack: ///./node_modules/rtf.js/dist/jquery.svg.js?: 36: 7)
    at eval (webpack: ///./node_modules/rtf.js/dist/jquery.svg.js?: 13: 37)
    at eval (webpack: ///./node_modules/rtf.js/dist/jquery.svg.js?: 16: 2)
    at Object .. / node_modules / rtf.js / dist / jquery.svg.js (C: \ ... \ ... \ .... \ dist_electron \ index.js: 1318: 1)
    at webpack_require (C: \ ... \ ... \ ... \ .... \ dist_electron \ index.js: 20: 30)
    at webpackUniversalModuleDefinition (webpack: ///./node_modules/rtf.js/dist/EMFJS.bundle.js?: 3: 28)
    at eval (webpack: ///./node_modules/rtf.js/dist/EMFJS.bundle.js?: 5: 3)
    at Object .. / node_modules / rtf.js / dist / EMFJS.bundle.js (C: \ ... \ ... \ .... \ dist_electron \ index.js: 1285: 1)
    at webpack_require (C: \ ... \ ... \ ... \ .... \ dist_electron \ index.js: 20: 30)
    at webpackUniversalModuleDefinition (webpack: ///./node_modules/rtf.js/dist/RTFJS.bundle.js?: 3: 103)

@Valterrsj I followed your steps:

npm install -g @vue/cli

vue create newproject

cd newproject/

vue add electron-builder

npm i rtf.js

add import {EMFJS, RTFJS, WMFJS} from 'rtf.js'; to background.js

npm run electron:serve

Which gives me the following output, suggesting that everything works just fine:
><EMAIL_ADDRESS>electron:serve /home/zoehneto/tmp/newproject
> vue-cli-service electron:serve

 INFO  Starting development server...
 98% after emitting CopyPlugin

 DONE  Compiled successfully in 1971ms                                                                                6:08:18 PM

  App running at:
  - Local:   http://localhost:8080/
  - Network: http://<IP_ADDRESS>:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

⠴  Bundling main process...

 DONE  Compiled successfully in 810ms                                                                                6:08:19 PM

  File                      Size                     Gzipped

  dist_electron/index.js    2838.34 KiB              1182.02 KiB

  Images and other types of assets omitted.

 INFO  Launching Electron...

I assume you added some code which actually uses rtf.js in order to get your error and didn't just import the library (without that code I can't reproduce your issue). But if I understand this vue / electron project setup correctly, the background.js script is actually run by node.js and only starts the browser side of electron (hence the new BrowserWindow) meaning that running rtf.js there will not work as you don't have the DOM available, which is needed by jQuery (might be why it doesn't load). So either you run rtf.js in the BrowserWindow created in background.js or if it needs to happen on the node side you have to use jsdom as described here.

Thank you! I solved it importing directly into render component as you said!!


Add support for site collection app catalog

Add support for site collection app catalog capability. Enable and disable at site collection URL.

Thanks for the suggestion @VesaJuvonen! We already have two commands spec'ed for this assigned to @andrewconnell: #63 and #64. I'll close this task so that we can track the separate commands, ok?

That's what happens if you don't double check the second page in the issue list view... thx for the update and good that this is moving forward.

Nevertheless, appreciate the suggestion 👏

Appreciate your comment as well. :-D


Azure Dev Ops version control

This article seems really out of date. I am using Azure Dev Ops and for the life of me, I cannot find version control.
It might be nice if there were tabs for the different platforms (azure dev ops, tfs, etc)

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

ID: 024e4ed9-cf8d-155f-5e4a-73c2effaaed8
Version Independent ID: f19c0538-4aae-b3b4-82b9-422e76723b01
Content: Run Git commands in a script - Azure Pipelines
Content Source: docs/pipelines/scripts/git-commands.md
Product: devops
GitHub Login: @andyjlewis
Microsoft Alias: alewis

Second this, the screenshots on the "Azure DevOps Services" tab look to be from TFS 2015!

Second this, the screenshots on the "Azure DevOps Services" tab look to be from TFS 2015!


Not able to login via SwiftUI app

I have been trying to implement RTM in a SwiftUI app but it keeps giving me an error code 3.  Below is the code I am currently using (I instantiate the class as a @StateObject and pass the instance back to represent the rtm and channel delegates)..
`class AgoraChatOO: NSObject, ObservableObject {
@Published var chatMessages: [ChatMessage] = []
@Published var kit: AgoraRtmKit?
@Published var rtmChannel: AgoraRtmChannel?

func updateKit(appId: String, delegate: AgoraRtmDelegate, channelDelegate: AgoraRtmChannelDelegate) {

        kit = AgoraRtmKit(appId: appId, delegate: delegate)

        guard let kit = kit else { return }

    kit.login(byToken: "my_tokeni", user: UIDevice.current.name) { [unowned self] (error) in

            if error != .ok {
                print("Error logging in: ", error.rawValue)
            } else {
                self.rtmChannel = kit.createChannel(withId: "testChannel", delegate: channelDelegate)

                self.rtmChannel?.join(completion: { (error) in
                    if error != .channelErrorOk {
                        print("Error joining channel: ", error.rawValue)
                    }
                })
            }
        }
    }

}`

Login error code 3 means that there's an invalid parameter. It's likely either the appId or UIDevice.current.name.
Could you print out what that UIDevice name is? Not all characters are allowed there, and there's a limit of 64 bytes:
https://docs.agora.io/en/Real-time-Messaging/API Reference/RTM_oc/Classes/AgoraRtmKit.html#//api/name/loginByToken:user:completion:

Hi @maxxfrazer you were absolutely correct..I changed it to a different string and it worked.  Did have a couple of other issues pop up though.  I could not get it to logon using a token, but was able to with a nil token using a different AppId.  The other issue now is the delegate methods are not being called after sending a message to the channel.  Would it be possible for you to create a simple SwiftUI demo for RTM (sorry I know it's a big ask).  Also wanted to say I'm a big fan of your Agora and RealityKit tutorials and articles.


Is it unfair to resize first and then centercrop when inferring?

Why resize at the centercrop size first, so that the pixels on the periphery of the image cannot be recognized, is this unfair? (And the length and width of the data in mvtec are the same, no need for centercrop)

I also have this questions. In my case, I am working with high-resolution rectangular images.
I am thinking to create a tiling algorithm that will crop my image into smaller parts and feed it for feature extraction.


Change / chat command syntax to be /<action> <resource> instead of /<resource> <action>

Summary of the new feature / enhancement
Currently we have an inconsistency in / commands as far as syntax structure. We have action commands like /like, /retry and /refresh but also have commands that start with the resource like /code and /agent. For consistency and ease of future expansion we should consider switching to a more   grammar.
Proposed technical implementation details (optional)
Switch to /<action> <resource> format. This means changing exsisting ones like /code copy. Some proposed ones I can thing of are:

Command
Description

/copy
Copies entire response + code

/copy code
Copies code only if n is not specified and n step if specified

/copy chat
Copies the chat only and not the code

/save
Saves entire response + code

/save code
Saves code only if n is not specified and n step if specified

/save chat
Saves the chat only and not the code

/edit
Opens the entire response in users default editor

/edit code
Opens specified code block or whole block in users default editor

/edit chat
Opens just the chat contents in users default editor

/config
Opens the config.json file in the .aish folder

/config
Opens specified agents config file in users default editor

/use
Switches users current agent

/list
Lists users current agents

/replace param
Goes through user input form for editing placeholder parameter values

/post
Posts just the code to the working terminal

Very open to ideas and suggestions on any of these commands, I hope to have an open discussion on this!

In my opinion, there are 2 kinds of commands and we should use different syntax for them respectively:

An action to take
Manage a resource

For the 1st, naturally it should be a verb.
For the 2nd, I think it should be /<name-of-resource> <action>, just like Az CLI commands, e.g. vm create

One big problem is that for agents creating their own commands like the /gpt command would not work in this case.


Fix GetBlockchainInfoAsync() for Bitcoin 0.13

Some coins still based on Bitcoin 0.13 (e.g. Zcoin). In Bitcoin 0.13, the fields initialblockdownload, size_on_disk and since in bip9_softforks is absent.

hey, this is a breaking change so I won't accept it.
However, you can do a test whether the field exists, and if not, set a default value.

Fixed.


Not using ScaledGraphics class degrades quality at higher zoom

In order to fix #621 we removed the use of the org.eclipse.draw2d.ScaledGraphics class. However, looking closer at some zoomed diagrams there are now new issues:

The outer rectangle of a box is misaligned on right and bottom sides
Fonts are not smooth
Other artefacts
Fonts loaded via Display#loadFont() are not scaled and rendered correctly (see #628)

With ScaledGraphics at 800% zoom:

Without ScaledGraphics  at 800% zoom:

Here's an example of a font zoomed in at 800%:
With ScaledGraphics at 800% zoom:

Without ScaledGraphics at 800% zoom:

I'm beginning to think that Draw2d uses ScaledGraphics for a good reason.
What we could do is copy ScaledGraphics and have our own version that we could hack and use that one (we already do that with the Thumbnail class). Caveat - I don't know what needs changing ScaledGraphics in to fix the original font clipping issue.

Another solution is to re-instate ScaledGraphics and use the workaround for TextFlow as mentioned here:
https://www.eclipse.org/forums/index.php?t=msg&th=154575&goto=487928&#msg_487928
fTextFlow = new TextFlow() {
    @Override
    protected void paintFigure(Graphics g) {
        g.setClip(getBounds().getCopy().resize((int)(g.getAbsoluteScale()*3), 0));
        super.paintFigure(g);
    }
};

Another solution is to re-instate ScaledGraphics and use the workaround for TextFlow

No because it doesn't solves the issue (rendering is also ugly and text is still truncated in several cases)

The outer rectangle of a box is misaligned on right and bottom sides

That's simply because we don't set a borderwidth, ScaledGraphics was introducing an issue that Archi adressed in drawing figures by substracting one pixel out of dimensions, but in fact the real fix is to shrink dimension by one in every directions and draw a 1px border.

Fonts are not smooth

Are we sure that the underlying graphics is configured as "advanced" and uses antialias ?
FWIW, If I have to choose, I prefer having a non smooth font at 800% than a smooth but truncated one.

Other artefacts

For relationships, that's in fact exactly the same in SVG output (at least on Linux), so this makes me think that the real issue lies in the figure drawing code, not the graphics itself (it was just invisible when using ScaledGraphics, but I guess for bad reasons)

Fonts loaded via Display#loadFont() are not scaled and rendered correctly (see #628)

I have to look at this one in detail, but this might be acceptable in the short/mid terme to explain that sideloading fonts is an experimental figure with known limitations which should be hopefuly solved in future release.

That's simply because we don't set a borderwidth, ScaledGraphics was introducing an issue that Archi adressed in drawing figures by substracting one pixel out of dimensions, but in fact the real fix is to shrink dimension by one in every directions and draw a 1px border.

If we edit RectangleFigureDelegate to do that, it still causes misalignment when exporting to SVG.

Are we sure that the underlying graphics is configured as "advanced" and uses antialias ?

Draw2D is doing the drawing on the underlying graphics for figures, not us. But yes they are on. Also, for fonts, I think ScaledGraphics is better at scaling fonts than SWTGraphics.

think that the real issue lies in the figure drawing code

I tried different things for connection Figures, but it still looks the same.

I don't know what to do about this any more. I tried to improve the figures by adjusting the bounds of the each figure but can never get a solution.
Here's an Application Component as it is now (no ScaledGraphics class):

And here's the SVG export:

Here it is with some x, y, width, height adjustments made in the figure to compensate:

But here's the SVG export:

For comparison, here's using ScaledGraphics:
View:

SVG:

It seems that ScaledGraphics has some advantages but is getting something wrong when rendering scaled fonts. I think it is getting the distance between characters too wide so the overall width is too wide and this is then being clipped.

Here's an experiment setting the figure's line width to 1:

But here's the SVG export:

Here's the same experiment setting the line width to 1 but using ScaledGraphics:
View:

SVG:

I wondered whether Modelio uses ScaledGraphics so I looked at their source code. They have a class called ScalableFreeformLayeredPane2 which extends ScalableFreeformLayeredPane and they also have the same workaround as we are now using in our ExtendedScalableFreeformLayeredPane:
    protected void paintClientArea(Graphics graphics) {
        if (getChildren().isEmpty()) {
            return;
        } else if (getScale() == 1.0) {
            super.paintClientArea(graphics);
        } else {
            boolean optimizeClip = getBorder() == null || getBorder().isOpaque();
            if (!optimizeClip) {
                graphics.clipRect(getBounds().getShrinked(getInsets()));
            }

            graphics.scale(getScale());

            graphics.pushState();
            paintChildren(graphics);
            graphics.popState();
            graphics.restoreState();
        }
    }

Modelio have a class ZoomableLineBorder which sort of does what we have tried in our experiments - shrinking the bounds. Also not the use of getWidth() % 2 which reduces width and height only for odd line widths.
    public void paint(IFigure figure, Graphics graphics, Insets insets) {
        AbstractBorder.tempRect.setBounds(getPaintRectangle(figure, insets));
        if (getWidth() % 2 != 0) {
            AbstractBorder.tempRect.width--;
            AbstractBorder.tempRect.height--;
        }
        AbstractBorder.tempRect.shrink(getWidth() / 2, getWidth() / 2);

        ZoomDrawer.setLineWidth(graphics, getWidth());
        graphics.setLineStyle(getStyle());

        if (getColor() != null) {
            graphics.setForegroundColor(getColor());
        }
        graphics.drawRectangle(AbstractBorder.tempRect);
    }

Aha! I remembered something in ExtendedGraphicsToGraphics2DAdaptor:
/**
 * JB fix - decrease width and height by 1 pixel
 */
@Override
public void fillRectangle(int x, int y, int width, int height) {
    Rectangle2D rect = new Rectangle2D.Float(x + transX, y + transY, width - 1, height - 1);

    checkState();
    getGraphics2D().setPaint(getColor(getSWTGraphics().getBackgroundColor()));
    getGraphics2D().fill(rect);
}

/**
 * JB fix - decrease width and height by 1 pixel
 */
@Override
public void fillRoundRectangle(Rectangle rect, int arcWidth, int arcHeight) {
    RoundRectangle2D roundRect = new RoundRectangle2D.Float(rect.x + transX, rect.y + transY, rect.width - 1, rect.height - 1, arcWidth,
            arcHeight);

    checkState();
    getGraphics2D().setPaint(getColor(getSWTGraphics().getBackgroundColor()));
    getGraphics2D().fill(roundRect);
}

These are not needed now.

But there are other issues now we are not using ScaledGraphics such as the icon drawing:

That is like that even at 100%

It looks like most of the Figures will have to be re-done.

I've created a branch figure-fixes with a few fixes for the Figures. There's more to be done.

Here's an example of a font zoomed in at 800%:
With ScaledGraphics at 800% zoom:

Without ScaledGraphics at 800% zoom:

I just checked the quality of zoomed fonts in Modelio. Same thing, as they also don't use ScaledGraphics

I've done some more fixes for some Figures in the figure-fixes branch.
For simple shapes like rectangles and rounded rectangles this was simply a case of shortening the width and height of a rectangle by 1 pixel both for the fill and for the outline (when we used ScaledGraphics we only did that for the outline).
However, I can't fix where we've used a PointList to draw polygons.
For example, AbstractMotivationFigure uses the same PointList for the fill and for the outline, and yet they are drawn differently:

The ScaledGraphics class has been tuned to draw graphics differently depending on the current scale factor and seems to do a better job. SWTGraphics doesn't do this.

It seems that a certain other Eclipse-based tool also has some problems when drawing at higher scale factors:

Ouch.

For example, AbstractMotivationFigure uses the same PointList for the fill and for the outline, and yet they are drawn differently:

In most of your attempts and test, borderwidth is not set, this is mostly why there are issues when zooming. In fact without a bordersidth set, there are several issues because the physical linewith on the screen is always 1 pixel and never zoomed while it should be.
So the only way I see to fix this is:

set a 1px border on figure
shrink the "drawing" dimensions by 1 unit (in all directions). This is the trick to fix the clipping which occures on the border itself
Check figure drawing code to remove any other dimensions adjustments which were created only to accomodate the fact that borderwidth was not set
When OK, check SVG related code to remove any other compensation factors introduced

And for an easier way to manage code, I would make sure that we have a private method to draw the figure which does is strictly based on a Rectangle (no shrinking), and then have the public draw method creating a Rectangle based on getting the figure dimensions shrinked by 1 and then calling the private method. This should then allow us to easily change the borderwith by using another value instead of 1 for shrinking (this value being related to the wanted borderwidth).
I did some experiments some weeks ago (which led me to the "BTW I find a way to fix the borderwidth issue" comment) and I was able to adjust borderwidth without impact on zoom (but I did test only on Business Actor at that time).
I'm a bit overloaded atm so can't test or contribute unfortunately :-(

I just checked the quality of zoomed fonts in Modelio. Same thing, as they also don't use ScaledGraphics

IMHO, such anti-aliasing issues are not a big deal. I think it is preferable (and hardly noticeable at zoom factors less than 200%) than having truncated text at most zoom factors.

Shrinking the bounds by 1 pixel will fix the clipping but there is a gap around the figure which causes a gap in the connection (I've shown the selection boxes here to show the overall shrinkage)

I didn't had this when I did test.
Is it visible even at 100% ?
So you experience clipping if you don't shrink ?

Is it visible even at 100% ?

Not really, but it is in SVG.

I've made progress on the Figures. I want to get us to where we were before removing ScaledGraphics. And once that is done we can think about setting line widths later.

Remove the minus 1 pixel width and height adjustments in ExtendedGraphicsToGraphics2DAdaptor
Make adjustments for width and height by minus 1 pixel in some figures
Use org.eclipse.swt.graphics.Path for drawing fills instead of org.eclipse.draw2d.geometry.PointList.

The key is to use org.eclipse.swt.graphics.Path for drawing where possible.
Here's an example of AbstractMotivationFigure before these changes. This uses Graphics.fillPolygon(points):

And this one uses Graphics.fillPath(path):

I wrote a utility method to convert the co-ordinates of org.eclipse.draw2d.geometry.PointList into a org.eclipse.swt.graphics.Path.
By doing this we can draw with more accuracy.
All of this is in the figureFixes branch.
I'll release another beta.

Damn.
I've just tested on Mac and there is a difference in how lines are drawn on Mac when not using ScaledGraphics. On Mac all lines have a width of 1 and look like this:

When we used ScaledGraphics` it looked like this:

This means that Mac users will see an uneven outline in the figures. Adding bounds.shrink(1, 1) helps with the unevenness but there is a small gap visible between the figure and any connections. The only thing that looks any good is if lineWidth is set to 2 and to use bounds.shrink(1, 1)

Does this happen only when zooming? Can you do a screenshot of a figure at 100%, 200% and 300%.

When we used ScaledGraphics it looked like this:

This as no borderwidth. Do you means that even with a borderwidth defined, ScaledGraphics was drawing this ?
For me what you get is the "usual" issue: when drawn, the border is centered on the defined coordinate, thus it spans accross clipping area.
Let's say you have a figure from (10,10) to (20,20). When drawing a 3px border, it ends up being drawn (thats an example and not perfectly accurate information) from (9,9) to (21,21) because there are 3px to draw the inner part of the box will be (11,11) to (19,19).
TBH, it seems that draw2d always put the bottom & right borders inside the clipping area while the top & left borders are "on" the limit of the clipping area. So we have to see when (which borders) to remove what (my guess is floor(borderwidth/2)+1) on which OS (in case it is OS dependant).

Does this happen only when zooming?

Yes, at all scales.
What I mean is there is now a difference between the non-specified line width on Windows and Mac. If we don't set the line width on Windows we get that thin line which is always the same at all zoom levels, but on Mac the "default" line width is 1 (equivalent to graphics.setLineWidth(1))

I have found a method to draw a rectangle with a specified line width that doesn't require any shrinking. Again, it means that we must do all drawing using org.eclipse.swt.graphics.Path
bounds.width--;
bounds.height--;

float lineWidth = 1;
float offSet = lineWidth / 2;
graphics.setLineWidthFloat(lineWidth);

Path path = new Path(null);
path.moveTo(bounds.x + offSet, bounds.y + offSet);
path.lineTo(bounds.x + bounds.width - offSet, bounds.y + offSet);
path.lineTo(bounds.x + bounds.width - offSet, bounds.y + bounds.height - offSet);
path.lineTo(bounds.x + offSet, bounds.y + bounds.height - offSet);
path.lineTo(bounds.x + offSet, bounds.y);
graphics.drawPath(path);
path.dispose();

We reduce width and height by 1 pixel
We set the line width to 1 (or 2 or 3)
We divide the line width by 2 to get a pixel offset
We draw a rectangle using the bounds x, y, width and height BUT add and subtract the offSet for x and y

In the case of a line width of 1, the offset is 0.5. This works for all line widths. And we don't need to use bounds.shrink()

I've committed the changes to RectangleFigureDelegate in the figureFixes branch.
Try it for rectangle figures. It works on Windows and Mac.

So it seems to me that if we are going to dispense with using ScaledGraphics and Mac is setting the line width to 1 whether we like it or not, we must now find a way to draw all figures with a line width of 1 on all platforms and no long use the "magic" line width that we have been using.

However, I don't think it will be possible to do this for figures other than rectangles. For example, there is no equivalent Path method of graphics.drawRoundRectangle() which takes integers.

Fuck! I may have found the solution.... (look at the SWTGraphics source code...)

However, I don't think it will be possible to do this for figures other than rectangles. For example, there is no equivalent Path method of graphics.drawRoundRectangle() (this uses integers not float). It does have addArc() methods but these would have to be calculated.

Where there's Math & Geometry there's a way... with me ;-)

look at the SWTGraphics source code...

But where ?????????

But where ?????????

public void translate(float dx, float dy)

public void translate(float dx, float dy)

Seems like you want to translate(offset, offset) or something similar ?

Seems like you want to translate(offset, offset) or something similar ?

Yes. The problem is that in most cases we want x and y to be 0.5 pixel indented. With translate we can do this.
Check out rectangle and rounded rectangle figures in the latest commit in figure-fixes branch ;-)

So far, this seems to be working. So hopefully we'll be able to achieve our goal of setting line width...

There are fundamental differences between Mac and Windows for drawing when not using ScaledGraphics.
On Mac, setting the lineWidth to 2 and calling Graphics#drawRectangle()or  Graphics#drawRoundRectangle()or Graphics#drawEllipse() requires that you also have to call bounds.shrink(1, 1). But if you draw the same rectangle using a Path then you have to call Graphics#translate(x, y).
On Windows, you have to call Graphics#translate(x, y) in all cases.

And it depends on the line width.
So if we use Graphics#drawRectangle(), Graphics#drawRoundRectangle() or Graphics#drawEllipse() we have to do this:
float lineWidth = 2.0f;

if(PlatformUtils.isMac() && lineWidth > 1) {
    graphics.setLineWidthFloat(lineWidth);
    bounds.shrink(lineWidth / 2, lineWidth / 2);
}
else {
    bounds.width -= lineWidth;
    bounds.height -= lineWidth;
    graphics.setLineWidthFloat(lineWidth);
    graphics.translate(lineWidth / 2, lineWidth / 2);
}

But for Archi 4.7 we should only use line width of 1 fixed internally until we can sort this stuff out.

There are fundamental differences between Mac and Windows for drawing when not using ScaledGraphics.

On Mac, setting the lineWidth to 2 and calling Graphics#drawRectangle()or Graphics#drawRoundRectangle()or Graphics#drawEllipse() requires that you also have to call bounds.shrink(1, 1). But if you draw the same rectangle using a Path then you have to call Graphics#translate(x, y).

Actually, it's the same on all platforms for these methods.

Cancel all of those last three messages and slap me round the head. I had hard coded a "1" for line width somewhere...

Right then.
I've re-written the code for all of the Figures (yes, it was a pain in the butt). All figures are now drawn with a line width of 1. It also works when setting the line width to 2 or 3 (any more than that looks silly.)
I've tested all of them at different zoom levels and exporting to SVG.
Let's test this and hope there are no more issues...
All in the figure-fixes branch.

Great. I'll test tonight !

Bear in mind a few small caveats. These are things that we are going to have to accept as a small compromise. The thing is, though, as we are no longer using ScaledGraphics then we have to draw all figures with an actual line width because Mac is not using the "magic" line width (defaults to 1 and looks terrible).
So our choices are:

Go back to using ScaledGraphics and try and fix the text clipping issue
Don't use ScaledGraphics and keep the "magic" line width but it looks terrible on Mac
Don't use ScaledGraphics and set default line width to 1 and use Graphics#translate() to compensate

Caveat:

Graphics#translate() is called when setting the line width. This will ensure outlines are placed correctly but it means the fill colour is indented (a bit like calling Bounds#shrink). You won't see this as the outline is drawn on top of the fill, but you will see it if you set the outline opacity to zero. Tough luck on that. I tried to draw the fill before calling Graphics#translate() for the outline but it causes over-spill on some figures and when exporting to SVG.

Here's the code that does it:
bounds.width -= lineWidth;
bounds.height -= lineWidth;
graphics.setLineWidthFloat(lineWidth);
graphics.translate(lineWidth / 2, lineWidth / 2);

Even without having tested this latest version, I choose option 3 as it is for me what should have been the right behavior from the begining if we didn't had to cope with eclipse/ScaledGraphics issues.

I agree. I've tested it and it's OK. Given the nature of Draw2d we will always have to compromise somewhere. I think we do a pretty good job at making the best of what we have to deal with.
A small reminder of how it could be done... ;-)

as it is for me what should have been the right behavior from the begining

It only took 10 years... ;-)

So our choices are:

Go back to using ScaledGraphics and try and fix the text clipping issue
Don't use ScaledGraphics and keep the "magic" line width but it looks terrible on Mac
Don't use ScaledGraphics and set default line width to 1 and use Graphics#translate() to compensate

Actually, this is a 4th choice:

Go back to using ScaledGraphics and fix the text clipping issue and set the default line width to 1 using Graphics#translate()

I only mention it to point out that the line width fix using Graphics#translate() works both with and without ScaledGraphics.

Actually, this is a 4th choice:

Yes... but no ;-) because it is (almost) impossible to fix the font clipping issue.

I only mention it to point out that the line width fix using Graphics#translate() works both with and without ScaledGraphics.

That's good new though.

(I'm not advocating for some of these choices, I just want to record them here so we know why we made these decisions)
BTW - you can actually set line widths to floats like 1.5 and 2.5 and it works.
Suggest this:

You test this
We issue a new beta
If it is all OK we could add a line width section to the Properties view (would need to decide what are reasonable limits, a line width greater than 3 or 4 is not a good look)

That's good new though.

Everything we do should work with or without ScaledGraphics...at 100% scale. ScaledGraphics is only used by GEF if scaling/zoom > 100:
	protected void paintClientArea(Graphics graphics) {
		if (getChildren().isEmpty())
			return;
		if (scale == 1.0) {
			super.paintClientArea(graphics);
		} else {
			ScaledGraphics g = new ScaledGraphics(graphics);

Suggest this:

You test this

I've just tested and everything seems ok. Good !

You can even set the line width to 0 and we are back to how it was before. Of course, line width of 0 doesn't work on Mac so it would have to be Windows/Linux only...

Some comments on Archi 4.7 beta 7 on this aspect.
I can still see some small drawing issues (here at 400%):

Arrowhead is a bit truncated on the left and is not fully filled
Rounded connection is not so rounded

I can also see some slight differences between 100% and other zoom factors (I guess this is because in this case we don't use translate() and other tricks.
All in all, there is nothing requesting any change in the short term. This is really acceptable for 4.7 final. I'll try to look at them for 4.7.1 or 4.8.

Arrowhead is a bit truncated on the left and is not fully filled

It was truncated before. The fill problem is because it is drawing an outline and a fill and they do not line up.
I created a new class com.archimatetool.editor.diagram.figures.connections.PathDrawnPolygonDecoration that helps with AggregationConnectionFigure and CompositionConnectionFigure but for the other connections I could not resolve them. I dug deep into the code and I think there are issues to do with clipping in one of the super classes of org.eclipse.draw2d.PolylineConnection
But connections need further investigation as you say.

Let's close this and open individual issues for each individual case.

A follow up to this.
Not using scaled graphics in Archi 4.7 has made an improvement to connections that have dots/dashes when exporting to an image at scales greater than 100%, In Archi 4.6 the dots/dashes didn't scale when exporting at higher scales.
Here's an image export at 200% from Archi 4.6:

And here's the same image export at 200% from Archi 4.7:


fix: depend_on_referenced_packages

What

Fixes: #1831
path & path_provider were in the dev_deps eventhough we used them at runtime
We use some path_provider & path files which are not excluded from the main files in tests. Ignored the linting rules there.

P0: This blocks merging of other PR's

Codecov Report

Merging #1841 (e1c783c) into develop (2ea0da3) will decrease coverage by 1.76%.
The diff coverage is 9.88%.

@@            Coverage Diff             @@
##           develop   #1841      +/-   ##
==========================================
- Coverage     8.86%   7.09%   -1.77%
==========================================
  Files          161     174      +13
  Lines         6623    7863    +1240
==========================================
- Hits           587     558      -29
- Misses        6036    7305    +1269

Impacted Files
Coverage Δ

...h_app/lib/cards/category_cards/abstract_cache.dart
0.00% <0.00%> (ø)

...p/lib/cards/category_cards/asset_cache_helper.dart
0.00% <0.00%> (ø)

...p/lib/cards/category_cards/raster_async_asset.dart
0.00% <0.00%> (ø)

...oth_app/lib/cards/category_cards/raster_cache.dart
0.00% <0.00%> (ø)

..._app/lib/cards/category_cards/svg_async_asset.dart
0.00% <0.00%> (ø)

...smooth_app/lib/cards/category_cards/svg_cache.dart
0.00% <0.00%> (ø)

...th_app/lib/cards/data_cards/image_upload_card.dart
0.00% <0.00%> (ø)

...es/smooth_app/lib/cards/data_cards/score_card.dart
4.54% <0.00%> (-0.22%)
:arrow_down:

...t_cards/knowledge_panels/knowledge_panel_card.dart
0.00% <0.00%> (ø)

...knowledge_panels/knowledge_panel_element_card.dart
0.00% <0.00%> (ø)

... and 119 more

Continue to review full report at Codecov.

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


Options tab is not accessible for YAML based pipelines

Hi! Any ideas why options tab is not accessible for yaml build definitions, what I normally does for GUI based build?
Build options in GUI based build definition:

Build options in YAML based build definition:

It is intentionally not available on yaml definitions. @melezhik which setting are you looking for on the options tab?

Hi @ericsciple , it is "Build number format".

@melezhik I was hoping you would say that one! Here is the yaml way of defining the build number: https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-name.md

👍

thanks @ericsciple , will try that one


Update README.md

Update typo and correct some directories/files name.
Change
{Describe what kind of change does this PR introduce}
Does this PR introduce a breaking change?
{...}
What needs to be documented once your changes are merged?
{...}
Additional Comments
{...}

Thank you @joaoluizSK ! :)


Create Kadanes_Algo

@maheshjainckd   I have been doing competitive Programming for the past few months. This is my first time applying for Hacktober fest. Please do assign me under Hacktober 2022.There are a lot of files that i would further like to contribute. Please do give me an opportunity.