TypeError: scroll.scrollTo is not a function

Hello 👋
I'm trying to create a button which, when clicked, will scroll the page down to a given Ref/ID/etc.
I'm struggling to figure out how to implement this from the docs.
What I have currently is roughly the following:
import { useLocomotiveScroll } from "react-locomotive-scroll";

const MyPage = () => {

const { scroll } = useLocomotiveScroll();

return (
    [...]
      <button onClick={(scroll) => scroll.scrollTo("#test", { duration: 1000 })>
        Click me
      </button>
      <DestinationDiv id="test" />
    [...]
  )
}

I've also initialized <LocomotiveScrollProvider> within my _app.js which wraps my entire app.
What am I doing wrong here?
I keep getting the following error: Unhandled Runtime Error: TypeError: scroll.scrollTo is not a function

I've also tried something like this, which would give me the following warning in the console:
react-locomotive-scroll: the context is missing. You may be using the hook without registering LocomotiveScrollProvider, or you may be using the hook in a component which is not wrapped by LocomotiveScrollProvider.
const { scroll } = useLocomotiveScroll();

  const handleScroll = () => {
    scroll.scrollTo(`#test`, { duration: 600 });
  };

return (
  <button onClick={handleScroll} />
)

I'm really at a loss here. Is there no way to scroll to a Ref or ID with this package..?

hey @AndrewNow i've figure out to something like this :
const handleScrollToId = (id) => { 		let elem = document.querySelector(id); 		scroll.scrollTo(elem, { 			duration: 1000, 			easing: [0.25, 0.0, 0.35, 1.0], 		}); 	}

Hi @AndrewNow I'm very sorry for the late reply. I created a codesandbox a while with an anchor to scroll to an ID in the page, hope it will help you : https://codesandbox.io/s/react-locomotive-scroll-vm8lt?file=/pages/index.js


[main] Update actions

Cron -knative-prow-robot
/cc knative/serving-writers knative/eventing-writers
/assign knative/serving-writers knative/eventing-writers
Produced by: knative-sandbox/knobots/actions/update-actions
Details:

/lgtm
/approve

/lgtm


Shim Promise.withResolvers() for ZQuery and minifront tests

Not sure how this got removed. This PR makes sure tests pass when running with vitest — e.g., pnpm vitest packages/zquery
Before

After

@turbocrime Ah, good catch! Thanks for calling that out. That was the issue. Closing this PR.


Reinstate curated list of InnerSourced and shared projects on Dev Guidelines website

With the move of Engineering@Trimble into Charlie we have lost the information identifying published InnerSourced projects which was on the original InnerSource page. I have had several people asking about this recently so I think it is important that we make this available again.
We could add this back into Charlie in the Engineering pages, however I don't think this is very discoverable anymore and the amount of information about InnerSource has been vastly reduced. So the other suggestion I have would be to move it to devguide alongside the rest of the InnerSource documentation
The page itself is just a Google Sheet right now (we can look at alternatives later) - it should be possible to include the sheet in a page using a Hugo shortcode - see here for some details on how this might be achieved.
Also open to other suggestions if anyone has any.

What about making it markdown based and coming up with inner source guidelines that involve making a PR to the dev guidelines for all inner source projects?
Also wonder if we should consider a different home for this than the dev guide (though a link from the dev guide would make sense).

Agree with Matthew that we should have list of innersourced (and open-source!) projects and agree with Jeff that the devguide isn't really the right place for it - though adding a link to wherever it does go would be a good idea.
I do really like the idea of building a nice new home for https://opensource.trimble.com and would like to work on that but I'd need help from multiple people to realize that project.


tf.matmul gives inconsistent results for same data

Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
binary
TensorFlow version
tf 2.8.0
Custom code
Yes
OS platform and distribution
windows 11
Mobile device
No response
Python version
3.9
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
cuda 11.8
GPU model and memory
No response
Current behavior?
I want to do matmul(A,transpose(A)) and matmul(B,transpose(B)). Here, B is just matrix A with additional rows. A is 8 by 512 and b is 64 by 512 with first 8 rows exactly as that of A.
let’s call
A_out = A matmul transpose(A), this is 8 by 8,
B_out = B matmul transpose(B), this is 64 by 64.
So the above matmul just dots each row of a matrix with all the other rows of the same matrix. So if the first 8 rows in B are same as A then the top-left, 8 by 8 sub matrix of B_out should exactly be same as A_out.
tf.matmul operation doesnt produce this. however numpy does.
Please look into this
Standalone code to reproduce the issue
import tensorflow as tf
from tensorflow.keras.layers import Embedding

# Set up
embedding = Embedding(36711,512,mask_zero=True)
example_sequence = tf.constant([36710,  5095,   466, 16678,     5,     3,  5152, 36711] + [0]*(64-8))

pad_embed    = example_sequence # input with padding       # has shape (64,)
no_pad_embed = example_sequence[:8] # input without padding # has shape (8,)

no_pad_embed = embedding(no_pad_embed) # shape (8,512)  # A
pad_embed    = embedding(pad_embed)    # shape (64,512) # B : has same first 8 rows as A

# Real problem: I want to use matmul to do A @ A.T and B @ B.T
pad_out    = tf.matmul(pad_embed,pad_embed, transpose_b=True)
no_pad_out = tf.matmul(no_pad_embed,no_pad_embed, transpose_b=True)
#print(pad_out[:8,:8])
#print(no_pad_out)

print(tf.reduce_all(pad_out[:8,:8]==no_pad_out)) # False, meaning that the upper left 8 by 8 submatrix of pad_out is not equal to no_pad_out

import numpy as np

# Real problem: I want to use matmul to do A @ A.T and B @ B.T
pad_embed   = pad_embed.numpy()
no_pad_embed= no_pad_embed.numpy()

pad_out    = np.matmul(pad_embed,pad_embed.T)
no_pad_out = np.matmul(no_pad_embed,no_pad_embed.T)
#print(pad_out[:8,:8])
#print(no_pad_out)

print(tf.reduce_all(pad_out[:8,:8]==no_pad_out)) # True, meaning 8 by 8 submatrix of pad_out equals no_pad_out

Relevant log output
tf.Tensor(False, shape=(), dtype=bool)
tf.Tensor(True, shape=(), dtype=bool)

Hi @syedhamzamohiuddin ,

I tried to run your code on Colab using TF v2.16.1, nightly and faced the same issue. Please find the gist here for reference.

Thank you!


[Bug] 1.9.7 betterdiscord

Before Reporting

[X] I found no existing issues matching my bug
[x] My issue is not caused by a plugin or theme

Describe the Bug
I have installed better Discord but I can't see my plugins and themes
Expected Behavior
No lagging
Steps To Reproduce
Install BetterDiscord 1.9.7
Operating System
Windows
Discord Version
Stable
BetterDiscord Version
1.9.7
Anything else?
No response

Do you have the plugins and themes tab but you cannot see the individual addons within them? Or can you not see them at all?
Can you see any of the BetterDiscord tabs in settings? Why is your 'expected behaviour' "no lagging" rather than "can see my addons".
Please be more specific, we cannot solve vague issues.

I can see it, it's the app's data, but I can't see it inside my Discord browser

I was downloaded from their website So better discords where you can install it

BetterDiscord is only for the desktop app. The installer you get from https://betterdiscord.app will only install to the desktop app, it will not let you install to the web client, or anything other than the three desktop release channels; Stable, PTB and Canary.
I highly suggest you join the support server for better help with this, make a post in the #support channel and include any screenshots that help illustrate your issue.

I think they are trying to say that their discord is missing this

Describe the Bug
I have installed better Discord but I can't see my plugins and themes
Expected Behavior
No lagging

To be fair, this is a really confusing issue report

I can see it, it's the app's data, but I can't see it inside my Discord browser

And this is not very indicative of the BetterDiscord section in the settings panel.

same for me

same for me

BetterDiscord is currently broken on Canary due to a version mismatch. This is not the same issue as what was described in this post.


fix: Lobby Remove button not showing for P1 when Server Only

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


Remove Twitter

URL
https://qgis.github.io/QGIS-Hugo/community/organisation/infrastructure/
On what type of device(s) did you see this bug?
No response
On which browser(s) are you seeing the problem?
No response
Other Browser
No response
Summary
Since we've left Twitter, this should be replaced by the new Mastodon account https://fosstodon.org/@qgis

Please find the proposed PR at #245
Regards.


Scrape sensors not initialised if they timeout on startup

Home Assistant release with the issue:
0.84.5

Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.):

Python virtual environment in Raspbian
Component/platform:

https://www.home-assistant.io/components/sensor.scrape/
Description of problem:
When Home Assistant starts up, if any Scrape sensors timeout accessing the URL, the sensors are not set up. This means that, even if this is an intermittent issue (e.g. a slow site) and it recovers, that sensor will not update. Even calling the homeassitant.update_entity service to force an update won't work, as the entity id does not exist.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
- platform: scrape
    name: bin_collection_grey
    resource: https://www.walsall.gov.uk/Waste/bincollections/Details/************?weeks=5
    select: "h3:nth-of-type(1) + table td:nth-of-type(2)"
    value_template: "{{ strptime((value | trim),'%d/%m/%Y').strftime('%Y-%m-%d') }}"

Traceback (if applicable):
2018-12-20 16:09:46 ERROR (Thread-12) [homeassistant.components.sensor.rest] Error fetching data: <PreparedRequest [GET]> from https://www.walsall.gov.uk/Waste/bincollections/Details/************?weeks=5 failed with HTTPSConnectionPool(host='www.walsall.gov.uk', port=443): Read timed out. (read timeout=10)

Additional information:

I've attempted to fix this in #19498


updated content changes 1st blog post

this pull request is regarding the 1st blog post content changes I want to make.
Please let me know if there are any issues.

Thanks @LuHesketh -- Unfortunately this didn't work. There are two problems:

Your pull request is including everything you ever contributed, thereby overwriting subsequent contributions by others.
Your conflict resolution introduced a bug that causes the build to fail

Here is what I suggest you should do:

[ ] Create another fork and call it, say, ucsc-GSoC2. This will create a clean and up-to-date copy of the origin repository.
[ ] Create a branch and call it, say, blogpost1 and checkout.
[ ] Edit content/report/osre23/ucsd/LabOp/20230621-LuHesketh/index.md and commit with, say, "update 1st blog post".
[ ] Create a new pull request with the title, say, "update 1st blog post" against ucsc-ospo:main. In the pull request you should see "LuHesketh wants to merge 1 commit into ucsc-ospo:main from LuHesketh:blogpost1.

All tests in the pull request should succeed and there should be no conflicts. Once I merged your pull request, please

[ ] Checkout main and delete branch blogpost1

The reason why you want to create pull requests from a branch instead of main of your fork is that you can get rid of those branches after your pull requests have been merged and then sync up your fork. If you use main for your pull requests, you will have to create a new fork every time you want a fresh copy of the origin repository that includes all contributions on top of your contributions.
You can keep around your other fork ucsc-GSoC for a while until you are sure it doesn't contain anything that you might want to copy and paste. But eventually I recommend deleting it so you don't accidentally use it again for another pull request.


Fix EOF when parsing the envelope headers

Fixes #139
The ReadMIMEHeader method should also receive the empty line according to the documentation.

Modified the subject check so it only attempts to set if there weren't errors or it was because only some headers were parsed (thus the EOF).

@flashmob

Thanks, looks good


