How to add markdown-it plugins

I attempted to add the Shikiji code highlighting plugin, but encountered a failure as the content is not rendering on the page. Below is my usage method:
import Shikiji from 'markdown-it-shikiji'

export default defineNuxtConfig({
  modules: [
    // others
    'nuxt-markdown-render',
  ],

  nuxtMarkdownRender: {
    as: 'article',
    componentName: 'NotNuxtMarkdown',
    options: {
      html: true,
    },
    plugins: ['pluginMdc', Shikiji({
      themes: {
        light: 'vitesse-light',
        dark: 'vitesse-dark',
      },
    })],
    global: true,
  },

const md = '#hello world'
<NuxtMarkdown class="prose" :source="md" />

Could you please provide guidance on the correct usage or any additional steps needed to successfully add the Shikiji code highlighting plugin to my project?  Thank you for your assistance!

I noticed that some plugins aren't correctly working when added with additional configs.
This is something I've planned to debug during the upcoming week (currently flying back home), I'll update once I'm up with something.

Btw: if in your nuxt.config.ts you set :
componentName: 'NotNuxtMarkdown'

Then in your nuxt page/layout/component you have to use that naming:
<script setup>
const md = `# hello world`
</script>

<template>
  <NotNuxtMarkdown class="prose" :source="md" />
</template>

I apologize; this is a basic mistake. I modified the code like this, but it still doesn't work properly. The console is outputting an error.
import Shikiji from 'markdown-it-shikiji'
import { appDescription } from './constants/index'

export default defineNuxtConfig({
  modules: [
    'nuxt-markdown-render',
  ],
  nuxtMarkdownRender: {
    plugins: ['pluginMdc', Shikiji],
  },

<NuxtMarkdown class="prose" :source="md" />

I apologize; this is a basic mistake. I modified the code like this, but it still doesn't work properly. The console is outputting an error.
[...]

No problem! And thanks, now I might know what the problem is.
Once I'm home (in a couple of days max) I'll work on it, either by implementing a fix or a workaround I already had in mind.

@lnbiuc I forgot that I already implemented the workaround for such cases.
The issue is that some plugins are promises that needs to be resolved before being used.  Until I handle them properly a simple workaround would be not to use those plugins inside nuxt.config.ts but instead create your own custom component that resolve those promises and adds them, for example create a ~/components/MyMarkdown.vue:
<template>
  <NuxtMarkdown
    :source="source"
    :options="{ html: true }"
    :plugins="[configuredShiki]"
  />
</template>

<script setup>
import shiki from '@shikijs/markdown-it'

const configuredShiki = await shiki({
  themes: {
    light: 'vitesse-light',
    dark: 'vitesse-dark'
  }
})

const props = defineProps({
  source: {
    type: String,
    required: true,
  },
})
</script>

And then use it in your pages/layouts/components:
<template>
  <MyMarkdown :source="md" />
</template>

<script setup>
const md = `
# My Markdown
`
</script>

Thank you very much for taking the time to help me resolve the issue. Through your assistance, the problem has been perfectly resolved. I will now close this issue.

I'm replying here just for backlogging this.
I completely forgot about runtimeConfig serialization, this means that we cannot pass plugins from nuxt.config.ts at all, thus making the workaround the only option available. I'll both remove the plugin option from the runtimeConfig as well as adding a dedicated section on how to correctly handle the use of plugins.

@Sandros94 I have upgraded nuxt-markdown-render to version 1.2. I encountered a problem when I tried to use another markdown-it plugin. I couldn't configure the plugin correctly. Here is my code, and I intend to use markdown-it-anchor to generate a table of contents.
Directly using the plugin, the plugin can work properly, but I am unable to add configurations.
<script setup lang="ts">
import shikiji from 'markdown-it-shikiji'
import anchor from 'markdown-it-anchor'

const props = defineProps({
  source: {
    type: String,
    required: true,
  },
})

const { rendered: NuxtMarkdown } = useNuxtMarkdown(props.source, {
  plugins: [
    await shikiji({
      themes: {
        dark: 'github-dark',
        light: 'github-light',
      },
    }),
    anchor,
  ],
})
</script>

<template>
  <NuxtMarkdown />
</template>

In order to configure the anchor plugin, I modified the code.
const { rendered: NuxtMarkdown } = useNuxtMarkdown(props.source, {
  plugins: [
    await shikiji({
      themes: {
        dark: 'github-dark',
        light: 'github-light',
      },
    }),
    anchor({
      level: 2,
    }),
  ],
})

However, I noticed that the first parameter of anchor() is MarkdownIt, so I modified the code to

<script setup lang="ts">
import shikiji from 'markdown-it-shikiji'
import anchor from 'markdown-it-anchor'
import md from 'markdown-it'

const props = defineProps({
  source: {
    type: String,
    required: true,
  },
})

const { rendered: NuxtMarkdown } = useNuxtMarkdown(props.source, {
  plugins: [
    await shikiji({
      themes: {
        dark: 'github-dark',
        light: 'github-light',
      },
    }),
    anchor(md, {
      level: 2,
    }),
  ],
})
</script>

<template>
  <div class="violet-prose">
    <NuxtMarkdown />
  </div>
</template>

but, this does not work properly.

If possible, could you give an example of how to correctly configure the plugin?

indeed, since I was mainly learning things from vue-markdown-render I copied a limitation they have too.
As soon I'm able to I'll fix the types that prevent this, thanks for reopening this


Issue with installation

Windows 7pro SP1 - 64bit
Details:
Output folder: C:\pinguino-11
Python v2.7 not detected in your system. Installing it...
Output folder: C:\Users\GRZEGO~1\AppData\Local\Temp
Extract: python-2.7.7.msi... 100%
Execute: "msiexec" /i "C:\Users\GRZEGO~1\AppData\Local\Temp\python-2.7.7.msi"
Python v2.7 installed.
Delete file: C:\Users\GRZEGO~1\AppData\Local\Temp\python-2.7.7.msi
PyPIP not detected in your system. Installing it...
Output folder: C:\Users\GRZEGO~1\AppData\Local\Temp
Extract: get-pip.py... 100%
Execute: "C:\Python27\python" "C:\Users\GRZEGO~1\AppData\Local\Temp\get-pip.py"
Delete file: C:\Users\GRZEGO~1\AppData\Local\Temp\get-pip.py
Wheel not detected in your system. Installing it...
Wheel not installed. Error code was: error!
Installation proces hanged on PIP, even if Python and PIP is installed manually cannot be detected correctly. It can by caused by limited rights on the machine. I do not have access to Administrator account. "Run as administrator" on user account does not make any change.

Hi! Sory for the delay.
Can you solve this problem ? If not yet, please try to execute this command: '"C:\Python27\Scripts\pip.exe" install wheel' and see what's the result on a CMD console.
Thanks, and best regards.


Add segment offset validation against previous element

The start offset is required to be greater than the start offset of any byte in the linear-memory space that will be initialized by a prior element in the array.

Can you do this using string concatenation rather than stringstream?
Also, shouldn't this be checking that the segment starts after the previous segment's end, rather than its beginning?

Added another commit with more improvements to the memory checking.
Created a bunch of parser tests that I used and have put a pull request for the spec: https://github.com/WebAssembly/spec/pull/311


Low Trackpad sensitivity

Hey,
I have noticed that trackpad sensitivity is kind of low. What I mean is that sometimes it registers three finger swipe, sometimes it does not. I have to kind of press more firmly compared to a real mac.
I am not talking about "Tracking speed" which just makes your mouse move faster.
Is there anyway I could tweak this? I tried scavenging through various forums, but people only talk there about "Tracking speed" not the actual sensitivty of registering your fingers.

Yeah three finger swipe works only 50% of the times if you are not used to the kind of sensibility it has.
You should look into VoodooPS2 repo to get familiar with how it works, I have never tried to change anything.

Alright, so after fiddling a bit, I have found this package: https://github.com/acidanthera/VoodooPS2. Using it now for a day, it seems like it made the trackpad more responsive (especially the 3 fingers swipe).
Closing it now :)

What do you mean by this package? Acidanthera’s VoodooPS2 kext is already built into my repo’s EFI.
You updated it?

Oh, okay, I thought you were using Rehab's (https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller).
To answer your question, yeah, I downloaded the latest version (2.1.5)

Newer version are known to cause some issues and lag when performing some actions as discussed in #10 (second part). At least for me it makes all choppy when dragging windows around using physical keys and Trackpoint. But yeah, swipes gestures are smoother in the latest version. Didn’t you noticed some weird behaviours with it?

In addition 2.1.5 will break PrtScr key map if you have one, unless you don’t modify the kext itself.

Hey, I've just updated the repo with a new trackpad kext, It's a lot snappier than before and supports all gestures!


flutter airwallex?

have flutter version?. support ios and   android?

Hi @bochaolin-lingoace , we're looking into this in this quarter, will let you know if there's further update!


Authorisation problem when deploying training pipeline

Hello,
I have been following your quick start guide, and have got to the stage where I need to deploy the pipeline "deploy-model-training-pipeline.yml" on Azure DevOps.
When I run this, it goes as far as the Run pipeline in AML step in DevOps, then I get this error:
If there is an Authorization error, check your Azure KeyVault secret named kvmonitoringspkey. Terraform might put single quotation marks around the secret. Remove the single quotes and the secret should work.
.create table mlmonitoring (['Sno']: int, ['Age']: int, ['Sex']: string, ['Job']: int, ['Housing']: string, ['Saving accounts']: string, ['Checking account']: string, ['Credit amount']: int, ['Duration']: int, ['Purpose']: string, ['Risk']: string, ['timestamp']: datetime)
Cleaning up all outstanding Run operations, waiting 300.0 seconds
2 items cleaning up...
Cleanup took 0.08368873596191406 seconds
Traceback (most recent call last):
  File "/azureml-envs/XXXXXX/lib/python3.7/site-packages/azure/kusto/data/security.py", line 68, in acquire_authorization_header
    return _get_header_from_dict(self.token_provider.get_token())
  File "/azureml-envs/XXXXXX/lib/python3.7/site-packages/azure/kusto/data/_token_providers.py", line 123, in get_token
    token = self._get_token_impl()
  File "/azureml-envs/XXXXXX/lib/python3.7/site-packages/azure/kusto/data/_token_providers.py", line 554, in _get_token_impl
    return self._valid_token_or_throw(token)
  File "/azureml-envs/XXXXXXX/lib/python3.7/site-packages/azure/kusto/data/_token_providers.py", line 201, in _valid_token_or_throw
    raise KustoClientError(message)
azure.kusto.data.exceptions.KustoClientError: ApplicationKeyTokenProvider - failed to obtain a token.
invalid_client
AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'XXXXX'.
Trace ID: XXXXXX
Correlation ID: XXXXXXX
Timestamp: 2022-11-01 15:46:31Z

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "prep.py", line 83, in <module>
    main()
  File "prep.py", line 80, in main
    log_training_data(df, args.table_name)
  File "prep.py", line 35, in log_training_data
    collector.batch_collect(df)
  File "/azureml-envs/XXXXX/lib/python3.7/site-packages/obs/collector.py", line 158, in batch_collect
    self.create_table_and_mapping()
  File "/azureml-envs/XXXXX/lib/python3.7/site-packages/obs/collector.py", line 132, in create_table_and_mapping
    self.kusto_client.execute_mgmt(self.database_name, CREATE_TABLE_COMMAND)
  File "/azureml-envs/XXXXX/lib/python3.7/site-packages/azure/kusto/data/client.py", line 891, in execute_mgmt
    return self._execute(self._mgmt_endpoint, database, query, None, self._mgmt_default_timeout, properties)
  File "/azureml-envs/XXXXX/lib/python3.7/site-packages/azure/kusto/data/client.py", line 959, in _execute
    request_headers["Authorization"] = self._aad_helper.acquire_authorization_header()
  File "/azureml-envs/XXXXX/lib/python3.7/site-packages/azure/kusto/data/security.py", line 72, in acquire_authorization_header
    raise KustoAuthenticationError(self.token_provider.name(), error, **kwargs)
azure.kusto.data.exceptions.KustoAuthenticationError: KustoAuthenticationError('ApplicationKeyTokenProvider', 'KustoClientError("ApplicationKeyTokenProvider - failed to obtain a token. \ninvalid_client\nAADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'XXXXXXX'.\r\nTrace ID: XXXXXXXX\r\nTimestamp: 2022-11-01 15:46:31Z")', '{'authority': 'XXXXXX', 'client_id': 'XXXXX', 'kusto_uri': 'https://adxmlopsv286309prod.uksouth.kusto.windows.net'}')

I have done some investigating:

It appears my Prod Service Principal is set up correctly. When I go to Project Settings > Service Connections > Azure-ARM-Prod > Edit, there is an option to verify the connection. It works here.
When I check my App Registrations and investigate the "Certificates and Secrets tab" of "Azure-ARM-Prod-mlops-sparse" there is indeed a secret in here. (The terraform pipeline to create the Prod infrastructure works, so I am lead to believe that my SPs are working correctly.)
When I go to my Prod Key Vault, there is a secret called kvmonitoringspkey - looking at this though the Secret Value is just $(CLIENT_SECRET) - is it meant to be this? If so, why? And where was is set to this?

Do you have any advice on how I can fix this error?

@nicoleserafino Could you help us on this issue?

@andrewblance Let me review this. You are right that this issue is related to the monitoring via the Data Explorer. If you don't need the monitoring or data drift, please disable the setup of the Azure Data Explorer. If you want to make it work, then you will need to setup client_secret in the config-infra-prod.yml
I believe that we have an issue with the monitoring setup and the documentation is certainly missing a step on how to configure it properly.

@andrewblance You can find the client secret being created in this template: https://github.com/Azure/mlops-templates/blob/main/templates/infra/create-sp-variables.yml
$(CLIENT_SECRET) becomes an environment variable in the ADO agent when you run the infra pipeline (see line 50 here: https://github.com/Azure/mlops-project-template/blob/main/infrastructure/terraform/pipelines/tf-ado-deploy-infra.yml)
However, I am not able to reproduce your problem :( When I run the pipeline and then look in key vault, I'm able to see a secret that's 56 characters long...
There is a separate issue that we are working to solve. It turns out when you use Terraform to inject a secret into key vault, it puts single-quotes around the secret value, and I thought that might be why your authentication is failing... We are going to migrate the key management to use AZ CLI instead because of this, but you'll have to bear with us while we push out the changes.
Can you try running the sparse checkout again, with the aml-cli-v2 classical example and rerunning the terraform pipeline? We've made some changes recently to the IAC. Please check that "enable_monitoring" is set to true in the config-infra-prod.yml file, as we have it off by default in our main branch.
Finally, delete your unused ADX resources :) They've been known to cost a pretty penny...

@cindyweng Thank you so much! That was incredibly useful!
I think I found the cause - in the version of tf-ado-deploy-infra.yml I had I did not have the same line 50, and therefore was not calling the create-sp-variables template. When I originally cloned the file must have been a little different (looking at the git history suggest this may be the case, apologies). I added it in and reran sparse checkout. It works now!
I bumped into the single-quote issue you mentioned - but I created a new version of the key, and everything works now. Thank you for helping me here!
I note that some of the features between AZ CLI and the Python SDK are slightly different (there is no Python SDK pipeline to create an endpoint). I think I will try to make this myself (once I work through the drift monitoring pipelines), but I was curious if there was a reason the CLI version was created before the Python one - is the CLI Microsoft's suggested method of creating pipelines and interacting with AML in scenarios like this?

@andrewblance with regards to your question on why CLI was done first, it came down to the choice that we had to pursue. We decided to first focus on the CLI and get it ready so that a larger number of folks can use it, especially it doesn't require you to learn python. Once that is ready, we can work on the Python SDK example to get similar examples in the repo.
We are also working out the logistics to allow for contributions on the various ML methods or ideas on the improvement for the workflow. We don't want the repo to get so complicated that it loses its appeal.
Hope that helps. Happy to have a broader conversation with you in case you are interested to contribute.


⚠ Bofrost.lu has degraded performance

In bde26c0, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1296 ms

Resolved: Bofrost.lu performance has improved in 3223c60 after 6 minutes.


no variable for window.chrome

No global variable for window.chrome in headless mode?

Sorry, this makes little sense. Please follow the issue template.

No response; closing.


GOOGLE_GLOG_DLL_DECL needs to be put into header file

Having CMake set this by compiler command line means anyone using an already compiled library must know what the value was at glog compile time.  This should be put directly into the header (include) files or better into a global config header file.

Hi.
There is ifndef statement in logging.h, what type of error or problem you are getting?
// Annoying stuff for windows -- makes sure clients can import these functions
#ifndef GOOGLE_GLOG_DLL_DECL
# if defined(_WIN32) && !defined(__CYGWIN__)
#   define GOOGLE_GLOG_DLL_DECL  __declspec(dllimport)
# else
#   define GOOGLE_GLOG_DLL_DECL
# endif
#endif


chore: remove refs to deprecated io/ioutil

Thanks for taking the time to contribute to clickhouse-operator!
Please, read carefully instructions on how to make a Pull Request.
This will help a lot for maintainers to adopt your Pull Request.
Important items to consider before making a Pull Request
Please check items PR complies to:

[ ] All commits in the PR are squashed. More info
[ ] The PR is made into dedicated next-release branch, not into master branch1. More info
[ ] The PR is signed. More info

--
1 If you feel your PR does not affect any Go-code or any testable functionality (for example, PR contains docs only or supplementary materials), PR can be made into master branch, but it has to be confirmed by project's maintainer.

looks like safe to merge
@testwill thanks for contribution


Unable to compile on Raspberry Pi 3+

Hello, I'm trying to find software to drive a Pelco-D PTZ mount, but I'm unable to compile this on a Raspberry Pi 3+. I may have no idea what I'm doing.
go install -o "cctv-ptz" -ldflags "-X main.VERSION=1.0.0 -X main.BUILD_DATE=20190319.025019.484" github.com/boxofrox/cctv-ptz
flag provided but not defined: -o
usage: install [build flags] [packages]

Are you running go install ... on the Raspberry Pi 3+, or trying to cross compile?  I have access to a Rasp Pi 3+ to test the build on.
I've not tried building the project on a Pi, before.  At first glance, it seems the -o "cctv-ptz" is a bad flag when running go install.

The following worked on a Rasp Pi 3+.  I don't have the equipment readily available to test anything more than cctv-ptz --help and cctv-ptz --version.  The program doesn't crash with those two basic tests, so I've no reason the rest won't work with the RS-485 and joystick connected.
go get github.com/boxofrox/cctv-ptz
go install github.com/boxofrox/cctv-ptz

It appears that golang removed -o from the accepted flags for go install since I began this project.

Thank you for responding! After setting my GOPATH to my local cvs directory, I was able to use your commands above. Now working out communications and addressing. Thanks again!


Update max retries from 5 to 2

We would like to decrease the number of retries from 5 to 2 in order to reduce the amount of time between Proctortrack being down and edX notifying a learner that they are in an error state.

recommending we close this in favor of https://github.com/joshivj/edx-proctoring-proctortrack/pull/13


docs: add legal section

I'm adding a new top level section to Docs: docs.apify.com/legal This section will house all of our public facing terms, policies and agreements.
At this time, I don't need it to be linked from the Docs homepage or from the top navigation bars, since the individual documents will be linked directly from elsewhere. In the future, we should find a reasonable place for a link to the whole section.
The individual terms and agreements will follow.

Lychee is failing because the documents don't exist yet, so they're throwing 404s.

Yes, this is expected behavior, due to the way we had to set Lychee up


micro:bit v2 MICROPYTHON onewire DB18B20 waterproof temp sensor

I need micro:bit v2 micropython .py library files for the onewire protocol and DS18B20 driver for a waterproof temp sensor. Research has been frustrating. Has anyone ported this yet.
I took a look at PyCom. Looks good if I could get enough info on micro:bit v2 micropython implementation. For example need to deal with removing from machine import Pin with from microbit import pin1...and then deal wirh the equivalwnt OPEN_DRAIN pin mode using pin1...without a map of rhe micro:bit v2 micropython environment...this will be trial and error, and I am alreadg in too many rabbit holes on this project.  I DO NOT want to go back to the TMP36 because it requires a constant reference voltage. If you use your battery or battery points, temp readings change as the battery drains, and adding constant refererence voltage circuit is battery expensive
Any sources for the afforementioned files?
Thank You

Thanks to @rhubarbdog:
https://github.com/rhubarbdog/microbit-ds18b20

The code doesn't work. It requires an oscilloscope to get the timings correct. The big number in the sleep sub routine needs to be reduced and possibly also the number of register 7 needs to be reduced before calling the sleep sub routine

Thanks for letting us know @rhubarbdog

MicroPython does have a built-in onewire module and drivers for the ds18x20.  But the onewire module is not enabled on the micro:bit and needs to be compiled into the firmware to work.

Damien,
Thank you. Why was it 'turned off'? What would be required to get a micro:bit version of the micropython image onto the micro:bit. Will that cause problems with other services and hardware assumptions?
Maybe you could help with the actual dilemma I am having. I need a reliable temperature sensor for the micro:bit for HVAC supply and return temperatures as well as a waterproof implementation for aquariums. This sensor must be used on a battery powered micro:bit using micropython.
I had used the TMP36 sensor, but this requires a constant reference voltage, of which the micro:bit does not supply (without modification). So, when the TMP36 is used the temperature changes during battery drain based on the manner in which the analog reading is converted to temperature.
This is why I was exploring the use of the DS18B20 waterproof temperature probe which uses the onewire protocol and the DS18X20 driver unavailable in micropython for micro:bit.
So...I am in a catch 22. I either need a simple way to use the DS18B20 or a method to get a constant 3vdc reference voltage from the micro:bit to drive the TMP36 temperature sensor to get reasonably accurate temperature readings.
Any thoughts on your experience with this would be greatly appreciated.
I could use another micro:controller IF I could find one that is compatible with the micro:bit micropython radio communications protocol, of which I have not yet been able to find. In other words, I have not found another microcontroller configuration that will allow me to communicate via radio with the micro:bit v2 micropython environment.
Best,Randy
On Sunday, November 12, 2023 at 10:24:55 PM EST, Damien George<EMAIL_ADDRESS>wrote:

MicroPython does have a built-in onewire module and drivers for the ds18x20. But the onewire module is not enabled on the micro:bit and needs to be compiled into the firmware to work.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

https://support.microbit.org/helpdesk/tickets/68811     Hi Randall  Thanks for contacting the Micro:bit Educational Foundation.     Please don't CC GitHub comments to @.*** Doing so creates new ticket that someone has to triage and assign.     All these people will see a notification of your comment automatically.  https://github.com/microbit-foundation/micropython-microbit-v2/watchers     Kind regards,  Martin Williams  Micro:bit Educational Foundation
                        On
                        Mon, 13 Nov at  2:06 PM
                        ,  Randall Burks<EMAIL_ADDRESS>wrote:

     Damien,

Thank you. Why was it 'turned off'? What would be required to get a micro:bit version of the micropython image onto the micro:bit. Will that cause problems with other services and hardware assumptions?
Maybe you could help with the actual dilemma I am having. I need a reliable temperature sensor for the micro:bit for HVAC supply and return temperatures as well as a waterproof implementation for aquariums. This sensor must be used on a battery powered micro:bit using micropython.
I had used the TMP36 sensor, but this requires a constant reference voltage, of which the micro:bit does not supply (without modification). So, when the TMP36 is used the temperature changes during battery drain based on the manner in which the analog reading is converted to temperature.
This is why I was exploring the use of the DS18B20 waterproof temperature probe which uses the onewire protocol and the DS18X20 driver unavailable in micropython for micro:bit.
So...I am in a catch 22. I either need a simple way to use the DS18B20 or a method to get a constant 3vdc reference voltage from the micro:bit to drive the TMP36 temperature sensor to get reasonably accurate temperature readings.
Any thoughts on your experience with this would be greatly appreciated.
I could use another micro:controller IF I could find one that is compatible with the micro:bit micropython radio communications protocol, of which I have not yet been able to find. In other words, I have not found another microcontroller configuration that will allow me to communicate via radio with the micro:bit v2 micropython environment.
Best,
Randy
                On Sunday, November 12, 2023 at 10:24:55 PM EST, Damien George<EMAIL_ADDRESS>wrote:

MicroPython does have a built-in onewire module and drivers for the ds18x20.  But the onewire module is not enabled on the micro:bit and needs to be compiled into the firmware to work.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Why was it 'turned off'?

Well, more so it was never turned on.  Micro:bit v1 didn't have it and neither does v2.
To enable it and get the DS18x20 driver working requires a bit of work:

ability for pins to be in OPEN_DRAIN mode
implement mp_hal_pin_od_low, mp_hal_pin_od_high
implement mp_hal_quite_timing_enter/exit, mp_hal_delay_us_fast
enable MICROPY_PY_ONEWIRE
freeze in the onewire.py bus driver

Then, the ds18x20.py driver in micropython-lib will work.

Hi,
We look forward to being able to program the ds18b20 with micro:bit with either solution. While waiting for these updates, thank you Damien George and Phil Hal.

Martin,
Good morning. I hope all is well.
Could you please explain to me how the micro:bit v2 memory is available and taken up in the micropython environment.I have researched this morning and cannot find a definitive answer:
micro:bit v2 using the micropython v3 environment
From sources:Total available Flash ROM: 512KBTotal available RAM: 128KB
but my confusion is what is earmarked for what and what is taken up already.
For example:
There is a "drive" available for sketch space (main.py, import *.py, user written files)How much of this is dedicated, available and from what block of memory type does it come from?
When micropython is loaded, how much space does it take up and from what type of memory?
There is a datalogging space that is earmarked. How large is this and from where does it come from?
So...for example...think of the following type of table
Flash ROM Available:                             512KB                            RAM Available:                                                                                128KB
Micropython Taks Up:                                -???                                -???The datalogger space taks up:                 -???                                 -???The "single folder drive" takes up             -???                                 -???Other items I haven't mention take up:    -???                                 -???
I am trying to determine how ALL types of memory is available and used my other than the user of the micro:bit v2.I am also trying to figure out        how much space is available for python files on the "single folder drive"
        how much space is available for run time memory include code, stack, data seg, and heap
        how much space is available for writing data (e.g., text and binary files to the "single folder drive, data to the datalogger)
I would also like to know if any of the available memory (e.g., data logger space) can be redefined for usefor example as additional storage for the "single folder drive" that could accommodate additional import .py files.
Thank You,Randy
Message ID: @.**>

Hi @burksfamly , you have sent your email to an unrelated issue on GitHub.
https://github.com/microbit-foundation/micropython-microbit-v2/issues/162
Would you like to send it to<EMAIL_ADDRESS>Then we might delete it from the issue.


Pre-Commit support to improve code quality

pre-commit is a pretty nice tool to manage other tools such as code formatters and linters used to improve the code quality. It is used by many other projects such as pytest itself.
It would be really great to add this to this repo as well.

Thanks, that sounds useful! I will certainly try this out. As I understand, this would also replace the flake8 and mypy runs we currently do in the test workflow.

Exactly. Or at least you don't need to call them directly but use pre-commit to run it.
If you then want to go even one step further, you could also enable the pre-commit CI which is free for open source projects.

Works fine - thanks for the idea!
I will probably add black sometime later. Currently auto-black changes too much in the code and creates multiple flake8 issues along the line (long lines).

Nice, thank you.
You can also check my flake8 config. It disables two checks that cause conflicts between black and flake8: https://github.com/hofbi/teaching-tools/blob/master/.flake8

Thank you, I had considered this. Actually I had the line length set to 120 in my projects first, but changed it to the pep8 version (e.g. 79) after some discussions in another project. I'm a bit undecided here: while I'm personally perfectly fine with 120 characters (especially considering the usage of long names), it seems to be a bit of a controversal issue, and I can live with both.
Though if this is the standard setting in black, and as black is nowadays considered the standard by many, I may change this...

Sounds good. I don't have a strong opinion on the code format as long as a formatter does it consistent across the codebase


improve performance, improve typings

This PR improves the overall performance of the csrf-package.
This is done by various strategies:

By using the base64url encoding instead of base64 encoding, it drops alot of unnecessary .replace-calls to achiev exactly that. base64url is supported since node 14.18.0, so for older versions, it fallbacks to base64 with string replacement.

to improve the verify()-method, I removed the double hmac equal time solution from the tsscmp-pakage with crypto.timingsafeequal call. Before crypto.timingssafeequal in node 6.6.0 existed the double hmac solution was proposed as a workaround. There were also attempts to implement crypto timingsafeequal with the double hmac solution approach. But that was denied by the node community and CRYPTO_memcmp of OpenSSL is since used for crypto.timingsafeequal implementation.
The only critical point is when we compare the generated actual value with the expected value. timingsafeequal expect that both buffers have the same length. To avoid even exposing the information that actual and expected have different lengths, we do the timingsafeequal and at the end check that the lengths are equal. Thus making it truely timing safe.

to improve the performance of the create()-method, the salt generation is done by creating a salt generator function just in time and calling it, thus reducing some overhead.

etc.
before:
uzlopak@Battlestation:~/workspace/csrf$ node benchmark/
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>  modules@93
<EMAIL_ADDRESS>  napi@8
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>  tz@2021a3
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
> /home/uzlopak/.nvm/versions/node/v16.14.2/bin/node benchmark/create.js

  create

  1 test completed.

  create x 705,158 ops/sec ±0.21% (195 runs sampled)

> /home/uzlopak/.nvm/versions/node/v16.14.2/bin/node benchmark/secret.js

  secret

  3 tests completed.

  secretSync        x 480,648 ops/sec ±0.44% (187 runs sampled)
  secret - callback x 106,458 ops/sec ±0.99% (172 runs sampled)
  secret - promise  x 100,651 ops/sec ±1.07% (172 runs sampled)

> /home/uzlopak/.nvm/versions/node/v16.14.2/bin/node benchmark/verify.js

  verify

  2 tests completed.

  verify - valid   x 130,676 ops/sec ±0.59% (190 runs sampled)
  verify - invalid x 128,384 ops/sec ±0.69% (191 runs sampled)

after:
uzlopak@Battlestation:~/workspace/csrf$ node benchmark
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>  modules@93
<EMAIL_ADDRESS>  napi@8
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>  tz@2021a3
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
> /home/uzlopak/.nvm/versions/node/v16.14.2/bin/node benchmark/create.js

  create

  1 test completed.

  create x 928,047 ops/sec ±0.30% (191 runs sampled)

> /home/uzlopak/.nvm/versions/node/v16.14.2/bin/node benchmark/secret.js

  secret

  3 tests completed.

  secretSync        x 555,162 ops/sec ±0.50% (190 runs sampled)
  secret - callback x 113,889 ops/sec ±1.23% (172 runs sampled)
  secret - promise  x 109,406 ops/sec ±1.19% (176 runs sampled)

> /home/uzlopak/.nvm/versions/node/v16.14.2/bin/node benchmark/verify.js

  verify

  2 tests completed.

  verify - valid   x 588,397 ops/sec ±0.28% (194 runs sampled)
  verify - invalid x 595,054 ops/sec ±0.37% (193 runs sampled)

@kibertoad
Maybe you also want to have a look? :)?

@mcollina for some reason I can't merge, this repo not on fastify team?


Change echoshader proposed hours

@MathewBiddle @ocefpaf : we would like to change the proposed hours for the echoshader idea based on discussion with @valentina-s. Thanks!

@ocefpaf okay if all the projects are 175 or 350?

It is ok.  Being flexible increases our chances to match with a good candidate. For example, I'd rather reduce to 175 hrs and work with someone that will stay contributing, than do 350 hrs with a student that will disappear.


Unable to do any definition lookups inside impl defined inside function

In the main.rs below, you can't lookup anything inside the test() definition inside the impl. get, self, unwrap etc. all can't be found. rustc has no issue compiling it though.
#![allow(dead_code)]

use std::collections::HashMap;

trait Test {
    fn test(&self) -> i32;
}

fn foo() -> () {
    struct Foo {
        h: HashMap<i32, i32>
    }
    impl Test for Foo {
        fn test(&self) -> i32
        {
            return *self.h.get(&3).unwrap();
        }
    }
}

fn main() {
    println!("Hello, world!");
}

$ ~/opt/bin/rust-analyzer --version
rust-analyzer 5ca7cd9

Duplicate of https://github.com/rust-analyzer/rust-analyzer/issues/1559.


Unnecessary repetition

Due to length reasons, the answer was truncated. When I continued to answer, the system continued to ask repeatedly whether to continue. The problem is shown in the following figure:

There's not any good method to solve it except enlarging token length.


Grafana visualization link does not work

Jenkins and plugins versions report

Environment

Running on my machine:
Dockerized jenkins 2.426.3
Dockerized Grafana v10.3.1 (00a22ff8b2)
Dockerized grafana/tempo:2.3.1
Dockerized otel/opentelemetry-collector-contrib:0.96.0

Jenkins Opentelemetry plugin version: 3.1138.v80fc844ed246

What Operating System are you using (both controller, and any agents involved in the problem)?
My machine is ubuntu 20.04 but all of the softwares are on dockers
Reproduction steps

I configured all the softwares to work together.
I configured the opentelemetry plugin to work with the otel collector and added Grafana as visualization tool.
I confirmed that my run trace appears in grafana by exploring my tempo datasource

Expected Results
When clicking on "View pipeline with Grafana", an explore dashboard showing the build trace will be opened.
Actual Results
Grafana browsing dashboard is opened with tempo as datasource, but with an empty TraceQL.
Generated link by the plugin:
http://<my-pc-ip>:3000/explore?orgId=1&left={"datasource":"tempo","queries":[{"refId":"A","datasource":{"type":"tempo","uid":"tempo"},"queryType":"traceql","query":"2ff062252dc2d5f968f6befd6b1d88c2"}],"range":{"from":"1711883663278","to":"1711884863278"}}

Grafana processes it to:
http://<my-pc-ip>:3000/explore?schemaVersion=1&panes={"AAr":{"datasource":"a7d93531-e206-4db5-8b30-46c2d38fd573","queries":[{"refId":"A","datasource":{"type":"tempo","uid":"a7d93531-e206-4db5-8b30-46c2d38fd573"},"queryType":"traceql","limit":20,"tableType":"traces"}],"range":{"from":"1711883663278","to":"1711884863278"}}}&orgId=1

When I browse the build trace manually, the grafana url is:
http://<my-pc-ip>:3000/explore?schemaVersion=1&panes={"4Qi":{"datasource":"a7d93531-e206-4db5-8b30-46c2d38fd573","queries":[{"refId":"A","datasource":{"type":"tempo","uid":"a7d93531-e206-4db5-8b30-46c2d38fd573"},"queryType":"traceql","limit":20,"tableType":"traces","query":"2ff062252dc2d5f968f6befd6b1d88c2"}],"range":{"from":"now-6h","to":"now"}}}&orgId=1

Anything else?
No response
Are you interested in contributing a fix?
No response

What helped for me was to use the data-source-id which grafana uses, instead of the name given to it.
You can find the id in the url when the data source i.e. https://grafana.com/connections/datasources/edit/
to me it looks like grafana resolves the name given to the data source and reload the page but then loses the trace-id which is queried
Perhaps Jenkins should just ask for the id?


Fix useCallback example snippet to match useMemo equivalence clause

Based on the line: https://github.com/reactjs/reactjs.org/blob/486dac1c6786de0b4b670c4d4b14123283974f97/content/docs/hooks-reference.md#L288
I get the impression that the useCallback example code should be of the form useCallback(fn, inputs).

This is not correct, the example in the PR does not switch to the useMemo. In addition, useMemo and useCallback do not pass the parameters from the dependency array into the function, those are only for cache tracking purposes.

Thanks for responding.
Indeed it was my early misunderstanding.


getValues async

Not sure if I'm missing something, but trying to implement the getValues prop and load values from the server async, but I can't figure out how to do this. Is it possible to support and async getValues or do I have to override valueEditor to do this?
Many thanks

Use case

Sorry for the delayed response. Yes, to load values asynchronously you would need to override valueEditor. I'll leave this issue open in case we eventually want to accept an async function in the getValues prop. Seems like a good feature, I just don't know right away how much work it would be to implement.


Make project installable through pip

This must be packaged so that it is able to be installed with pip install.

Done. Until it's version 1.0, install with pip install --pre open-project-linter.


Feat/deduplication

:tada: This PR is included in version 0.11.0-beta.28 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


[GHSA-gmpq-xrxj-xh8m] Arches vulnerable to execution of arbitrary SQL

Updates

References

Comments
Adding the patch link for v7.2.0: https://github.com/archesproject/arches/commit/7ed53e23a616edf3301d95814d9d64de5e3072a9
Adding the GHSL link: https://securitylab.github.com/advisories/GHSL-2022-070_GHSL-2022-072_Arches/
The GHSL link references the CVE: "GHSL-2022-070_GHSL-2022-072: SQL injection in Arches - CVE-2022-41892"
And the issues referenced in the commit patch reference GHSL-2022-070_GHSL-2022-072: "fixes9019, 9021, 9026 in stable/7.1.1"

Hi there @apeters! A community member has suggested an improvement to your security advisory. If approved, this change will affect the global advisory listed at github.com/advisories. It will not affect the version listed in your project repository.
This change will be reviewed by our highly-trained Security Curation Team. If you have thoughts or feedback, please share them in a comment here! If this PR has already been closed, you can start a new community contribution for this advisory


Value of type 'WebSocket' has no member 'onConnect'

compiler error

pod 'Starscream',git: 'https://github.com/daltoniam/Starscream' , tag: '3.1.1'
fix it

btw we won't upgrade to latest Starscream, we will replace it with builtin URLSessionWebSocketTask


Debugging chapter showing probe-rs as supporting the esp32s3 despite this seemingly not being the case ?

Hi,
First of all thanks for the great ressource. I am currently working on getting the built in JTAG interface of the ESP32S3 to work using vscode. Going through the book, it seems like Chapter 5.3 - Debugging indicates the ESP32S3 is supported by probe-rs, despite the next sub chapter Chapter 5.3.1 - probe-rs stating :

There is support for ARM & RISC-V architectures [...]

So to my understanding no extensa support.
The tracking issue for extensa support on the probe-rs repository seems to indicate it has not been completed yet, although I have not checked if some of it has been merged.
I am not using probe-rs on my side, however this did seem a little unclear and thought it best to point out :)

Thanks for the issue! probe-rs has been improving the support on Xtensa devices a lot lately, debugging support needs to be improved in Xtensa devices but you can flash all the ESP32 variants with probe-rs at the moment.


Is this project still maintained?

Hi there,
please @bleonard are you still maintaining the project?
We need to understand whether the effort of collaborating via new PRs is worth it, thanks!

Hi there!
I share this package that I did a few days ago react-native-zendesk-ichat, it lacks the pushNotifications (in a future version I will add it), but it is functional and has the latest versions of the SDK, it is also adapted for the latest versions of RN.

We are not currently using it, unfortunately - so we haven't needed to upgrade and it's harder to verify fixes. Is there someone that would like to take it over?


change theme name has no effect ..

I did change the theme name in settings.yaml, but it has no effect, still the typemill themplate ist loaded. however, change it in system/settings.php does.
Any idea whats the problem?

Thank you for that finding. It is a small bug, I will fix it and push it live next week.


[Mutator] Ynohtna1

The author of this mutator is  ynohtnA
The readme does say "This code is for the Unreal Tournament Demo, and although it may function with the full version of the game (as yet unreleased), no assumptions to that effect should be made."  Just to note that it does work in the full UT (at least the infinite anti-grav boots that I tested do).

URL: https://unrealarchive.org/mutators/unreal-tournament/Y/ynohtna1_46696cad.html
Hash: 46696cade9b831c7b4cfdf09a232789b1da52061
Current name: Ynohtna1

Updated


Adding description of using postcss-js parser with babel 6 compiler

postcss-js parser produce wrapped styles, adding description to fix this problem

Done


Cody VSCode extension response quality

I am experiencing this frequently these days while using either the codebase context/keyword context with Cody.  Whenever I ask any direct question while working with any codebase, it says this:
This example is in the case of the keyword context.

This is for the case of the codebase context with the Cody codebase. The interesting thing I saw here is that when I asked the question using the prompt in the extension, I did not get any response. While using the same prompt, I got a response in the Cody web.

Looking at the behaviour, I can only think that the issue is, for now, the Prompt Quality, but also I guess we need to cross-check once if there's any bug when it reads the current file context etc while working with any codebase.
CC: @abeatrix @umpox @beyang

@deepak2431 Were you connected to the sourcegraph/cody codebase when you asked the question in VS Code, or was it using keyword context?
Cody was able to answer when using embeddings context:

@abeatrix Yes, I was using the sourcegraph/cody codebase context for that question.
Hmm, for you the same prompt works. Not sure of this behaviour!

@deepak2431 i noticed there were only 5 files in yours vs 12 files used as context in mine 👀 Maybe there was a connection issue to the codebase that was causing the issue? If you are able to reproduce it, can you share the logs in the Output channel with me so i can investigate further please?

@abeatrix I tried again the same prompt, it is working now but it still says in the beginning that it doesn't have the context about the codebase.

So, might be the case that it won't be able to connect to the codebase at that time. Btw, just a thought if this is the case sometimes Cody fails to connect to the codebase then we should show a VSCode warning message for the user. WDYT?


Closing git diff closes main file editor

Issue Type: Bug

Open saved file from explorer
Open change diff on the same file from source control
Close change diff file
When you close the change diff, the content of the opened file in it's own tab is gone, no text editor to view. Have to close and re-open to see file contents again.

Azure Data Studio version: azuredatastudio 1.20.1 (fe6312306647441b30102a64bb43abb06ebcf2be, 2020-07-17T02:39:41.016Z)
OS version: Windows_NT x64 10.0.19041

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (12 x 2592)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: enabledrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
47.72GB (28.84GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions: none

It looks like there is something weird with the provisional tab and the diff editor.  You should be able to workaround this issue by double-clicking on the document title prior to opening the diff.  You can tell the difference between normal and provisional tab since provisional document tab will have title in italics font.


The common names of organisms used by humans as food

We imported all of the LanguaL common names for animals, but I see now that NCIT offers up many of these.  I am open to switching to the NCIT ones knowing that the ontology community really needs to harmonize on just one set of common names.  Other's thoughts?

FoodOn is now adopting NCITaxon ids directly. Consequently what we need at this point is just an ontology term mapping over to the NCITaxon organism ontology terms.

This has been completed.  In some cases NCITaxon terms are augmented by FoodOn curation with synonym names.

This has been completed.  In some cases NCITaxon terms are augmented by FoodOn curation with synonym names.


WaterType update + {arcgislayers}-ification

Hey MB -
This PR:

Reverts the fetchNHD() code back to its former {arcgislayers} glory. (If you remember, I had to use a less desirable hack as a placeholder until {arcgislayers} came back on CRAN as part of some edits to the EPA PR). This code brings it back to looking as it did before - so no real changes here!
Adds "water type" to the ATTAINS features pulled in fetchATTAINS(), which requires an additional API call to the EPA ATTAINS server. This was something requested by Hillary.
Some misc. code tweaks to help speed up some of the ATTAINS download pulls.

For this PR, if you could confirm my "watertype" code looks ok, that would be great!
Thanks!
Katie

Thanks for taking a look!! I'll be sure to let you know when this bad boy gets merged to the EPA's package


fixed auto submit form when enter key pressed in selection modals

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/24198
$ https://github.com/Expensify/App/issues/26345
PROPOSAL: https://github.com/Expensify/App/issues/24198#issuecomment-1676430016
Tests

Open your user profile.
Click on the "Settings" option.
Select "Personal Details."
Choose "Date of Birth."
Select the desired "Year. "
This time, use the keyboard (Up or Down arrow keys to scroll) to choose a year, and then press the "Enter" key.
Observe year is selected and no error on UI.

For state selection
1-Go to settings -> workspaces -> your workspace -> add bank 2- account -> connect manually.
3- Fill in the data.
4- Click on the "Connect" button.
5- Open the state search page.
6- Use the arrow keys to navigate to a state.
7- Press Enter.
8-  Observe that state is selected and no  error is shown
Offline tests

QA Steps

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

PR Author Checklist

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

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

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

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

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

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

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

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

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

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

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

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

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

Screenshots/Videos

Android: Native
https://github.com/Expensify/App/assets/4333876/6022f0e3-dcc6-4a24-ac4c-6889b9535373

Android: mWeb Chrome
https://github.com/Expensify/App/assets/4333876/9cacbc12-646f-4859-b4e5-6ab688cdc235

iOS: Native
https://github.com/Expensify/App/assets/4333876/7712bf3e-1471-4d08-bb78-2cf649fada62

iOS: mWeb Safari
https://github.com/Expensify/App/assets/4333876/563341fb-094e-4658-abd5-131d224d27d9

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/4333876/02e8a3a7-4028-432c-b6d9-94acdb23b621
https://github.com/Expensify/App/assets/4333876/648c7401-26e6-4837-b48c-7ea572a5c9a2

MacOS: Desktop
https://github.com/Expensify/App/assets/4333876/d9ba3cf8-1e87-4b8c-8de2-d78bfb497f15

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

recheck

Have you found any SelectionList where it should allow propagation?

@aimane-chnaif  I did not find any place where we should allow  propagation , though  timezoneSelectPage , LanguagePage , PronounsPage are few pages where we are using SelectionList, but all these places we do have API call on select row to set the users data, allowing  or disallowing propagation does  not have any effect on these

@Li357 requesting you please review this PR .
Thanks

Apologies for the delay as I'm working part-time. Thanks for getting this through!

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

🚀 Deployed to staging by https://github.com/Li357 in version: 1.3.94-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to staging by https://github.com/Li357 in version: 1.3.94-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.94-2 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to staging by https://github.com/Li357 in version: 1.3.95-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.95-9 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Crash with "const: Assertion `validVar(v)' failed"

Hi,
I'm getting an issue when using Clingo 5.5.0 and the latest Clingo from the wip branch. When I run the attached file with the flag --opt-strat=usc,stratify Clingo crashes and gives the following error:
clingo: /home/mark/Downloads/clingo/clasp/clasp/solver.h:547: Clasp::ValueRep Clasp::Solver::value(Clasp::Var) const: Assertion `validVar(v)' failed.
Aborted (core dumped)

This file is auto generated by ILASP, so is quite messy. It is also using multi-shot solving. If it helps, I can try to reconstruct the final single-shot program which fails and clean up the program a bit.
Thanks,
Mark
crash_file.txt

➜ gdb --args ./build/debug/bin/clingo crash_file.txt --opt-str=usc,stratify
(gdb) run
Solving...
Answer: 1
v_i(105)
Optimization: 0
Solving...
Progression : [6;inf]
Answer: 1
active(21) active(22) active(23) active(24) active(79)
Optimization: 23
Progression : [10;23] (Error: 1.3)
Progression : [14;23] (Error: 0.642857)
Answer: 2
active(21) active(24) active(79)
Optimization: 15
Answer: 3
active(21) active(24) active(79) v_i(105)
Optimization: 14
Solving...
Progression : [6;inf]
Progression : [12;inf]
Answer: 1
active(21) active(22) active(78) active(97)
Optimization: 21
Progression : [16;21] (Error: 0.3125)
Progression : [18;21] (Error: 0.166667)
Progression : [20;21] (Error: 0.05)
clingo: /home/kaminski/Documents/git/potassco/clingo/clasp/clasp/solver.h:547: Clasp::ValueRep Clasp::Solver::value(Clasp::Var) const: Assertion `validVar(v)' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff6bf918b in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff6bf918b in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6bd8859 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff6bd8729 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff6be9f36 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007ffff75a17c7 in Clasp::Solver::value (this=0x5555556251b0, v=1949) at /home/kaminski/Documents/git/potassco/clingo/clasp/clasp/solver.h:547
#5  0x00007ffff759f42b in Clasp::LoopFormula::simplify (this=0x555555828d30, s=...) at /home/kaminski/Documents/git/potassco/clingo/clasp/src/clause.cpp:1035
#6  0x00007ffff75aa484 in Clasp::simplifyDB<bk_lib::pod_vector<Clasp::Constraint*, std::allocator<Clasp::Constraint*> > > (s=..., db=..., shuffle=false)
    at /home/kaminski/Documents/git/potassco/clingo/clasp/clasp/solver.h:895
#7  0x00007ffff763443f in Clasp::Solver::simplifySAT (this=0x5555556251b0) at /home/kaminski/Documents/git/potassco/clingo/clasp/src/solver.cpp:735
#8  0x00007ffff7633c82 in Clasp::Solver::simplify (this=0x5555556251b0) at /home/kaminski/Documents/git/potassco/clingo/clasp/src/solver.cpp:667
#9  0x00007ffff763146b in Clasp::Solver::endStep (this=0x5555556251b0, top=66, params=...) at /home/kaminski/Documents/git/potassco/clingo/clasp/src/solver.cpp:304
#10 0x00007ffff761fda2 in Clasp::SharedContext::unfreezeStep (this=0x55555562aa48) at /home/kaminski/Documents/git/potassco/clingo/clasp/src/shared_context.cpp:877
#11 0x00007ffff761fc3e in Clasp::SharedContext::unfreeze (this=0x55555562aa48) at /home/kaminski/Documents/git/potassco/clingo/clasp/src/shared_context.cpp:865
#12 0x00007ffff76157bf in Clasp::ProgramBuilder::updateProgram (this=0x55555562ade0) at /home/kaminski/Documents/git/potassco/clingo/clasp/src/program_builder.cpp:48
#13 0x00007ffff75668a0 in Clasp::ClaspFacade::doUpdate (this=0x55555562aa40, p=0x55555562ade0, updateConfig=false, sigAct=0x0)
    at /home/kaminski/Documents/git/potassco/clingo/clasp/src/clasp_facade.cpp:1044
#14 0x00007ffff75667bb in Clasp::ClaspFacade::update (this=0x55555562aa40, updateConfig=false, sigAct=0x0) at /home/kaminski/Documents/git/potassco/clingo/clasp/src/clasp_facade.cpp:1029
#15 0x00007ffff75667fa in Clasp::ClaspFacade::update (this=0x55555562aa40, updateConfig=false) at /home/kaminski/Documents/git/potassco/clingo/clasp/src/clasp_facade.cpp:1033
#16 0x00007ffff7216a8c in Gringo::ClingoControl::update (this=0x55555562b0b0) at /home/kaminski/Documents/git/potassco/clingo/libclingo/src/clingocontrol.cc:199
#17 0x00007ffff7216bb3 in Gringo::ClingoControl::ground (this=0x55555562b0b0, parts=std::vector of length 1, capacity 1 = {...}, context=0x0)
    at /home/kaminski/Documents/git/potassco/clingo/libclingo/src/clingocontrol.cc:215
#18 0x00007ffff7246ced in clingo_control_ground (ctl=0x55555562b0b0, vec=0x555555a64858, n=1, cb=0x0, data=0x0) at /home/kaminski/Documents/git/potassco/clingo/libclingo/src/control.cc:1796
#19 0x00005555555be1ce in (anonymous namespace)::ControlWrap::ground (L=0x555555650ef8) at /home/kaminski/Documents/git/potassco/clingo/libluaclingo/luaclingo.cc:3390
#20 0x00007ffff6fd44d5 in ?? () from /lib/x86_64-linux-gnu/liblua5.3.so.0
#21 0x00007ffff6fe1225 in ?? () from /lib/x86_64-linux-gnu/liblua5.3.so.0
#22 0x00007ffff6fd48c8 in ?? () from /lib/x86_64-linux-gnu/liblua5.3.so.0
#23 0x00007ffff6fd48f5 in ?? () from /lib/x86_64-linux-gnu/liblua5.3.so.0
#24 0x00007ffff6fd0370 in lua_callk () from /lib/x86_64-linux-gnu/liblua5.3.so.0
#25 0x00005555555bfcc4 in (anonymous namespace)::luaMain (L=0x555555650ef8) at /home/kaminski/Documents/git/potassco/clingo/libluaclingo/luaclingo.cc:3764
#26 0x00007ffff6fd44d5 in ?? () from /lib/x86_64-linux-gnu/liblua5.3.so.0
#27 0x00007ffff6fd4897 in ?? () from /lib/x86_64-linux-gnu/liblua5.3.so.0
#28 0x00007ffff6fd48f5 in ?? () from /lib/x86_64-linux-gnu/liblua5.3.so.0
#29 0x00007ffff6fd3cf7 in ?? () from /lib/x86_64-linux-gnu/liblua5.3.so.0
#30 0x00007ffff6fd4b9f in ?? () from /lib/x86_64-linux-gnu/liblua5.3.so.0
#31 0x00007ffff6fd043e in lua_pcallk () from /lib/x86_64-linux-gnu/liblua5.3.so.0
#32 0x00005555555c085b in (anonymous namespace)::LuaScriptC::main (ctl=0x55555562b0b0, data=0x555555623650) at /home/kaminski/Documents/git/potassco/clingo/libluaclingo/luaclingo.cc:3943
#33 0x00007ffff724907e in (anonymous namespace)::CScript::main (this=0x555555623670, ctl=...) at /home/kaminski/Documents/git/potassco/clingo/libclingo/src/control.cc:2129
#34 0x00007ffff725f72b in Gringo::Scripts::main (this=0x7ffff7a470c0 <Gringo::g_scripts()::scripts>, ctl=...) at /home/kaminski/Documents/git/potassco/clingo/libclingo/src/scripts.cc:43
#35 0x00007ffff72172a3 in Gringo::ClingoControl::main (this=0x55555562b0b0, app=..., files=std::vector of length 1, capacity 1 = {...}, opts=..., out=0x55555562ade0)
    at /home/kaminski/Documents/git/potassco/clingo/libclingo/src/clingocontrol.cc:254
#36 0x00007ffff72043c7 in Gringo::ClingoApp::run (this=0x7fffffffcd50, clasp=...) at /home/kaminski/Documents/git/potassco/clingo/libclingo/src/clingo_app.cc:281
#37 0x00007ffff7263689 in Clasp::Cli::ClaspAppBase::run (this=0x7fffffffcd50) at /home/kaminski/Documents/git/potassco/clingo/clasp/app/clasp_app.cpp:217
#38 0x00007ffff76a1a0d in Potassco::Application::main (this=0x7fffffffcd50, argc=3, argv=0x7fffffffd128)
    at /home/kaminski/Documents/git/potassco/clingo/clasp/libpotassco/src/application.cpp:127
#39 0x00007ffff72492a9 in clingo_main_ (argc=3, argv=0x7fffffffd128) at /home/kaminski/Documents/git/potassco/clingo/libclingo/src/control.cc:2152
#40 0x0000555555576b3a in main (argc=3, argv=0x7fffffffd128) at /home/kaminski/Documents/git/potassco/clingo/app/clingo/main.cc:50

This might be a problem with the simplification of clasp's loop formulas. If I run the problem with --loops=common, --loops=distinct, or --loops=no, then it seems to work. @marklaw it would certainly be nice to have something simpler than the program you attached. We would also need @BenKaufmann's help to figure out the problem.

I reduced the problem to the following two smaller programs:

bug.lp.gz
bug.aspif.gz

The programs can be run with

zcat bug.lp.gz | clingo --opt-str=usc,stratify --loops=shared, and
zcat bug.aspif.gz | clasp --opt-str=usc,stratify --loops=shared.

@BenKaufmann the aspif program is quite small. I hope this can be used to find the issue easily.

Sorry Roland. I've been out of the office for the last few days. Thanks for reducing the program yourself. If you need anything further from me, please let me know.

@rkaminsk Thanks for the aspif program :+1:
Should be fixed now.

Thanks @BenKaufmann. @marklaw, development packages are available.

Thanks!


make tests for custom token() usage

Superseding https://github.com/expressjs/morgan/pull/124

fixes parsing of empty arguments via :x[]
makes token functions always be given the same length of arguments

Makes tests for custom usage of morgan.token from reading the docs.

Awesome, will take a closer look soon :) A quick look shows that there are some comments from the previous PR that were missed on this one, so getting those addressed would help, otherwise I'll spend some time to write them back on this PR as well :) A few that jump out: https://github.com/expressjs/morgan/pull/124#discussion_r82318607 , https://github.com/expressjs/morgan/pull/124#discussion_r82318476 , https://github.com/expressjs/morgan/pull/124#discussion_r82318607 , https://github.com/expressjs/morgan/pull/124#discussion_r82318476 , https://github.com/expressjs/morgan/pull/124#discussion_r82318236 , https://github.com/expressjs/morgan/pull/124#discussion_r82318200 , https://github.com/expressjs/morgan/pull/124#discussion_r82318131 , https://github.com/expressjs/morgan/pull/124#discussion_r82318103

Pushed changes, but opposed to DRY change.
On Tue, Oct 11, 2016 at 9:48 PM, Douglas Wilson<EMAIL_ADDRESS>wrote:

Awesome, will take a closer look soon :) A quick look shows that there are
some comments from the previous PR that were missed on this one, so getting
those addressed would help, otherwise I'll spend some time to write them
back on this PR as well :) A few that jump out: #124 (comment)
https://github.com/expressjs/morgan/pull/124#discussion_r82318607 , #124
(comment)
https://github.com/expressjs/morgan/pull/124#discussion_r82318476 , #124
(comment)
https://github.com/expressjs/morgan/pull/124#discussion_r82318607 , #124
(comment)
https://github.com/expressjs/morgan/pull/124#discussion_r82318476 , #124
(comment)
https://github.com/expressjs/morgan/pull/124#discussion_r82318236 , #124
(comment)
https://github.com/expressjs/morgan/pull/124#discussion_r82318200 , #124
(comment)
https://github.com/expressjs/morgan/pull/124#discussion_r82318131 , #124
(comment)
https://github.com/expressjs/morgan/pull/124#discussion_r82318103
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/expressjs/morgan/pull/127#issuecomment-253104722, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAOUo3ZvCkKTJu19X7a5d9cda9eoxAXSks5qzEplgaJpZM4KTpPP
.

but opposed to DRY change.

Please make the change; in the end, I have yo maintain the tests and the changes should be consistent with all the other code I am maintaining.

@dougwilson going to simply drop this. done.


Consider direct support of Nexus and Artifactory repositories

Companies who run private Maven-compatible repositories probably won't want to publish to Bintray. They may also be reluctant to set up another server to provide the metadata. The big question is whether it's possible to interrogate these repositories in a way that works well for the list and info commands (+ any future ones, such as search).

@pledbrook we definitely have a need for this; we use a private Artifactory cluster and are not interested in publishing to Bintray. I'm considering putting together a pull request that would abstract the concept of Bintray from LazyBones, and make publishing generic to any modern binary repo (Bintray, Artifactory, Nexus, etc.). Do you have any guidance, input, requests before I get started?

@hotmeatballsoup Thanks for the interest. The tricky part of this feature is working out how the metadata will be stored. One of the reasons I chose Bintray is that it makes it relatively easy to get at the list of packages, the available versions, description, etc. It may be possible to do this with Artifactory as well (with custom metadata), but I don't know about Nexus.
If it's not possible to get the required information from Artifactory/Nexus, then we might need to consider a separate server for the metadata, but this should be a last resort. I suspect some users wouldn't want to or be able to run an extra server app.
I planned to refactor Lazybones to formalise the main components of the app, but parts of the API are quite tricky to fix due to the nature of the available repository implementations. I made a start on a separate branch and you can see my attempt at an API there. The PackageInfo class should give you an idea of what metadata Lazybones needs for each package. PackageSource represents a repository (Bintray or other) and is perhaps the trickiest bit to get right. I'd love to be able to query a repository for a list of packages while filtering the results, but how many repositories support that?
Hopefully that's given you an idea of the aims and challenges around this particular issue. I welcome any feedback and if you have any questions, please don't hesitate to ask.

+1 on this feature. We use a local Artifactory instance also.

Hi @pledbrook, I'm looking at https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API to see if it can provide the information required (since I have an Artifactory available to test with). Can you point me to, or provide more information on how the list of packages, available versions, and descriptions etc... are currently retrieved from bintray (I'm a real example kind of person). Hopefully I can adapt that to artifactory apis.

Sorry, I think I found it: https://github.com/pledbrook/lazybones/blob/master/lazybones-app/src/main/groovy/uk/co/cacoethes/lazybones/packagesources/BintrayPackageSource.groovy


Fix issue where device builds would be installed in the simulator

Fixes #66.
This is one possible solution to resolve an issue where device builds would be installed in the simulator, and then crash on launch because they are built for the wrong architecture.
The main problem I have with this as a potential solution is that we now completely ignore the configuration set in the scheme, in favour of an explicit configuration variable managed by vim-xcode.
However, the only alternative I've been able to think of is to add code to first locate and then parse .xcscheme files, so that we can then communicate various scheme parameters to xcodebuild -showBuildSettings and simctl launch. This is possibly a little complicated, because it would involve writing logic to try and locate the correct xcscheme file to use. Parsing itself would be less complicated because we should be able to extract values with some straightforward XPath queries and something like xmllint.
Love to know what you think of this approach, and whether we should just go for supporting more features of Xcode schemes.

Honestly, I feel like if we're going to do this we should probably fall back to the scheme for this, even though it's more difficult.
Does it help that we know the name of the selected scheme? We also have a list of the projects in the root of the repo. I guess it'd be more complicated if the project is nested somewhere but exposed through a workspace. One thing at a time, I suppose?

I think the main issue is that the name is not enough to uniquely identify a scheme: i.e., you can technically have a scheme with the same name inside every project in a workspace, and inside the workspace itself.
Xcode handles this by presenting all the schemes as a list, and if there are conflicts it places the project or workspace name in parentheses after the scheme name.
So I think the way to handle this would be to always resolve a scheme name to an actual path on disk. When it comes to selecting a scheme, perhaps we could present a list of the matching schemes to the user and have them choose one?

I was thinking that perhaps if a project was selected, rather than a workspace, we could assume there is only one matching scheme. But the. I remembered that nested projects are also a thing, so ¯_(ツ)_/¯


Adds a getInventory function

Its adds session.getInventory and a "inventory" callback to the cli
It also go-fmt some file (my IDE is doing it automatically)

@atuleu Sorry for the formatting. I've made sure that my editor runs gofmt properly on save now. Mind rebasing from master?

Yep I'll rebase it

Thanks for your contribution @atuleu! Much appreciated.


Review Default Value for byte ArrayType

if I understand the problem correctly, I think the default  should be null so there is a way to represent an empty array and distinguish it from lack of value.
Originally posted by @lmolkova in https://github.com/Azure/autorest.java/pull/1495#discussion_r898555318

I assume currently it is byte[0]? That likely being from the start of v4 codegen, and I hadn't really thought much about it.
What would be the difference on wire?

Closing as this is now a configuration to use either null (default) or byte[0]


Fixed "Cannot read properties of undefined (reading 'toLowerCase')"

Motivation and context
We have many exceptions like this: Cannot read properties of undefined (reading 'toLowerCase') on app.cvat.ai
It happens because event.code property has undefined value.
It is not clear why the value may be undefined, because even with synthetic event it equals empty string in my case.
So, small fix allows us to reduce number of exceptions
How has this been tested?

Checklist

[x] I submit my changes into the develop branch
[ ] I have created a changelog fragment
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[ ] I have linked related issues (see GitHub docs)
[x] I have increased versions of npm packages if it is necessary
(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)

License

[x] I submit my code changes under the same MIT License that covers the project.
Feel free to contact the maintainers if that's a concern.

/check


fix: Support named export in middleware for Netlify compatibility

Closes #290

I'll close this, see the discussion in #290


Get Riverpod State Outside of Riverpod

Is your feature request related to a problem? Please describe.
There is no way to get the state of Riverpod state objects globally or outside of the Riverpod method #335
For example, with the boolean state below, is it possible to get the value in my own class?
final StateProvider<bool> premiumUser = StateProvider<bool>((ref) {
  return true;
});

In my class, I should be able to read the value.
class PremiumUserManager {
    bool isPremium;
    PremiumUserManager() {
        isPremium = premiumUser.state;
    }
}

Describe the solution you'd like
If the providers are declared globally, there should be a way to access their state without a context.
Additional context
This is an ancillary issue to my request to be able to get all app state.
The biggest painpoint with Riverpod and migrating to Riverpod is not having a context when a context is needed because context is no longer passed to the global Riverpod state when with Provider, context could be passed into the constructor of a ChangeNotifier.

This is anti-pattern.
It is voluntary that the state of providers is not accessible globally.
You could instead either:

have your class receive isPremium as parameter
pass ProviderReference to your class

Thanks, that makes sense, I can close this issue.
However, I would like an easy way to observe all the state at any point in time, not just the last notify change.

I need to know more about what you're trying to do, as it may already be feasible

Thanks Remi, please allow me to check my knowledge and see if I'm missing anything.

With context, getting the state is easy with context.read.
Inside providers, getting the state is easy with (ref).
However, refs must be passed explicitly through the constructor. If a ChangeNotifier is broken into 20 different ValueNotifiers, those 20 value notifiers need to be passed into the constructor of the ChangeNotifier.
Outside of context and ref, there's no way to get a provider's value.

Is that correct? Thank you very much for your time sir.

However, refs must be passed explicitly through the constructor. If a ChangeNotifier is broken into 20 different ValueNotifiers, those 20 value notifiers need to be passed into the constructor of the ChangeNotifier.

I'm not sure what that means. If you pass ProviderReference to the class that wants to read provider, you have only a single parameter in the class constructor

Outside of context and ref, there's no way to get a provider's value.

Correct

With context, getting the state is easy with context.read.
Inside providers, getting the state is easy with (ref).

Correct

I was not aware that a ref could or should be passed as a constructor argument.
That solves a lot of problems, thanks!
So instead of
final ChangeNotifierProvider<PremiumPageParentModel> premiumPageParentChangeProvider =
    ChangeNotifierProvider<PremiumPageParentModel>((ref) {
  final optionalValueA = ref.watch(optionalAStateProvider);
  final optionalValueB = ref.watch(optionalBStateProvider);
  final optionalValueC = ref.watch(optionalCStateProvider);
  return PremiumPageParentModel(a: optionalValueA, b: optionalValueB, c: optionalValueC);
});

I can just pass a reference instead.
final ChangeNotifierProvider<PremiumPageParentModel> premiumPageParentChangeProvider =
    ChangeNotifierProvider<PremiumPageParentModel>((ref) {
  return PremiumPageParentModel(ref);
});

class PremiumPageParentModel extends ChangeNotifier {
    val optionalValueA;
    PremiumPageParentModel(ref) {
        value = ref.watch(optionalAStateProvider);
    }
}

Does the previous approach offer any advantages?

You need to be careful not to use ref.watch except synchronously during the construction of the model. But you can use ref.read at any point in the model as long as you pass that in.

final ChangeNotifierProvider<PremiumPageParentModel> premiumPageParentChangeProvider =
    ChangeNotifierProvider<PremiumPageParentModel>((ref) {
// Do your ref.watches here
  return PremiumPageParentModel(ref.read);
});

class PremiumPageParentModel extends ChangeNotifier {
    Reader read;
    PremiumPageParentModel(this.read);

    Future<void> doSomething() async {
      // Gets the latest config from myConfigProvider
      final someConfig = read(myConfigProvider);
      // Do some async work / call an api using config
    }
}

Thank you @TimWhiting for clarifying the incorrect usage.
So watch should be inside the provider while reads can be passed into the model. :ok_hand:

Related usage clarification: https://github.com/rrousselGit/river_pod/issues/295#issuecomment-770368812


ActivityNotFoundException when ActivityCompat.requestPermissions() is called within the generated class

Seeing an ActivityNotFoundException being thrown when the generated class' "withCheck" method is called. Seems be that the device doesn't have an activity that can handle the intent created, does this mean that the device doesn't have a way to manage permissions?
Right now I'll have to check if an activity exists that can support the intent prior to making the withCheck call, which seems like something the generated class could handle and redirect.
Lib version: 2.3.0
Device: Zenphone 2 running android 6.0
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.content.pm.action.REQUEST_PERMISSIONS pkg=com.android.packageinstaller (has extras) }
	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1805)
	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1634)
	at android.app.Activity.startActivityForResult(Activity.java:4633)
	at android.app.Activity.requestPermissions(Activity.java:3899)
	at android.support.v4.app.ActivityCompatApi23.requestPermissions(ActivityCompatApi23.java:49)
	at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:372)
