Add support for using Ctrl/Alt/Meta with non-character keys

Currently, key modifiers can only be used in conjunction with keys which map to a printable character. This pull request is a refactor that allows key modifiers to be used with any key, such as arrow keys, tab, etc.

It's a good point. What do you think of something like this then?
pub enum Key {
    Backspace,
    Char(char),
    Delete,
    Down,
    End,
    Enter,
    Esc,
    Home,
    Insert,
    Left,
    Null,
    PageDown,
    PageUp,
    Right,
    Tab,
    Unknown, // not sure about this, from UnknownEscSeq
    Up,
}

pub struct KeyPress {
    pub key: Key,
    pub ctrl: bool,
    pub alt: bool,
    pub shift: bool,
    pub meta: bool,
}

altand meta are the same by default on most unix keyboard, no ?
https://unix.stackexchange.com/questions/28993/what-is-bashs-meta-key:

By default, on most setups, the Meta key is the key labeled Alt. This is because historically, many unix workstations had a key labeled Meta where PCs have a key labeled Alt.

In many other contexts the meta key is the same as the super key (aka windows, command, etc).
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/metaKey
https://forum.kde.org/viewtopic.php?f=111&t=88599
For clarity, I suppose it would be better to call it super here, instead of meta.

So, I'm playing around with this a bit. I ended up implementing the above proposal and several macro helpers. What do you think?

I don't know if the pending PRs will be integrated one day and, if they are, in which order.
But your PR and #103 will generate a lot of conflicts.

Indeed, although I suspect this PR will cause many conflicts with just about any other change. There is a lot being touched for this.

Would you mind closing the PR ?


Requested module does not provide export named 'default'

Environment

Node Version: v14.16.0
Nuxt Version: 3.0.0
Package Manager<EMAIL_ADDRESS>Bundler: Vite

Reproduction
here you can see a very simple reproduction link
https://stackblitz.com/edit/github-nl4dyg?file=app.vue
npm run dev
Describe the bug
I'm trying to use class-validator packages.
first I faced a problem  mentioned here and solved it by adding this package to build.transpile in nuxt.config.ts file.
then this error starts to show up
SyntaxError: The requested module '/_nuxt/node_modules/validator/lib/isLatLong.js?v=cba03522' does not provide an export named 'default'
the validator package is one of class-validator dependencies.
the weird part is that the code runs perfectly on the server process
and the error only occurs on the browser
and it works fine on both server and browser in production mode!
Additional context
No response
Logs
No response

Hello 😄
After updating from "nuxt": "3.1.2" to "nuxt": "3.2.3", I'm getting this error in the console:
"Uncaught SyntaxError: The requested module 'nuxt/@fs/D:/Projects/studiomado/backoffice/node_modules/.vite/deps/vue.js?v=d26ca8db' does not provide an export named 'Component' (at imports.mjs:4:716)"
The line in the imports.mjs file is:
export { withCtx, withDirectives, withKeys, withMemo, withModifiers, withScopeId, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, computed, customRef, isProxy, isReactive, isReadonly, isRef, markRaw, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, watch, watchEffect, isShallow, effect, effectScope, getCurrentScope, onScopeDispose, defineComponent, defineAsyncComponent, resolveComponent, getCurrentInstance, h, inject, nextTick, provide, useAttrs, useCssModule, useCssVars, useSlots, useTransitionState, Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'nuxt/@fs/D:/Projects/studiomado/backoffice/node_modules/.vite/deps/vue.js?v=d26ca8db';

Any solutions @danielroe ?  :)

Would you open a new issue with a reproduction? 🙏

Of course I can do it, i need just a couple of days, i will ping you back in here later!
Thank you! 😄

With Nuxt version "nuxt": "3.1.2" the imports.mjs is just:
export { withCtx, withDirectives, withKeys, withMemo, withModifiers, withScopeId, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, computed, customRef, isProxy, isReactive, isReadonly, isRef, markRaw, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, watch, watchEffect, isShallow, effect, effectScope, getCurrentScope, onScopeDispose, defineComponent, defineAsyncComponent, resolveComponent, getCurrentInstance, h, inject, nextTick, provide, useAttrs, useCssModule, useCssVars, useSlots, useTransitionState } from 'vue';

With no 'Component' 🤔

Ok @danielroe !! I did it!! 😄
HERE the Github repo (synchronized with Codesandbox)

Step to reproduce:

Install the project yarn install, with<EMAIL_ADDRESS>yarn add --exact<EMAIL_ADDRESS>Run yarn dev (everything is working) [image 1];
Upgrade nuxt npx nuxi upgrade --force (to version 3.2.3);
Run yarn dev, the page appear blank ("Requested module 'nuxt/@fs/C:/Users/luxdamore/Desktop/nuxt3-component-vite-bug/node_modules/.vite/deps/vue.js?v=14ad53f6' does not provide an export named 'Component'" error appear in the browser console) [image 2].

With version 3.1.2:

With version ^3.2.3:

@LuXDAmore You have Nuxt 2 as a dependency in your project: https://github.com/LuXDAmore/nuxt3-component-vite-bug/blob/main/package.json#L84

@danielroe Sorry, i copy/pasted wrong 😆!
But in the original project this package was not installed..
So yes, the error still even without this package involved.

I've also updated the repo so you can check @danielroe 😄

@LuXDAmore Sorry you're experiencing this. The issue is now that an outdated version of unimport is being hoisted up to the top level in your dependencies. If you manually install the latest unimport, things should (hopefully) work for you.

@danielroe I've tried to install the latest version of unimport@3, but the problem is not resolved.
I've also noticed that the version 2 is a dependency from the @nuxt/devtools package

Currently facing the same issue after upgrading my packages:

Also tried directly installing unimport. Didn't change anything. However, I can reach my index page normally. As soon as I switch to another route the error occurs.

@Floppy012 how did you debugged it?
I have some imports from import { ref } from '#imports', but before version 3.2.3 was working well

@Floppy012 how did you debugged it?
I have some imports from import { ref } from '#imports', but before version 3.2.3 was working well

In a totally un-elegant way. My root route worked but others didn't. So I took the page with least code and started to comment out things until it worked again. Then went into the component that broke the page and started the same thing over, then in the composable it was just a guess as I've had removed all the #imports stuff from the other files some time ago and seemed to have forgotten that one.
The only reason I used the imports was because WebStorm didn't support the way, that Nuxt uses to make the whole import-less stuff happen.

@Floppy012 thank you very much, yes at the end the problem was caused by this row

import { ref } from '#imports'

Now i have just to handle with the ESLint warning telling me that ref is not defined XD, but still, i can update and the project is working so i don't care!!
Also thanks to you @danielroe ❤

I just upgraded from v3.3.3 to v3.4.2   I wish I had not as I am getting lots of these same errors as well. Example:
Uncaught SyntaxError: The requested module '/_nuxt/components/ui/form/country/country-codes.ts?t=1682519720961' does not provide an export named 'default'
I do not have any import { ref } from '#imports'

@tvld do you have any imports from #imports?
It's not just the ref one, but probably any imports from '#imports', '#app', ecc

Nope, no imports at all with "#" (did not even know that's possible :))... I only use @/... )

I just created a new project with latest version of Nuxt 3.4.3. When I installed<EMAIL_ADDRESS>I get similar issue:
`Cannot restart nuxt:  The requested module 'minimatch' does not provide an export named 'default'                                                22:06:02
import minimatch from 'minimatch';
^^^^^^^^^
SyntaxError: The requested module 'minimatch' does not provide an export named 'default'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)
`
How to fix this? thanks.

I just created a new project with latest version of Nuxt 3.4.3. When I installed<EMAIL_ADDRESS>I get similar issue:
`Cannot restart nuxt: The requested module 'minimatch' does not provide an export named 'default' 22:06:02
import minimatch from 'minimatch'; ^^^^^^^^^ SyntaxError: The requested module 'minimatch' does not provide an export named 'default' at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21) at async ModuleJob.run (node:internal/modules/esm/module_job:190:5) ` How to fix this? thanks.

Having the same issue in with Github Actions (Node v18.15.0, pnpm v6) for Nuxt Content v2

I just created a new project with latest version of Nuxt 3.4.3. When I installed<EMAIL_ADDRESS>I get similar issue:
`Cannot restart nuxt: The requested module 'minimatch' does not provide an export named 'default' 22:06:02
import minimatch from 'minimatch'; ^^^^^^^^^ SyntaxError: The requested module 'minimatch' does not provide an export named 'default' at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21) at async ModuleJob.run (node:internal/modules/esm/module_job:190:5) ` How to fix this? thanks.

Can you upgrade to<EMAIL_ADDRESS>please? Sorry about this 🙏

How do I fix this literally cam out of know where

I've tried the optimizeDeps fix with no luck, and I'm trying to remove the #import and #app imports, however I get:
nuxt3/nuxt cannot be imported directly. Instead, import runtime Nuxt composables from #app or #imports.
How do I import without these then if it throws errors like that? Am I just using the wrong  import in general?

How do I fix this? @danielroe

I was importing jsonwebtoken into a module that had a Middleware for H3 Nitro server that was utilizing the package and another Middleware that was being used for my front-end that wasn't utilizing the package. Once the package was being imported from the module in my front-end Nuxt didn't like a Node Library being imported in the front-end and not server side. So I separated the two Middlewares and placed them in their recommended folders and everything is working now.

still have the same issue on "nuxt": "^3.6.5" with the nuxt layer, and set these will working
alias: {
    'tiny-case': 'tiny-case/index.js',
    'property-expr': 'property-expr/index.js',
    toposort: 'toposort/index.js'
  }

I have this issue The requested module 'vite-plugin-inspect' does not provide an export named 'default' .
Only fix was to delete   devtools: { enabled: true }, from nuxt.config.ts

I have this issue The requested module 'vite-plugin-inspect' does not provide an export named 'default' . Only fix was to delete  devtools: { enabled: true }, from nuxt.config.ts
"devDependencies": { "@nuxt/devtools": "latest", "nuxt": "^3.7.4", "vue": "^3.3.4", "vue-router": "^4.2.5" }

This worked for me. I had to remove devtools. Nuxt now needs to explicitly install vue and vue-router? Okkkk....

i was facing the same issue with a custom package and was able to resolve it with the following in nuxt.config.ts.
(nuxt 3.9.0 with vite 5.0.10)
export default defineNuxtConfig({
  ...
  build: {
    // This fixes a 500 error when trying to run the app after building for production.
    // e.g: mypackagefunction is not a function.
    transpile: ['mypackage'],
  },
  vite: {
    optimizeDeps: {
      // This fixes a 500 error when running in dev mode after adding the build.transpile option above.
      // e.g: The requested module '/_nuxt/node_modules/mypackage/dist/index.js?v=85eb31b5' does not provide an export named 'default'
      include: ['mypackage > mypackage'],
    }
  },
});

Hi guys,
I'm facing same error but with dayjs: The requested module '/_nuxt/node_modules/dayjs/plugin/advancedFormat.js?v=b8982373' does not provide an export named 'default'

Same here, with vueform/nuxt module:
nuxt.js?v=00be99e8:98 [nuxt] error caught during app initialization SyntaxError: The requested module '/_nuxt/node_modules/wnumb/wNumb.js?v=00be99e8' does not provide an export named 'default' (at useTooltip.js?v=00be99e8:2:8)

Hi guys,
I'm facing same error but with dayjs: The requested module '/_nuxt/node_modules/dayjs/plugin/advancedFormat.js?v=b8982373' does not provide an export named 'default'

Did you fixed the issue? I'm having the same problem with arraySupport


HDDS-2828. Add initial UI of Pipelines in Recon

What changes were proposed in this pull request?
Addition of initial Pipelines page in Recon.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-2828
How was this patch tested?
This patch was tested by running the react app with mock api server.
cd hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web
yarn install
yarn run dev

A screen-shot of the new Pipelines page is attached below:

@elek @avijayanhwx Please review!


included fortrabbit in cloud.yml

fortrabbit is a PHP hosting provider from and for Europe — shamless plug: i am co-founder.

missing a 32x32 logo

Closed in favor of #1185.


Clean up example

Hi, thank you, I'll comment it tomorrow.

Tim, your code is impressive, but quite complex and different from the original example in the rnn documentation, so I added a link to your fork in the header. Is it ok?
Richard

Thanks Richard. I didn't plan to make that many changes in the first place, but as I started to read more about Torch I constantly went back and was tempted to try out new things.


[Backport v2.7-branch] boards: nucleo_h745zi_q: enable POWER_SUPPLY_DIRECT_SMPS

The board is fitted with the SMPS components and have no path from
VDD_MCU to VDD_LDO.
The stm32h7_init code used to default to SMPS on supported SoC but has
been changed in 22186c7c51 to only use SMPS if explicitly configured to
do so. This is causing the board to become unresponsive after a power
cycle when flashed with the current defconfig, and needs to be started
pulling BOOT0 high to be recovered.
Setting CONFIG_POWER_SUPPLY_DIRECT_SMPS restores the intended behavior.
Signed-off-by: Fabio Baltieri<EMAIL_ADDRESS>

@fabiobaltieri Can you approve this backport?


Async review

Hi, since I need this crate for a project I'm working on, I decided to give implementing futures Stream for a BusReceiver (Bus sending isn't async in this patch), however I am curious as to whether this implementation is correct, since I'm not too experienced with lock-free code
lib.rs
Basically, if a value is not ready, it sends the current Waker (kind of equivalent of thread handle) to the unparking channel, which will wake it up when it's ready.