quintd1(owid) dataset

Hi,
We have a judgement metric that is not rating based but a descriptive one (we want the judge to describe the errors in the prediction).
There is no existing task for that.
What do you suggest?
@elronbandel

what will be the output of the judge? how will it be aggregated for a final score per the dataset?

The output will be a json containing the evidence and types of the errors in the prediction. The aggregation may be the number of errors for example.


Keybase fails to poll smart card for key verification

I just installed the app on my Linux machine (debian based distro) when logging in on the web said someone I followed sent me something (which that user says via other means he most certainly did not, and we are wanting to see what it is). The app fails to provision the device, saying it cannot find my private key. The private key for my account is on a Smart Card, and I do not extract keys (actually, I cannot extract keys once they are generated and having a flat file key defeats the purpose of a smart card)
GPG has no issues using the card on this machine, and I have other applications that use it as well.
gpg -K
/home/XXXXXXXXXXXX/.gnupg/secring.gpg
-----------------------------
sec>  4096R/48590686 2015-07-12 [expires: 2025-07-09]
      Card serial no. = XXXX XXXXXXXX
uid                  Jimb0 Hon1nbo (Hon1nbo MFA GPG<EMAIL_ADDRESS>ssb>  4096R/29F3F68B 2015-07-12
ssb>  4096R/D1184610 2015-07-12

my log id: adfcb3d11ad6cce3cdcf061c
Cheers,
~H

Your log shows this:
790 2017-03-15T12:34:41.394033-05:00 ▶ [DEBU keybase gpg_cli.go:353] 2f5 | running Gpg: /usr/bin/gpg2 --no-tty --with-colons --fingerprint -K
791 2017-03-15T12:34:41.400580-05:00 ▶ [DEBU keybase gpg_cli.go:332] 2f6 gpg: starting migration from earlier GnuPG versions
792 2017-03-15T12:34:42.404075-05:00 ▶ [DEBU keybase gpg_cli.go:332] 2f7 gpg: porting secret keys from '/home/xxxxxx/.gnupg/secring.gpg' to gpg-agent
793 2017-03-15T12:34:42.414971-05:00 ▶ [DEBU keybase gpg_cli.go:332] 2f8 gpg: To migrate 'secring.gpg', with each smartcard, run: gpg --card-status
794 2017-03-15T12:34:42.415154-05:00 ▶ [DEBU keybase gpg_cli.go:332] 2f9 gpg: key 48590686: secret key imported
795 2017-03-15T12:34:42.415428-05:00 ▶ [DEBU keybase gpg_cli.go:332] 2fa gpg: migration succeeded
796 2017-03-15T12:34:42.415628-05:00 ▶ [DEBU keybase gpg_cli.go:332] 2fb gpg: checking the trustdb
797 2017-03-15T12:34:42.416165-05:00 ▶ [DEBU keybase gpg_cli.go:332] 2fc gpg: marginals needed: 3 completes needed: 1 trust model: PGP
798 2017-03-15T12:34:42.416336-05:00 ▶ [DEBU keybase gpg_cli.go:332] 2fd gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
799 2017-03-15T12:34:42.416557-05:00 ▶ [DEBU keybase gpg_cli.go:332] 2fe gpg: next trustdb check due at 2025-07-09

What does this show?
/usr/bin/gpg2 --no-tty --with-colons --fingerprint -K

That command has no output, but when using gpg rather than gpg2 gives the following:
/usr/bin/gpg --no-tty --with-colons --fingerprint -K
sec::4096:1:7F9E0FD048590686:2015-07-12:2025-07-09:::Jimb0 Hon1nbo (Hon1nbo MFA GPG) <hon1nbo@hackingand.coffee>:::
fpr:::::::::56033A399BB0778C0C123DA17F9E0FD048590686:
ssb::4096:1:F9EADE6129F3F68B:2015-07-12:::::::
ssb::4096:1:0CEB49F4D1184610:2015-07-12:::::::

gpg2 does see the keys and exists on this system. Not sure why it has no output when gpg goes.
gpg2 --list-keys
/home/XXXXXXXXX/.gnupg/pubring.kbx
-----------------------------
pub   rsa4096/48590686 2015-07-12 [SC] [expires: 2025-07-09]
uid         [ultimate] Jimb0 Hon1nbo (Hon1nbo MFA GPG<EMAIL_ADDRESS>sub   rsa4096/29F3F68B 2015-07-12 [A] [expires: 2025-07-09]
sub   rsa4096/D1184610 2015-07-12 [E] [expires: 2025-07-09]

However, looking through I see that scdaemon failed to be called via gpg2 --card-status.
I don't normally use scdaemon, but since keybase is forcing gpg2 I went ahead and set it up.
This allowed keybase to see that I have the secret key (should really be more verbose in the log output that it is trying to use gpg2 and failing, as debian distros by default tend to have both gpg and gpg2... however stupid that is).
Next up comes a different error though (and I send in fresh logs for it, my log id: 43d8acba6eb1fac1047f921c   )
This time keybase fails with the card PIN. I am not sure what it is doing, but it says exit code 2.
I don't know how it is trying to handle the pin under the hood. I am getting a GUI popup for pin entry rather than my usual Curses based when I call something from commandline. When it comes to pin entry there are sometimes quirks (especially on Debian systems where GNOME components are present). I may investigate this further, but if you can see a more useful log it might help speed things up.
Cheers,
~H

Oh! Your woes can likely be solved via:
keybase config set gpg.command gpg

if I run that, then keybase goes back to not detecting a private key again...
Log send id: 3eafafcdfbb9df087b138d1c
Cheers,
~H

ok cc: @zapu

On 15.03.2017 21:23, Jimb0 Hon1nbo wrote:

if I run that, then keybase goes back to not detecting a private key again...
Log send id: 3eafafcdfbb9df087b138d1c
Cheers,
~H
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub [1], or mute the thread [2].

try AFTER running:
gpg-connect-agent /bye
gpg-agent --daemon
gpg2 --card-status
--
Corey W Sheldon
ph: +1<PHONE_NUMBER>
0x8B4E89435A88E539 0x59276298D2264944
Freelance IT Consultant, Multi-Discipline Tutor
Fedora AmbaNA (linuxmodder)
Ameridea LLC Founder, President
Find me elsewhere:
https://gist.github.com/linux-modder/ac5dc6fa211315c633c9
"One must never underestimate the power of boredom...from which
creativity and laziness are borne, which can spark great works of chaos
and genius." --Anonymous
"Any man willing to retreat freedom for security is deserving of
neither." (Pp) -- Benjamin Franklin.
This document, including attachments, is intended for the person or
company named and contains confidential and/or legally privileged
information. Unauthorized disclosure, copying or use of this information
may be unlawful and is prohibited. If you are not the intended
recipient, please destroy this message and notify the sender.
Links:
[1] https://github.com/keybase/client/issues/6259#issuecomment-286883715
[2]
https://github.com/notifications/unsubscribe-auth/AFpb8N8u7MJHZxer7OkVVFtajcyMtOOrks5rmFa3gaJpZM4MeTb3

@linux-modder no dice.

I had a similar issue (but probaly not the same) and the steps here helped me. Maybe this should live in the docs?


clues: Fix capitalization for Dark Mage anagram

It seems like the capitalization changed at some point, likely after GotR.

Looks like the location is also off by one tile based on that screenshot. Could that be corrected here as well?


Sources would help so much

Hi,
I'm very thankful that you provided this repository. It's a really good starting point. It would be good to know from where some of the info comes, though. For instance the distinction of separate elastic pod types, you probably took that from some documentation page, or learned that in a meet-up or something. Could you reference from where that comes?
Another example: We are trying to reduce privileged pods at the moments, so it would be really good if I could point to your repo and your repo would point to wherever the info comes from that it needs privileged to initialize.
What do you think about it?

https://www.elastic.co/guide/en/elasticsearch/reference/6.2/modules-node.html

By default a node is a master-eligible node and a data node, plus it can pre-process documents through ingest pipelines. This is very convenient for small clusters but, as the cluster grows, it becomes important to consider separating dedicated master-eligible nodes from dedicated data nodes.

If you look at the pod descriptors, you'll understand why it needs to be run in privileged mode. Maybe you can find enough CAP_ to deliver the same functionality and open a PR? 😃


Use harvesterhci to sync node label to vmi

Solution:
https://github.com/harvester/cloud-provider-harvester/pull/21#pullrequestreview-1027259165
Related Issue:
#1418
Test plan:
https://github.com/harvester/cloud-provider-harvester/pull/21

No need to use harvesterhci.io keys, close this PR


Update the metric protocol to include the concept of inputs

Description
Checklist
Please confirm that this pull request has done the following:

[x] Tests added
[x] Documentation added (where applicable)
[x] Changelog item added to changelog/

This is a potential config interface for #10

@mikapfl Still a WIP but it is at a good point to get some feedback. #10 for context

@bouweandela This is already getting a bit bit. Happy to tweak this to better match your breakdown in #15, but it might occur in a follow up MR

Thanks for the feedback @mikapfl and @bouweandela. I'm going to merge this now. My goal is to come up with an end-to-end workflow asap and then we can revisit some of these assumptions when we implement some metrics.


Hub and spoke Bastion deployment. Document Read access on VNETs

In case Bastion deployed in hub and spoke network environment the list of required roles needs to include Read role on both hub network where bastion is located and spoke network where VM is located.

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

ID: 0c234d88-d9f6-f33e-c245-e307cc37394e
Version Independent ID: 7a7a2f04-d668-c395-51fb-fc240a1a30af
Content: Connect to a Windows VM using RDP - Azure Bastion
Content Source: articles/bastion/bastion-connect-vm-rdp-windows.md
Service: bastion
GitHub Login: @cherylmc
Microsoft Alias: cherylmc

Hello @a6848418,
Thank you for your feedback. The information stated above is currently documented here
Hope this helps. Please let me know if you have any additional questions. Thank you!

Hello @a6848418,
We will now proceed to close this issue out, please tag me in your response if you have any additional questions. Thank you!


Version not updated!?

The command --version returns 4.0.0, although the latest version (4.0.1) has been installed.

That's right, it was forgotten in the latest release. The appropriate line is here.

I'm closing this since it's not possible to fix it without a new release and when doing a new release, we have to bump the version anyways (and hopefully won't forget it again! 😄 ).


Issue when porting project for ESP32 to ESP32-S3 (IDFGH-7776)

ESP-IDF version used: 4.4.1
Problem description:
I have initially built my project on ESP32. The project involves BLE and WiFi, I have also used .cpp for some components just to learn c++.
I have changed the build target to ESP32-S3 and tried to build my project. I had some confilcts about the GPIO pins that I have managed to fix easily, however there are a few errors that I am not sure about:

There seems to be a lot of issues regarding touch_pad_intr_mask_t. Could someone point me in the right direction how this can be solved.

@krupis Could you share the command line output of the compiler? The full build log output for the file in question would be great. Alternatively, a little example that reproduces the issue would be great, too.

@krupis Could you share the command line output of the compiler? The full build log output for the file in question would be great. Alternatively, a little example that reproduces the issue would be great, too.

The same issue is described here:
https://github.com/espressif/esp-idf/issues/5699
Tommorow I will try to share the output logs

@krupis Are you including any IDF header files inside an extern "C" { ... } block?

@krupis Are you including any IDF header files inside an extern "C" { ... } block?

Yes I definately am. At the beggining of my project, I have decided to write my code in cpp. This probably was not the best idea. Every component that I have in my project is .cpp component apart from a few components that I could not get to build if I name them cpp ( one of those is my WiFi component where I have all wifi functions from the esp-idf.
What is the correct way to mix c and cpp components? For example if I have ADC component which is cpp and then I have WiFi component which is C. If both components are dependant on each other, what is correct way to include headers to one another?

When I try to make my wifi component cpp,  I get the following error:
    wifi_config_t wifi_config = {
        .ap = {
            //.ssid = EXAMPLE_ESP_WIFI_SSID_AP,
            //.ssid_len = strlen(EXAMPLE_ESP_WIFI_SSID_AP),
            .password = EXAMPLE_ESP_WIFI_PASS_AP,
            .ssid_len = strlen(device_info.ID),
            .channel = EXAMPLE_ESP_WIFI_CHANNEL,
            .authmode = WIFI_AUTH_WPA_WPA2_PSK,
            .max_connection = EXAMPLE_MAX_STA_CONN,
        },
    };

../components/WIFI/WIFI.cpp:231:5: error: C99 designator 'password' outside aggregate initializer

@krupis Please try to not include IDF headers inside extern "C" {...} blocks. Outside these blocks, but inside your C++ code, it should be fine. If you are normally including IDF header files from your C++ code but still get an error, it's probably a bug.
The reason why we do this is that some of our header files contain C++ code which won't work if both they are included from C++ code and they are declared as extern "C".

If you are able to switch to master, the code shown above should probably work. We enabled C++20 recently which allows "aggregate initialization". For v4.4 and below, C++11 is default which doesn't allow "aggregate initialization".

Can you confirm if I understand this correctly?:
This is my custom NVS component that I have created. It is NVS.cpp and NVS.h
Not correct:
#ifndef NVS_H
#define NVS_H

#ifdef __cplusplus
extern "C" {
#endif

#include "esp_log.h"
#include "esp_system.h"
#include "nvs_flash.h"
#include "nvs.h"
#include "stdio.h"
#include "Thermostat.h"
#include "string.h"

#ifdef __cplusplus
}
#endif

#endif

Correct:
#ifndef NVS_H
#define NVS_H

#include "esp_log.h"
#include "esp_system.h"
#include "nvs_flash.h"
#include "nvs.h"
#ifdef __cplusplus
extern "C" {
#8732

#include "stdio.h"
#include "Thermostat.h"
#include "string.h"

#ifdef __cplusplus
}
#endif

#endif

@krupis yes, this is correct. If you have problems with the "Correct" when including the IDF headers, please let us know!
BTW., there is a C++ API for NVS.


Support for Unity 2017.3

EventType.mouseDown is already deprecated in Unity 4.x and Unity forcibly deprecate this API in Unity 2017.3.
See https://docs.unity3d.com/ScriptReference/EventType.html

Nice, looks good to me -- @bbbscarter merge please?

All done - thanks for the PR!


Remove "units" from metadata.

          Remove "units" from metadata. Currently, defined inconsistently (e.g., "nmol mol-1" in ICOS, nothing for CRDS, and "ppb" for GCWERKS). Use unit in data frame instead

Originally posted by @mrghg in https://github.com/openghg/openghg/issues/395#issuecomment-1234263857

Links to #540

Starting looking at this on branch: "rm_units_metadata"

Removed this from GCWERKS and updated impacted tests
Removed from global attributes and updated impacted tests
Need to check over other source_format options and do the same.

Also need to add this to icos and ceda retrieval functions, making sure the unit details are converted and integrated into the unit attributes for each species variable.


rt library fix

In case of some libraries (for example boost::chrono) it is required to link them to librt.
This pr contains the modification of BoostConfig.cmake.in and an test with boost::chrono.

Ok, Men! Take it easy. I want to add the thread specific part to the previous pr but you merged it before me.
I checked again boost::thread code and I think you won't use the function that holds clock_gettime without using boost::chrono. So I think it is enough to add librt only to boost::chrono.

I want to add the thread specific part to the previous pr but you merged it before me.

Heh, sorry :)
Is this pull request ready for testing?

Not at all. It is ready to test:)

Testing:

https://ci.appveyor.com/project/ingenue/hunter/build/1.0.918
https://travis-ci.org/ingenue/hunter/builds/158223556

Uploading:

https://ci.appveyor.com/project/ingenue/hunter/build/1.0.920
https://travis-ci.org/ingenue/hunter/builds/158254628

Released: https://github.com/ruslo/hunter/releases/tag/v0.15.26


[Feature][Metric] Support selecting multiple tables in table-row-count check rules

Search before asking

[X] I had searched in the feature and found no similar feature requirement.

Description
Support selecting multiple tables in table-row-count check rules
Usage Scenario
No response
Related issues
No response
Are you willing to submit a PR?

[ ] Yes I am willing to submit a PR!

#155


Numpy analysis is inconsistent from run to run

import numpy
numpy.

Run analysis, look at icons in the completion list. Reload and run again - you get different set. Ex, 3 sequential runs (look at AxisError, ALLOW_THREADS, DataSource). [abc] icon actually means Unknown

I'll see if I can get better repro

How to fix https://github.com/microsoft/python-language-server/issues/1635 ?

There is no consistent fix. The problem is that analysis sometimes produces results as I showed and sometimes does not. It involves concurrency and circular dependencies between modules in numpy. You may try reloading window and see if the analysis result is different.

Partial PR https://github.com/microsoft/python-language-server/pull/1584, parts can be reused.

In favor of #1666

Closing per #1686.


feat: support geo-replication configs

Draft now
We can define a PulsarGeoReplication new CR to describe the replicate logic
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarGeoReplication
metadata:
  name: pulsar-geo-sample
  namespace: geo
spec:
  replicationList:
    - name: us-west
       sourceConnectionRef:
  	  name: "us-west"
       destinationConnectionRef:
  	  name: "us-east, us-cent"
    - name: us-east
       sourceConnectionRef:
  	  name: "us-east"
       destinationConnectionRef:
  	  name: "us-west, us-cent"
    - name: us-cent
       sourceConnectionRef:
  	  name: "us-cent"
       destinationConnectionRef:
  	  name: "us-east, us-west"

On the tenant level, we can add a geoReplicationRef field to quote the replica CR
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarTenant
metadata:
  name: geo-pulsar-tenant
  namespace: geo
spec:
  name: geo-tenant
  connectionRef:
    name: us-west
  adminRoles:
  - admin
  geoReplicationRef:
    name: pulsar-geo-sample

On the namespace level
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarNamespace
metadata:
  name: geo-pulsar-namespace
  namespace: geo
spec:
  name: geo-pulsar-tenant/geo-ns
  connectionRef:
    name: us-west
  geoReplicationRef:
    name: pulsar-geo-sample

On the topic level
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarTopic
metadata:
  name: geo-topic
  namespace: test
spec:
  name: persistent://geo-pulsar-tenant/geo-pulsar-namespace/geo-topic
  connectionRef:
    name: us-west
  geoReplicationRef:
    name: pulsar-geo-sample

I have a few questions on the usage.
In the PulsarGeoReplication CR, what do the names "us-east" "us-west" "us-cent" correspond to in the source and destination ref fields? Are they pulsar cluster names? Where are the acceptable values defined?
My use case involves only 2 pulsar clusters (let's call them us-east and us-west) and let's assume I need to geo-replicate one topic and 1 subscription between the 2 clusters. Could you describe how I should use this PulsarGeoReplication CR when I deploy pulsar us-east and pulsar west clusters on 2 different k8s clusters resp.? Do I need to create (and apply) a different PulsarGeoReplication CR for each deployment? Is there a way to geo-replicate a subscription for a geo-replicated topic?
Where do we enter the information required to connect to the peer pulsar cluster? (FQDN URL, JWT is configured,...) Providing an example of CRs for the above use case would be great.

The names of "us-east", "us-west" indicate the PulsarConnection which describes the connection info to a specific cluster. But I think we need to add broker address field on PulsarConnection because geo needs the broker address info.

For your case, I think the sample will look like:
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarConnection
metadata:
  name: us-east-pulsar-connection
  namespace: pulsar-resource
spec:
  adminServiceURL: http://<us-east-pulsar-domain>:8080
  # need to support this field
  brokerServiceURL: http://<us-east-pulsar-domain>:6650
  # optional
  authentication:
    token:
      secretRef:
        name: us-east-pulsar-sn-platform-vault-secret-env-injection
        key: brokerClientAuthenticationParameters
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarConnection
metadata:
  name: us-west-pulsar-connection
  namespace: pulsar-resource
spec:
  adminServiceURL: http://<us-west-pulsar-domain>:8080
  # need to support this field
  brokerServiceURL: http://<us-west-pulsar-domain>:6650
  # optional
  authentication:
    token:
      secretRef:
        name: us-west-pulsar-sn-platform-vault-secret-env-injection
        key: brokerClientAuthenticationParameters
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarGeoReplication
metadata:
  name: pulsar-geo-sample
  namespace: pulsar-resource
spec:
  replicationList:
    - name: us-west-geo-replica
      sourceConnectionRef:
        name: "us-west"
      destinationConnectionRef:
        name: "us-east"
    - name: us-east-geo-replica
      sourceConnectionRef:
        name: "us-east"
      destinationConnectionRef:
        name: "us-west"
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarTenant
metadata:
  name: geo-pulsar-tenant
  namespace: pulsar-resource
spec:
  name: geo-tenant
  connectionRef:
    name: us-east-pulsar-connection
  adminRoles:
  - admin
  geoReplicationRef:
    name: pulsar-geo-sample
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarTenant
metadata:
  name: geo-pulsar-tenant
  namespace: pulsar-resource
spec:
  name: geo-tenant
  connectionRef:
    name: us-west-pulsar-connection
  adminRoles:
  - admin
  geoReplicationRef:
    name: pulsar-geo-sample
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarNamespace
metadata:
  name: geo-pulsar-namespace
  namespace: geo
spec:
  name: geo-pulsar-tenant/geo-ns
  connectionRef:
    name: us-east
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarNamespace
metadata:
  name: geo-pulsar-namespace
  namespace: geo
spec:
  name: geo-pulsar-tenant/geo-ns
  connectionRef:
    name: us-west
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarTopic
metadata:
  name: geo-topic
  namespace: pulsar-resource
spec:
  name: persistent://geo-pulsar-tenant/geo-pulsar-namespace/geo-topic
  connectionRef:
    name: us-east
  geoReplicationRef:
    name: pulsar-geo-sample
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarTopic
metadata:
  name: geo-topic
  namespace: pulsar-resource
spec:
  name: persistent://geo-pulsar-tenant/geo-pulsar-namespace/geo-topic
  connectionRef:
    name: us-west
  geoReplicationRef:
    name: pulsar-geo-sample

Keep in mind I have 2 pulsar clusters to deploy independently "us-west" pulsar cluster and "us-east" pulsar cluster on 2 different k8s clusters.
It seems to me that the set of CRs you describe needs to be split in 2 groups: one group that is applied on the us-west cluster and another that is deployed on the us-east cluster.
For example the last 2 CR will create a topic named persistent://geo-pulsar-tenant/geo-pulsar-namespace/geo-topic. The one with connectionRef set to "us-east" should be applied on the us-west cluster and vice versa?
For PulsarGeoReplication CR, shouldn't we also have 2 CRs, one applied on us-east and the other applied on us-west?

The ideal solution could be that we deploy some kind of centralized resource operator that can control and coordinate the resources in multiple remote pulsar clusters (in my case 2), but then this becomes a remote controller, probably harder to implement.
I think in this case this pulsar resource operator has to be installed on the same k8s cluster as every pulsar cluster and can only control resources on the local pulsar cluster

The ideal solution could be that we deploy some kind of centralized resource operator that can control and coordinate the resources in multiple remote pulsar clusters (in my case 2), but then this becomes a remote controller, probably harder to implement. I think in this case this pulsar resource operator has to be installed on the same k8s cluster as every pulsar cluster and can only control resources on the local pulsar cluster

Let me think about how to support under this scenario of only control resources on the local pulsar cluster. I think we need to create us-east and us-west PulsarConnection and PulsarGeoReplication for both deployment Kubernetes cluster. Let me try to figure out a sample for that.

We assume we have two k8s clusters and each running a resource operator, us-east pulsar cluster running under kube1 us-esat-pulsar ns and us-west pulsar cluster running under kube2 us-west-pulsr ns.
us-east cluster resource config
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarConnection
metadata:
  name: kube-1-us-east-pulsar-connection
  namespace: us-esat-pulsar
spec:
  adminServiceURL: http://<us-east-external-domain>:8080
  # need to support this field
  brokerServiceURL: http://<us-east-external-domain>:6650
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarConnection
metadata:
  name: kube-1-us-west-pulsar-connection
  namespace: us-esat-pulsar
spec:
  adminServiceURL: http://<us-west-external-domain>:8080
  # need to support this field
  brokerServiceURL: http://<us-west-external-domain>:6650
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarGeoReplication
metadata:
  name: kube-1-geo-config
  namespace: us-esat-pulsar
spec:
  replicationList:
    - name: us-east-geo-replica
      sourceConnectionRef:
        name: "us-east"
      destinationConnectionRef:
        name: "us-west"

us-west cluster resource config
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarConnection
metadata:
  name: kube-2-us-west-pulsar-connection
  namespace: us-west-pulsar
spec:
  adminServiceURL: http://<us-west-external-domain>:8080
  # need to support this field
  brokerServiceURL: http://<us-west-external-domain>:6650
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarConnection
metadata:
  name: kube-1-us-east-pulsar-connection
  namespace: us-west-pulsar
spec:
  adminServiceURL: http://<us-east-external-domain>:8080
  # need to support this field
  brokerServiceURL: http://<us-east-external-domain>:6650
---
apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarGeoReplication
metadata:
  name: kube-2-geo-config
  namespace: us-west-pulsar
spec:
  replicationList:
    - name: us-west-geo-replica
      sourceConnectionRef:
        name: "us-west"
      destinationConnectionRef:
        name: "us-east"

this looks good! I guess one could actually test this with just 1 k8s cluster and using 2 pairs of namespaces.
can you comment on subscription geo-replication?

Nice! You can see that PulsarConnection supports config to any kind of Pulsar cluster if the admin address, broker address are reachable.
So, you can use this design to configure the geo replica between a bare mental pulsar cluster and k8s deployed pulsar cluster also.


Fix sql: no rows in result set

The reasons for this situation is: MySQL deliberately not let user permissions override my.cnf, default is 644, namely -rw-r--r--, if the permissions that are not 644, will appear this kind of circumstance.

Thanks for the contribution!


Is it possible to have conditionals for the parameters?

Is it possible to have conditionals for the parameters?
For example, my matrix build will trigger test builds based on multiple parameters:
os.name=Windows,OS X,ios,android
os.version=8.1,10,Sierra,High Sierra,10.3,11,7.0,8.0
browser.name=chrome,safari,firefox
browser.version=63,64,10,11,57,58
This will create a lot of combinations that are not supported (or no longer relevant), like
os.name=Windows
os.version=High Sierra
browser.name=safari
browser.version=64
Is there any way to apply conditions for parameters so that the test build is started if a condition is satisfied?

Hello. Yes, you can enable "Only diagonal" checkbox, and it will mean that builds will be triggered only for respective parameters. Example:
Parameters:
os.name=Windows,OS X,ios
os.version=8.1,10,Sierra
browser.name=chrome,safari,firefox
browser.version=63,64,10
Builds:

Windows, 8.1, chrome, 63
OS X, 10, safari, 64
ios, Sierra, firefox, 10

Thanks, that should do the trick for now.
However, I was referring in my question to something similar to how it's behaving in Jenkins.


wineStaging: fix mingwSupport

Motivation for this change
Fix mingwSupport for staging builds of wine. See #103102.
@mweinelt I was able to get WoW running with:
wineWowPackages.full.override {
  wineRelease = "staging";
  mingwSupport = true;
}

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

@avnik @bendlas @7c6f434c @cawilliamson

Result of nixpkgs-review pr 107916 run on x86_64-linux 1

1 package failed to build:

airwave

18 packages built:

lutris
lutris-free
lutris-unwrapped
pipelight
playonlinux
protontricks
wine (wineFull)
wineStaging (wine-staging)
wineMinimal (winePackages.minimal)
wineStable (winePackages.base)
winePackages.staging
wineUnstable (winePackages.unstable)
wineWowPackages.base (wineWowPackages.stable)
wineWowPackages.full
wineWowPackages.minimal
wineWowPackages.staging
wineWowPackages.unstable
winetricks

Airwave is already broken on target branch, so no biggie.

@MetaDark I can start up WoW, but the screen sadly remains black. Audio works. Keybinds on the login screen seem to work as well.
I'm on wayland with amdgpu. Are you applying anything else to your wine prefix? How did you set it up? Just WINEARCH=win64?

@mweinelt I just launched it from Lutris with this configuration:

Hmm weird, I just tried launching with: WINEPREFIX=/home/kira/Games/wow /nix/store/wa8sp6dqnh63yr50d2dc3qnfcsqw9xx4-wine-wow-5.22-staging/bin/wine '/home/kira/Games/wow/drive_c/Program Files (x86)/World of Warcraft/_retail_/Wow.exe' and I'm getting the same issue. I wonder what Lutris is adding that's causing it to load properly :thinking: .

@mweinelt I disabled Enable DXVK/VKD3D through and was able to reproduce it through lutris. You might need to install dxvk: winetricks dxvk

Just FYU  dxvk don't work on old GPU . Also I plan to switch to mingw as default at some point after 6.0 release.

@avnik Once staging-next is merged into master, stripping will be re-enabled on Wine, so there won't be an overhead with debug symbols anymore.

@mweinelt I disabled Enable DXVK/VKD3D and was able to reproduce it through lutris. You might need to install dxvk: winetricks dxvk

Works like a charm. Thank you.


Feat/redeploy 7

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


Add usage tracker to GPT by price

Three caveats here:

The pricing per token usage is hardcoded from what I got in the OpenAI website today
The calculation of the stream chunks is an approximate calculation using tiktoken (official tokenizer by OpenAI)

This is a super requested feature as you can see here: https://community.openai.com/t/openai-api-get-usage-tokens-in-response-when-set-stream-true/141866/1

We check for the cost limit before the prompts execution, so if its a huge request prompt it might pass the limit by a few cents.

no permissions to push - but otherwise looks ok. do you want to keep this @leordev or wait for the new langchain flavor?

The no permissions to push is because it's a forked pr, then github does not expose the GH token secret. you can go ahead and merge. So we can get rid of your OpenAI Key while we dont merge the new langchain stuff.


Using WebPack v2, Must Close and Reopen Terminal For webpack.config.js changes to be recoginized

VSCode Version: Code 1.11.2 (6eaebe3b9c70406d67c97779468c324a7a95db0e, 2017-04-13T08:03:11.395Z)
OS Version: Windows_NT ia32 10.0.14393
Extensions:

Extension
Author
Version

jshint
dbaeumer
0.10.15

vscode-eslint
dbaeumer
1.2.8

beautify
HookyQR
1.0.2

Angular1
johnpapa
0.1.16

Angular2
johnpapa
2.2.3

csharp
ms-vscode
1.8.1

PowerShell
ms-vscode
0.12.2

vscode-icons
robertohuertasm
7.5.1

vscode-gulp
tanato
0.0.4

open-in-browser
techer
1.0.0

wallaby-vscode
WallabyJs
1.0.50

bootstrap-3-snippets
wcwhitehead
0.0.9

Steps to Reproduce:

The shell that's running in the terminal is an external program, so it's likely powershell/cmd/etc.'s problem


[4.0] Add 2D scale factor property

4.0 version of #52137. Bugsquad edit: Rebase of #21446
This can be used to make 2D elements larger or smaller, independently of the current stretch mode.
Only the disabled and canvas stretch modes support this new property.
As with the 3.x version this doesn't solve the image scaling problem (again, we would need godotengine/godot-proposals#2924). In addition, font rendering currently looks weird when the scale factor is set to anything other than. After far too much time spent debugging I can now confirm that this is NOT caused by these changes. It would appear that font oversampling is currently broken. For more information please see #47957.
2d-scaling-demo4.zip
Pinging @Calinou, since he wanted to port this to 4.0 himself.

The 3.x PR has been merged, but this one still doesn't pass CI.

@Akien Yeah, I am really sorry about that. I have been really busy with university for the last few months right now and didn't have the time to dig deeper into the testcase that fails.
Hopefully I will have some time over the winter break between preparing for my exams. IIRC the problem is that a function that gets a screen pos from a character keeps returning (0,0) (or was it the other way around?).
I probably need to dig deeper into text rendering to figure this out. When I have the spare time I will probably also need to ping bruvzg about #47957. That bug really needs to be fixed before 4.0.

Thanks!


go-fula .aar package size issue

The .aar output of the go-full package is around 52Mb, which causes the app's package size to grow incredibly.

go-fula has all architecture (arm64,x86,...) included for now so size of it  is little big!
for release we can use decouple arch and the size going to be around 10MB. but is need some android native knowledge, but it will not be an issue.

With ldflag -s -w
gomobile bind -ldflags='-s -w' -v  -o ./out/fula.aar -target=android/arm64 github.com/functionland/go-fula/mobile
generate arr file with size 8.9MB for arm64.
And we can use something like to build multiple apk:

https://proandroiddev.com/reducing-apk-size-by-using-abi-filters-and-apk-split-74a68a885f4e

Add makefile

@farhoud
You are right the main reason is multi-architecture build.
Is it possible to make a .jar file instead of .aar, it seems a .jar file is a more lightweight and common way of distributing an artifact?

@farhoud You are right the main reason is multi-architecture build. Is it possible to make a .jar file instead of .aar, it seems a .jar file is a more lightweight and common way of distributing an artifact?

No but we can have multiple aar file base on arch.


paginate search results

Tasks

[ ] 1. create Paginate component (use boilerplate below as starting point)
[ ] 2. take a page prop to specify current page
[ ] 3. take a totalResults prop
[ ] 4. use limit sound list results to max of 5 by default,
[ ] 5. write a function that takes the number of results, the num of results per page, and returns the number of pages
[ ] 6. incorporate what you built with tailwind's example
[ ] 7. as a nice touch, rename SoundListContainer's tracks prop to sounds (very inconsistent naming right now)

Idea Usage
function onPageClick(page) {
  freesound.search('foo', { page, limit: 5 })
}

<Paginate limit={5} page={1} totalResults={100} onPageClick={onPageClick}>
  <SoundListContainer sounds={mySounds} etc.../>
</Paginate>

SoundListContainer should still be responsible for listing and playing sounds
Paginate should be responsible for keeping track of the current page, rendering the pagination buttons (next, prev, 1, 2, 3, etc).

Examples

https://github.com/AdeleD/react-paginate
https://react-bootstrap.github.io/components/pagination/

Watch
https://youtu.be/IYCa1F-OWmk
Readings:

https://ihsavru.medium.com/react-paginate-implementing-pagination-in-react-f199625a5c8e
https://www.seoptimer.com/blog/what-is-pagination/
https://agentestudio.com/blog/pagination-design-examples-and-best-practices

Boilerplate
function Paginate({ children, page, limit, totalResults }) {
  const pageCount = determinePageCount(limit, totalResults);
  const pages = []
  for (...) pages.push(i);
  return (

      {children}
      <button onClick={...}>Prev</button>
      pages.map(e =>
{e}
)
      <button onClick={...}>Next</button>

  )
}

In which places do we want to see the pagination bar?
If we want to see it in multiple places, like on tag pages and search result pages, we may want to create a reusable <PaginationBar /> component.

[ ]  limit sound list results to max of 5

Do we always want a maximum of 5 results? For example, should the "Pack" and "Similar" <SoundListContainer /> components on a sound's page also have at most 5 results?

Good question. This should be configurable via a prop. Default prop value should be 5 for now. We can change it later if we want.

@hamirmahal added some more context to the solution. I recommend playing around with https://github.com/AdeleD/react-paginate and try seeing if you can pass tailwind classes as props to give it consistent styling with the result of tide.

Correct, all sound list should be able to be used inside of a Pagination component. Note that from the ideal usage section in the ticket description, the Paginate component should know nothing about the SoundListContainer

I recommend playing around with https://github.com/AdeleD/react-paginate and try seeing if you can pass tailwind classes as props to give it consistent styling with the result of tide. Don't worry about data fetching and updating the SoundListContainer initially. I recommend focusing on the component aspect initially.

Are we sure we don't just want to use Tailwind's pre-built pagination element?

[ ]  implement pagination UI (See https://tailwindui.com/components/application-ui/navigation/pagination)

I made a bit of progress with it a few weeks ago. The issue is just that the whole pagination element is in SearchResults.js. I was trying to pinpoint exactly where the pagination element should be to figure out how to refactor things correctly.

@hamirmahal good point, i think if its not too hard, we should use the tailwind template if possible

Okay, I'll play around with it. Thanks for the additional information!

[ ]  4. use limit sound list results to max of 5 by default,

Idea Usage
...
  freesound.search('foo', { page, **limit**: 5 })
...
<Paginate **limit**={5} ...

Boilerplate
function Paginate({ children, page, **limit**, totalResults }) {
  const pageCount = determinePageCount(**limit**, totalResults);
  ...

Can we call limit numberOfResultsPerPage instead? It's more verbose, but I think it's more self-documenting, especially as I'm filling in values and expressions that depend on limit, or numberOfResultsPerPage.


Information on X

Although X probably will not be used for anything SEMC OS-related, I'm interested in seeing if it's possible to get it up and running - heck, can we have an X version? (SEMC X sounds so cool).
So far, I've been able to:

Compile X.Org (0.9 SBU, quite fast)
Get all libs required  by Xorg initially
Compile dwm
Set up a (working) .xinitrc

Currently, I'm get a keymap error, something like the following:
[    22.383] (EE) Error compiling keymap (server-0)
[    22.383] (EE) XKB: Couldn't compile keymap
[    22.383] XKB: Failed to compile keymap
[    22.383] Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
[    22.383]
Fatal server error:
[    22.383] Failed to activate core devices.

Unknown solutions.

Moved to FanHub.

New fanhub project in the repo.

Deprecated as of 647e09ce9268854abe284da5d3906e2c1472a5bc


Optimize reduce

Various improvements to the reduce function with the goal of improving speed and reducing memory usage.
The main architectural changes are:

Replace the huge numpy color mapping array by a dictionary data structure
Pre-compute lab palette instead of re-running the conversion every time nearest_color_ciede2000 is called

The benchmarks presented below were run on the following image, using timeit and memit for profiling:

New
Old

fast-time
209 ms
220 ms

fast-mem
241 MiB
319.43 MiB

accurate-time
765 ms
2230 ms

accurate-mem
270 MiB
1262.61 MiB

NB: memory is still being leaked for the accurate method, albeit at a much slower rate than before.

Now also fixes the memory leak in rgb2lab

This is indeed much better for both the memory and the speed and thanks for fixing the memory leak.
However you removed some optimizations I had in the old version so I think this could be improved even more:

Populate the initial cache dictionary with the palette: this makes the function way faster when it's used on an image that already matches the palette (which often happens) because there's no computation to do.
Why iterate over every pixel? Wouldn't it be faster to iterate over the unique colors like I did and then apply the cache color map to the initial array as bytes?
I set cached=True in some @jit decorators so the function get cached and they don't have to get re-compiled after each reboot but I couldn't do it for the CIEDE2000 functions because I was using parallel=True and it doesn't work with the cache. Since you removed the parallel, maybe the cache could be added on the missing functions.

nearest_color_idx_ciede2000 currently runs in ~6.75 µs. This means that even if all the palette colors are used by a template, we'll only be gaining 0.2 ms out of several hundreds. Imo it's not worth it.
Iterating over each pixel directly has the advantage of reducing the total number of iterations (we're iterating over each pixel in image vs in image+unique color array), and saves a bit of memory. Applying a dict map to an array is also a lot slower than the coordinate lookup you introduced, so I strongly suspect this will end up being slower (haven't tested tho).
Will do!

Alright that's fair for 1 and 2, I tested 3 and everything works so it's all good to be merged 🎉


Try fixing Jülich

Doesn't work yet, but fixes some of the first problems that occurred...

Merged manually


Relationships on Create for non ActiveRecord models

I guess more of a question.
I have this legacy app we are trying to slowly migrate to use jsonapi-resources. We have some bloated models we are splitting into smaller resources but also some models that point to Redis-backed models.
class RedisResource < JSONAPI::Resource
  attribute :attr_1
  attribute :attr_2

  # Override required. The underlying model is not based on
  # ActiveRecord.
  def self.find_by_key(key, options = {})
    context = options[:context]
    model = RedisModel.find(key)
    raise(JSONAPI::Exceptions::RecordNotFound, key) if model.nil?
    new(model, context)
  end
end

The problem though, is that somehow the relationship data is getting lost before reaching the Resource methods like: #replace_field(field_data).
All that info is available when I use an ActiveRecord model that uses the #belongs_to helper. But unsure what do I need to do/implement in my models to get the relationship assignment working.

@diegoeche The relationships are updated in separate methods from replace_field, such as replace_to_many_links. Let me know if you are still having trouble and I'll see if I can make some time to test with Redis.

Thanks for your reply!
So I tried using replace_field but field_data had has_one empty. Also I'm using 0.8.1

Ok, I'll try setup a simple app using Redis. Might be a day or two.


fetchYarnDeps: git fetch not working on specific lockfile

Describe the bug
git fetch not working on specific lockfile
Steps To Reproduce
Steps to reproduce the behavior:

Build this

with (import ./. {});

let
  src = fetchFromGitHub {
    owner = "chatwoot";
    repo = "chatwoot";
    rev = "03b1a3d045bbfc221bcf07c8155eccd2d0d88905";
    sha256 = "dJ3uG8wpuDGzPOZEgRCv1FHyU3pHch+sgsFRlaWxNjY=";
    fetchSubmodules = true;
    # rev = "v${version}";
  };
in
fetchYarnDeps {
    yarnLock = src + "/yarn.lock";
    sha256 = lib.fakeSha256;
}

Watch it fail as follows:
Error: hash mismatch, expected 7e8acadd10d7b932c0dc0bd0a18f804434f83517, got 3adb1f02d5b6054de0046e367c1d687b6cdf7aff
    at IncomingMessage.<anonymous> (/nix/store/ngdkv56l59jjp660j7fqbbkff42xx984-prefetch-yarn-deps/libexec/index.js:45:42)
    at IncomingMessage.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

Expected behavior
Fetches dependencies and throws error about invalid output hash (fakeSha256 so I can get the output hash)
Additional context
The problem is with the git fetcher itself, which seems to ignore the revision part of the url (or does something else entirely wrong)
Changing the hash to the one the error message contains (in yarn.lock) causes the error to go away but yarn is subsequently unable to fetch from that lockfile so it must be a bug in fetchYarnDeps not yarn itself
Notify maintainers
@yu-re-ka
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
output here

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:

The problem here is the difference between https://github.com/... and git+https://github.com/.... yarn itself uses some magical logic to assign the resolved field to a fetcher (git, https, ...). fetchYarnDeps sees the https:// prefix and tries to download it as a file via https.
You can try patching the lockfile to say git+https. hedgedoc does the same thing. yarn2nix also has the same problem.

The magic seems to be here https://github.com/yarnpkg/yarn/tree/master/src/resolvers/exotics
It doesn't seem like a lot so it would be worth implementing it (or possibly just using that code directly)
I'll try git+https patching for now

I've found another bug
This part of the lockfile
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>  version "1.0.30001219"
  resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001219.tgz#5bfa5d0519f41f993618bd318f606a4c4c16156b"
  integrity sha512-c0yixVG4v9KBc/tQ2rlbB3A/bgBFRvl8h8M4IeUbqCca4gsiCfvtaheUssbnux/Mb66Vjz7x8yYjDgYcNQOhyQ==

Results in this error
Error: [https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001271.tgz]: hash mismatch, expected undefined, got 0dda0c9bcae2cf5407cd34cac304186616cc83e8
    at IncomingMessage.<anonymous> (/nix/store/b4j67lppkril4pz3m42q9d34f5aajdx5-prefetch-yarn-deps/libexec/index.js:45:42)
    at IncomingMessage.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

The undefined part should be fixed by https://github.com/NixOS/nixpkgs/pull/119522 by preferring integrity.

I get such errors too:
Error: hash mismatch, expected 0dfc80309beec8411e65e706461c408b0bb9b431, got bbba84135de6b052c2210e74e0cc5b2a9d359ddb
    at IncomingMessage.<anonymous> (/nix/store/vxwkpcpfxsra97qwkqvax0zcm44pdcxm-prefetch-yarn-deps/libexec/index.js:46:42)
    at IncomingMessage.emit (node:events:402:35)
    at endReadableNT (node:internal/streams/readable:1343:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

But it seems this time the problem is more general, because I get this exact hash bbba84135de6b052c2210e74e0cc5b2a9d359ddb for any npm packet. And googling of this hash gives...
$ echo -n Found | sha1sum
bbba84135de6b052c2210e74e0cc5b2a9d359ddb  -

$ curl "https://registry.npmmirror.com/7zip-bin/download/7zip-bin-5.1.1.tgz"
Found

But!
$ wget -nv "https://registry.npmmirror.com/7zip-bin/download/7zip-bin-5.1.1.tgz"
2022-01-20 01:42:41 URL:https://oss.npmmirror.com/7zip-bin/-/7zip-bin-5.1.1.tgz [5054087/5054087] -> "7zip-bin-5.1.1.tgz" [1]

Ok, going further, we get a "document moved" (302 HTTP code) answer from the server. So we need to follow the redirect. For example, curl -L does this.

A quick example of patching this with an overlay:
let
  fetch-patch = builtins.toFile "fetch.patch" ''
    diff --git a/pkgs/build-support/node/fetch-yarn-deps/index.js b/pkgs/build-support/node/fetch-yarn-deps/index.js
    index f3662a54361..193656ccd41 100755
    --- a/pkgs/build-support/node/fetch-yarn-deps/index.js
    +++ b/pkgs/build-support/node/fetch-yarn-deps/index.js
    @@ -36,6 +36,22 @@ const urlToName = url => {
     const downloadFileHttps = (fileName, url, expectedHash) => {
     	return new Promise((resolve, reject) => {
     		https.get(url, (res) => {
    +			if (res.statusCode === 301 || res.statusCode === 302) {
    +				return https.get(res.headers.location, (res) => {
    +					const file = fs.createWriteStream(fileName)
    +					const hash = crypto.createHash('sha1')
    +					res.pipe(file)
    +					res.pipe(hash).setEncoding('hex')
    +					res.on('end', () => {
    +						file.close()
    +						const h = hash.read()
    +						if (h != expectedHash) return reject(new Error(`hash mismatch, expected ''${expectedHash}, got ''${h}`))
    +							resolve()
    +						})
    +						res.on('error', e => reject(e))
    +					})
    +			}
    +
     			const file = fs.createWriteStream(fileName)
     			const hash = crypto.createHash('sha1')
     			res.pipe(file)
  '';
  overlay = _final: prev: {
    prefetch-yarn-deps = prev.prefetch-yarn-deps.overrideAttrs (_def: {
      postBuild = ''
        chmod +w libexec/index.js
        cp ${pkgs.path + /pkgs/build-support/node/fetch-yarn-deps/index.js} `
        `libexec/index.js
        patch -p5 libexec/index.js ${fetch-patch}
        patchShebangs libexec/index.js
      '';
    });
  };
  pin = builtins.fetchTarball {
    name = "nixpkgs";
    url = "https://github.com/NixOS/nixpkgs/archive/d5dae6569ea9952f1ae4e727946d93a71c507821.tar.gz";
    sha256 = "1w4wch077d2wgrdaya8y1pa34rzvh26xns6zgzr4kmlfd5g2rhwd";
  };
  pkgs = import pin { overlays = [ overlay ]; };
in
pkgs.fetchYarnDeps {
  yarnLock = pkgs.runCommandLocal "fix-yarn.lock" { } ''
    sed 's/\.tgz\?[^#]\+/\.tgz/g' ${./yarn.lock} > $out
  '';
  sha256 = pkgs.lib.fakeSha256;
}


feat: easily override default config for build

PR Type

[x] Feature
[x] Other: Customization enhancement
What Is the Current Behavior?
If a customer project uses a different default build configuration than production, the new configuration has to be inserted into quite a lot of scripts in package.json.
What Is the New Behavior?
The default configuration can be overridden in package.json or in local npm settings and automatically applies to all scripts.
Does this PR Introduce a Breaking Change?

[ ] Yes
[x] No

wait for integration of #630

Will be integrated into #775


Switch to established open-source license

Could you consider using an established open-source license for this project? Pytest uses the MIT license, which might be a suitable option. With the current license, I am unable to use this project in my work. I understand that the library code will not be used in production directly (as it is a development dependency), but the current licensing still limits users who are bound by company policies that mandate the use of open-source software only.
Thank you for your consideration.

As one of the maintainers of this project, I agree and hereby second this motion. 👍
While I am normally partial to (A)GPL licenses, in this case I do not have a strong opinion regarding which OSI-compliant license is selected.

Isn't this a pretty established license? https://opensource.org/license/bsd-3-clause
I would have probably chosen MIT if given the choice, but we are pretty much stuck since there are too many contributors to relicense.

I had no idea the current LICENSE file in this project is based on one of the BSD licenses, albeit an older version that is not commonly seen in active use today. I suspect Michał did not realize that either.
That said, I think there are some changes I would suggest to improve the current situation:

Remove the "All rights reserved" line, which appeared in older versions of the BSD License but is not actually present in the 3-Clause BSD License.
Ensure that the license type (e.g., "3-Clause BSD License") is clearly visible somewhere on the main project page on GitHub. (This may happen automatically once item 1. above is resolved.)

As to why the "All rights reserved" line was removed from modern versions of the BSD license, and why I think it should be removed from this project's license, please read: https://opensource.stackexchange.com/questions/2121/mit-license-and-all-rights-reserved/4403#4403
@Teemu: Do you have any objections if I make the above change, bringing the project's LICENSE file in alignment with the 3-Clause BSD License?


Japanese translation

add japanese translation. I looked to remove bJAPAN/bKOREAJAPAN/JAPANBEGIN/JAPANEND. But it is need to keep behavior for users who want to use english on japanese locale.

Please want merge. Some dialogs still have problems for sizes.

Thanks!

Great work.
But this translation does not appear to follow Microsoft style guide.
According to the style guide,

We should use a space between katakana-words. e.g. "ツール (space) バー" instead of "ツールバー". (Style guide §3.1.7)
Today, we should use ”－" for English suffix "-er" or "-or", e.g. "ファイル (space) マネージャー" instead of "ファイルマネージャー" or "ファイル (space) マネージャ". ("Katakana prolonged sound mark" of §3.1.14)

If you want to make a nostalgic style (win3.1, win9x and old NT style),

We should use Half-width katakana instead of Full-width katakana for menu bar items, e.g. "ﾂｰﾙ(space)ﾊﾞｰ" instead of "ツールバー" or "ツール(space)バー".
In this case, we shouldn't use katakana prolonged sound mark for "-er" or "-or", e.g. "ﾌｧｲﾙ(space)ﾏﾈｰｼﾞｬ" instead of "ファイル マネージャ" or "ファイル マネージャー".

Note: The rule of katakana prolonged sound mark ("ー" for "-er" or "-or") has changed in 2008.

@fetus-hina Thanks your advice. I'm not familier to the guide since MS changed style recently after I learned the older style (no spaces, no suffix -er).
Could you please correct words in curent translation? Below is a file listed japanese katakana words in resource files.
https://gist.github.com/4f01bb666a0b1b5af9bf8aa71a869acf

@fetus-hina If you are going to make PR, please wait for https://github.com/Microsoft/winfile/pull/138 since this PR change words and dialog sizes.

Okay, I'll fix with spaces and suffix -er in my self. Sorry.

I think we may not leave Japanese translations in res_en-US.rc.
Since localization for many countries and languages are working in process, it's not a good idea to contain Japanese translations for them (for example res_zh-CN.rc and res_pl-PL.rc now).
@craigwi
Translators from other countries can't read Japanese words and just make a copy of res_en-US.rc for their work. So JAPANBEGIN and JAPANEND may leave many rubbish in their works.

There seems to be a different of opinion on whether to leave the JAPANBEGIN/END stuff in or not.  My request is for someone who can figure out what is going on to propose a specific change.  Thanks.


the Trailing Stop Loss and Trailing Take Profit calculations do not make sense to me

Hi,
I'm wondering about the calculation of the readjusted TP and SL values based on the settings coming from the config file.
These are the default values as given in the config:
  # define in % when to sell a coin that's not making a profit.
  STOP_LOSS: 5

  # define in % when to take profit on a profitable coin.
  TAKE_PROFIT: .8

  # when hit TAKE_PROFIT, move STOP_LOSS to TRAILING_STOP_LOSS percentage points below TAKE_PROFIT hence locking in profit
  # when hit TAKE_PROFIT, move TAKE_PROFIT up by TRAILING_TAKE_PROFIT percentage points
  TRAILING_STOP_LOSS: .4
  TRAILING_TAKE_PROFIT: .1

Then the STOP_LOSS is set to -5 and the TAKE_PROFIT value is stored:
https://github.com/CyberPunkMetalHead/Binance-volatility-trading-bot/blob/533daf54c0c47390d2d51daa67fec8127da4a829/Binance Detect Moonings.py#L437-L438

Now, let's assume a simple scenario:
A position was opened at a price of coins_bought[coin]['bought_at'] = 50.
Based on the following calculations this means TP = 50.4 and SL = 47.5.
https://github.com/CyberPunkMetalHead/Binance-volatility-trading-bot/blob/533daf54c0c47390d2d51daa67fec8127da4a829/Binance Detect Moonings.py#L364-L366
This is not a lot of profit, but okay, perhaps TAKE_PROFIT should just be a higher value.
But that's not the actual issue here.
The next step is to readjust the TAKE_PROFIT and STOP_LOSS values if LastPrice > TP and USE_TRAILING_STOP_LOSS:. So, let's say the last price is LastPrice = 70. This would be a 40% price increase and is calculated correctly in line 371: PriceChange = float((LastPrice - BuyPrice) / BuyPrice * 100), i.e. PriceChange = 40.
https://github.com/CyberPunkMetalHead/Binance-volatility-trading-bot/blob/533daf54c0c47390d2d51daa67fec8127da4a829/Binance Detect Moonings.py#L376-L378
And now the calculation becomes somewhat obscure to me.
Because, looking at the example values, the new TAKE_PROFIT price would then be calculated as coins_bought[coin]['take_profit'] = 40.1 and the new STOP_LOSS coins_bought[coin]['stop_loss'] = 39.7, respectively.
Both are now below the actual entry price.
So what am I missing here?
If you ask me, I'd say the following calculations would make a lot more sense, resulting in coins_bought[coin]['take_profit'] = 55.44 and coins_bought[coin]['stop_loss'] = 66.5, respectively:
 coins_bought[coin]['take_profit'] = TP + (TP * TRAILING_TAKE_PROFIT)
 coins_bought[coin]['stop_loss'] = SL + (SL * TRAILING_TAKE_PROFIT)

Of course, then the values in the config should be adjusted accordingly (TRAILING_TAKE_PROFIT > TRAILING_STOP_LOSS), so the new stop loss level is lower than the new take profit level. For TRAILING_TAKE_PROFIT = 0.4 and TRAILING_STOP_LOSS = 0.1, the results would be coins_bought[coin]['take_profit'] = 70.56 and coins_bought[coin]['stop_loss'] = 52.25, for example.

coins_bought[coin]['stop_loss'] = 39.7 is define in %.
so if enter price is 50, the new stop loss price is: 50 * (1 + 0.397)

coins_bought[coin]['stop_loss'] = 39.7 is define in %.

no, I don't agree.
The only value defined directly in % is actually PriceChange, i.e. PriceChange = 40.

so if enter price is 50, the new stop loss price is: 50 * (1 + 0.397)

where can I find this calculation in the code? I don't see it.
attached is an Excel sheet following the script step by step with the example values:
Binance-volatility-trading-bot_TSL_calc.xlsx


Update File

Pull request for the review of the program

@danielhuppmann und @Komposthaufen
Can you please allow my pull request?


Should command line examples be "cut and paste" ready?

With multi-line command line (bash) examples, it's convenient for users to just cut and paste them into a terminal window.  Our examples (mostly) start with a $ on each line, making it inconvenient to cut and paste examples such as:
$ cd $ZEPHYR_BASE/tests/booting/stub

# Make a build directory, and use cmake to configure a Make-based build system:
$ mkdir build && cd build
$ cmake -DBOARD=arduino_101 ..

# Now run make on the generated build system:
$ make flash

vs.
cd $ZEPHYR_BASE/tests/booting/stub

# Make a build directory, and use cmake to configure a Make-based build system:
mkdir build && cd build
cmake -DBOARD=arduino_101 ..

# Now run make on the generated build system:
make flash

For examples that mix command and their output, I'm personally in favor of putting the $ in, but for multi-line examples (without output) not using the $ makes more sense.
Your thoughts?

For examples that mix command and their output, I'm personally in favor of putting the $ in, but for multi-line examples (without output) not using the $ makes more sense.

+1

Samples are mostly c/p ready, it depends on how complex the sample is, but for most part, you can just copy and paste them.


Undefined references in arrays are not displayed

On julia-client 0.5.11 with atom 1.12.7, running
C = Array{Array{Float64,2}}(31)
yields
UndefRefError: access to undefined reference
 in yieldto(::Task, ::ANY) at ./event.jl:136
 in yieldto(::Task, ::ANY) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in wait() at ./event.jl:169
 in wait(::Condition) at ./event.jl:27
 in wait(::Condition) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in wait(::Task) at ./task.jl:132
 in macro expansion at /Users/jb/.julia/v0.5/Media/src/dynamic.jl:67 [inlined]
 in (::Atom.##65#68)(::Dict{String,Any}) at /Users/jb/.julia/v0.5/Atom/src/eval.jl:108
 in handlemsg(::Dict{String,Any}, ::Dict{String,Any}, ::Vararg{Dict{String,Any},N}) at /Users/jb/.julia/v0.5/Atom/src/comm.jl:163
 in (::Atom.##14#17)() at ./event.jl:68

whereas it works fine in the REPL. I would think that this is somehow related to this closed bug:
https://github.com/JunoLab/atom-julia-client/issues/44
See also this post on julia-users.

This is fixed with https://github.com/JunoLab/Juno.jl/commit/3d81eb2a179735bf0cc435d6670d7196419e4184, but there hasn't been a new release since.


Is there a endpoint I can invoke to download a certain model?

I was facing this issue where in a new setup, my requests seemed to be not working or timing out. I figured (most likely) that it is because the model was not downloaded and my connection was not fast enough for it to happen quickly. What is the best way of using the endpoints? Is there an endpoint I can invoke first to download the required model and keep checking progress of the download?

You can modify the DEFAULT_MODEL in your .env file to a different model name from the model list to have it download when the server starts.


Wiki page describing local engine web builds is missing

Now this only links to flutter.dev/web. however that page used to contain information on how to build a local engine with ninja

cc @yjbanov

Do you mean https://github.com/flutter/flutter/wiki/Compiling-the-engine should also describe how to build a local web engine? I'm not aware of any existing pages having used to contain this information 🤔

I wrote an initial doc in the wiki describing this workflow, I was hoping you know why the link got changed, and where the old wiki page is.

I know that pages on the flutter.dev website were updated around September 10, 2019. I'm not aware of any recent Wiki changes. I clones the Wiki repo and scanned the history for "destroyed" pages. I only found "Destroyed Building a web application with Flutter (markdown)" by @sfshaza2, but I'm guessing that's not the page that talks about local engine builds, is it?

A-ha! I'm wrong. That page does contain engine build instructions:
Current Status
Flutter now has early experimental support for running flutter web applications. There are still many missing features and known performance issues, so it isn't recommended for production use. This requires the latest flutter master from at least commit 4c0145.
IMPORTANT: The unforked flutter web workflow is still missing several features currently present in flutter_web. Work is ongoing to upstream these changes in Flutter proper.
If your app is using package:flutter_web, see Upgrading from package:flutter_web to the Flutter SDK.
Examples
Only the flutter gallery and hello_world have been configured to work with flutter for web. The additional files required can be added to an existing project with the command  flutter create . once the feature is enabled. For a new project the web sub-project is created automatically.
Tooling
Use the config command to enable:
flutter config --enable-web

If this is set up correctly, Flutter devices will output a device named chrome. Flutter doctor will also check for a locatable chrome executable which is required for development mode and tests. If one cannot be found, try setting the CHROME_EXECUTABLE environment variable to the path to your Chrome executable.
$ flutter devices
> 1 connected device:
>
> Chrome • chrome • web-javascript • Google Chrome 75.0.3770.80

$ flutter doctor
> Doctor summary (to see all details, run flutter doctor -v):
> [✓] Flutter (Channel unknown, v1.7.3-pre.52, on Mac OS X 10.14.5 18F132, locale en-US)
>
> [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
> [✓] Xcode - develop for iOS and macOS (Xcode 10.0)
> [✓] iOS tools - develop for iOS devices
> [✓] Chrome - develop for the web
>     ! CHROME_EXECUTABLE not set
> [!] Android Studio (version 3.3)
>     ✗ Flutter plugin not installed; this adds Flutter specific functionality.
>     ✗ Dart plugin not installed; this adds Dart specific functionality.
> [✓] IntelliJ IDEA Community Edition (version 2018.3.4)
> [✓] VS Code (version 1.35.0)
> [✓] Connected device (1 available)

flutter run will launch the application using the development compiler in a Chrome browser. The name of the web "device" is currently "chrome", but this doesn't need to be specified if there are no other devices attached.
$ flutter run -d chrome
> Running "flutter pub get" in hello_world...                         0.4s
> Compiling lib/main.dart for the Web...                              1.0s
>
> 🔥  To hot restart (and rebuild state), press "R".
> For a more detailed help message, press "h". To quit, press "q".

To see additional build output, you can run with -v. If there are issues with changes not propagating or compilation errors that can't be resolved, run flutter clean and then file a bug describing what you changed.
This includes a basic hot restart functionality: though IDEs do support hot reload on save, this functionality does not exist yet for flutter web. While flutter web intends to support modern browsers for shipped applications, for development we require the use of a chrome browser to make use of Chrome devtools.
Plugins
Plugins are not currently supported in flutter web.
Engine development
Development on the web engine requires the same setup as the normal engine workflow. Follow the setup in the engine contributing guide at Setting-up-the-Engine-development-environment.
To build the web engine:
./flutter/tools/gn --unopt --full-dart-sdk
ninja -C out/host_debug_unopt

And then to run with a locally built web engine:
flutter run -d chrome --local-engine=host_debug_unopt

The web implementation of dart:ui is located at https://github.com/flutter/engine/tree/master/lib/stub_ui and the rules to build the sdk are located at https://github.com/flutter/engine/tree/master/web_sdk.
Subsequent changes to the dart sdk in the engine will require another run of ninja -C out/host_debug_unopt and a restart or browser refresh. Currently the web compilers do not recompile the web engine, and instead it works because the dart sdk is loaded as a separate javascript bundle in the browser during development mode.
Release and profile builds
A release build uses dart2js instead of the development compiler to produce a single JavaScript file. This can be run with the flutter run -d chrome --release/--profile flag or built using flutter build web. The latter will output files at build/web, including the assets, which need to be served together. A profile build contains unminified JavaScript for easier debugging, but is otherwise identical to a release build. There is no support for "building" a debug build, since they generally consist of potentially thousands of small files.
Tests
Unit tests can be run on the web with the argument --platform=chrome. This will compile the tests to JavaScript and run them in a headless Chrome browser. Note that there are still compatibility issues with many flutter tests and bugs with the test bootstrap itself that will need to be resolved.
$ flutter test --platform=chrome
> Downloading Web SDK...                                              1.1s
> Running "flutter pub get" in flutter...                             0.4s
>
> Compiling test/scheduler/debug_test.dart for the Web...

There is no current support for driver tests.

I added a web section to the engine wiki: https://github.com/flutter/flutter/wiki/Compiling-the-engine#compiling-for-the-web


Kernel panic on 1.1.4 update

FYI,
Downloaded an update to 1.1.4 and as soon as I clicked on "Install and Relaunch" got a kernel panic.
Unable to find any related crash logs. After I rebooted, ControlPlane still on 1.1.3. Second update attempt worked fine.

What's your configuration (evidence sources)?

Computer configuration or ControlPlane configuration?
Evidence Sources:
AudioOutput
IP Address
NetworkLink
USB Device Source
WiFi Network Name

Hmm, and was there any context switch happening when this occurred?

Nope. Sitting at work. Have not moved the laptop since 8am.
Currently used evidence sources for Work context are:
Active ethernet port and  a specific IP Address.

No matter, apparently kernel panics do get logged, could you please follow the instructions here and upload the crash log somewhere?

Oh, I know they get logged, but they are not in their usual locations.
There is no fresh logs in /Library/Logs/DiagnosticReports. Last one I have is from 12/29/2011
This is rather odd. I have never seen a kernel panic without a log....

Quote from Apple:

The kernel panic text is added to the log after you restart the computer, assuming that you did not reset PRAM (the kernel panic text is stored in PRAM until you restart)

You didn't do that, did you?

Nope. No PRAM reset.  I just went through every log file in /Library/Logs, ~/Library/Logs and /var/log.
Can not find anything even close to this kernel panic....
here is what i have in my syslog. I got a kernel panic at 12:43pm
https://www.dropbox.com/s/1jybcckbi788pr2/syslog.txt

This might be quite annoying, but could you try the update process a few times?

Im on 1.1.4 already. Do you want me to downgrade and try upgrading again?
Also (not sure if ControlPlane related), I have an action to enable/disable screensaver password, and change screensaver time between Home and Work contexts. When I bring the laptop home, first thing that happens is a loginwindow crash as soon as the laptop wakes up. I get a blank screen with backlight and a mouse pointer, so i have to ssh in from my iPad or another computer and restart loginwindow. Sometimes I see a blue background for a few seconds and then loginwindow crashes. If i disable screensaver actions, this does not happen. Funny thing though, this only happens at home. I only had it happen once at work. Perhaps my thunderbolt display has something to do with it....
Again, this is probably Apple video driver related, as there is a 159 page thread on Apple support forums of people having similar video-related issues, but I figured i should give you guys a heads up.

Both of those actions send a message to the login window
CFMessagePortRef port = CFMessagePortCreateRemote(NULL, CFSTR("com.apple.loginwindow.notify"));
	success = (CFMessagePortSendRequest(port, 500, 0, 0, 0, 0, 0) == kCFMessagePortSuccess);

I've never bothered to find out why they do that and left it alone.

Yes that's what I meant. The action problems should be moved to another thread/issue.

I happen to use the ScreenSaver password action myself and I've actually always blamed Lion for this issue.  Each time my computer resumes from sleep after coming home from work where I have an external monitor the login window doesn't appear.  I simply type in my password on the system unlocks.
Because of this thread I thought I'd test the idea that I'm seeing the same thing you are, so I disabled the actions.  Sure enough, I get home, open the lid and the login screen appears.  Looks like I can stop saying #blamelion and start saying #blamecontrolplane for this one.
On Jan 4, 2012, at 3:49 PM, David Jennes wrote:

Yes that's what I meant. The action problems should be moved to another thread/issue.

Reply to this email directly or view it on GitHub:
https://github.com/dustinrue/ControlPlane/issues/110#issuecomment-3361740

@dustinrue: i would not go so far as to blame ControlPlane.  At first I thought it was it, but then I tried Sidekick and caused the same exact issue.
Here is the thread from Apple support forums. 155 pages of video issues....
https://discussions.apple.com/thread/3191083?start=0&tstart=0
Sorry for highjacking my own issue thread with this video issues. I will downgrade to 1.1.3 and try to upgrade a few times to see if i can reproduce the kernel panic I got yesterday.

I'm willing to bet SideKick does the same trick...
On Jan 4, 2012, at 6:20 PM, solefald wrote:

@dustinrue: i would not go so far as to blame ControlPlane.  At first I thought it was it, but then I tried Sidekick and caused the same exact issue.
Here is the thread from Apple support forums. 155 pages of video issues....
https://discussions.apple.com/thread/3191083?start=0&tstart=0
Sorry for highjacking my own issue thread with this video issues. I will downgrade to 1.1.3 and try to upgrade a few times to see if i can reproduce the kernel panic I got yesterday.

Reply to this email directly or view it on GitHub:
https://github.com/dustinrue/ControlPlane/issues/110#issuecomment-3363653

Ok, after 5 different downgrades/upgrades I am unable to reproduce this crash. Perhaps a fluke or something to do with my Work context. I will try at work tomorrow.

Hasn't happened since and have heard of it from anyone else so I'm closing this one


BackendSampler (V1) fails to run with empty classical register

Environment

Qiskit version: main
Python version: 3.11
Operating system:

What is happening?
The BackendSampler primitive fails to run if provided a circuit where the classical register contains zero bits.  (Note that currently BackendSampler only supports a single classical register -- see #11967.)
How can we reproduce the issue?
from qiskit.circuit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit.primitives import BackendSampler
from qiskit_aer import AerSimulator

qreg = QuantumRegister(1)
creg = ClassicalRegister(0)
qc = QuantumCircuit(qreg, creg)
qc.h(0)

backend = AerSimulator()
sampler = BackendSampler(backend=backend)
sampler.run([qc], shots=1024).result()

raises the traceback
Traceback (most recent call last):
  File "/home/garrison/Qiskit/qiskit/empty-creg-backendsamplerv1.py", line 13, in <module>
    sampler.run([qc], shots=1024).result()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/garrison/Qiskit/qiskit/qiskit/primitives/base/base_sampler.py", line 131, in run
    circuits, parameter_values = validation._validate_sampler_args(circuits, parameter_values)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/garrison/Qiskit/qiskit/qiskit/primitives/base/validation.py", line 87, in _validate_sampler_args
    circuits = _validate_circuits(circuits, requires_measure=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/garrison/Qiskit/qiskit/qiskit/primitives/base/validation.py", line 117, in _validate_circuits
    raise ValueError(
ValueError: The 0-th circuit does not have any classical bit. Sampler requires classical bits, plus measurements on the desired qubits.

What should happen?
No error.  Empty string or value of zero is appropriate for a register with no classical bits.
Any suggestions?
Related issue: #12043

Actually, until more than one classical register is supported (#11967), I think this behavior is reasonable.  I am going to close this.  (I opened this issue prematurely before I fully understood what was happening.)


Cannot render the correct image from mesh .obj with texture

test.zip
Thanks for your support. But I can not get good rendering effects using my own dataset in this.zip file. The mesh object can be visualized in the meshlab software. However, I  get something shown here:

And the code I used as shown here:
import json
import os
import glob
import time
import kaolin
from PIL import Image
import torch
import numpy as np
from matplotlib import pyplot as plt

import kaolin as kal
mesh_path = r"new_musk.obj"
mesh = kaolin.io.obj.import_mesh(mesh_path,with_materials=True,with_normals=True)

vertices = mesh.vertices.cuda().unsqueeze(0)
vertices.requires_grad = True
faces = mesh.faces.cuda()
uvs = mesh.uvs.cuda().unsqueeze(0)

nb_faces = faces.shape[0]
#nb_vertices = vertices_init.shape[1]
face_size = 3

face_uvs_idx = mesh.face_uvs_idx.cuda()
def get_camera_from_view(elev, azim, r=3.0, look_at_height=0.0):
    x = r * torch.sin(elev) * torch.sin(azim)
    y = r * torch.cos(elev)
    z = r * torch.sin(elev) * torch.cos(azim)

    pos = torch.tensor([x, y, z]).unsqueeze(0)
    look_at = torch.zeros_like(pos)
    look_at[:, 1] = look_at_height
    direction = torch.tensor([0.0, 1.0, 0.0]).unsqueeze(0)

    camera_proj = kal.render.camera.generate_transformation_matrix(pos, look_at, direction)
    return camera_proj

face_uvs = kal.ops.mesh.index_vertices_by_faces(uvs, face_uvs_idx).detach()
face_uvs.requires_grad = False
texture_map = mesh.materials[0]['map_Kd'].unsqueeze(0).float().permute(0,3,1,2).cuda()/255
#camera projection
camera = kal.render.camera.generate_perspective_projection(np.pi / 3).cuda()
camera_projection = camera
elev = 1.047
azim = 0.0
radius = 1.5
look_at_height = 0.25

camera_transform = get_camera_from_view(torch.tensor(elev), torch.tensor(azim), r=radius,look_at_height=look_at_height).cuda()
face_vertices_camera, face_vertices_image, face_normals = kal.render.mesh.prepare_vertices(
    vertices, faces, camera_projection, camera_transform=camera_transform)
### Perform Rasterization ###
# Construct attributes that DIB-R rasterizer will interpolate.
# the first is the UVS associated to each face
# the second will make a hard segmentation mask
face_attributes = [
    face_uvs.repeat(1, 1, 1, 1),
    torch.ones((1, nb_faces, 3, 1), device='cuda')
]

image_features, soft_mask, face_idx = kal.render.mesh.dibr_rasterization(
            512, 512, face_vertices_camera[:, :, :, -1],
            face_vertices_image, face_attributes, face_normals[:, :, -1],
            rast_backend='cuda')
# image_features is a tuple in composed of the interpolated attributes of face_attributes

texture_coords, mask = image_features

mask =mask.cpu()
image = kal.render.mesh.texture_mapping(texture_coords,texture_map.repeat(1, 1, 1, 1),
                                        mode='bilinear').cpu()
image = torch.clamp(image * mask, 0., 1.)
print('image.shape: ',image.shape)
print('image.max(): ',image.max())

tensor1 = image[0].detach().cpu().numpy()
print('tensor1.shape: ',tensor1.shape)
path=r"render_image.jpg"
Image.fromarray((tensor1 * 255).astype(np.uint8)).save(path)

Could you help me figure out the reasons?

Hi @wangmiaowei , we currently don't really support cyclic UVs for interpolation of textures, as stated in https://kaolin.readthedocs.io/en/latest/modules/kaolin.render.mesh.html#kaolin.render.mesh.texture_mapping the expected coordinates are in the [0, 1] range while your UVs avec in [-1, 1] range.
An easy workaround is to simply modify you code the following:
image = kal.render.mesh.texture_mapping(
    texture_coords % 1.,
    texture_map.repeat(1, 1, 1, 1),
    mode='bilinear'
).cpu()

Thanks @Caenorst It works well!


it doesn't seem like the bomb cells have any effect on the algorithm

The path found goes through the bombs cells. So what does mean a bomb cell?

Hi @ekleiman22
Just for context:
The bomb cells are applicable to only the Dijkstra's algorithm and not the other algorithms.
Since Dijkstra's algorithm finds the shortest path between nodes in a weighted graph, we need the cells in the grid to have different weights to visualise this. This is why I have given the option to convert cells to bomb cells. A bomb cell has a weight of 10 and a non-bomb cell has a weight of 1.
Coming to your question now:
The algorithm will try to find the shortest path and while doing that, it will try to avoid the bomb cells to find the path with the least total weight. However, if there exists no path in which bomb cells can be avoided completely, it will have to go through the bomb cells.

Thanks. Understand.


Rename $uiTreeHelper service to UiTreeHelper

The dollar sign is a convention used for services provided by Angular.
Renamed the helper service to avoid confusion.

@ppuleo are you interested in reviewing this change?

@Voles Yes, this looks great. All the tests pass for me and the examples work correctly. Definitely makes sense to remove the $ for non-Angular services.

@ppuleo thanks for reviewing! Merged :balloon:


Update Travis CI to test latest NodeJS v5.x.x

Using stable only gets you NodeJS v5.0.0, switching to 5 gets the latest "stable" which is currently v5.4.0

Thanks!


Some issue on general info in setting page

Describe the bug

favicon image is not display in cropper while edit
logo image is not display in cropper while edit
favicon not working

Screenshots

https://www.berrycast.com/conversations/b9c14701-473d-57a9-a5ad-0d6294eda959


Pass 'not' to commit count

Due to #24409 , we can now specify '--not' when getting all commits from a repo to exclude commits from a different branch.
When I wrote that PR, I forgot to also update the code that counts the number of commits in the repo. So now, if the --not option is used, it may return too many commits, which can indicate that another page of data is available when it is not.
This PR passes --not to the commands that count the number of commits in a repo

Some thoughts:

CommitsCount(ctx context.Context, repoPath, not string, revision ...string) seems very fragile, too many similar arguments , it would cause bugs sooner or later.

Using some Opt struct to pass complex arguments could be an approach

It needs some tests, to avoid something unexpected happening again, and make the code could be maintained/improved in the future.


Add badges from CI

Follow some of the patterns from JupyterLite, etc. to add an RTD badge to PRs.

Image works, now but is broke, see: https://github.com/deathbeds/jupyak/pull/12


Screenshot image does not match recent Windows versions UAC credential dialog

[Enter feedback here]
The screenshot that shows the prompt to enter username password does not match current version of Windows - only a default admin username is shown, and a "More Choices" link below the password text box must be clicked before there is any indication that the user can input any other administrative username name/password combo.
Suggest to include updated gif - see (https://social.technet.microsoft.com/Forums/windows/en-US/6ba968a3-004a-4eaf-9679-74d411431f2c/how-to-customize-uac-prompts?forum=win10itprosecurity)

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

ID: 495688e2-ca8d-a005-19d2-5ee9138c86f2
Version Independent ID: 760f236c-5eb0-00cd-9553-990f29ee5aa4
Content: How User Account Control works (Windows) - Windows security
Content Source: windows/security/identity-protection/user-account-control/how-user-account-control-works.md
Product: m365-security
GitHub Login: @Dansimp
Microsoft Alias: dansimp

Thanks @modernman1 for the feedback. A community member submitted a change for this issue, which should go live around 11 AM Pacific on 4 May.

Thank you for taking the time to do this.


Error opening application/octet-stream

Please add more details

Closing as there is no detail provided.


Rename Qrcode.svelte to QrCode.svelte

Following issue #7
Renaming the file in order for index.js to find the QrCode.svelte file and not Qrcode.svelte file.

Closes #
📑 Description

✅ Checks

[ ] My pull request adheres to the code style of this project
[ ] My code requires changes to the documentation
[ ] I have updated the documentation as required
[ ] All the tests have passed

ℹ Additional Information

Thanks. But it is already updated.


feat: Add client options support

The PR adds ClientOptions to support the client. It is necessary to communicate with the Azure Sovereign Cloud solutions.

Possible Test cases and follow-ups:

[x] Integrate the options inside Telegraf a test the new options.

@ShiranAvidov or @srebhan Could you please have a look?

@redbaron Could you please have look?

Thank you for the contribution @ZPascal!
The team will take a look as soon as possible 🙏🏼

Hey @8naama, the PR is ready for another review.

@8naama Thank you for the update!


bugfix: endless loop

endless and cosume massive cpu if a ping packet lost

similar problem as issue #13

Thanks for the contribution! sorry for the delay getting to this.

this has now been fixed in #40