...

Thanks for your report! This is highly unexpected, and I've never personally expected this issue ever, nor encountered a device that runs API23+ but doesn't handle Runtime Permissions!? Would you mind setting up a Runtime Permissions check flow without using PD, and only using "requestPermissions", and see if that fails as well? Do you have any apps on that phone that do require Runtime Permissions and work?
In any case, your observation seems to be correct, it seems like there is no System Activity to handle the request (which would raise the dialog asking for consent to grant the permission otherwise, I suppose). My quick Google-fu didn't yield any particularly useful results either, but I'm unsure as to how we should go about this. @hotchemi @shiraji, do we really need to test the device capability and call "onPermissionDenied" if the device can't handle it?

@jameskobayashimob Sorry for the late, can you reproduce the bug with our sample module on the device?
If you can reproduce that's a fault of hardware manufacturer, so I recommend you to catch ActivityNotFoundException and show an error message. But ASUS is one of the capable hardware manufacturer of Android so I hope they didn't manipulate such a thing.
@aurae Thx for your quick catch! I think it's okay not to address like this case because it makes hard for developers to realize the problem!

@jameskobayashimob any update?

@jameskobayashimob we're not able to proceed investigation about the issue so let me close. Please reopen if needed.

Hey, sorry for the late update, I should've mentioned that I do not have the device on hand so unfortunately I'm unable to different scenarios out. For the time being however yes, I have wrapped every call to the generated class/methods.