I think @habnabit would be a good person to ping here, as they did a bunch of related work over in https://github.com/jonhoo/bus/pull/15, culminating in https://github.com/habnabit/bus/tree/async_bus


Right way to get a Handle for use with other tokio crates?

For example https://docs.rs/tokio-memcache/0.0.3/tokio_memcache/struct.Client.html requires a Handle -- but since hyper::rt::run inits tokio for me, I'm unclear on the right way to get the Handle.  Or do I have to switch to lower-level APIs than the Runtime if I want to use other crates like this?

Looks like that is using tokio-core, which is deprecated. You can still use tokio-core with crates using tokio, but it's more annoying, and not something I recall off the top of my head.

Ok, so really it's just this one case is an old API and I should probably skip that crate but generally won't need this otherwise?

Yea, the new tokio now will lookup a Handle automatically when needed (and there's APIs to set a specific one if you so desire, but it's usually never needed).


convert.py  - _read_file function does not read in config.yaml as a dictionary

I have pulled down the latest version of the workflow. It stops working at the convert_sol step in the snakemake workflow. The reason is that the _read_file function reads in the config.yaml file as a list instead of a dictionary. Here is an example of how the config.yaml is read in:
['AccumulatedAnnualDemand:\n', '    indices: [REGION,FUEL,YEAR]\n', '    type: param\n', '    dtype: float\n', '    default: 0\n', 'AnnualEmissionLimit:\n', '    indices: [REGION,EMISSION,YEAR]\n', '    type: param\n', '    dtype: float\n', '    default: -1\n'

Instead of:
AccumulatedAnnualDemand:
    indices: [REGION,FUEL,YEAR]
    type: param
    dtype: float
    default: 0
AnnualEmissionLimit:
    indices: [REGION,EMISSION,YEAR]
    type: param
    dtype: float
    default: -1

The _read_file def shown here is taken from the otoole utils.py.
def _read_file(open_file, ending):
    if ending == ".yaml" or ending == ".yml":
        contents = load(open_file, Loader=UniqueKeyLoader)  # typing: Dict[str, Any]
    elif ending == ".json":
        contents = json.load(open_file)  # typing: Dict
    else:
        contents = open_file.readlines()
    return contents

The error message during the run is shown like this:
Traceback (most recent call last):
 File "C:\Users\User\Documents\ECEMF_OSeMBE\convert.py", line 37, in <module>
   sol2csv(path_sol, path_res, path_dp, path_config)
 File "C:\Users\User\Documents\ECEMF_OSeMBE\convert.py", line 16, in sol2csv
   reader = ReadGurobi(config)
             ^^^^^^^^^^^^^^^^^^

Do you have any suggestions for a possible solution to this problem? The otoole environment used to load in the config.yaml file is a virtual conda environment and contains the following:
name: otoole-env
dependencies:
- pandas
- pip
- pip:
  - otoole>=1.0.4

I have reverted my changes to the last commit made by HauHe in PR #72
❯ git log
commit 6399ecc0d0ebb6214459d268199450dcf2016bc8 (HEAD -> main, upstream/main)
Merge: dde227e 05ad457
Author: Hauke Henke<EMAIL_ADDRESS>Date:   Thu Nov 30 19:25:08 2023 +0100
Merge pull request #72 from HauHe/main
Corrected regex for reporting Final Energy Electricity
The error still persists.

Thanks for the report @EmiFej - I'll take a quick look now.

Thank you @willu47.
Modifications made:

convert.py modified through commit 91cc6a4.
otoole_env.yaml modified through commit 69c3f59 to run with Otoole 1.1.0 instead of 1.0.4. The Python version has been changed from 3.12 to 3.11 due to incompatibility between Pandas and Python 3.12 on Windows.

These modification close this issue.


bug: maximum callstack exceeded errors due to msgpackr

Bug Description:
There is an issue following https://github.com/eclipse-theia/theia-blueprint/commit/6ddc6e3a0316e52cefd9e9ca29a9f76d8d57245c where the upgrade to msgpackr is causing maximum callstack exceeded errors due to https://github.com/eclipse-theia/theia/issues/12499. We added a resolution note in the main repo as a workaround until fixed:

https://github.com/eclipse-theia/theia/blob/master/doc/Migration.md#general

rpc-message-encoder.ts:151 Uncaught (in promise) Error: Error during encoding: 'Maximum call stack size exceeded'
    at t.MsgPackMessageEncoder.encode (rpc-message-encoder.ts:151:23)
    at t.MsgPackMessageEncoder.request (rpc-message-encoder.ts:137:14)
    at l.sendRequest (rpc-protocol.ts:161:22)
    at proxy-handler.ts:74:45

https://github.com/eclipse-theia/theia-blueprint/blob/5850adb9220e3cea711ebcf4ef89852c7720778e/yarn.lock#L9567-L9568

Steps to Reproduce:

start the application
notice the maximum callstack exceeded logs

Additional Info

https://github.com/eclipse-theia/theia/issues/12574

The mentioned workaround works and exception isn't thrown . But we still have the connection issue as mentioned in https://github.com/eclipse-theia/theia/issues/12574.
The issue occurs only with Theia Blueprint 1.37 and not with Theia Blueprint 1.36 for the same vscode extension.

Should I raise a separate defect for this ?

@badrihcl I don't have an environment to test, if you can debug as to why it happens first that would be helpful.

@badrihcl Can you try with Blueprint 1.38.0, that we recently made available? It pins msgpackr to an earlier version, known to work.

Also, it seems that msgpackr has a new version out that contains a fix: 1.9.5. Let us know if you still have the issue with Blueprint 1.38.0, and maybe we can upgrade its msgpackr.


props disapear when changing scene using redux store

Version
Tell us which versions you are using:

react-native-router-flux v3.32.0
react-native v0.31.0-rc.0
"redux": "^3.5.2"

Expected behaviour
following this example
https://github.com/aksonov/react-native-router-flux/blob/master/docs/REDUX_FLUX.md
I would expect that props / scene information will be show, when I switch scenes.
Actual behaviour
On first call dashboard route, I can use {this.props.routes.scene.title},
after navigating to ProfileScreen scene, and back, it wont show up anymore.
Steps to reproduce
              <Scene key='main'
                tabs='true'
                tabBarStyle={styles.tabBarStyle}
                tabBarSelectedItemStyle={styles.tabBarSelectedItemStyle} >
                <Scene
                  key='dashboard'
                  hideNavBar={true}
                  component={DashboardScreen}
                  title='Dashboard' icon={TabIcon} hideStatusBar={true}
                />
                <Scene
                  key='profile'
                  component={ProfileScreen}
                  title='Profile'
                  icon={TabIcon} />
              </Scene>

Same problem to me... Did some work on reducer.js and Router.js though... Somehow with ActionsConst.BACKACTION, it will calculate the parent sceneKey, then use the Actions.callback method to dispatch actions.type only... No routes related props will be sent over to redux store...


Null error in displayString getter

When running builder I got the following error in analyzer-1.7.1/lib/src/error/best_practices_verifier.dart:1998:14:
Error: A non-null value must be returned since the return type 'String' doesn't allow null.
String get displayString {
^
The getter contains only some specific cases in switch statement without default case which may lead to null value but the returned value must be String not String?.

Got the same problem after using the Flutter master branch today
Dart 2.14.0
Flutter 2.3.0
If it helps:
Pub resolved only analyzer-1.4.0 for me. After explicitly using analyzer 1.7.0 it worked again.
1.7.1 is incompatible with flutter_test because its using meta 1.4.0 and analyzer in 1.7.1 is using 1.3.0

Unclear which area this belongs to @jakemac53 any idea?

Right now, the current state of affairs is that:

package:analyzer 1.7.0 requires package:meta ^1.4.0
package:analyzer 1.7.1 has the same contents as 1.7.0, but requires package:meta ^1.3.0
Flutter stable pins package:meta to 1.3.0 (https://github.com/flutter/flutter/blob/stable/packages/flutter/pubspec.yaml#L13)

I'm uncertain how we're running into the exceptions above - the two most recent versions of analyzer are pretty explicit about which version of meta they need.

@edlman do you have any dependency_overrides in your pubspec?

Hello Jacob,
you're right, I'm using 3rd party pkgs which depend on meta 1.4.0 so I put
it to dependency_overrides to solve the collision. It didn't come to my
mind it cause such a problem.
I've changed the override to 1.3.0, it works fine, no problem yet.
I'm sorry for this and thank you for explanation.
Regards, Martin
Dne 14. 06. 21 v 19:00 Jacob MacDonald napsal(a):

@edlman https://github.com/edlman do you have any dependency_overrides
in your pubspec?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dart-lang/sdk/issues/46337#issuecomment-860840873,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA5XIQEEG5VLHRB3NI52TK3TSYYRFANCNFSM46Q54D5A.

--
Martin Edlman			[web]     http://an.y-co.de
ANY CODE			[mobile]  +420 774 692 633
c/c++,c#,java,android,		[hangout] ac.anycode @ gmail.com
php,sql,html5,css3		[skype]   an.y-co.de

Adding overrides effectively side steps the version solver so yes it can cause any number of problems. Sometimes it is necessary to get a version solve but you will open yourself up to incompatibilities as well.
Should we go ahead and close this issue?

I'm closing the issue.


[Bug]: Input widget onSubmit ends up triggering onTextChange

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
When an input widget has onSubmit and onTextChange configured, on pressing enter, both events gets triggered.get
Steps To Reproduce

Add an input widget.
Add {{showAlert("onSubmit")}} to onSubmit event.
Add {{showAlert("onTextChange")}} to onTextChange event.
Type something on the input and press enter.
Observe that onSubmit gets triggered followed by onTextChange.

Environment
Production
Version
Cloud

CC @dilippitchika @somangshu

Starting the discussion here, after on Submit is clicked we should not allow on Text change to be triggered. This need not be a migration, to prevent users whose apps are built using this to break.


Only include clipboard and syntax for: Blog Posts, Handbook, Docs

Description
Moves the clipboard and syntax highlighting scripts to only be included on:

Blog Posts (post.njk)
Handbook & Docs (handbook.njk)

I believe these are the only places code blocks are displayed.
Places to check:
http://<IP_ADDRESS>:8080/handbook/ - handbook index
http://<IP_ADDRESS>:8080/blog/2022/12/flowforge-gcp-https-set-up/ - blog post
http://<IP_ADDRESS>:8080/docs/admin/telemetry/
Related Issue(s)
#401
Checklist

[x] I have read the contribution guidelines
[x] I have considered the performance impact of these changes
[ ] Suitable unit/system level tests have been added and they pass
[ ] Documentation has been updated

@knolleary @ZJvandeWeg @robmarcer @iskerrett Once this PR merges, please keep this in mind if introducing a code-block somewhere other than the blog, handbook or docs.


Password protected sharing broken, errors "Unknown sharing key"

Describe the bug
When running PiGallery, password protected share creates links those are served by an "Unknown sharing key." error page.
An example link in my case: https://redacted.duckdns.org/shareLogin?sk=a9322371
When disabling password protection, the sharing feature works just fine.
When password protection is disabled, a temp user is used to access the shared links. If I reenable password protection while browsing as a temp user, that user session can still access all the password protected shares without prompt for a password.
If I log out from the temp user during browsing a password protected share, I'm redirected to a login page where only a password is requested for that share. Typing the right password allows me to access the share as expected, however, if I use the generated share link, I'm again greeted by "Unknown sharing key."
Photo/video (optional) that causes the bug
Bug is not connected to any particular media.

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy

redacted@redacted:~/pigallery$ grep bpatrik docker-compose.yaml
    image: bpatrik/pigallery2:nightly-alpine

Browser [e.g. chrome, safari]
Behavior verified in Edge, Chrome and Firefox

Used app version:

docker-nightly-alpine

More on the matter:
It look that the following function is setting UnknownSharingKey an time there is an error when trying to load a share:
https://github.com/bpatrik/pigallery2/blob/080455cdc1c900fc576733802c44e2ad814c4a4d/src/frontend/app/ui/gallery/share.service.ts#L134
However, when a password protected share is accessed the first time, the console logs an "error: Unauthorized" error as no password was provided yet and there is no authenticated session.
Since the error for a nonexisting sharing key is also "Unauthorized" when there is no authentication yet, we never trigger the login form:
https://github.com/bpatrik/pigallery2/blob/080455cdc1c900fc576733802c44e2ad814c4a4d/src/frontend/app/ui/sharelogin/share-login.component.html#L10-L13
After forcing authentication manually, the error code for a nonexistent share is "error: Not Found", but before authentication, there is no way to tell apart the different scenarios based on the error.

It sounds to be a bug to me, but I do not fully understand the use case.
What do you mean by When disabling password protection ? Disable password protection as a whole on the page, or only disabling password protection to the shared links?
My possible answer to the problem (If I understand it correctly): When someone switches on/off password protected shares, the app should just delete all active shares:

If you create a sharing link with password, then disable password protection, discarding password should be ok.
but if you have a link that never had a password, but you enable password protected shares, that link is basically invalid

I think I've tried to cover several independent problems at once at that was a mistake so I'll try to stick to the title of the ticket and I'll create more issues on the rest once I have better understanding and solid ways to reproduce.
Let's forget about disabling the password protection.
Issue
Take the use case when I create a fresh instance of the service from alpine-nightly and create a single password protected share.
Something like https://-redacted-.duckdns.org/shareLogin?sk=a9322371
When I try to access this password protected share link from another machine, I get the Unknown Sharing Key error page as referred above.
The issue is with getSharing():
https://github.com/bpatrik/pigallery2/blob/080455cdc1c900fc576733802c44e2ad814c4a4d/src/frontend/app/ui/gallery/share.service.ts#L126-L138
It will add UnknownSharingKey on any error, regardless that the error (the value of e) is "Not Found" or "Unauthorized".
https://github.com/bpatrik/pigallery2/blob/080455cdc1c900fc576733802c44e2ad814c4a4d/src/frontend/app/ui/gallery/share.service.ts#L133-L136
This PR fixes the access issue:
https://github.com/bpatrik/pigallery2/pull/633
However, it fails to provide the correct Unknown Sharing Key error page even if I try to access a non-existing share, so this solution is likely not sufficient.
So regardless whether the share exists or not, the Unknown Sharing Key landing page is rendered always for password protected shares and the login page never appears.
https://github.com/bpatrik/pigallery2/blob/080455cdc1c900fc576733802c44e2ad814c4a4d/src/frontend/app/ui/sharelogin/share-login.component.html#L10-L13

I just noticed this on 2.0.0. Is there any official workaround for having password-protected shares?


Add command palette

This is just a dream, but command palettes can be huge productivity boosters for expert users. The command+k convention has become common place in lots of tools: slack, vscode, github, etc etc
We could use something off the shelf like this:
https://svelte-command-palette.vercel.app/
https://github.com/rohitpotato/svelte-command-palette
Then define a list of all actions someone might take within the app and have them all accessible via the keyboard

Running simulation
Switching views
Searching for activities
Setting specific zoom levels
Jumping to a time in the plan
... the list goes on

Better than the above libraries, theres a port of cmdk for svelte that looks promising: https://www.cmdk-sv.com


Support for custom http methods (like PROPFIND)

Trying to use clj-http as webdav client I faced that it does not support custom http methods, so
(client/request {
                                        :method "PROPFIND"
                                        :url "http://localhost:7000/"
                                        :Accept "*/*"
                                        :Depth "1"
                                        }
                                   ))

does not work for me:
java.lang.IllegalArgumentException: Invalid request method PROPFIND
            core.clj:206 clj-http.core/http-request-for
            core.clj:186 clj-http.core/http-request-for
            core.clj:268 clj-http.core/request
            core.clj:208 clj-http.core/request
            Var.java:379 clojure.lang.Var.invoke
          client.clj:801 clj-http.client/wrap-request-timing[fn]

Is there a way to workaround this? Or shouldn't support for custom methods be added?

So, as far as my research shows, there is no support in Apache's HTTP client for the PROPFIND method, so you'd first need to write your own extension of the HttpGet.java class, and then you could redefine clj-http.core/http-request-for to include support for it.
Not sure how apache will treat it however...

Finally I've settled down with using raw Apache Client and
(proxy [HttpRequestBase] [] (getMethod []
                               (str "PROPFIND")))

worked fine for me.
I am not sure in my Clojure skills but maybe I will try to fix it and send a pull request


pallet-identity: Make identity generic

related issue #14026

[ ] Add companion PRs

Is this still WIP? Because as far as I can tell, this PR still hasn't been able to achieve what was described in the issue.

Is this the correct approach or did I miss something?

I'd add a polkadot companion which just maps the IdentityInfo type to the existing IdentityInfo struct to make it backwards compatible.

And add a testcase to substrate which tests using a custom IdentityInfo struct.

The introduced IndentityInfo isn't used anywhere?

So, a IdentityInfo associated type should be added to the Config trait and everywhere where currently IdentityInfo is being used, should be replaced by T::IdentityInfo.

Emphasis mine. I don't believe this has been done in the PR?

I have a problem with the implementation. I have to crate instances of the Config::IdentityInfo associated type. AFAIK it's only possible by introducing a new trait with a constructor that the associated type has to implement.
I assume it's not a breaking change adding that trait and implementing it for the types::IdentityInfo struct.
Is this correct, is this a proper way?

I have a problem with the implementation. I have to crate instances of the Config::IdentityInfo associated type. AFAIK it's only possible by introducing a new trait with a constructor that the associated type has to implement.

Where do you have to create the instance? In benchmarks?

I have a problem with the implementation. I have to crate instances of the Config::IdentityInfo associated type. AFAIK it's only possible by introducing a new trait with a constructor that the associated type has to implement.

Where do you have to create the instance? In benchmarks?

Yes here for example.

Proper solution would probably to add some trait to FRAME benchmarking similar to Arbitrary, but with the worst-case scenario in mind.
As hacky solution you can do a where IdentityInfo: From<u32> bound on your benchmarks module, but yea we should probably find a better solution.

Proper solution would probably to add some trait to FRAME benchmarking similar to Arbitrary, but with the worst-case scenario in mind.
As hacky solution you can do a where IdentityInfo: From<u32> bound on your benchmarks module, but yea we should probably find a better solution.

How about adding a trait like this to frame_benchmarking and implementing it for IdentityInfo<>
trait WorstCase {
    fn worst_case() -> Self;
}

But the set_identity benchmark is using the additional fields  length as complexity parameter.
Do you have an idea how to implement a generic WorstCase trait with respect to complexity parametrization?

But the set_identity benchmark is using the additional fields length as complexity parameter.
Do you have an idea how to implement a generic WorstCase trait with respect to complexity parametrization?

Maybe an associated type like:
trait WorstCase {
    type Complexity;
    fn worst_case() -> Self;
}

The we could do where bounds like Identity: WorstCase<Complexity=u32> or something.
For multi dimensional complexities the benchmarking would require WorstCase<Complexity=(u32, u32)>. Hope that is the correct syntax :laughing:


Javascript language examples

This shifts code-first-schemas over to subservice-languages/javascript, given that it's doing the same thing as the Ruby example, and hopefully we can collect more languages!
@yaacovCR – this okay? Also, does /subservice-languages seem okay for the root-level folder name? I waffle between subservice and subschema, given that non-JS languages will always be separate services.

Sounds good to me!


Could not find a declaration file for module 'nestjs-trpc'.

Edit: I solved the issue by setting "module" to "NodeNext" as the official TypeScript documentation suggests: https://www.typescriptlang.org/tsconfig/#module. We should add a section about this in the docs and modify the field in examples/, thoughts @KevinEdry?
Hey, thanks for this awesome library!
When following the installation guide with a fresh project, the following ts error is shown when using the package:
Could not find a declaration file for module 'nestjs-trpc'. '%path%/node_modules/nestjs-trpc/dist/index.js' implicitly has an 'any' type.
  There are types at '%path%/node_modules/nestjs-trpc/dist/index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.ts(7016)

I tried changing the tsconfig.json's moduleResolution as per the suggestion, but that throws another error, requiring the module to be changed from "commonjs".
I'm not sure what's the best way to proceed, but either way we should update the documentation with this information because autocomplete for typing does not work on a fresh install of a NestJS project as it is.

Thanks for opening an issue an letting me know! I will try replicate this issue and solve it.
It should work on a fresh install of nestjs.

I think there was a mismatch between the package json "types" section and where the actual types were located. I've updated it locally and will test to ensure things are working properly.
I'll keep you posted!

@yamcodes I want to reproduce it, how did you create the fresh project?

I assume it was fixed, feel free to open the issue again if it still persists.


Sort out how to do NetStandard packaging

I would like to repackage the NuGet using .NET Standard.   I believe Nugettizer-3000 can help me do that, but I believe I might need to change my library target to do that.

@migueldeicaza I just tried a trivial Windows console app test using nuget to add TFS and the app fails at launch (error below). Is this something that will be fixed by your planned NuGet change or should I open an issue?
System.BadImageFormatException: 'Could not load file or assembly 'TensorFlowSharp, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.'

@mwk888 That exception is most likely because your platform target is not x64; libtensorflow.dll is 64bit.

@andykernahan You're right, thanks! I didn't notice the new project defaulted to x32

It is shipping .NET Standard libraries now.


Initiale state is empy array in reducer

Have this simple reducer
`const INITIAL_POSTS_STATE = {postsList: {posts: [], error:null, posts_loading: false}}
function posts(state = INITIAL_POSTS_STATE, action){
console.log(state) // prints in the console => []
switch(action.type){
case 'FETCH_POSTS':
let new_state = Object.assign({}, state, { postsList: {posts:[], error: null, posts_loading: true} });
return new_state;
default:
return INITIAL_POSTS_STATE;
}
}
export default posts;`
Why state is returned as [] and not what I pass as default INITIAL_POSTS_STATE

Found the solution I was passing this defaultState to createStore
//create default data
const defaultState = {
posts: []
}
//create the store object to be used in the app
const store = createStore(rootReducer, defaultState);


Can instantiate RxBleClient with last Dagger release

Summary
I faced an issue yesterday with the new Dagger release (2.14.1). At the RxBleClient creation ( RxBleClient.create(context);) the app crash (with 2.13 and less it's ok)
Library version
1.4.3
Logs from the application running with setting
                                                               Process: myapp.id, PID: 23473
                                                               java.lang.NoSuchMethodError: No static method injectMembers(Ldagger/MembersInjector;Ljava/lang/Object;)Ljava/lang/Object; in class Ldagger/internal/MembersInjectors; or its super classes (declaration of 'dagger.internal.MembersInjectors' appears in /data/app/myapp.id-2/base.apk:classe
at com.polidea.rxandroidble.RxBleAdapterStateObservable_Factory.get(RxBleAdapterStateObservable_Factory.java:28)
                                                       at com.polidea.rxandroidble.RxBleAdapterStateObservable_Factory.get(RxBleAdapterStateObservable_Factory.java:10)
                                                       at com.polidea.rxandroidble.RxBleClientImpl_Factory.get(RxBleClientImpl_Factory.java:104)
                                                       at com.polidea.rxandroidble.RxBleClientImpl_Factory.get(RxBleClientImpl_Factory.java:23)
                                                       at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
                                                       at com.polidea.rxandroidble.DaggerClientComponent.rxBleClient(DaggerClientComponent.java:419)
                                                       at com.polidea.rxandroidble.RxBleClient.create(RxBleClient.java:54)`

Hey. Thanks for updating us.
This is related to https://github.com/google/dagger/pull/950
We'll let you know when the snapshot will have a workaround.

My project was using rxandroidble 1.3.3, everything was working fine. Recently, I upgraded my project to target Android 11 and migrated to Androidx. After that, I started getting this exact same error. I was then able to resolve it after upgrading to rxandroidble 1.5.0.
My project was not using Dagger explicitly.  Hence, I'm wondering what actually caused this issue to appear? Do you guys have any idea? Any help is appreciated! @dariuszseweryn

My project was using rxandroidble 1.3.3, everything was working fine. Recently, I upgraded my project to target Android 11 and migrated to Androidx. After that, I started getting this exact same error. I was then able to resolve it after upgrading to rxandroidble 1.5.0.
My project was not using Dagger explicitly.  Hence, I'm wondering what actually caused this issue to appear? Do you guys have any idea? Any help is appreciated! @dariuszseweryn

With more investigation, I found that I was getting this error because I recently migrated Fabric to Firebase Crashlytics. And the latest version of Firebase actually uses Dagger 2.24 internally. This was overriding my Dagger 2.8
So upgrading rxandroidble to 1.5.0 solved the problem.

Happy to hear that. :)


[css] propose class names and ids that exist in HTML

When write my HTML first, I add a class name that I have not yet created in my CSS, for example  div class="vscode" /div . When I go to my CSS file and begin typing ".v" there is no autocomplete for ".vscode". but in the webstorm ,there is a hint, it's really great.
there are some extensions to auto-complete class name, but all of them (at least I can't find one)offer the suggestions based on the css files instead of html  files .
someone has the same problem.
https://stackoverflow.com/questions/40760014/vs-code-html-css-classes-scoping?rq=1
https://stackoverflow.com/questions/41817375/vscode-autocomplete-in-css-a-class-first-created-in-your-html-tag-extension-fo?rq=1

VSCode Version: last version
OS Version: last version

Vote up, this property is really missing and important and it could work vice versa.

This extension provides the feature, but I'd definitely prefer if this were supported 'natively' :)

This extensions makes the trick: https://marketplace.visualstudio.com/items?itemName=solnurkarim.html-to-css-autocompletion
This feature should be included natively...

This extension makes the trick: https://marketplace.visualstudio.com/items?itemName=solnurkarim.html-to-css-autocompletion
This feature should be included natively...

Thank you so much for that extension!

covered by #47331


test: pr validation 2

Sanity Tests Execution Failed.

Sanity Tests Execution Failed.

Sanity Test execution job failed


Incorrect display of times in the offer listing

If I log in as an administrator with a profile whose time zone is not set to UTC, incorrect date and time information is displayed in the listing of quotes. The output is only in UTC and not in the user time zone. The behavior therefore differs from the order list.
Reproducable in Shopware 6.6 and 6.5

[public] Shopware automated response: This issue is linked to the internal issue: B2B-1275
[created from B2B-1275, comment 503562]


[esp/scene] add initial support for Replica_v1 semantic information

Motivation and Context

Initial support for Replica semantic information.
How Has This Been Tested
Testing semantic information using WebGL demo.

Types of changes

[ ] Docs change / refactoring / dependency upgrade
[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[X] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[X] I have read the CONTRIBUTING document.
[X] I have completed my CLA (see CONTRIBUTING)
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

All feedback should now be addressed. Verified that semantic labels are working well (thanks to @erikwijmans helping fix a bug in the javascript side).


climate system #1540

Summary of the discussion
In order to solve #1329 we need climate system for axiomatisation.
Type of change (CHANGELOG.md)
Added

Added a new class climate system #1540

Workflow checklist
Automation
Closes #1540
PR-Assignee

[ ] 🐙 Follow the Pull Request Workflow
[ ] 📝 Update the CHANGELOG.md
[ ] 📙 Add #'s to term tracker item

Reviewer

[ ] 🐙 Follow the Reviewer Guide
[ ] 🐙 Provided feedback and show sufficient appreciation for the work done

I added the link to ENVO as proposed in the issue.

However, as there was only very limited time from my initial proposal to the implementation I suggest to wait at least a couple of days before merging to see whether someone else has an opinion on this definition.

The issue and PR were now open for more than a week and nobody had further comments so I merge this PR now.


Reusable dialog fragment template (EXPOSUREAPP-12789)

First PR in the dialog refactoring story, wrapping all dialogs in a dialog fragment to prevent potential memory leaks and save dialog state if the view gets destroyed when the app is put in background.
I've kept thinking of how I would like to use this template and I've come up with this showDialog extension function for fragments because it feels easy to use and there's not much boilerplate code that needs to be written but I'm open to change this up if you prefer another method.
Another approach  would be to create sepparate files where we store all dialogs for a specific fragment/entire feature like we currently do for example in the RecycleBinDialogType, but I'm not sold on the idea of writing boilerplate code for each dialog type. We would need an XDialogHelper file and an XDialogHelperType class for each fragment/feature.
Please let me know what your preference would be and if this approach gets more votes, I'll implement it this way.
I'm not passing the resId of the strings and instead I'm using the getString() function to pass the string directly to the template because there are instances where we are using string interpolation to display a dialog message so a resId woudln't suffice.
I've started changing the dialogs from the QR Scanner fragment as an example of how this works. I haven't made any changes to the Error dialogs yet as they require more work and I'd do them at a later time once we get this template in.

@SamuraiKek Thanks for the nice description. I have some ideas (maybe to explore)

Instead of having once function with many params , could we use a builder pattern. Dialogs can vary from different cases
I think Builder pattern would be a good fit in here.
I think we can use Kotlin DSL here? https://kotlinlang.org/docs/type-safe-builders.html
Maybe through this building pattern we could expose what MateriaDailogAlertBuilder offer anyway and just display it in DialogFragment and this would offer flexibility to custom the dialog from once screen to another without having to provide so many args. and would extend the pattern to offer new functionally such Delete Dialog red button

Let me what are your thoughts on that ?

Nice work!


Parsing of ShapeNetSem meshes

Can you give some better instructions regarding the mesh creation with manifold?
I am following your steps and leads to segmentation fail.
Is the shapenetsem file models-OBJ.zip the one needed or am I doing sth wrong?

I have a similar problem; I assumed that I'm supposed to process the .obj files with Manifold but the program crashes or freezes my computer.

I have a similar problem; I assumed that I'm supposed to process the .obj files with Manifold but the program crashes or freezes my computer.

Hi,
(1) What exactly leads to a segfault? Is it the manifold or simplify command?
(The simplify command can lead to crashes when dealing with degenerated triangles, see e.g.: https://github.com/hjwdzh/Manifold/issues/5)
(2) Does it happen with all meshes or just a subset?

@clemense I am dealing with problem #1. How did you deal with it?

The easiest solution is to ignore those meshes. There shouldn't be many that fail.

Got it; with some patience, I got around 5250 successfully simplified meshes (some seemed to take a really long time, which I killed and discarded)

@clemense I have the same error and am getting segmentation faults for objects in the ShapeNetSem obj files, which should be the same objects that are in acronym. for example, I am getting a crash for 5bbcf08fabf2d50336b41ce3eef1f5be.obj, a "DoubleBed" object. In this case do you suggest (1) removing such objects from the dataset, (2) using the non-simplified version (i.e. the version that was made watertight by the manifold command but not simplified), or (3) something else? Thank you for your help.

It seems that (1) would require regenerating scene_contacts as some scenes reference the removed meshes.


mbsync.el: Require cl

cl is required because of incf macro
This commit fixes error message after calling mbsync procedure.

Hm, shouldn't that be cl-lib?

Requiring a cl-lib works, too.  Let's stick with cl-lib, because cl requires cl-lib.  I've pushed a change.

thanks =D


HINT: How to use Docker-pretty-ps with Powershell

If you want to use dpps with powershell one way is to use an alias.
i installed it with pip install docker-pretty-ps and added an alias to my profile.
function DPrettyPS {
    $expression = "python C:\ProgramData\scoop\apps\python\current\Scripts\docker-pretty-ps "+$args[0]
     Invoke-Expression $expression
}
Set-Alias dpps DPrettyPS -Option AllScope

now you can use it with the alias dpps and all available parameter like dpps -s

Hope it helps someone.

pip installed the binary in a different location (%APPDATA%). Thank you!!


How to kill the 'Today' button?

Hi guys, thanks very much for your work on this.
I'm trying to kill the Today button.
Been having a good comb through the code but i can't find <button class="selectDay"> anywhere.
Tried:

looking at Calendar.js, dev tools suggests the button is at CalendarContainer level

   <div className={styles.calendarContainer + ' ' + jalaaliClassName + className}>
        {mode === 'monthSelector' ? this.renderMonthSelector() : this.renderDays()}
      </div>

But that ^^ just renders month/day selectors.

looking at onClickOutside module. Wondered if it might listen for a click on a button and then assign a value of Date.now() or something. But seems onClickOutside is literally just there to open/close the calendar component.

searching for the selectDay styles / className. No joy.

Any advice on where to find it?
Might just kill the element with a style rule otherwise.

UPDATE: I have gotten around this by injecting a disgustingly-hacky display: none at the top of my app for selectToday
Would love to see/assist in adding an options prop that kills that button though, if poss.
Thanks. x

Hi @Aid19801
Thanks for reporting the issue.
I'll add this feature ASAP.

@Aid19801
Added new showTodayButton property to the Datepicker and you can see the usage of this feature here on the demo page.


Huge file sizes when using png image type

When initializing html2pdf with 'png' as the image type option, file sizes are approx. 32 times larger than using 'jpeg' at 100% quality. Adjusting the 'quality' option doesn't have any effect on the filesize when using type 'png', it remains constant at all levels.

Hi @Colinh84, yes .png is a lossless image compression so it gives larger file sizes. The image type and quality options are used in the canvas.toDataUrl() conversion, and you'll see in that link that 'quality' is only used for jpeg/webp, not png. I'll try to make the documentation more clear about that limitation.
In terms of resolving the issue, my suggestion is to try using this shim which adds png compression to canvas.toDataUrl(). It looks like a convenient in-place solution - it should cause the quality setting to reduce the size of the pngs/files created. I'll add that info into the readme as well. Let me know if you try it!

Closing this issue, hopefully your questions about pngs were resolved.


fix: Fixed git fatal error in Dockerfile

Put an x into the box if that apply:

[ ] This PR introduces breaking change.
[x] This PR fixes a bug.
[ ] This PR adds new functionality.
[ ] This PR enhances existing functionality.

Description of your changes
Fixes #370
How can we test changes
git checkout fix/GH-370/fix_docker
docker build -t pre-commit-terraform --build-arg INSTALL_ALL=true .

cd TEST_REPO
docker run -v $(pwd):/lint -it  -w /lint pre-commit-terraform:latest run -a

This PR is included in version 1.68.1 :tada:


docs: fix a typo in example

Checklist:

[ ] My organization is added to USERS.md.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


buildGraalvm: fix build on x86_64-darwin

Related: https://github.com/NixOS/nixpkgs/issues/354059
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[x] x86_64-darwin
[x] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[x] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 360254

x86_64-linux

aarch64-linux

x86_64-darwin

:fast_forward: 3 packages marked as broken and skipped:

dapl-native
dbqn-native
obb

:x: 3 packages failed to build:

certificate-ripper
graalvmCEPackages.graalnodejs
scala-update

:white_check_mark: 17 packages built:

babashka
babashka-unwrapped
bbin
clj-kondo
cljfmt
clojure-lsp
cq
graalvm-ce
graalvmCEPackages.graaljs
graalvmCEPackages.graalpy
graalvmCEPackages.truffleruby
jet
kdePackages.stdenv
neil
vscode-extensions.betterthantomorrow.calva
yamlscript
zprint

aarch64-darwin

:fast_forward: 3 packages marked as broken and skipped:

dapl-native
dbqn-native
obb

:white_check_mark: 16 packages built:

babashka
babashka-unwrapped
bbin
certificate-ripper
clj-kondo
cljfmt
clojure-lsp
cq
graalvm-ce
jet
kdePackages.stdenv
neil
scala-update
vscode-extensions.betterthantomorrow.calva
yamlscript
zprint

@ofborg build babashka clojure-lsp

Hey @nathanregner , do you mind backporting this to nixos-24.11 release stable? I was trying to update my darwing setup today and faced this issue with building graalvm.
According to the [https://github.com/NixOS/nixpkgs/blob/d88425e91ca77d6041fd0c1801012bcbe0fae56b/CONTRIBUTING.md#backporting-changes](Backporting section) you just need to add label backport release-24.11 and the github actions will create the backport even though this PR is merged.


Optimize p_box3x3_f32().

Couple of notes:

I figured running "make check" in tests/image/ doesn't really recognize failures in individual tests (they're just reported as PASS). Kind suggestions: guys, if you want people contribute to "optimization" part of library, it's your job as maintainers to make infrastructure be right and comfortable (people can help with that, see #173, #174 from me, but overall, it's not much fun to go for "optimize" if basic thinsg like testing don't work).

The testcase could use some (hopefully minor) codestyle cleanup, feel free to request that, but let's see first if you'd appreciate this contribution at all.

Ah, almost forgot - this is my application for optimization crowdsourcing contest https://www.parallella.org/2015/06/02/write-one-c-function-and-get-a-free-computer/ ;-)

On x86_64, this optimization reduces both code size and stack usage.

Great! Looks good. Please sign off commit/pr.
Agree, regarding verification, it is being worked on! Although I would add that verification is everyone's responsibility if we want to scale.(especially adding invividual test cases)

Great! Looks good. Please sign off commit/pr.

Both commits of this PR are signed-off. Remembering that github may use PR description as merge commit description, and you want even that merge commit signed off, I added it, hope that's what you meant.

Agree, regarding verification, it is being worked on! Although I would add that verification is everyone's responsibility if we want to scale.(especially adding invividual test cases)

Sure, that's why I included a testcase in this PR - I wouldn't know if I implementation is correct w/o it. I meant ground testing infrastructure, like which unit test framework to use, helper routines, overall tets format, etc. - if each contributor would start to invent that stuff, it would be a mess. Anyway, seeing updates to check_p_rgb2greyscale.c in the same dir, I propagated them to test in this patch too, thansk for them.
Also made headlines of commit messages more consistent with existing.


Problems with extending Joule example (noisy solution for electric potential)

Hi all,
I want to use the Joule example as a starting point to model heating of complex coil geometries such as MRI gradient coils (eventually adding water cooling tubes, either via boundary conditions or more complex water flow modeling, but that's a bit further down the road).
I've been generating some example meshes representing a simple coil loop with two ports (not too different from the coil.gen example) embedded in a sheet of ABS plastic. The idea is to model how the coil is heating up the ABS sheet, and test whether or not we need to include cooling mechanisms. My assumption is that the Joule example should be suitable to model this, even though the main contribution to the ABS sheet heating would be from heat conduction from the wire itself, rather than through eddy currents. The meshes are generated in Matlab and Tetgen, because ultimately I want to batch model a larger number of coil geometries (i.e., generate the meshes on the fly without too much manual labor).

I've been making pretty good progress, but I am seeing an odd behavior in the solution of the electric potential phi, i.e., the solution is very noisy. I tested this with serial and parallel runs but it didn't seem to make a difference. In the image below, I also left out the ABS sheet, i.e., only modeled the coil and the background air. I also used the same material parameters (el. conductivity, etc.) as in the Joule example. Units of the mesh are in meters.

Any idea what could cause this behavior?
Big thanks,
Maatinksi

Hi, @Maatinski,
I've seen similar issues with tetrahedral meshes. I suspect this is a symptom of under-resolving the field. Often it is sufficient to increase the basis function order but you may need to refine the mesh outside the coil (the coils itself seems to be much finer).
Best wishes,
Mark

Hey @Maatinski ,

representing a simple coil loop with two ports

assuming those two ports are on the lower boundary and part of the coil (not sure what the two red circles are in your screenshot), then I would expect phi to be more gradual.
In my experience of modelling voltage-driven, solid coils one would only solve the electric potential inside the coil by specifying one port to V=0 and the other one to V=Applied Voltage. When phi is discretized using H1 you should get good results even in first order.
Here, one example how of I would expect the phi potential to look like (in the magnetostatic limit):

Hi @mlstowell and @paul-hilscher
Thanks for the comments. I reran this problem with a mesh with better grading, but the results did not improve. I also double checked again that I am correctly defining material and boundary properties (compared to coil.gen) but I don't see a difference.
@paul-hilscher As for the boundary values, I am assigning +1V/-1V to the two wire ports, as in the Joule/coil.gen example. Looking at the phi solution, it does seem like these boundary values are set correctly.
Mesh-explorer view of coil.gen example and my mesh:

Mesh view in Matlab after improving mesh gradient (total of ~2M elements):

Solution of phi with order=2 elements:

A quick follow up: I've been playing with tons of other parameters (grading, element quality, serial vs. parallel runs, etc.) but nothing seemed to help. The one thing I did find though is the following error that occurs when enabling AMR refinement:
MFEM abort: (r,c,f) = (786,887,956)  ... in function: int mfem::STable3D::operator()(int, int, int) const  ... in file: /autofs/space/p41trd3/p41trd3/mfem-4.6.1/general/stable3d.cpp:112
I found some explanations on here (#3478 424) but I am not sure if I am missing requirements on how the mesh has to be formatted. Any thoughts on this?
Thanks a lot!

Another quick update:
The error seems to be related to the MFEM mesh version. If I switch from v1.0 to v1.x, i.e., from the format
vertices
75685
3
-21.5000000 -33.0000000 -59.3100000
-21.5000000 -33.0000000 -58.3838000
...

to
vertices
75685

nodes
FiniteElementSpace
FiniteElementCollection: H1_3D_P1
VDim: 3
Ordering: 1

-21.5000000 -33.0000000 -59.3100000
-21.5000000 -33.0000000 -58.3838000
...

the error is gone. I was under the impression that for first-order meshes these two formats would lead to the same mesh, but I may be wrong. Let me know if I'm missing something.
Thanks,
Maatinski

Hi all,
things are starting to look good, finally able to run this for more complex problems (see below a run on a more representative coil geometry). This was solved for order = 1 but on a much refined mesh for the wire. Two questions popped up though:
1. Material attributes:
I assume the attributes defined in the example correspond to the electrical conductivity sigma, thermal conductivity Tcond, and heat capacity Tcap but I am a bit confused by the values. Even if I convert everything to coherent units (looks like the coil.gen example is more like cm units) the values don't make sense to me. Am I missing something?
2. Steady state solution:
Is there any reason why I wouldn't be able to compute a steady-state solution for the heating part (of this would mean moving away from the transient operator)? I was thinking about integrating the Joule heating component for one sinusoidal cycle, and then assuming this quantity to be the constant driving term for heating (maybe scaled by a smaller duty cycle) for the steady-state heat problem. Any thoughts on this would be most welcome.
Thanks,
Maatinski

Hi all,
sorry that I keep bugging everyone about this. Still trying to figure out how the material values are handled. I tried running this with conventional values for the properties mu, sigma, Tcond, Tcap  but the results don't seem to make sense. At the same time the default values don't seem to make sense to me (especially the EM properties):
double mu = 1.0;
double sigma = 2.0*M_PI*10;
double Tcapacity = 1.0;
double Tconductivity = 0.01;

Also the scaling of thermal properties of the conductive wire relative to air seem odd (metal thermal conductivity should be greater than air, for example):
TcondAir   = 1.0e6  * Tconductivity;
TcapAir    = 1.0    * Tcapacity;

I am sure I am missing something fairly trivial, but any suggestion or hint would be greatly appreciated.
@mlstowell @tzanio Any thoughts on this?
Big thanks!!

Hi, @Maatinski,
I agree that the default values appear odd. I did not choose these values so I can only guess why they are set in this manner. I do have two ideas. First, I suspect the values were not chosen to represent a realistic situation but only to produce desired behavior i.e. liberties were taken. Second, I believe the developer was concerned with physical problems involving wires overheating due to induction. With this in mind consider the best case scenario where we can perfectly control the temperature at the surface of the wire (via some active cooling tech). How much heating of the wire is inevitable? Perhaps this was the scenario being modeled or perhaps they just wanted to see a temperature gradient inside the wire for aesthetic reasons. I really cannot say with any certainty.
Best wishes,
Mark

Hi @mlstowell
thank you so much for the comment. That makes totally sense. Maybe it's worth adding a comment on this to the joule example to avoid confusion (or maybe it's just me who got confused).
I also just retested this with realistic parameters: I think when I tested this initially I accidentally set incorrect values for the heat capacity (J/g °K rather than J/m^3 °K). Seems to be producing realistic results now.
Big thanks,
Mathias

Hi @mlstowell and others,
thanks again for the comments. Things are working pretty well now, but there is one piece I am having trouble with. I would like to calculate the total current flowing through either of the coil ports to relate the heating to the current rather than the voltage. Anything looking wrong with the code below?
(the results don't seem correct, i.e., it's giving me too low of a current amplitude).
As always, big thanks!
// E - E-field in HCurlFESpace
// j - Current density in HCurlFESpace

// GET CURRENT DENSITY
//================================
ParBilinearForm ej(&HCurlFESpace);
ej.AddDomainIntegrator( new VectorFEMassIntegrator(*sigma) );
ej.Assemble();
ej.Mult( E, j );

// Or is this done through an Interpolator?
// ParDiscreteLinearOperator ej(&HCurlFESpace, &HCurlFESpace);
// ej.AddDomainInterpolator(new ScalarVectorProductInterpolator(*sigma));
// ej.Assemble();
// ej.Mult( E, j );

// INTEGRATE CURRENT ON PORT 1
//================================
ParLinearForm I_surf_int(&HDivFESpace);
VectorGridFunctionCoefficient Jv_gf(&J_gf);

// mask for the coil port 1
Array<int> bdr_attr(pmesh->bdr_attributes.Max());
bdr_attr = 0;
bdr_attr[0] = 1; // port 1

I_surf_int.AddBoundaryIntegrator(new BoundaryNormalLFIntegrator(Jv_gf), bdr_attr);
I_surf_int.Assemble();

ParGridFunction ones(&HDivFESpace);
ones = 1.0;

double I_port_1 = I_surf_int(ones);

it's giving me too low of a current amplitude)
// j - Current density in HCurlFESpace

the current for solid coils has two components: the eddy currents ($\sigma \partial_t \vec{A}$) and the coil source current ($\sigma \nabla \phi$). Do you include both ?

Hi @paul-hilscher ,
Thanks for the comment. Yes, I am including both (using similar workflow as in the joule example). The E-field magnitude and the heating power both seem good, I think the problem is in translating the E-field E to current density j and integration of the current density across the coil port boundary (i.e., something in the code in my previous comment).

Hi, @Maatinski,
I don't know if this is still an issue but here's how I would do this:

Compute J in H(Div) from E in H(Curl) using something like:

ParMixedBilinearForm ej(&HCurlFESpace, &HDivFESpace);
ej.AddDomainIntegrator( new VectorFEMassIntegrator(*sigma) );
ej.Assemble();
ParBilinearForm m(&HDivFESpace);
m.AddDomainIntegrator( new VectorFEMassIntegrator );
m.Assemble();
ej.Mult( E, j_dual );

... setup an iterative solver with a diagonal scaling preconditioner or something similar...
m_inverse.Mult(j_dual, J);

Prepare a linear form to integrate over the port exactly as you show above except use a VectorCoefficient which defines a unit normal vector field which pierces the surface of the port in the direction you choose to represent positive current flow. For example if your port is parallel to the yz plane and flow is in the positive x direction, you can use the following:

Vector xHatVec(3); xHatVec = 0; xHatVec[0] = 1;
VectorConstantCoefficient xHatCoef(xHatVec);

... setup ParLinearForm and attribute array
I_surf_int.AddBoundaryIntegrator(new BoundaryNormalLFIntegrator(xHatCoef), bdr_attr);
I_surf_int.Assemble();

double I_port_1 = I_surf_int(J);

Notes:
If you define J in H(Curl) then the J DoFs on the surface of the wire where sigma has a discontinuity will be lower than expected. This is because those DoFs are computed as a weighted average of the current density inside the wire and outside of it and presumably the current density is virtually zero outside the wire.
Solving for J in the manner I suggest above can be computationally expensive on a large mesh. If you only need J on the port this may seem excessive. Another, less expensive option is to compute J in H(Div) by interpolating E (and sigma). This can be done in various ways; using an interpolator matrix or a VectorGridFunctionCoefficient (then multiply by sigma). If the interpolation option is used I would recommend integrating over a surface which is at least a few elements from the end of the wire not on the end of the wire itself unless the port is part of the outer boundary of the mesh. This again avoids the discontinuity in sigma or any possible edge effects in the E field near the transition out of the end of the wire.
Best wishes,
Mark

Hi @mlstowell ,
thanks a lot for these suggestions and apologies for the late response; I had to put this aside for a few weeks due to some other deadlines. I will try to implement your suggestions soon and post some updates here.
Thanks a lot,
Mathias

Hi @mlstowell ,
a quick follow-up to your suggestions above:
I tried to implement what you wrote in your point 1) but I think I may be missing something. j_dual looks like I would expect it, but J does not seem right, so I assume something is wrong in the code below (this is written in terms of the PyMFEM interface but I assume it's easy to interpret):
m = mfem.ParBilinearForm(HDivFESpace)
m.AddDomainIntegrator(mfem.VectorFEMassIntegrator())
m.Assemble()

j = mfem.ParGridFunction(HDivFESpace)
j.Assign(0.0)

# Same tdofs as for scalar potential solve?
ess_tdof_list = mfem.intArray()
ess_bdr = mfem.intArray(pmesh.bdr_attributes.Max())
ess_bdr.Assign(1)
ess_bdr[0] = 0 # Port 1
ess_bdr[1] = 0 # Port 2
HDivFESpace.GetEssentialTrueDofs(ess_bdr, ess_tdof_list)

# Set up operators with correct DoF's
A = mfem.HypreParMatrix()
B = mfem.Vector()
X = mfem.Vector()

m.FormLinearSystem(ess_tdof_list, j_dual, j, A, X, B)

# Preconditioner #2
prec = mfem.HypreDiagScale()
pcg_a1 = mfem.HyprePCG(A)

# Solver parameters
solver_tol = 1e-12
solver_max_iter = 500
solver_print_level = 2

# Set the PCG solver
pcg_a1.SetTol(solver_tol)
pcg_a1.SetMaxIter(solver_max_iter)
pcg_a1.SetPrintLevel(solver_print_level)
pcg_a1.SetPreconditioner(prec)
pcg_a1.Mult(B, X)

J = mfem.ParGridFunction(HDivFESpace)
J.Assign(0.0)
m.RecoverFEMSolution(X,j,J)

Anything obviously wrong? I will try to add a screenshot later, but maybe you see something obvious even without screenshot.
Big thanks in advance!

Ok, I actually found the implementation in ex34p.cpp and realized I may have taken one confusing step that introduced some errors. I think it might be working now. I will check some of the quantitative current amplitudes and check if these agree with experiments.
https://github.com/mfem/mfem/blob/5f373e8c2a70acb413e0fb2a7c1be8054ab6079e/examples/ex34p.cpp#L620-L652


[WIP] App-level tests

This PR adds app-level tests, to allow testing a full constructed app and interaction with it and is very much work in progress.
It currently works similar to the Service trait.
Most of the code isn't very tide specific, for discussion and bikeshedding, I'd like to keep it on the module for now, before potentially moving it out into a crate.
Description

Adds a testing module containing the ability to turn an App into a Test app, which can be called.
Contains two main functions: test and tokio_test::test, which provide the necessary wrappers around panicing and reactor handling
Adds examples for response specific macros assert_status, assert_ok, etc.)

Misses any kind of ergonomics around building requests

Motivation and Context

How Has This Been Tested?
By writing tests using it.
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.

It's been a while since the last update. I'm going to go ahead and close this PR. @skade if you find time again to work on this again, I suggest to file a new PR and we can pick up where we left off (:


Generate new changelog with bumped version (no release)

:metal: awesome.

@jkeiser i think you just got #152 with that addition to the rake file.

:+1:

@jjasghar well, some of it anyway :) at least adds the github changelog generation.


Sponser button not working .

Description
Upon clicking on  sponser button , it is not redirecting.
I would be happy working on it. kindly assign this to me under hacktoberfest tag
Screenshots

@AyushJain001 Go for it!

The sponser button is not responsive. I would like to work on this issue. Kindly assign it to me

some of the links in the sponser section aren't working, I would like to fix this issue. Kindly assign this task to me


Add TLS key for sgadmin, add additional output to pkcs8 for node key

Reason
This operator depends on use of the searchguard-ssl plugin for TLS encryption. However searchguard-ssl is no longer distributed as a standalone plugin past ES version 6.2.4 - https://docs.search-guard.com/latest/search-guard-versions
In order to support ES versions 6.3+ the full blown searchguard plugin needs to be used. This requires an additional cert that MUST differ from the node cert in order to initialize sgadmin.

Thanks @while1eq1, I'm working to get a 6.3 docker image together to test this. What image were you using? I'm also looking to move to the upstream elastic builds if possible.

@stevesloka quay.io/while1eq1/elasticsearch-kubernetes-searchguard:6.4.1
https://github.com/while1eq1/elasticsearch-kubernetes-searchguard
You will need to test on this PR here - https://github.com/upmc-enterprises/elasticsearch-operator/pull/249
^ that PR has this PR here merged in with it because the sgadmin TLS key is needed for that image to work

@stevesloka im closing this in lieu of https://github.com/upmc-enterprises/elasticsearch-operator/pull/249


[FLINK-4876] Allow web interface to be bound to a specific ip/interface/inetHost

Currently the web interface automatically binds to all interfaces on <IP_ADDRESS>. IMHO there are some use cases to only bind to a specific ipadress, (e.g. access through an authenticated proxy, not binding on the management or backup interface)

[x ] General

The pull request references the related JIRA issue ("[FLINK-XXX] Jira title text")
The pull request addresses only one issue
Each commit in the PR has a meaningful commit message (including the JIRA id)

[x ] Documentation

Documentation has been added for new functionality
Old documentation affected by the pull request has been updated
JavaDoc for public methods has been added

[x ] Tests & Build

Functionality added by the pull request is covered by tests
mvn clean verify has been executed successfully locally or a Travis build has passed

Thank you for opening a PR for fixing this.
+1 to merge.

I added a new way to define configuration options (see below). It is a much more maintainable way of defining configuration options.
Would be great if we used that for all new options that we create, and lazily migrate existing parameters to that pattern.
ConfigOption<Double> threshold = ConfigOptions
    .key("cpu.utilization.threshold")
    .defaultValue(0.9).
    .withDeprecatedKeys("cpu.threshold");

Here is a complete example: https://github.com/apache/flink/blob/master/flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java

@StephanEwen seems reasonable thing to do, i updated the code to use the new ConfigOption method

@uce i personally always prefer a explicit default as that keeps me in control instead of the upstream implementation, but i can live with setting it to null.

OK, cool. If you have time to address this, I would go ahead and merge it afterwards.

@uce i made the changes are requested. With a few slight modifications however.

.defaultValue(null); throws an error so i opted to use .noDefaultValue(); which behaves the same.

You can not pass null as the first argument of io.netty.bootstrap.ServerBootstra.bind() as it wants you to be explicit about the address ( it will also validate it as a valid local address). So i added a if (configuredAddress == null) { switch.

Thank you! I will check it out later today.


Batch management and monitoring

Batches should have a unique ID so that we can do some more advanced operations on them.
Also, there should be a way to add multiple transactions to a batch via a single API call (e.g. import transactions into batch). CSV option could be interesting here.
Then we should have some notification system that tells the app the status of the batch:

Get information on a batch: time reamining, amount of bitcoins, list of tx, batch size (kb)
List batches (if we allow multiple at once)
Set automated threshold for notification (Bitcoin amount? Batch size?)

API configs and routes:
Enable batching

simple on/off switch
parameters: batch frequency
batching schedule (optional): batch at predetermined times, e.g. Mondays 9AM and Tuesdays 2PM

Create a batch

create batch via API using multiple addresses and amounts
create a batch via CSV upload of addresses and amounts
create a batch from transactions
create a batch for PBST signing
create a batch from multiple signed PBST files

Batch IDs

generate unique ID for each batch which is saved and logged in Cyphernode
index all batches

Batch statuses:

pending: when the batch is accumulating transactions
done: when the batch has been signed and broadcast

Batch data for lookup:

status
start time
if done: time
if done: tx id
if done: tx fees
if done: # confirmations
number of transactions in batch
total amount of bitcoins in batch
number of inputs and outputs
batch size
if pending: time remaining until broadcast
if pending: expected broadcast time according to schedule

Batch actions

cancel batch (no broadcast or signing)
optional (security tradeoff): broadcast batch overriding the batch schedule
add offline signing: require batches to be signed offline using PSBT
offline signing threshold: only transactions over (x) amount of bitcoins must be signed offline


fix: Add ArrowLeft and ArrowRight to ignoreKeydown type

The library in fact supports this configuration, but the FocusableProps.ignoreKeydown doesn't include it for some reason.
This is needed for my POC of keyboard navigation in the table and interacting with an intractable element:
https://github.com/microsoft/fluentui/pull/26873/files#diff-91a26c39f89f4f6f6ce48e2d580e0c68d2b10706c96f851e5a070a65f0871fe7R47

Can you add tests here? https://github.com/microsoft/tabster/blob/c1b46b478fd0d75fe95b5653d525658e2bf16d6a/tests/Mover.test.tsx#L327


Enable Stacked Bar Chart #enhancement

Description
Enable stacked bar chart when user set stack to true.
Currently only works with all positive or all negative numbers.

Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?

[ ] If this is a bug fix, did you add or update a test file to the examples directory that verifies the bug is fixed?
[x] If this is a new feature, did you add files to the examples directory to demonstrate the feature?
[x] If this is a new feature, did you add documentation to the docs directory for the feature?

Thanks for your contribution


Time Travelling does not work

With Redux DevTools, everything seems to work well except time travelling.

Hey there, I think I can tackle this since it's blocking for me. Any insight as to why this might be?

Nice catch!
ConnectedRouter.js should be changed like you proposed.
Can we just create a history instance in reducer.js like the below code instead of passing history object to it? So, it'll be easier for setting up the root reducer; especially, we we make `rootReducer' as a separate file.
import { createBrowserHistory } from 'history'
import { LOCATION_CHANGE } from './actions'

/**
 * This reducer will update the state with the most recent location history
 * has transitioned to.
 */
const history = createBrowserHistory()
const initialState = {
  location: history.location,
  action: history.action,
}

const routerReducer = (state = initialState, { type, payload } = {}) => {
  if (type === LOCATION_CHANGE) {
    return {
      ...state,
      ...payload,
    }
  }

  return state
}

export default routerReducer

@supasate I thought about that, but I have reservations because:

It becomes less testable because we're using createBrowserHistory which is dependent on window right?
We need to expose the history object somehow so that StaticRouter has access to it, right?

If we passed it in, it could be mocked in a testing environment, and we would give StaticRouter access to it for push, replace, etc.

@dictions I agree with testability.
The history object need to be passed to Provider, store, and rootReducer. If they are in separated files, the rootReducer might need to be transformed to a function that takes history object in.
However, I'd like make it simple by not changing the way most people do with the rootReducer file with the benefit of only initial state in the reducer.
I'll rethink it this weekend probably. If you have any idea, please let me know!

Yeah it's a tricky one. You either have to pass it to your rootReducer and make that a generator. Or, you'll need to create and colocate history with your rootReducer, making it not testable in the same way. What if the API was similar to redux connect?
// Your main client entrypoint

import rootReducer from 'reducers'
import configureStore from './store'
import {connectRouter} from 'connected-react-router'
import {createBrowserHistory} from 'history'

const history = createBrowserHistory()
const store = configureStore(
  connectRouter(history)(rootReducer)
)

// Set up router ...

Is that too ridiculous?

@dictions I think it's a nice solution. Based on your code, I fixed some bugs and Time Travel works great now (except URL bar is not updated which we may fix it as another issue).
import { LOCATION_CHANGE } from './actions'

/**
 * This reducer will update the state with the most recent location history
 * has transitioned to.
 */
const routerReducer = (state, { type, payload } = {}) => {
  if (type === LOCATION_CHANGE) {
    return {
      ...state,
      ...payload,
    }
  }

  return state
}

const connectRouter = (history) => {
  const initialRouterState = {
    location: history.location,
    action: history.action,
  }
  // Wrap a root reducer and return a new root reducer with router state
  return (rootReducer) => (state, action) => {
    let routerState = initialRouterState

    // Extract router state
    if (state) {
      const { router, ...rest} = state
      routerState = router || routerState
      state = rest
    }
    const reducerResults = rootReducer(state, action)

    return {
      ...reducerResults,
      router: routerReducer(routerState, action)
    }
  }
}

export default connectRouter

Would you like to submit a PR to be a contributor of this idea?

Looks great! I'll submit a PR in a bit.
I noticed that the URL bar was out of sync w/ the router reducer. I can't seem to figure out a solution to that though, as it would involve sending undo payloads to the browser history, and keeping track of the "real" browser history in memory.
My best example would be this:

Start on Page A
Nagivate to Page B
Go back in browser history to Page A (Page B is forward in history now).
"Undo" the navigate change via the Redux Devtools LogMonitor, thereby going forward to Page B.

I can't seem to wrap my head around a simple solution there. If you can figure it out I'd love to hear ideas.
PR coming soon!

About synchronizing URL in Time Travel mode, I've created a new issue #8 for this topic.


02-load-data-with-power-query-in-power-bi-desktop.md

English:
Font Color Format
Current Translation:
字体颜色格式
Suggested Translation:
Font Color Format

Hello contributor,
Thank you for your contribution! We are processing your suggestions and we will update you shortly.
Kind regards,
Microsoft Worldwide Learning Team

Fixed.


Punishments 'date' issue

With 2.10.0 the punishments are properly collected but there is an issue with the date ('given')
The first date (or last punishment) is formatted differently than the others, blocking sorting and providing an output which is difficult to tweak if one wants to format the date

code used
if client.logged_in: # check if client successfully logged in
    # recup des punishments
    jsondata={}
    punishments = client.current_period.punishments
    punishments = sorted(punishments, key=lambda punishment: punishment.given, reverse=True)
    print(punishments)
    jsondata['punishments'] = []

    #Transformation des punishments en Json

    for punishment in punishments:
        jsondata['punishments'].append({
            'id': punishment.id,
            'date': punishment.given,
            'cours': punishment.during_lesson,
            'raisons': punishment.reasons,
            'circonstances': punishment.circumstances,
            'nature': punishment.nature,
            'duree': str(punishment.duration),
            'devoirs': punishment.homework,
            'exclusion': punishment.exclusion,
        })
    punishmentList = jsondata
    print(jsondata)

There is an error on the line: punishment = sorted(pun....
Traceback (most recent call last):
  File "/mnt/3692670A6ACD9016/docker/homeassistant1/python_scripts/pronote_old_attempts/test3.py", line 33, in <module>
    punishments = sorted(punishments, key=lambda punishment: punishment.given, reverse=True)
TypeError: can't compare datetime.datetime to datetime.date

output:
{
  'punishments': [
    {
      'id': '121C446FD3EF593',
      'date': datetime.date(2023,
      6,
      16),
      'cours': False,
      'raisons': [
        'Pas de carte de cantine'
      ],
      'circonstances': 'xxxxx',
      'nature': 'xxxx',
      'duree': 'xxxxx',
      'devoirs': '',
      'exclusion': False
    },
    {
      'id': '12160CBE73EF534',
      'date': datetime.datetime(2023,
      2,
      10,
      9,
      22),
      'cours': True,
      'raisons': [
        'xxxx'
      ],
      'circonstances': "xxxx",
      'nature': 'Devoir supplémentaire',
      'duree': 'None',
      'devoirs': 'Recopier le chapitre 1 du document de rentrée.',
      'exclusion': False
    },
    {
      'id': '12177EEF83EF5F5',
      'date': datetime.datetime(2023,
      3,
      17,
      9,
      22),
      'cours': True,
      'raisons': [
        'bavardages continues malgré les rappels'
      ],
      'circonstances': 'xxxxx',
      'nature': 'Devoir supplémentaire',
      'duree': 'None',
      'devoirs': 'recopier le chapitre un du document de rentrée',
      'exclusion': False
    }
  ]
}

Hi,
this is not a problem on pronotepy's side. Sometimes punishments only have the date specified, but other times they have a full date-time. This is reflected in the API by making given a Union[datetime.date, datetime.datetime]. You can do something similar to this:
if client.logged_in: # check if client successfully logged in
    # recup des punishments
    jsondata={}
    punishments = client.current_period.punishments

    # CHANGED HERE
    punishments = sorted(punishments, key=lambda p: p.given if isinstance(p.given, datetime.date) else p.given.date(), reverse=True)

    print(punishments)
    jsondata['punishments'] = []

    #Transformation des punishments en Json

    for punishment in punishments:
        jsondata['punishments'].append({
            'id': punishment.id,
            'date': punishment.given,
            'cours': punishment.during_lesson,
            'raisons': punishment.reasons,
            'circonstances': punishment.circumstances,
            'nature': punishment.nature,
            'duree': str(punishment.duration),
            'devoirs': punishment.homework,
            'exclusion': punishment.exclusion,
        })
    punishmentList = jsondata
    print(jsondata)

This transforms given into a datetime.date object when needed. You can of course do it the other way around, which will be more precise.
PS: you can serialize pronotepy classes using to_dict

I know it is ugly, but the ugliness does not come from pronotepy... :(

OK. my workaournd is adding .strftime("%Y-%m-%d") both for sorting as well as for the attrib.
The time itself has no value from what I see.


resizableImageWithCapInsets works on ioS5 only

Hi,
is there an alternative for non ios5?
The control is really cool!

I'll try and make it work with iOS 4 as well!

Great! I like this control but I also try to run it on iOS4. i've changed the resizbleImageWithCapInsets with stretchableImageWithLeftCapWidth. and also remove the weekOfYear code. But eventually the code runs not quite smooth compare to running on iOS5.0.
It will be great if Andrew can make the code compatible to iOS 4.0, thanks!


Problem in Android device after removing/ uninstalling Lottie -  undefined is not an object (evaluating reactNative.UIManager.LottieAnimationView.Commands)

I have deleted Lottie from the project:
react-native unlink lottie-react-native
react-native unlink lottie-ios
react-native uninstall lottie-react-native
react-native uninstall lottie-ios

After that deleted all code in Android project which refers to Lottie, deleted code in js files which refers to Lottie, Clean, Rebuild the project, made npm cache clean.
But still getting this error:

undefined is not an object (evaluating reactNative.UIManager.LottieAnimationView.Commands). Any ideas how is possible to get rid of that error?

I was able to get rid of that error, doing such steps:
I have installed Lottie again. after that:
react-native unlink lottie-react-native
react-native unlink lottie-ios
react-native uninstall lottie-react-native
react-native uninstall lottie-ios

After that restarted my laptop


Add documentation to simulators app for dealing with license keys for software

Add to https://biosimulators.org/conventions/simulator-interfaces
(1) License keys should be read from environment variables so they can easily be injected into containers. Keys can be prefixed by the name of the software (e.g., GRB_ for Gurobi).
(2) Developers should contact the the BioSimulations team to arrange using license software to run simulations in RunBioSimulations.

:tada: This issue has been resolved in version 4.5.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Attribute Localization

How can I localize attributes within error messages? Let's say I have required error message 'This :attribute is required' and I have that message under localization key "REQUIRED_ERROR_MESSAGE". I register that key as language message for 'required' property, but that won't work since key itself is missing :attribute and I'm doing translation on UI using i18next.
Only way I currently see this working is if we had some kind of callback which we can register globally and it would fire upon validation before message is returned in order to change the message. That way I could do this:
Validator.setMessageFormatter(function (message, rule, attributes) {
    // localize each attribute because my attributes are also just localization keys
   //  localize message -> e.g. 'This :attribute is required'
   // replace each 'attributes' key if its inside the message so the :attribute would be replaced with
       localized version
  // return localized message
});

Maybe there is some othere way but currently I can't seem to find it.
Thank you.

In order to provide a custom attribute name, you may want to use CustomAttributes like this:
let validator = new Validator({ firstName: '' }, { firstName: 'required' });

validator.setAttributeNames({ firstName: 'Vorname' });
if (validator.fails()) {
  validator.errors.first('firstName'); // "The Vorname field is required."
}

If you additionally switch language to de - you will have all your error message in a language you want.

If you use setAttributeNames you pass an object. Where key - is an identifier(attribute name) and value sould be already localized string, not a key in your localization table.
when using setAttributeFormatter your can achive this trick, but in this case attribute name should be a key in localization table, that may not be usable.
like this:
const localizationTable = {'FIRSTNAME_LABEL' : 'Vorname'};

                                                        ⬇key                                   ⬇key
let validator = new Validator({ FIRSTNAME_LABEL: '' }, { FIRSTNAME_LABEL: 'required' });
validator.setAttributeFormatter(function(attribute) {
  return localizationTable[attribute];
});
if (validator.fails()) {
  console.log(validator.errors.first('FIRSTNAME_LABEL')); // The Vorname field is required.
}


HDXDSYS-811 remove enum stragglers

Removed "POC"  from the population group enum, and "POP" from population status, as they are no longer needed

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.03%) to 80.739%

Totals

Change from base Build<PHONE_NUMBER>:
-0.03%

Covered Lines:
918

Relevant Lines:
1137

💛  - Coveralls


Fix mobile menu when hello bar is present

I've added the CNCF hello bar to the devrel site, however, the mobile menu doesn't adjust position correctly to accommodate it. Can the menu be made smart enough to accommodate a hello bar? Does it need to be positioned absolute instead of fixed so that it can respond to the parent element position?

The above PR doesn't quite solve the issue.

I think this one is solved...


GraphCMS Marcom website says to use children as prop

Issue
Didnt know where else to put it but figured I would try to be a good citizen of the community and put this up somewhere
For react children as a prop throws an error
How to reproduce

copy and paste this example from graphcms.com

const App = () => {
  return (

      <RichText
        children={content}
        renderers={{
          h1: ({ children }) =>
{children}
,
          bold: ({ children }) => {children},
        }}
      />

  );
};

React will get big mad and throw an error

Failed to compile
src/views/ACoolComponent.jsx
  Line XX:XX:  Do not pass children as props. Instead, nest children between the opening and closing tags  react/no-children-prop

Search for the keywords to learn more about each error.

URL: https://graphcms.com/blog/graphcms-react-rich-text-renderer

Hey @EvansJWang! Thanks a lot for opening this issue!
I fixed it on the documentation but forgot to update it on the post, haha! https://github.com/GraphCMS/rich-text/pull/15
Feel free to join our community on Slack!