Hey, sorry for the late reply. I forgot to mention that I don't have the device in question on hand, so unfortunately I'm not able to investigate any of these scenarios. In the meantime, I have a try/catch to simply avoid crashing wrapped around every call to the generated classes.

hello,guys... unfortunately,I have the same Issue too.
I didn`t use the PD,just use ActivityCompat.requestPermissions()（the basic way） to request permission.
the device is a TVbox(set top box),the SDK is provided by Amlogic.I have the same log as @jameskobayashimob.

@tracyliu1 Wow thx for your info. Sorry I've never heard about TvBox and Amlogic...what's that?
And if ActivityCompat.requestPermissions() merely returns wrong result, we gotta send a bug report to b.android.com?

we have met the same exception , sounds like no solution

we have met the same exception , sounds like no solution


Are you managing this project?

i confuse  to use this library
so
i wiil  fork & create new project to manage myself
but if you are managing this project now
i want to get  manager permission

@KimSoungRyoul I'm not sure what is your issue with it. But you definitely can fork it and use in a way that you want to.

i want to get manager permission

If you want to get manager permission, probably it would be good to start with some contributions first, then we will see if that really requires you to be a manager for a project.


Update notebooks

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (fe11c02) 100.00% compared to head (7730b84) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #297   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           94        94
  Lines         3197      3197
  Branches       249       249
=========================================
  Hits          3197      3197

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Dart and analyzer produce different types of compile errors when check least and greatest closures for FutureOr.

Dart SDK version: 2.12.0-13.0.dev (dev) (Mon Nov 2 15:57:37 2020 -0800) on "windows_x64"
Here is a source code example which demonstrates the problem:
import "dart:async";

Type? _capturedTypeArgument;

X captureTypeArgument<X>() {
  _capturedTypeArgument = X;
  throw "Error";
}

Type? get capturedTypeArgument {
  var result = _capturedTypeArgument;
  _capturedTypeArgument = null;
  return result;
}

void main() {
  void f<X>(FutureOr<X> Function() g) => g();

  f(() => captureTypeArgument()..unknownMember);
  f(() => captureTypeArgument()?..unknownMember);
}

Both analyzer and dart produce a compile error here.
The problem is that these are different types of errors for different pieсes of the failing lines.
Seems like both tools should complain about the same here.
Sample output is:

$> dartanalyzer test.dart
Analyzing test.dart...
error - An expression whose value can be 'null' must be null-checked before it can be dereferenced. - test.dart:19:11 - unchecked_use_of_nullable_value
error - An expression whose value can be 'null' must be null-checked before it can be dereferenced. - test.dart:20:11 - unchecked_use_of_nullable_value
2 errors found.
$> dart test.dart
test.dart:19:34: Error: The getter 'unknownMember' isn't defined for the class 'FutureOr<Object?>?'.

'Object' is from 'dart:core'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'unknownMember'.
f(() => captureTypeArgument()..unknownMember);
^^^^^^^^^^^^^
test.dart:20:35: Error: The getter 'unknownMember' isn't defined for the class 'FutureOr<Object?>'.
'Object' is from 'dart:core'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'unknownMember'.
f(() => captureTypeArgument()?..unknownMember);
^^^^^^^^^^^^^

Please also note that the following code statically passes with both tools, no An expression whose value can be 'null' must be null-checked before it can be dereferenced  error message here:
  f(() => captureTypeArgument()..toString());
  f(() => captureTypeArgument()?..toString());

It looks like the error from the analyzer at line 20 is spurious: ?.. is allowed on a value whose type is potentially nullable.
It is working as intended that toString() is allowed: even null has the members of Object.
The error message from the front end indicating that the type of the receiver is FutureOr<Object?>? is misleading: The greatest closure of FutureOr<U> with respect to some set of type variables L is FutureOr<V>, where V is the greatest closure of U with respect to L. This might be caused by the semantic representation of nullability in the front end (the outermost ? makes no difference), but it is still somewhat confusing.
It could be argued that the two error messages are about the same thing after all: The analyzer says that a potentially nullable expression does not have any members, and the CFE says that the given receiver type doesn't have the specific member which is requested.
However, considering that we allow null.toString() it isn't actually true that

An expression whose value can be 'null' must
be null-checked before it can be dereferenced

The trade-off is that the CFE uses an error message which does not emphasize the fact that this is about null.
@stereotype441, @johnniwinther, do you see an useful improvement in making these error messages more similar to each other? In that case we may create new issues about this change, and possibly about the other things mentioned above.

Yeah, I consider this an analyzer bug.  Although all the specification demands is that the analyzer produce at least one error for erroneous code, the error it produces is incredibly confusing--it says you should null check the value, even though you're already null checking it!
Reading between the lines, I suspect that what's happening is that the analyzer checks expressions of the form x?..m by converting the type of x to its non-nullable counterpart and then proceeding with the logic that would be otherwise used for x..m.  But that's not a good way to implement it because types of the form FutureOr<T> (where T is nullable) don't have a non-nullable counterpart.
The problem affects any erroneous property access or method call applied to FutureOr of a nullable type, e.g.:
import 'dart:async';

main() {
  FutureOr<int?> f;
  f?.m;
  f?.m();
  f?..m;
  f?..m();
}

Not super-high priority to fix, since both implementations are correctly rejecting the code, but it would be really nice for the analyzer error message to look more like the front end error message for these cases.

I agree. Given code of the form
void f(String? s) {
    s.unknown;
}

The message ought to indicate that the getter unknown isn't defined for the type String (or technically String?, though the nullability isn't the issue), and the front end's message does that while analyzer's fails to do that.
But given code of the form
void f(String? s) {
    s.length;
}

It would be better to indicate that s needs to be null checked because that's more likely to suggest the right fix to the user. The front end's message in this case ("Property 'length' cannot be accessed on 'String?' because it is potentially null.") is fine. I just don't want analyzer to start producing the "isn't defined" message in this latter case, and because it currently produces the same message in both cases, I think that's a possibility if the implementer isn't careful.

Analyzer behaves the same today for all of the examples.


[JOSS] time to start thinking about a JOSS paper

Following splot, it is time to start thinking about a JOSS paper.

General Timeline

following v1.5.0 release

Main blocking issues include

#438 (resolving via #439, and #443 )
decision regarding #427
#426
#465,  #469, #470, #471
#225
others?

Info

JOSS example submissions
From What should my paper contain?

Your paper should include:

A list of the authors of the software and their affiliations, using the correct format (see the example below).
A summary describing the high-level functionality and purpose of the software for a diverse, non-specialist audience.
A clear Statement of Need that illustrates the research purpose of the software.
A list of key references, including to other software addressing related needs.
Mention (if applicable) of any past or ongoing research projects using the software and recent scholarly publications enabled by it.
Acknowledgement of any financial support.

To Consider

Authorship

main

@jGaboardi, @sjsrey

current PySAL devs (who would like to be included?)
previous maintainer (@jlaura), contributors, etc.?

Suggested Editor

Lorena Mesa (social sciences) ?
Ariel Rokem (computational social science) ?

Suggested Reviewers

???
???

March dev meeting agenda

Stefanie suggests using Overleaf for drafts.

Going to postpone this due to the current situation at JOSS among other reasons.

Paper repo and .md initialized in c49cf7649c9fd220b25d2188c81925b69a7a5bc3

@pysal/devs I started an Overleaf template for the paper. If interested, please send me a private message on gitter and I will send you the link.

First draft of JOSS paper wrapped up.

The current list for the JOSS paper is:

@jGaboardi
@slumnitz
@sjsrey

If any others are interested, please send me note via gitter or email and I can share the OverLeaf link.
@weikang9009 @knaaptime @ljwolf @darribas, etc.

see sjsrey/spaghetti_paper for the working draft.

#541

revisiting suggested editors:

Lorena Mesa
Leonardo Uieda
Ben Stabler

revisiting suggested reviewers:

Anita Graser
Aleksey Bilogur
Geoff Boeing?

@slumnitz @sjsrey The initial submission for the JOSS paper is complete. Closing this issue now.


Add androidfanatic to Contributor's list

@androidfanatic, I'm quite elated about your PR. I wanna evolve this project to addresses various problems faced by first time contributors. I'd love to learn about your journey in open source community, the problems, pain points you had etc.
Could you explain how you felt when you went through the tutorial, made a PR and learned that I merged it?


Question about return types from .map()

Hello,
I have two functions.  Each of the two functions returns a tuple of enum variants as its return value.  For function one the return type over the map is (Vec<T>, Vec<U>), but for function two the return type is Vec<(T, U, V)> .  Am I mapping over these functions incorrectly?
Function 1:
pub fn nrel_2008(
    time_step: &chrono::DateTime<FixedOffset>,
    latitude: &Latitude,
    longitude: &Longitude,
    elevation: &Elevation,
    pressure: &Pressure,
    temperature: &TemperatureAmbient,
) -> (SunAzimuth, SunZenith)

let inputs = (time_series, &weather_station.temperature_ambient).into_par_iter();
let (azimuth_series, zenith_series) = inputs
            .map(|(time_step, t_amb)| {
                nrel_2008(time_step, latitude, longitude, elevation, &pressure, t_amb)
            })
            .collect()

Function 2:
    fn convert_spherical_to_cartesian(
        azimuth: f64,
        zenith: f64,
    ) -> (SunCartesianX, SunCartesianY, SunCartesianZ)

    let spherical_coordinates = (solar_azimuth_series, solar_zenith_series).into_par_iter();
    let spherical_coordinates: Vec<(SunCartesianX, SunCartesianY, SunCartesianZ)> =
        spherical_coordinates
            .map(|(azimuth, zenith)| convert_spherical_to_cartesian(azimuth, zenith))
            .collect();

I don't understand the question. Are you getting errors from this? Are the return types not what you intended?

Hello,
Apologies for my unclear question.  I am not getting errors, but you are right that my return types are not what I expected.
The first function returns a tuple of vectors, while the second function returns a vector of tuples.  I am not sure why function 1 would return a different type than function 2 given the underlying functions that are being mapped.

The collect() method is generic, where its return type can be anything that implements FromParallelIterator, and that is usually inferred from the surrounding context. So in the first case:
let (azimuth_series, zenith_series) = (/*iter*/).collect();

Your let pattern is forcing the result to be a tuple, and you must have some other code that is driving type inference for each of those "series" to end up fully resolved as (Vec<T>, Vec<U>). Rayon has an implementation of FromParallelIterator for tuple pairs that acts pretty much like unzip().
In the second case, your code is explicitly forcing the Vec<(X, Y, Z)> type for collect():
let spherical_coordinates: Vec<(SunCartesianX, SunCartesianY, SunCartesianZ)> = (/*iter*/).collect();

We don't have a direct way to collect (Vec<X>, Vec<Y>, Vec<Z>), if that's what you wanted, but you can use nested tuple pairs for this if you produce parallel items of the same shape, like:
let (vx, (vy, vz)) = (/* iter with Item=(x, (y, z)) */).collect();
// or
let ((vx, vy), vz) = (/* iter with Item=((x, y), z) */).collect();

Thank you!  That was a very clear explanation.  Closing as complete.


Update README.md

Added the Hash Symbol at the start of the README.md file via the Browser

Accepting the Pull Request

Creating merge commit