Not a BUG: Modify to Tastomateacher4domo

Hi.
Inspired by your work.
I don't know if you are interested in adapting this code so it can handle the new Tasmota autodiscovery as well ? Tasmota team dropped support for "Setoption19 1" a legacy homeassistant auto discovery and introduced a new version.
In theory with the correct templates it should be possible right?
link: https://www.domoticz.com/forum/viewtopic.php?p=312108#p312108
Many thanks for taking it into consideration.

In theory it is possible, although there are a lots of sensors and myterious RGB settings beyond the standard relays in Tasmota which i have no clue how it works.
Shelly Gen1 devices has a good online documentation about MQTT commands, Shelly Gen2 has some cryptic documentation, which needs a lots of guesswork, but i do not found any good documentation about Tasmota MQTT topics and possible values... just its pure command list which is not telling any useful to this task.
But FYI:

Legacy "Setoption19 1" method still can be used with Tasmota devices,  (in fact i still use this at my v13 Tasmota) as it can be enabled when compiling Tasmota from source code.
https://github.com/arendst/Tasmota/blob/8223777e4f4195a43787a90956f2d77527d7d3a1/tasmota/my_user_config.h#L428

#define USE_HOME_ASSISTANT                           // Enable Home Assistant Discovery Support (+12k code, +6 bytes mem)
//#define USE_TASMOTA_DISCOVERY                      // Disable Tasmota Discovery support (+2k code)

In case of ESP32, the Discovery can be implemented on the device side on Tasmota Berry, as i did that on my own thermostat:
https://github.com/enesbcs/tasmota-custom-scripts/blob/edae4cd58badc6aad4b86853c9e50426390b32e6/thermostat/thermostat.be#L319

"Tasmota docs are open source and are maintained by the community," :)
I've found this information on Tasmota github regarding TasmotaDiscovery:
Preliminary discovery message format example
Topic: tasmota/discovery/49A3BC
Payload:
{
  "ip":"<IP_ADDRESS>",                             // IP address
  "dn":"Living Room",                               // Device name
  "fn":["Ceiling Lamp", "Floor Lamp"],              // List of friendly names
  "hn":"tasmota_49A3BC-0956",                       // Hostname
  "id":"49A3BC",                                    // ChipID
  "md":"Sonoff Dual",                               // Module
  "of":"Offline",                                   // D_OFFLINE
  "on":"Online",                                    // D_ONLINE
  "st":["OFF","ON","TOGGLE","HOLD"],                // StateText[0..3]
  "bd":"<IP_ADDRESS>",                                   // Tasmota SW build version
  "t":"tasmota_49A3BC",                             // Topic
  "ft":"%prefix%/%topic%/",                         // Fulltopic
  "tp":["cmnd","stat","tele"],                      // [SUB_PREFIX, PUB_PREFIX, PUB_PREFIX2]
  "li":[0,0,0,0,0,0,0,0],                           // Lights, 0: disabled, 1: Enabled
  "rl":[0,0,0,0,0,0,0,0],                           // Relays, 0: disabled, 1: relay, 2.. future extension (fan, shutter?)
  "sw":[0,0,0,0,0,0,0,0],                           // Switches, 0: disabled: 1: enabled
  "bt":[0,0,0,0],                                   // Buttons, 0: disabled: 1: enabled
  "so":{"13":0,"17":1,"30":0,"37":1,"68":0,"73":1}, // SetOption needed by HA to map Tasmota devices to HA entities and triggers
  "lt_st":0,                                        // Light subtype
  "se":[0],                                         // Sensors, 0: disabled, 0..xx index in kHAssJsonSensorTypes (??)
  "ver":1                                           // Discovery protocol version, must be 1
}

Some keys were renamed/dropped from the initial proposal:
{
  "bd":"<IP_ADDRESS>",                                   // Tasmota SW build version - now sw
  "bt":[0,0,0,0],                                   // Buttons, 0: disabled: 1: enabled - now btn
  "id":"49A3BC",                                    // ChipID
  "li":[0,0,0,0,0,0,0,0],                           // Lights, 0: disabled, 1: Enabled
  "of":"Offline",                                   // D_OFFLINE - now ofln
  "on":"Online",                                    // D_ONLINE - now onln
  "se":[0],                                         // Sensors, 0: disabled, 0..xx index in kHAssJsonSensorTypes (??)
  "st":["OFF","ON","TOGGLE","HOLD"],                // StateText[0..3] - now state
  "sw":[0,0,0,0,0,0,0,0],                           // Switches, 0: disabled: 1: enabled - now swc?
}

{
"bat":0, // is the device battery driven and provide % of remainign power?
"dslp":0, // is the device deep_speep configured, will change online/offline behavior in HA. device ia expected to sleep most of the time
"if":0,
"lk":0,
"ty":0,
"sho":[], // configured shutteroptions, reverse, locked,.... works with HA
"sht":[] // configured shutters. Works with HA for shutters and blinds
"swc":[-1,-1,-1,-1,-1,-1,-1,-1], // I suppose this was sw, but why -1?
"swn":[null,null,null,null,null,null,null,null],
}

I think it may be converted to old style Autodiscovery and saved as retained configuration objects with some (i mean a lots of) work.

@sincze TasmotaDiscovery support added at testing branch. No binaries yet, can be run under python3.
https://github.com/enesbcs/shellyteacher4domo/blob/testing/README.md

@sincze TasmotaDiscovery support added at testing branch. No binaries yet, can be run under python3. https://github.com/enesbcs/shellyteacher4domo/blob/testing/README.md

Followed the instructions as indicated on the Domoticz forum, probably I missed a pre-requirement step.

@sincze TasmotaDiscovery support added at testing branch. No binaries yet, can be run under python3. https://github.com/enesbcs/shellyteacher4domo/blob/testing/README.md

Followed the instructions as indicated on the Domoticz forum, probably I missed a pre-requirement step.

This image shows the tasmota discovery topic. What is your question? What is the error log? Are there any error?

It already start detecting devices when I modified the settings.ini.

Mmm busted.
You got me.
To be honest.
That's correct.
I got shelly on shelly fw
Older shelly on tasmota fw
And esp32 on tasmota fw.

Will need to do some debugging updated from 2022.2 to 2024.3 in test. Flip a switch in Domoticz and the tasmota light switches on, however Domoticz does not reflect that state with an on switch. Making it impossible to turn the light off ;-)

Will need to do some debugging updated from 2022.2 to 2024.3 in test. Flip a switch in Domoticz and the tasmota light switches on, however Domoticz does not reflect that state with an on switch. Making it impossible to turn the light off ;-)

I guess Tasmota reports its change in /POWER if only one relay found but reacts to /POWER1. Just guessing.
Only you can see what happens in MQTT Explorer on your system.

I am also fiddeling with the setup mentioned here to spot the differences
https://www.domoticz.com/forum/viewtopic.php?p=312108#p312108

OK to get the switch working I took the JSON from what the teacher created and modified it to the following:
shelly-pi5/switch/68C63AA84B81_RL_1/config
{
"name": "friend-sonoff-spare",
"stat_t": "stat/tasmota_spare-A84B81/POWER",
"avty_t": "tele/tasmota_spare-A84B81/LWT",
"pl_avail": "Online",
"pl_not_avail": "Offline",
"cmd_t": "cmnd/tasmota_spare-A84B81/POWER",
"pl_on": "ON",
"pl_off": "OFF",
"val_tpl": "{{value_json.POWER}}",
"uniq_id": "68C63AA84B81_RL_1",
"dev": {
"ids": [
"68C63AA84B81"
]
}
}
Now I am able to control ON and OFF.

Its very interesting that Tasmota does not use Power1 when only one relay present, in its default behaviour.
Can be added to the script as exception.

OK to get the switch working I took the JSON from what the teacher created and modified it to the following:
	"stat_t": "stat/tasmota_spare-A84B81/POWER",
	"val_tpl": "{{value_json.POWER}}",

Its very interesting config object. I do not know how its possibly works, as the POWER structure is not a JSON. :D
Maybe its state topic was tele_topic earlier, and val_tpl never actualized to the new struct by the Tasmota devs.

Power1 fix added at commit https://github.com/enesbcs/shellyteacher4domo/commit/17f0ba7beeacdb7ba6a377707aef20fda9cfc38e

Today I Build a nice sensor in Tasmota.

The Teacher finds the device
on_message::payload::{"ip":"192.168.xxx.xxx","dn":"CV-Ruimte","fn":["Door","Relais1","Relais2","Relais3",null,null,null,null],"hn":"cv-ruimte-5830","mac":"DC4F220756C6","md":"Technische Ruimte","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"13.4.0","t":"cv-ruimte","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],"swn":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"btn":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"so":{"4":0,"11":0,"13":0,"17":0,"20":0,"30":0,"68":0,"73":0,"82":0,"114":0,"117":0},"lk":0,"lt_st":0,"bat":0,"dslp":0,"sho":[],"sht":[],"ver":1}
DC4F220756C6 alive
on_message::payload::{"sn":{"Time":"2024-03-31T08:46:17","Switch1":"ON","DS18B20-1":{"Id":"3CCCE3810022","Temperature":18.4},"DS18B20-2":{"Id":"3CF0E381CD74","Temperature":17.7},"TempUnit":"C"},"ver":1}
DC4F220756C6 alive

It generates the Temp Sensors. However the Door and Relais are Missing. Would this be a complexity issue that can be solved ??

It generates the Temp Sensors. However the Door and Relais are Missing. Would this be a complexity issue that can be solved ?

on_message::payload::{"ip":"192.168.xxx.xxx","dn":"CV-Ruimte","fn":["Door","Relais1","Relais2","Relais3",null,null,null,null],"hn":"cv-ruimte-5830","mac":"DC4F220756C6","md":"Technische Ruimte","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"13.4.0","t":"cv-ruimte","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],"swn":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"btn":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"so":{"4":0,"11":0,"13":0,"17":0,"20":0,"30":0,"68":0,"73":0,"82":0,"114":0,"117":0},"lk":0,"lt_st":0,"bat":0,"dslp":0,"sho":[],"sht":[],"ver":1}
DC4F220756C6 alive
on_message::payload::{"sn":{"Time":"2024-03-31T08:46:17","Switch1":"ON","DS18B20-1":{"Id":"3CCCE3810022","Temperature":18.4},"DS18B20-2":{"Id":"3CF0E381CD74","Temperature":17.7},"TempUnit":"C"},"ver":1}
DC4F220756C6 alive

For some unknown reason, Tasmota devs thinks it is necessary to report config in two distinct message, one for the sensors and another one for everything else. In my current implementation i read first the "config", than wait for "sensors" structure for 5 x 0.1 seconds and if its arrived than i will send out the config payload.
I guess in case the sensors come first, than the relays will never be processed. Currently i have no idea how to solve this, as this never happened with my test Tasmota device so far.


No command in the command pallet

Thank you for your plugin!!!
However, the breadcrumb: open pane does not show up in command pallet.
 If the command to open the pane isn't in the command palette, that means it's already open in the right-side leaf.
The error cannot destructure gParents... is expected. That is a different bug which I'm waiting on a fix for.
Are you able to see the Breadcrumbs pane on the right side?

Yes! Sorry for not checking this first.
Thank you so much!


Multiple bibtex libraries

Hey, @chrisgrieser, thanks for this handy workflow. The new citation picker is especially great. 👍
Maybe it is just me but there seems to be no way to use more than one bibtex library. It'd be great for my use case (one personal library and one group library), if I could include multiple libraries.

Thanks!
What exactly is the use case that you have in mind? Do you want to regularly switch between two libraries as you work on two projects in parallel? Or do you mean using citations from two libraries for the same project/document?

In case it is the latter, that is easy to implement, so I just added it to the 3.1 release. :)

Exactly, I‘d like to use citations from two libraries in one project/document. So it is fantastic that you added this feature to 3.1.

I noticed that the second library is considered in the pandoc conversion, but not used by the new citation picker. I fixed this in release 3.7, now the citation picker looks for references at both libraries.


refactor: clean up the asset list

:tada: This PR is included in version 1.27.2 :tada:
The release is available on:

GitHub release
npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:


Register new route

I created a page file and linked to it using the <router-link> element, but it 404s.
I see in the .nuxt folder there are some routes defined e.g.
const _3cb81d92 = process.BROWSER_BUILD ? () => System.import('/Users/heydonpickering/repositories/project-folder/pages/about.vue') : require('/Users/heydonpickering/repositories/project-folder/pages/about.vue')

These are clearly added dynamically on webpack build, but I don't know where to add a new one?
Many thanks.

Hi @Heydon
If you have theses pages:
-| pages
---| index.vue
---| about.vue

You can link the about page in index.vue with <router-link to="/about">About page</router-link>
Example: https://gomix.com/#!/project/nuxt-hello-world
Live demo: https://nuxt-hello-world.gomix.me/

Thanks


updating chai

Coverage remained the same at 100.0% when pulling f62bdd861041d83dc0d7a284a7ee27d73e4b7433 on demo into 5cad3d42f94050c7df6814c8aae5be2681a8fb04 on master.


Update chocolateyInstall.ps1

This is a proposed change of the install ps1 file.
This should install System Level if the Chromium key is present, and %appdata% if that key is present.
Everything checks as far as Power Shell is concerned < fingers crossed >

@RedBaron2 is there a reason that you have created your own function for Get-Level and Get-ProcessorBits?

Didn't know that Chocolatey had these functions; They can be removed if they conflict with chocolatey.

Yes, these type of functions do exist already.
Have a look here:
https://github.com/chocolatey/chocolatey-coreteampackages/blob/765885000ca097b5628e3e41fbaa27638d35cc93/automatic/fiddler4/tools/chocolateyUninstall.ps1#L6
As an example.
Can you re-work this PR to use these?  Thanks!

@gep13  Changed the file to use Chocolatey functions. Thanks for the push in the right direction. I do have a question about if a bit of code will work
`$file = (Get-ItemProperty -Path $hk_level":"
If this works than I will have a uninstall file for chromium. The main question is if the variable needs to be in the quote?

@gep13  Made a cleanup change to the file, and have submitted #259 to make a few Chocolatey Users happy. The main push has been the whole hkcu vs hklm issue of the package. Some Users don't have a problem with the package being just for them, and others want the package to be for the whole (system level). This file will test for the hkcu key and if set will install for that user, and vice versa.

@gep13 Took out the functions that may have been a bottleneck and streamlined the file. Thanks for taking your time in committing this to the actual.

@gep13 Tested and confirmed working; Condensed the code some more; Thanks for being reserved in merging this file.

@RedBaron2 sorry for taking so long to get back to you about this.
I am going to go ahead and merge this.  Thanks!

@gep13 Thanks, we will see how this works out.


Using Modal inside a service

Hello, I am new in Angular 2 and I am trying to open modal from a service. But I am getting this error and I don't find a clear way to do it. In fact, I couldn't say if I am doing something wrong or missing something or It just can't be done.
Here's the error I got :
EXCEPTION: No provider for ViewContainerRef!
And Here's the way I am doing :
Service:
import { ViewContainerRef } from '@angular/core';
import { Overlay } from 'angular2-modal';
import { Modal } from 'angular2-modal/plugins/bootstrap';
import { ViewEncapsulation } from '@angular/core';
import { overlayConfigFactory } from 'angular2-modal';
import { BSModalContext } from 'angular2-modal/plugins/bootstrap';
import { MyModalContext, MyModal } from '../shared/my-modal';

@Injectable()

export class myService {
 constructor (overlay: Overlay, vcRef: ViewContainerRef, public modal: Modal) {
    overlay.defaultViewContainer = vcRef;
}

  test() {
    return this.modal.open(MyModal,  overlayConfigFactory({
      dialogClass: 'my-modal',
    }, BSModalContext));
  }

Modal :
import { Component } from '@angular/core';

import { DialogRef, ModalComponent, CloseGuard } from 'angular2-modal';
import { BSModalContext } from 'angular2-modal/plugins/bootstrap';

export class MyModalContext extends BSModalContext {
  /*Context init varuiables for example*/
}

@Component({
  selector: 'my-modal',
  styleUrls: ['...'],
    template: `
    <div>
        Test
        <!-- bla bla bla -->
    </div>

        `
})
export class MyModal implements CloseGuard, ModalComponent<MyModalContext> {
  context: ErrorModalContext;

  constructor(public dialog: DialogRef<MyModalContext>) {
    this.context = dialog.context;
  }

  onCloseDialog() {
    this.dialog.close();
  }

}

Can you help me having a solution to this issue?
Thank you.

I'm trying to do the same thing, and I'm stuck just a little further down the line. You need to provide the ViewContianerRef down from app.module. I found this example elsewhere:
`const MODAL_PROVIDERS = [
Modal,
Overlay,
{ provide: OverlayRenderer, useClass: DOMOverlayRenderer },
ViewContainerRef
];
@NgModule({
imports: [
....
ModalModule.forRoot(),
BootstrapModalModule
],
declarations: [
AppComponent
],
providers: [
MODAL_PROVIDERS
],
bootstrap: [AppComponent]`
Unfortunately, this doesn't totall work. Now I am just getting the error:
 Uncaught (in promise): TypeError: inj.get is not a function
Which I haven't got past yet.

Well, I did get past that (I'll keep commenting in hopes that one of us gets this all ironed out and helps the other). I wasn't including the modal module properly.  That moved me to an issue where is complained there was no provider for DialogRef. No problem, back to the app.module to add it. Add the import, add the provider. Now we see:
Error: (SystemJS) Can't resolve all parameters for DialogRef:
Which may be SystemJs or this. Or me. Who knows? Not me.

Stripped down the modal class to
export class MyModal  {
    constructor(
                overlay: Overlay,
                vcRef: ViewContainerRef,
                private modal: Modal){
                overlay.defaultViewContainer = vcRef;
    };

    onCloseDialog() {
    }

And now it works. Still needs work to be done/useable, but I hope this is enough to get you going!

Thank yo very much !


Button.Text not inheriting styles from sx prop on Button

Description
Button.Text not inheriting styles from sx prop on Button
CodeSandbox/Snack link
No response
Steps to reproduce

Create a custom button component that extends the GlueStack UI Button component
Attempt to style the text in Button.Text via the sx prop on the Button

I'm trying to migrate our components that were built with NativeBase to GlueStack. The Button.Text component doesn't seem to be inheriting styles passed in the sx._text prop of the Button. The GlueStack UI docs aren't clear about this particular pattern, but it seems like this should work...
import {Button} from '@/components/gluestack'

type TButtonProps = React.ComponentProps<typeof Button>

interface SolidButtonProps extends TButtonProps {
  Icon?: React.ReactNode
}

export const SolidButton = ({
  children,
  Icon,
  ...otherProps
}: SolidButtonProps) => {
  return (
    <Button
      my={10}
      borderRadius="$full"
      sx={{
        _text: {
          fontFamily: '$body',
          fontWeight: '$bold',
          fontSize: '$xs',
          color: '$red500',
          ':disabled': {
            color: '$grey',
          },
          lineHeight: '$sm',
        },
        ':disabled': {
          opacity: 1,
          bg: '#DFDFDF',
        },
      }}
      variant="solid"
      size="lg"
      {...otherProps}
    >
      <Button.Text>
        {children}
      </Button.Text>
      {Icon && <Button.Icon as={Icon} ml={10} />}
    </Button>
  )
}

What does work is directly styling the Button.Text component like this...

<Button.Text
  fontFamily="$body"
  sx={{
    fontWeight: '$bold',
    fontSize: '$xs',
    color: '$red500',
    ':disabled': {
      color: '$grey',
    },
    lineHeight: '$sm',
  }}
>
  {children}
</Button.Text>

But what I'm trying to achieve here is our own SolidButton component that can be further modified as needed by passing different style props to it such as a different text color or fontFamily, etc.  The sx prop on the Button.Text component also doesn't seem to accept the fontFamily property although the typings suggest it does. It just doesn't work. fontFamily does work as a direct prop of Button.Text though.
Is this a bug or am I completely missing the mark here?
gluestack-ui Version
latest
Platform

[ ] Android
[X] Expo
[ ] iOS
[ ] Next

Other Platform
No response
Additional Information
No response

Hey @reggieofarrell , Thanks for reporting the issue. We will have a look.

@sandeepgeeky FYI, I also tried building my own button component from scratch with gluestack-style and ran into a possibly related bug...
https://github.com/gluestack/gluestack-style/issues/314

Hey @reggieofarrell , please upgrade the @gluestack-style/react version to 0.2.1 . It should solve the above issue. Let us know if it still persists with minimal reproducible issue in this snack.

@makkarMeenu @sandeepgeeky  I did the update and the issue still persists. I tried to create a Snack for you, but it crashes anytime I add style props to the Button that is exported from @gluestack-ui/themed...
https://snack.expo.dev/@reggiegovside/gluestack-ui-overrides-bug
I can confirm that the issue still persists in my codebase though. The latest version 0.2.3 also did not fix the issue I filed in the @gluestack-style/react repo that I believe is related to this...
https://github.com/gluestack/gluestack-style/issues/314
I was able to create a working Snack for that issue which I left in the comments there.

@makkarMeenu @sandeepgeeky Can we please re-open this issue?

This appears to be fixed with the latest GlueStack Style version 2.0.11

Same issue here.
package.json:
  "dependencies": {
    "@gluestack-ui/themed": "latest",
    "@gluestack-ui/utils": "^0.1.8",
    "@gluestack-ui/react": "*",
    "@types/react-native": "0.72.2",
    "@gluestack-style/react": "latest",
    "expo": "^49.0.0",
    "expo-font": "~11.4.0",
    "react": "18.2.0",
    "react-native": "0.72.4",
    "react-native-svg": "^13.4.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/eslint-config": "^0.72.2",
    "@react-native/metro-config": "^0.72.11",
    "@tsconfig/react-native": "^3.0.0",
    "@types/react": "^18.0.24",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.2.1",
    "eslint": "^8.19.0",
    "jest": "^29.2.1",
    "metro-react-native-babel-preset": "0.76.8",
    "prettier": "^2.4.1",
    "react-native-svg-transformer": "^1.1.0",
    "react-test-renderer": "18.2.0",
    "typescript": "4.8.4"
  },


Random error when running LightGBM scala code in cluster

when trying to repro another issue I got an error with latest 0.14 related to SerialVersionUID:
org.apache.spark.SparkException: Job aborted due to stage failure: Task 11 in stage 7.0 failed 4 times, most recent failure: Lost task 11.3 in stage 7.0 (TID 114, <IP_ADDRESS>, executor 3): java.io.InvalidClassException: com.microsoft.ml.spark.LightGBMBooster; local class incompatible: stream classdesc serialVersionUID = -6123404490847323315, local class serialVersionUID =<PHONE_NUMBER>419181008
It looks like I need to define a SerialVersionUID for LightGBMBooster in order to prevent this error from occuring.

fixed with pr #388


refactor(ast): squash nested enums

OK, this is a big one...
I have done this as part of work on Traversable AST, but I believe it has wider benefits, so thought better to spin it off into its own PR.
What this PR does
This PR squashes all nested AST enum types (#2685).
e.g.: Previously:
pub enum Statement<'a> {
    BlockStatement(Box<'a, BlockStatement<'a>>),
    /* ...other Statement variants... */
    Declaration(Declaration<'a>),
}

pub enum Declaration<'a> {
    VariableDeclaration(Box<'a, VariableDeclaration<'a>>),
    /* ...other Declaration variants... */
}

After this PR:
#[repr(C, u8)]
pub enum Statement<'a> {
    BlockStatement(Box<'a, BlockStatement<'a>>) = 0,
    /* ...other Statement variants... */

    VariableDeclaration(Box<'a, VariableDeclaration<'a>>) = 32,
    /* ...other Declaration variants... */
}

#[repr(C, u8)]
pub enum Declaration<'a> {
    VariableDeclaration(Box<'a, VariableDeclaration<'a>>) = 32,
    /* ...other Declaration variants... */
}

All Declaration's variants are combined into Statement, but Declaration type still exists.
As both types are #[repr(C, u8)], and the discriminants are aligned, a Declaration can be transmuted to a Statement at zero cost.
This is the same thing as #2847, but here applied to all nested enums in the AST, and with improved helper methods.
No enums increase in size, and a few get smaller. Indirection is reduced for some types (this removes multiple levels of boxing).
Why?

It is a prerequisite for Traversable AST (#2987).
It would help a lot with AST Transfer (#2409) - it solves the only remaining blocker for this.
It is a step closer to making the whole AST #[repr(C)].

Why is it a good thing for the AST to be #[repr(C)]?
Oxc's direction appears to be increasingly to build up control over the fundamental primitives we use, in order to unlock performance and features. We have our own allocator, our own custom implementations for Box and Vec, our own IndexVec (TBC). The AST is the central building block of Oxc, and taking control of its memory layout feels like a step in this same direction.
Oxc has a major advantage over other similar libraries in that it keeps all the AST data in an arena. This opens the door to treating the AST either as Rust types or as pure data (just bytes). That data can be moved around and manipulated beyond what Rust natively allows.
However, to enable that, the types need to be well-specified, with completely stable layouts. #[repr(C)] is the only tool Rust provides to do this.
Once the types are #[repr(C)], various features become possible:

Cheap transfer of the AST across boundaries without ser/deser - the property used by AST Transfer.
Having multiple versions of the AST (standard, read-only, traversable), and these AST representations can be converted to one other at zero cost via transmute - the property used by Traversable AST scheme.
Caching AST data on disk (#3079) or transferring across network.
Stuff we haven't thought of yet!

Allowing the AST to be treated as pure data will likely unlock other "next level" features further down the track (caching for "edge bundling" comes to mind).
The problem with #[repr(C)]
It's not required to squash nested enums to make the AST #[repr(C)].
But the problem with #[repr(C)] is that it disables some compiler optimizations. Without #[repr(C)], the compiler squashes enums itself in some cases (which is how Statement is currently 16 bytes). But making the types #[repr(C)] as they are currently disables this optimization.
So this PR essentially makes explicit what the compiler is already doing - and in fact goes a bit further with the optimization than the compiler is able to, in squashing 3 or 4 layers of nested enums (the compiler only does up to 2 layers).
Implementation
One enum "inheriting" variants from another is implemented with inherit_variants! macro.
inherit_variants! {
#[repr(C, u8)]
pub enum Statement<'a> {
    BlockStatement(Box<'a, BlockStatement<'a>>),
    /* ...other Statement variants... */

    // `Declaration` variants added here by `inherit_variants!` macro
    @inherit Declaration
    // `ModuleDeclaration` variants added here by `inherit_variants!` macro
    @inherit ModuleDeclaration
}
}

The macro is fairly lightweight, and I think the above is quite easy to understand. No proc macros.
The macro also implements utility methods for converting between enums e.g. Statement::as_declaration. These methods are all zero-cost (essentially transmutes).
New patterns for dealing with nested enums are introduced:
Creation:
// Old
let stmt = Statement::Declaration(Declaration::VariableDeclaration(var_decl));

// New
let stmt = Statement::VariableDeclaration(var_decl);

Conversion:
// Old
let stmt = Statement::Declaration(decl);

// New
let stmt = Statement::from(decl);

Testing:
// Old
if matches!(stmt, Statement::Declaration(_)) { }
if matches!(stmt, Statement::ModuleDeclaration(m) if m.is_import()) { }

// New
if stmt.is_declaration() { }
if matches!(stmt, Statement::ImportDeclaration(_)) { }

Branching:
// Old
if let Statement::Declaration(decl) = &stmt { decl.do_stuff() };

// New
if let Some(decl) = stmt.as_declaration() { decl.do_stuff() };

Matching:
// Old
match stmt {
    Statement::Declaration(decl) => visitor.visit(decl),
}

// New (exhaustive match)
match stmt {
    match_declaration!(Statement) => visitor.visit(stmt.to_declaration()),
}

// New (alternative)
match stmt {
    _ if stmt.is_declaration() => visitor.visit(stmt.to_declaration()),
}

New syntax has pluses and minuses vs the old. match syntax is worse, but when working with a deeply nested enum, the code is much nicer - it's shorter and easier to read.
This PR removes 200 lines from the linter with changes like this:
https://github.com/oxc-project/oxc/pull/3115/files#diff-dc417ff57352da6727a760ec6dee22de6816f8231fb69dbef1bf05d478699103L92-R95
- let AssignmentTarget::SimpleAssignmentTarget(simple_assignment_target) =
-     &assignment_expr.left
- else {
-     return;
- };
- let SimpleAssignmentTarget::AssignmentTargetIdentifier(ident) =
-     simple_assignment_target
+ let AssignmentTarget::AssignmentTargetIdentifier(ident) = &assignment_expr.left
else {
    return;
};

#3115  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @overlookmotel and the rest of your teammates on  Graphite

You always teach me on things that I don't understand, so ahh ... shippit?

No perf gain for the time being, please promise to me that I'll see a huge perf gain in the future ❤

This introduces a learning curve on the AST, I'll check with cargo doc once you're done, to make sure its comprehensible (at least one needs to be comprehensible for a layman like me).

No perf gain for the time being, please promise to me that I'll see a huge perf gain in the future ❤

Perf is very slightly better as a few types have less indirection, but most of the AST remains unchanged.
The purpose of this change isn't to unlock performance gains - it's just replicating what the compiler already does internally. But it does unlock features - ways of manipulating the AST outside of what Rust gives you natively.

This introduces a learning curve on the AST, I'll check with cargo doc once you're done, to make sure its comprehensible (either code or documentation needs to be comprehensible for a layman like me).

Yes, you're right, I should add a lengthy comment in oxc_ast entry point.
I have documented how the macro expands in src/ast/macros.rs, but you're right, the comments don't give the wider context or justification.

I likes the changes to user land code (simpler), but introduces a barrier for downstream tool authors, so we'll need to at least put a mental image somewhere to show what @inherit expands to.

How do you mean "barrier for downstream tool authors"?

And again ... we probably need to start codegen the ast at some point 😭

I agree it'd be good to start codegen-ing, as an alternative to macros without the compile time cost. But is the AST the best candidate? It might have been a quick way to build out the AST types originally, but since it's all built now, and the AST is not undergoing much churn, I'm not sure what's to gain now.
On this PR, what could be good is to generate the inherit_variants! macro in a build script. Then it'd automatically get updated when any changes are made to the AST - without the overhead of proc macros.

And thanks for considering accepting this. It's taken me 4 x 14 hour days to put this together, and I was worried you'd completely hate it!

This breaks RA:

Jump to definition goes to

bike shedding the usage of macros aside, I don't know what to do with the worse dx 😢

cargo doc works.
Here's what I like to do:

merge when you're recovered from the burn out
plan out the replacement of macro to codegen

I've improved what appears in cargo doc for inherited variants:

Breakage with RA:

Ah I see. Yes, not good.
If inherit_variants! was instead an attribute proc macro #[inherit_variants], would Rust Analyser handle it correctly? If so, that's annoying! I specifically avoided proc macros to avoid impact on compile time.

Here's what I like to do:

merge when you're recovered from the burn out
plan out the replacement of macro to codegen

OK great. If intent is to merge, it would be ideal if you'd be able to do that as soon as possible. This PR touches so much of the codebase that it will very quickly end up with merge conflicts.
I promise to follow up in next few days with:

Add docs explaining the inheritance scheme.
Open issues to discuss how to fix the RA problem/codegen + macro usage.

Does that work?

:shipit:


Oculus Incompatibility

Describe the Bug
Client render crash with Embeddium, Oculus and Missions installed
Reproduction Steps

Place Mechanical Exchanger block
Open GUI

Expected Result
Client does not crash
Screenshots and Videos
crash-2024-02-07_20.40.55-client.txt
Crash Report or Log
No response
Operating System
Mac OS
Mod Version
0.2.11
Create Mod Version
0.5.1f
Minecraft Version
1.20.1
ModLoader and Version
Forge 42.2.20
Other Mods
See log
Additional Context
No response

I cannot reproduce the issue with Create: Missions, Create, Embeddium and Oculus installed.
Could you give more details? there's too many mods in the logs

reopen is 0.2.10 still crashes


Fix name resolution in check_admits

Previously, considering two files A.Foo.fst and Foo.fst:
module A.Foo

module Foo
open A
module M = A.Foo
val x: int
let x = 18

fstar.exe --lax Foo.fst
Warning: Admitting Foo.x without definition
fstar.exe --cache_checked_modules --lax Foo.fst
Warning: Admitting Foo.x without definition
fstar.exe --cache_checked_modules --lax Foo.fst
Error: Duplicate top-level names: Foo.x
This pull request solves these problems.

took a variant of this change a pushed to master. thanks!


Background SL button

Provide consistency in background of outline button within Sanoma Learning theme.
### Tasks
- [x] outline button should be transparent

see branch #797

There is no consistency between and an IN themes in what the outline button looks like with regards to the background color. I made these screenshots in the LIGHT theme, but made the background black so you can see the background-colour of the button.
Max:

Bingel:

clickedu:

Kampus:

My Vanin:

Neon/Nowa Era:

Sanoma Learning (these are the solid buttons, not the outline):


Brightness Control

Describe the problem
It seems that there are no APIs in MRTK to control the brightness of Hololens1‘s screen.
Additional context
Instead of using the Brightness up/down button, can we adjust it through code?
For example, setting brightness from 0% to 100% maybe something like this below:
CoreServices.XXX.XXX.setBrightness(int percentage)
CoreServices.XXX.XXX.getBrightness()
Thanks!

This does not currently exist in MRTK but you can use the UWP API, BrightnessOverride
https://docs.microsoft.com/en-us/uwp/api/windows.graphics.display.brightnessoverride
Example:
https://github.com/KevinKennedy/BrightnessOverride

Thank you!


using the ASP.NET Core HealthChecks library for the liveness/readiness sample

As discussed in #502

Thanks for the doc! I think we should leave the readiness check and liveness check as fake checks that don't change as a result of an http request. It's fine in a sample but I would leave it out of the doc since it's not exactly what you would do in practice.

@davidfowl  I removed the whole talk about the /set endpoint away from the doc, but I added it to the / endpoint of the sample service. how's that?

LGTM, thanks!


Build: Added Ansible Galaxy configuration (fixes #42)

Coverage remained the same at 100.0% when pulling 17535419fc8b1c982c3c0c8c7ad48ac9151e45d3 on galaxy into 557e90f3127605d78e7e42a55f3fcdc3ad5285e9 on master.


how to create "bash" alias in windows command prompt?

Hello,
My "bash" command accidentally disappeared from my command prompt despite having WSL installed. Does anyone know how to remake the alias? My file system is shown below for proof

Could you try turning the feature off, reboot, turn feature on, reboot? Should pull bash.exe from the base image.

I think something out there in the wild (unrelated to WSL) is blowing away folks' Windows %PATH%. #4458 #4259.

I found bash.exe in C:\Windows\System32, I can cd into that directory and run bash from there. I guess I have to remake the alias. Everything seems to be working okay...

I can cd into that directory and run bash from there

You do not need to (should not have to) cd into C:\Windows\System32. You do not need to make or remake a console alias.


Added Levenshtein(Edit) distance under Dynamic Programming

Levenshtein distance or Edit distance is a classic DP problem. It demonstrates efficient string manipulation techniques.

Do not raise PR until I assign


A RenderFlex overflowed by 40 pixels on the right.

In a lot of devices the calendar widget raise the overflow error.

Could you provide some specific device info and display resolution? Also, screenshots would help.

Hi, for example:
Pocophone F1
1080 x 2246 pixels

I changed the if (width < 400) instead 340 for ScreenSizes.small, seems better, Im going to try with more devices, like iphones

400 is indeed the right value. This has been fixed in 45a6eceb9ec1c61cb41102c5d6d4bb70d1bf3f02.


Replace process.browser because it's deprecated

https://github.com/vercel/next.js/issues/5354#issuecomment-520305040

I have resolved my issue by changing as this:
(typeof window !== 'undefined' && window.localStorage.getItem("cover"))


chore: remove no more used test infra dependencies ftpmockserver and

mockito
Description
I think that the dependency is no more needed since this refactor https://github.com/apache/camel/commit/8a2207e0904c0dcd879eb75fe66425a61356688d
Target

[ ] I checked that the commit is targeting the correct branch (note that Camel 3 uses camel-3.x, whereas Camel 4 uses the main branch)

Tracking

[ ] If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

[ ] I checked that each commit in the pull request has a meaningful subject line and body.

[ ] I have run mvn clean install -DskipTests locally and I have committed all auto-generated changes

/component-test ftp

/component-test ftp

It's used in itest. You won't be able to test it here.


http.get in flutter on ios is slow compared to android

Steps to Reproduce
I have a minimal rest client that just fetches data with http.get in an async method.
On android this takes around 0.02 seconds according to Stopwatch (and feels like this)
on iOS it takes around 5 seconds according to Stopwatch (and feels like 10).

Can you check if you measuring this in release or debug build? Please try flutter run —release both on iOS and Android.

Yes ... I did ... its the same values.

  Future<void> index() async {
    try {
      if (_info != null) {
        print('getting index');
        setState(() => _serverResult = new ServerResult());
        final url = infoToUri(_info).resolve('api/state');
        final stopwatch = new Stopwatch()..start();
        final response = await get(url).timeout(const Duration(seconds: 15));
        print('getting in ${stopwatch.elapsed}');
....

thats the code i use to make the request ...

/cc @zanderso maybe we have some issues in iOS specific io layer implementation?

i am sure, this must be some problem of mine, otherwise there would be much more problems ...

I did some more testing, and observed, that ios is only so slow, if i do the getting from a mdns/bonjour name. if i directly use the ip associated with this name, the operation is as fast as on the android side.

This sounds like a Dart issue. cc @zanderso

I have the same problem, especially for calling several APIs in parallel.

It feels like requests on iOS are queued and executed one after the other while on Android they seem to execute in parallel. The problem only occurs in release builds for me which makes it very hard to debug.
I was using the swagger-generator to generate our API client. This generated code dependent on the flutter http package. I thought the problem may be in this package so I refactored our app to use the openapi-generator with the dart-dio template. This template uses Dio as the http client. Sadly, this did not solve the problem.
So my guess would be that there might be an issue with the underlying platform specific implementation which I am not familiar with.
Any ideas that may help with figuring this out?

@Sleevezipper87 @AresVampire - you will need to provide as much information as possible to help us reproduce the issue (e.g. are you running on a simulator or a real device, what kind of device it is etc) Preferably we need a sample project we could build and run locally.
Searching reveals that at least iOS Simulator has issues with DNS resolution which make things very slow (see for example this SO question). This matches what @gizmomogwai has observed. However if you are running release build on a real device then the problem is most likely different - and might be associated just with performance characteristics of the release build itself (e.g. release build might be slower than debug build).
@Sleevezipper87 I suggest doing a profile build and then using DevTools to look at the CPU profile.

This seems to have gotten better with Flutter 1.12.13+hotfix.7 (or the version before). Do you guys observe this as well?

This problem still persists on the version flutter_macos_v1.12.13+hotfix.8-stable. I saw this problem using google maps or http clients. Hope it will be fix soon

We had the same problem on iOS platform as well. It took about 5 seconds to perform a simple http get request. flutter version: v1.12.13+hotfix.8-stable. iOS version: 13.3.1.
The weird thing is, it happened only when I run on the iPhone with wifi on, the speed is normal if I run on 4G connection.
But I can guarantee the wifi network is fine. Because when we access the same site in any other app not built with flutter (safari for example), the speed is normal.

The problem exists no matter we use http or HttpClient to request data.

As a reference, I created a flutter sample project, with
flutter create --androidx -t app sample
Then, add some code in main.dart to perform a simple http get request, whenever user clicks the + button and display the time spent. (https://gist.github.com/rxwen/009c7ae4328ee799f71013f06e206b13)
This simplest example, exhibit the same behavior too.

Took about 5 second on  wifi
Safari can open the same instantaneously under the same wifi connection
Took about 500 ms on 4G

Tried the sample on flutter 1.9.1 version, the problem still exist.

I conducted a further test, calculate the time of running
IPAddress.lookup("baidu.com")
and
http get "http://baidu.com"
The pure dns lookup took merely no time at all. But the http get still took more than 5 seconds.

I came to realize why @Hixie said this is a dartlang issue.
Looks like the underlying httpclient and socket in implemented in dart sdk repo.
Guess we should report the issue there.

I am reporting a similar issue at https://github.com/flutter/flutter/issues/55586 which seems to be related to HTTPS.

I've found kinda temporary work around to increase the response speed with platform channel methods
https://github.com/dart-lang/sdk/issues/41451#issuecomment-619243422

http.post is giving me 10 second delays too on IOS, very quick on android.
Only sending token text to a php form, shouldnt take that long at all.

If I read the thread right this is clearly a Dart issue so I'm going to close it.
Please feel free to reopen if is related to Flutter.


moto 1.3.9 does not work with .aws/credentials for non-mocked calls while moto 1.3.6 did

moto 1.3.9 not using .aws/credentials for non-mocked calls
I found the below problem with 1.3.9, while this was working fine with 1.3.6
Unfortunately 1.3.6 miss some features I need and those are implemented in 1.3.9.
Sample Code
import sys
import boto3
import moto

from moto import mock_sts

@mock_sts
def test_1():
    print('Mocked call:', boto3.client('sts').get_caller_identity())

def test_2():
    print('Non-mocked call:', boto3.client('sts').get_caller_identity())

def main(argv):
    test_1()
    test_2()

if __name__ == '__main__':
    main(sys.argv)

Failing stack

boto==2.49.0
boto3==1.9.186
botocore==1.12.186
moto==1.3.9

Failing run

(venv) ➜  ~ python a.py
Mocked call: {'Account': '123456789012', 'Arn': 'arn:aws:sts::123456789012:user/moto', 'ResponseMetadata': {'RequestId': 'mmm', 'HTTPStatusCode': 200, 'HTTPHeaders': {'server': 'amazon.com', 'Content-Type': 'text/plain'}, 'RetryAttempts': 0}, 'UserId': 'EXAMPLE'}
Traceback (most recent call last):
File "a.py", line 19, in
main(sys.argv)
File "a.py", line 16, in main
test_2()
File "a.py", line 12, in test_2
print('Non-mocked call:', boto3.client('sts').get_caller_identity())
File "/home/gb/venv/lib/python3.5/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/gb/venv/lib/python3.5/site-packages/botocore/client.py", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidClientTokenId) when calling the GetCallerIdentity operation: The security token included in the request is invalid.
...

Working stack

boto==2.49.0
boto3==1.7.84
botocore==1.10.84
moto==1.3.6

Passing run

(venv) ➜  ~ python a.py
Mocked call: {'Account': '123456789012', 'Arn': 'arn:aws:sts::123456789012:user/moto', 'ResponseMetadata': {'RequestId': 'mmm', 'HTTPStatusCode': 200, 'HTTPHeaders': {'server': 'amazon.com', 'Content-Type': 'text/plain'}, 'RetryAttempts': 0}, 'UserId': 'EXAMPLE'}
Non-mocked call: {'Account': 'XXX', 'Arn': 'arn:aws:sts::XXX:user/ZZZ', 'ResponseMetadata': {'RequestId': 'abc', 'HTTPStatusCode': 200, 'HTTPHeaders': {'content-length': '459', 'date': 'Wed, 10 Jul 2019 20:18:13 GMT', 'x-amzn-requestid': 'ddd', 'content-type': 'text/xml'}, 'RetryAttempts': 0}, 'UserId': 'kkk'}
(venv) ➜  ~

Can you confirm that test_2() works if you comment out test_1() and the call to it?
If it does work, can you try testing on moto==1.3.8. I'm having trouble recreating this and understanding where it changed would be helpful.

On 1.3.6 it works fine when commented out only test_1 and the related call.
However, on 1.3.8 with the same setup it runs into the InvalidClientTokenId error.
For 1.3.8, I had to comment out the moto imports to make it work.

This now works for me against master. Can you confirm?

Hmm.., I have tested this with moto==1.3.14.dev31 and the issue persists. With moto==1.3.6 above code works all right. I have enclosed below the related requirements.txt:
Stack with failing call:

asn1crypto==0.24.0
attrs==19.1.0
aws-sam-translator==1.12.0
aws-xray-sdk==2.4.2
boto==2.49.0
boto3==1.9.188
botocore==1.12.188
certifi==2019.6.16
cffi==1.12.3
cfn-lint==0.22.3
chardet==3.0.4
cryptography==2.7
docker==4.0.2
docutils==0.14
ecdsa==0.13.2
future==0.17.1
idna==2.8
Jinja2==2.10.1
jmespath==0.9.4
jsondiff==1.1.2
jsonpatch==1.23
jsonpickle==1.2
jsonpointer==2.0
jsonschema==3.0.1
MarkupSafe==1.1.1
mock==3.0.5
moto==1.3.14.dev31
pkg-resources==0.0.0
pyasn1==0.4.5
pycparser==2.19
pyrsistent==0.15.3
python-dateutil==2.8.0
python-jose==3.0.1
pytz==2019.1
PyYAML==5.1.1
requests==2.22.0
responses==0.10.6
rsa==4.0
s3transfer==0.2.1
six==1.12.0
sshpubkeys==3.1.0
urllib3==1.25.3
websocket-client==0.56.0
Werkzeug==0.15.5
wrapt==1.11.2
xmltodict==0.12.0

Working stack:

asn1crypto==0.24.0
attrs==19.1.0
aws-sam-translator==1.12.0
aws-xray-sdk==0.95
boto==2.49.0
boto3==1.7.84
botocore==1.10.84
certifi==2019.6.16
cffi==1.12.3
cfn-lint==0.22.3
chardet==3.0.4
cookies==2.2.1
cryptography==2.7
docker==4.0.2
docutils==0.14
ecdsa==0.13.2
future==0.17.1
idna==2.8
Jinja2==2.10.1
jmespath==0.9.4
jsondiff==1.1.1
jsonpatch==1.23
jsonpickle==1.2
jsonpointer==2.0
jsonschema==3.0.1
MarkupSafe==1.1.1
mock==3.0.5
moto==1.3.6
pkg-resources==0.0.0
pyaml==19.4.1
pyasn1==0.4.5
pycparser==2.19
pycryptodome==3.8.2
pyrsistent==0.15.3
python-dateutil==2.8.0
python-jose==2.0.2
pytz==2019.1
PyYAML==5.1.1
requests==2.22.0
responses==0.10.6
rsa==4.0
s3transfer==0.1.13
six==1.12.0
sshpubkeys==3.1.0
urllib3==1.25.3
websocket-client==0.56.0
Werkzeug==0.15.5
wrapt==1.11.2
xmltodict==0.12.0

Hmmmm. Is there anything else unusual about your setup? What OS, etc? Any environment variables related to AWS auth?
Is it still giving the The security token included in the request is invalid. error?

This has been tested now with 1.3.14.dev61 and confirmed working with that.
Thanks a lot for the fix.


[YouTube] Format error when searching for videos starting with numbers

Extension – YouTube
Author: @tonka3000
Description
When searching for a video starting with a number a format error is thrown. In my case I was searching for the show "7 vs Wild".
Error:
Error: Rendering failed:
The data couldn’t be read because it isn’t in the correct format.

Steps To Reproduce

Start Raycast
Type in Search YouTube  and select the command with enter
Search for any Video starting with a number such as "7 vs Wild".

The current behavior
The error above is thrown.
The expected behavior
The extension also accepts search queues starting with numbers.
Raycast version
Version: 1.43.2

@rgutt This should be fixed when #3592 get merged.
btw: It was not the starting character. Sometimes nodesjs string.slice crash when containing unusual characters, which seems to happen more often when Fritz Meinecke videos are searched 😉


How are warnings and errors displayed?

nvim --version: NVIM v0.5.0-nightly-141-g24b5f69a4
nvim-lsp version(commit hash): b7b311e22a0b071dfb43aa6a9ccc0ed92e5eab3d
:checkhealth result All OK
What language server(If the problem is related to a specific language server): rust-analyzer
Operating system/version: Mac
Terminal name/version: iTerm2
$TERM: screen-256color

How to reproduce the problem from neovim startup

Start neovim.
Open the main.rs file for your Rust project.

Actual behaviour
The place where the error is occurring is not marked.
Expected behaviour
The following code should detect the error.
fn main() {
    // let a = [1, 2, 3, 4, 5];
    let b = a.iter().map(|x| x * x); // <- No error is displayed.
    b.for_each(|x| println!("it is {}", x));
}

No warning is displayed.
fn foo() {
    let a = [1, 2, 3, 4, 5]; // <- No unused warnings are displayed.
}

By the way, it is displayed in 'LanguageClient-neovim'.

My LSP setting.
local lsp = require'nvim_lsp'

local capabilities = {
    textDocument = {
        completion = {
            completionItem = {
                snippetSupport = false
            },
        },
    },
};

local on_attach = function(client)
    diagnostic.on_attach(client)
end

lsp.rust_analyzer.setup {
    capabilities = capabilities,
    on_attach = on_attach,
}

Thanks for your report. The configs here are best-effort:

It is hoped that these configurations serve as a "source of truth", but they are strictly best effort. If something doesn't work, these configs are useful as a starting point, which you can adjust to fit your environment.

If you have an improvement or fix, please send a PR!
If you have a specific question we'll try to answer it (keeping in mind the configs in this repo are best-effort and unsupported).
If you found a bug in the core lsp module, the best way to get it fixed is to describe steps to reproduce it without the particular LSP server and other factors particular to your environment. Or better, by adding a failing test case to lsp_spec.lua, which has code to setup a fake LSP server to simulate various scenarios.

My LSP setting.

I would start by disabling diagnostic-nvim and see if that helps. Then remove the custom capabilities.

Yes. I deleted diagnostic-nvim setting and confirmed.


Create pwmout_api.c

Added PWM support for the LPC812 using the SCT. Code was ported from LPC824 libs.
First needed to modify us_ticker() to free up the SCT and use the MRT instead.
PWM can support a maximum of 4 channels using any portpin. All channels will use the same period.

Ok, understand.
Why is I2C Slave enabled?

I don't want to enable slave for this platform if we know it's not fully functional, as users might struggle in case they use byte oriented approach.

Then I propose you also disable the LPC824 I2C stuff since I know it is not
fully functional in several areas. The LPC812 I2C Slave lib as such is
correct. The fixes need to be made to I2CSlave.cpp by calling the correct
slave byte/read operations in LPC812. I proposed a temporary fix in I2CSlave
before by using a macro for the 812. This could be removed as soon as the
other libs are updated to the same level as the LPC812.
Regards
Wim

From: Martin Kojtal<EMAIL_ADDRESS>Sent: donderdag 12 februari 2015 14:22
To: mbedmicro/mbed
Cc: Wim
Subject: Re: [mbed] Create pwmout_api.c (#906)
I don't want to enable slave for this platform if we know it's not fully
functional, as users might struggle in case they use byte oriented approach.

Reply to this email directly or view it
https://github.com/mbedmicro/mbed/pull/906#issuecomment-74069157  on
GitHub.
<https://github.com/notifications/beacon/AKMUNFct0M2JCbNf_4S5CVQstFX1qsjgks5
nrKCPgaJpZM4DfF7f.gif>


Implement feature to show course dates for a user.

Description
LEARNER-296
Please refer to story for features implemented in this PR.

Codecov Report

Merging #953 into master will decrease coverage by 0.1%.
The diff coverage is 3.16%.

@@             Coverage Diff              @@
##             master     #953      +/-   ##
============================================
- Coverage     16.88%   16.77%   -0.11%
  Complexity     1012     1012
============================================
  Files           466      468       +2
  Lines         19952    20110     +158
  Branches       2302     2321      +19
============================================
+ Hits           3369     3374       +5
- Misses        16202    16355     +153
  Partials        381      381

Impacted Files
Coverage Δ
Complexity Δ

...org/edx/mobile/view/CourseUnitWebViewFragment.java
37.9% <ø> (ø)
16 <0> (ø)
:arrow_down:

...rc/main/java/org/edx/mobile/util/AppConstants.java
0% <ø> (ø)
0 <0> (ø)
:arrow_down:

...bile/src/main/java/org/edx/mobile/view/Router.java
15.42% <0%> (-0.17%)
8 <0> (ø)

.../java/org/edx/mobile/view/CourseDatesActivity.java
0% <0%> (ø)
0 <0> (?)

.../edx/mobile/view/AuthenticatedWebViewFragment.java
0% <0%> (ø)
0 <0> (?)

...a/org/edx/mobile/view/CourseDashboardFragment.java
50% <62.5%> (+0.83%)
7 <0> (ø)
:arrow_down:

Continue to review full report at Codecov.

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

@miankhalid ready for another pass.

@miankhalid
PR addressed, final pass may be.
Note: Conflict resolution is pending yet.

Facing the following issues after the refactor:

Course Dates
Courseware

Steps to reproduce:

Turn off internet.
Open course dates / course unit screen.
Turn on internet.
Wait for the spinner to appear.
Turn off internet.

@miankhalid  Issue fixed, approved may be ?


[notifications] gomoob/php-pushwoosh

This add php-pushwoosh (see http://gomoob.github.io/php-pushwoosh and  https://github.com/gomoob/php-pushwoosh) to the Notifications section, php-pushwoosh is a well tested library with more than 1000 downloads / month.
This library is very stable and is widely used, so it can safely be added to awesome-php.

Can you rebase this onto master?

Hi @josegonzalez, I'm not used to do rebase with git ...  I think this is done now but I'm not 100% sure it was done the right way, so do not hesitate to let me know if you need me to do more to integrate the changes.
Thanks for integrating the lib into Awesome-Php :+1:


fix: datasource context provider will now cleanup when being unmounted

<AzureMapDataSourceProvider /> does not work well with React.StrictMode
Strict mode will render, unmount and rerender again to find common issues see:  https://reactjs.org/docs/strict-mode.html
When Strict mode is enabled, it will throw the following error: Uncaught Error: 'datasource-id' is already added to the map (map will not render anymore)
This PR fixes this issue by doing a cleanup when <AzureMapDataSourceProvider /> is being unmounted.
note: This PR does not fix any other cleanup issues in other components, so there could be more!

Thank you @rvdkooy! I was testing this PR with react-azure-maps-playground without strict mode and I got errors like the following while navigating between different examples. You're right, there are other cleanup issues and they might need to be fixed altogether at once.
Error: Source "BubbleLayer DataSourceProvider" cannot be removed while layer "BubbleLayer LayerProvider" is using it.

Uncaught Error: One or more layers have a dependency on the source 'BubbleLayer DataSourceProvider'

hi @yulinscottkang
I've been digging around on this issue and the problem is the order of unmounting / cleanup
<AzureMapDataSourceProvider> --> this unmounts first
  <AzureMapLayerProvider /> --> but this needs to be cleaned up first
</AzureMapDataSourceProvider>

In my latest commit, i've added some logic where the AzureMapDataSourceProvider will cleanup the layers from the map that are using the same datasource
This is still WIP, but I would like to have some feedback on this first!
Also had to do some updates on the playground see:
https://github.com/Azure/react-azure-maps-playground/pull/77

Thanks @rvdkooy, LGTM!

@yulinscottkang my latest commits should be fine and ready for review
Gr


Support loading / storing complex numbers with empty imaginary part

Fix #427

@JohanMabille as far as I can tell, the errors are related to the CI configuration, not this actual commit.

@serge-sans-paille do you want to rebase? (just to be sure there isn't any hidden problem)

@JohanMabille done


feat: cascade delete

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

2 of 2 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.006%) to 96.168%

Totals

Change from base Build<PHONE_NUMBER>:
-0.006%

Covered Lines:
895

Relevant Lines:
942

💛  - Coveralls


Dynamic fanout fanin example failed with permission problem

Problems
Hi. I'm trying to run the dynamic_fanout_fanin.py example on a local cluster but the generate step is failing with this error log:
Error (exit code 1): pods "dynamic-fanout-fanin-2-268573311" is forbidden: User "system:serviceaccount:default:default" cannot patch resource "pods" in API group "" in the namespace "default"

To replicate
To replicate this problem:

Install minikube version v1.26.1, then create a local cluster

minikube start --cpus 12 --memory 13312

Install agro workflows version v3.3.9, according to this

kubectl create namespace argo
kubectl apply -n argo -f https://github.com/argoproj/argo-workflows/releases/download/v3.3.9/install.yaml
kubectl patch deployment \
  argo-server \
  --namespace argo \
  --type='json' \
  -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args", "value": [
  "server",
  "--auth-mode=server"
]}]'

Port-forward the agro workflow server:

kubectl -n argo port-forward deployment/argo-server 2746:2746

Install hera-workflows version 3.7.0 to run the dynamic_fanout_fanin example:

pip install hera-workflows==3.7.0
wget https://github.com/argoproj-labs/hera-workflows/raw/main/examples/dynamic_fanout_fanin.py

Then change the host and token to: WorkflowService(host='https://localhost:2746', token="") and run:
python dynamic_fanout_fanin.py

The problem above should be replicated now.

Are there any thing that I might be doing wrong here ? Thanks for checking by!

Thanks for the note @lamhoangtung! The 3.3.9 YAML you linked creates a role called argo-role. That role has the following access associated with it:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: argo-role
  namespace: argo
rules:
- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  verbs:
  - create
  - get
  - update
- apiGroups:
  - ""
  resources:
  - secrets
  verbs:
  - get

This role is bound to the argo service account, which is linked to the deployment, and that one controls what the task can do. You will need to adjust the permissions of the argo-role to allow it to patch pods!

Thanks for helping @flaviuvadan. Here is how I resolved this:

First create this fix_role.yml file with this content:

# give our webhook ap (as default:default) permissions to create workflows
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: argo-invocation
  namespace: argo
rules:
- apiGroups:
  - "argoproj.io"
  resources:
  - "workflows"
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - patch
  - delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: default-default-invocation
  namespace: argo
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: argo-invocation
subjects:
- kind: ServiceAccount
  name: default
  namespace: default

# give workflows (as argo:default) permissions to run things
# see https://github.com/argoproj/argo/blob/master/docs/workflow-rbac.md
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: argo-workflow
  namespace: argo
rules:
# pod get/watch is used to identify the container IDs of the current pod
# pod patch is used to annotate the step's outputs back to controller (e.g. artifact location)
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - get
  - watch
  - patch
# logs get/watch are used to get the pods logs for script outputs, and for log archival
- apiGroups:
  - ""
  resources:
  - pods/log
  verbs:
  - get
  - watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: argo-default-workflow
  namespace: argo
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: argo-workflow
subjects:
- kind: ServiceAccount
  name: default
  namespace: argo

Then apply it with: kubectl apply -f fix_role.yml
Now modify the Workflow to make sure it run inside the argo namespace and the problem should be resolve


docs(merge-tree,sequence): Update READMEs with common template contents

Also updates embed line numbers for website articles, which copy contents from these READMEs for public consumption.

I'm trusting the new line ranges are correct, didn't check those.

I re-ran the build until changes didn't occur. The lack of content changes is effectively the validation of this :)


Make classes defined in buildSrc (in whichever language) visible to kotlin build scripts at compile time

The title is a little ambiguous. It could mean:

Make classes defined in buildSrc (in whichever language) visible to kotlin build scripts at compile time
Allow buildSrc classes to be implemented in kotlin.
Allow the build scripts for buildSrc to be implemented in kotlin.

It's the first meaning that we intended to capture here so I renamed it as per your suggestion, thanks.

Make sure navigating to sources from build.gradle.kts to buildSrc works in IDEA.


Enhancement: filter predicate push down support for GraphQL GitHub Connector

Goal-State/What/Result
Support filter predicate push down for GraphQL-based Github Connector tables: pull requests, issues, commits
Why/Purpose
To reduce the amount of data transferred in large queries, and improve response times.
By When
A target date for done-done completion of the entire enhancement.
Issue/Spec written and reviewed: 26th Sep, 2024
Done-Done: 30th Sep, 2024
Done-Done

[x] First Principles Driven
[x] The Algorithm
[x] PM/Design Review
[ ] UX Review
[ ] Threat Model / Security Review
[ ] Tests
[ ] Documentation
[ ] Samples/Quickstarts/Tutorials
[ ] Release Notes

The Algorithm

[x] Every requirement questioned?
[x] Delete (Scope) any part you can.
[x] Simplify.
[x] Break down into smaller iterations/milestones.
[x] Opportunities for automation.

Spec
GitHub connector queries should support injecting filter parameters into the GitHub GraphQL search.
How/MAP
GitHub connector queries should first be updated to use search.
Once updated, columns that support filter expressions for exact values and values greater/less than should be identified. For example, in issues the title, body and author columns support exact matches while updated_at supports both exact and range based matches.
For filters targeting these columns, the search value in the GitHub GraphQL query should be updated to reflect the filter. For example, WHERE author = 'peasee' should apply a filter which results in a GraphQL search parameter like author:peasee.
For queries with filters that explicitly match single columns (e.g. WHERE author = 'peasee' AND state = 'closed') we should pass Exact filter push down as it should return the exact results from the query (author:peasee state:closed).
For queries with complex filters, or queries that match multiple values for a column (e.g WHERE assignee IN ('peasee', 'phillipleblanc')) we should pass Inexact filter push down as the query may not return the exact results. This SQL query would be rewritten as search parameters like assignee:peasee assignee:phillipleblance, because assignee search parameters don't support multiple values. This can return issues with one or both assignees, which requires the Inexact filter parameter.
Implementation (issues)

[ ] #2833
[ ] #2834
[ ] #2835
[ ] #2836
[ ] #2837
[ ] #2838
[ ] #2839

@peasee - we should extend this or create separate WI for similar work for files table.


Added completion command to create Bash completion files

First draft for #325

Waiting for change: https://github.com/SpectoLabs/hoverfly/issues/325#issuecomment-331846797

Added the changes from https://github.com/SpectoLabs/hoverfly/issues/325#issuecomment-331846797 and some documentation


Add Gitlab as Gold sponsor

What happened

Add the Gitlab inf as a Gold sponsor
Change the order of Gold and Partner sponsors to be in alphabetical order. Previously it was in the order of sign-ups.
Improve the responsive styling of the Gold and Partner sponsors to fit 2 x 2 or4 x 4 on small and medium screens

Insight
I needed to change the logo into a horizontal pattern (instead of having the icon above the brand name, it's on the left) to fit in our design. I hope I did not break any design guidelines
Proof Of Work
Small Screen

Medium Screen

Large Screen

Quick comment - do we want to do something to highlight the fact that Gitlab is also sponsoring our swag, in addition to being a gold sponsor? (if yes, this could be a separate issue)

@ditsara About the swag sponsorship, it could be part of the social media promotion. During the event, since the swag will be handed over to each attendee, it will give clear visibility to Gilab. So in terms of ROI for Gitlab, it should be good.


Small box with an X when row text overflows

There is a problem with the ellipsis in the multibyte representation.
This seems to be a problem with flutter, not just with PlutoGrid.

https://github.com/flutter/flutter/issues/90135

solution
https://github.com/flutter/flutter/issues/90135#issuecomment-984916656


Can't import some BTC private keys...

When i try the sweep option and give it my private-eys, i'm getting a "tx's duplicate" eror but it's the first time i claim my BTCP via the electrum wallet... Any idea what's going on ?

Seems like a dupe of my issue #35


Use service account in tests

I'd like to be able to run the Helm tests using a private repo to demonstrate how this is done.  The service account can be added to the tests that pull images by adding this to the Pod specs:
spec:
  {{- if .Values.serviceAccount.enabled }}
  serviceAccountName: {{ template "podinfo.serviceAccountName" . }}
  {{- end }}

The chart now contains this option.


netbird even log higher level when not set or set to info

in home assistant we run it as :
netbird up  --foreground-mode --config /config/netbird/config.json --log-file console --setup-key xxxxx --hostname yyyy
but the log still full with such lines:
time=2024-03-28T12:06:35.985+01:00 level=DEBUG msg="Skipping handshake due to missing endpoint" pid="WozkqsNH0R2gGzIyEFqjWuLvcfuI+wrTl8Q/wd6AXmg="
time=2024-03-28T12:06:35.988+01:00 level=DEBUG msg="Added peer" pid="WozkqsNH0R2gGzIyEFqjWuLvcfuI+wrTl8Q/wd6AXmg="
2024-03-28T12:06:35+01:00 INFO client/internal/peer/conn.go:375: connected to peer hCDjKQBW9TBwsZigTRXxvVzpAYE+ZqDHBol4sOSUMl0=, endpoint address: <IP_ADDRESS>:43358
time=2024-03-28T12:06:36.027+01:00 level=DEBUG msg="Skipping handshake due to missing endpoint" pid="y9muQSHT3YHV0QugCUP+oH6TevaeJiN0UrlQ22Cd9vk="
time=2024-03-28T12:06:36.029+01:00 level=DEBUG msg="Added peer" pid="y9muQSHT3YHV0QugCUP+oH6TevaeJiN0UrlQ22Cd9vk="
2024-03-28T12:06:36+01:00 INFO client/internal/peer/conn.go:375: connected to peer gsrpCbJwc8lkmNV783rxIHpyj+zZIhy/rFj5HsfVuBY=, endpoint address: <IP_ADDRESS>:51820
time=2024-03-28T12:06:36.032+01:00 level=DEBUG msg="Handling message" type=InitHello
time=2024-03-28T12:06:36.046+01:00 level=DEBUG msg="Skipping handshake due to missing endpoint" pid="4gwHVFRbiUK4dEKIyjDxvnmgdCmMfDR0MWze2fzuY3U="

even if i set loglevel with:
netbird up  --foreground-mode --config /config/netbird/config.json --log-file console --setup-key xxxxx --hostname yyyy --log-level info
i still got these DEBUG lines.
IMHO this is a bug and not a feature.

Hi @lfarkas, you are absolutely right, this is a bug. Those debug logs are sent from the rosenpass library which is using a different logging framework, that we are not configuring properly. If you check https://github.com/netbirdio/netbird/blob/4fff93a1f228fe15a802b5a0862aa1180f912c5d/client/internal/rosenpass/manager.go#L103 we have a hardcoded debug log to standardout. This needs to be fixed and preferably optional to enable/disable those logs completely independent from the main netbird logs


error invalid config: undefined

when i start code-server in container, i occur error invalid config: undefined

code-server source code is mounted in container with -v.
print version also error
# /var/vm/vscode/bin/code-server --version
[2020-12-15T04:28:51.050Z] error invalid config: undefined

but print success at hostpath
# ./code-server --version
***** Please use the script in bin/code-server instead!
***** This script will soon be removed!
***** See the release notes at https://github.com/cdr/code-server/releases/tag/v3.4.0
3.7.4 11f53784c58f68e7f4c5b3b8dae9407caa41725b

Only if start code-server at one container, commit this container to new image, then start code-server in this new image, will be occur the error. why?

the reason that config  yaml is empty, remove it, run correctly


Add configuration option to enable EBS volume encryption.

Adds support for #318. So far not tested due to other issues.
Note that if set to true, the instance types available for use will be limited.

Thanks @ineffyble! Will merge into a testing branch.

Hi @lox , @ineffyble - has this feature been merged to Master? Thanks.


inform screen reader of notebook inline suggestion

We should play an audio cue and will also want the screen reader to read the content immediately like we will do for the editor tracked by https://github.com/microsoft/vscode/issues/167348

@rebornix @amunger what are your thoughts here/ has there been any headway made on this?

@meganrogge - I assume we should follow what we did for https://github.com/microsoft/vscode/issues/167348, but it's hard to follow what the result was there. It looks like the last PR that was referenced was reverted, and I don't see the applicable code in the ghostTextWidget. Was there a final decision on behavior somewhere or just a TPI?  And is there another PR that I could use for reference?

Hi Aaron, we control the one in the editor with a setting. here's the implementation of that
https://github.com/microsoft/vscode/blob/dcafd8876c9365ca3fc6fe0f449aaa9a16570c15/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.ts#L236-L238

the same code is hit for a notebook cell, the notification sound is played for me, and it looks like the aria alert is being added.

I don't ever hear any alert text on either of my machines and haven't been able to figure out why so I can't check, but is it not reading the ghost text for notebook cells?
Is there something else that's missing?

Can you use the NVDA speech viewer to verify the alert is happening? @amunger

what is the value of lineText when that gets hit?

lineText is whatever else is on the line.
On my laptop the text editor ghost text is not read either.
I tried again on my desktop pc, and now the ghost text is read for both notebook cells and text editors. Are you seeing something different?

Sounds like an issue with the screen reader/ setup you have. I would suggest using the speech to text viewers rather than the audio version as then you won't wonder if it's an issue with your setup or the code.


RGB values for different categories

Are the rgb values for each category somewhere in this directory?

Hi, do you mean the RGB value for color scheme of each class? Maybe here
https://github.com/NVIDIA/semantic-segmentation/blob/master/datasets/cityscapes.py#L24
If I misunderstand your question, please let me know more details. Thank you.

Yeah, so I guess you used that instead of assigning rgb values to each class.
So there doesn't exist like a dictionary somewhere that is like:
{person: [252, 0, 10], car: [20, 10, 20], ... etc.}

We didn't write it like a dictionary, but here is the dictionary showing the mapping if you like:
road: 128, 64, 128
sidewalk: 244, 35, 232
building: 70, 70, 70
wall: 102, 102, 156
fence: 190, 153, 153
pole: 153, 153, 153
traffic light: 250, 170, 30
traffic sign: 220, 220, 0
vegetation: 107, 142, 35
terrain: 152, 251, 152
sky: 70, 130, 180
person: 220, 20, 60
rider: 255, 0, 0
car: 0, 0, 142
truck: 0, 0, 70
bus: 0, 60, 100
train: 0, 80, 100
motorcycle: 0, 0, 230
bicycle: 119, 11, 32

That's awesome!
Exactly what I was looking for, thank you!


Couldn't install the project

Hi,
I am using Ubuntu 20.04.1, Linux operation system and want to setup aztec-packages as mentioned in https://github.com/AztecProtocol/aztec-packages#development-setup.
When I run bootstrap.sh in my locally I am getting the following errors.

The same issue was solved in other repo.


TypeError: Cannot read property 'contains' of null

What error is this? How to solve?
OutsideClickHandler.js:1 Uncaught TypeError: Cannot read property 'contains' of null
    at OutsideClickHandler.onOutsideClick (webpack:///./~/react-dates/lib/components/OutsideClickHandler.js?:1:3926)
    at eval (webpack:///./~/consolidated-events/lib/TargetEventHandlers.js?:1:1684)
    at Array.forEach (native)
    at TargetEventHandlers.handleEvent (webpack:///./~/consolidated-events/lib/TargetEventHandlers.js?:1:1620)

Are you running this in a browser?

Yes, in a browser.
I've created a widget that requires react-datepicker. It is a UMD library. All works well except react-dates events. Does it cause the issue because it is UMD library?
I add a widget on a page like this:

Widget file, as I said, is a UMD and looks like this:
(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else if(typeof exports === 'object')
		exports["AS"] = factory();
	else
		root["AS"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
......... so on

Source files.
Widget. It is an entry point for Webpack:
'use strict';
const React = require('react');

const DatePicker = require('./DatePicker');  // My DP wrapper
let css = require('Widget.scss');

class Widget extends React.Component {
    render() {
        return (

                        <DatePicker />

        );
    }
    constructor(props) {
        super(props);
    }
};

module.exports = Widget;

My DP wrapper, almost identical to example:
'use strict';
const React = require('react');

const moment = require('moment');
import { DateRangePicker, SingleDatePicker, DayPickerRangeController } from 'react-dates';

class DP extends React.Component {
    render() {
        return (
            <SingleDatePicker
                {...this.props}
                id="date_input"
                date={this.state.date} // momentPropTypes.momentObj or null
                onDateChange={this.onDateChange} // PropTypes.func.isRequired
                focused={this.state.focused} // PropTypes.bool
                onFocusChange={this.onFocusChange} // PropTypes.func.isRequired
            />
        );
    }

    onFocusChange = ({focused}) => {
        this.setState({
            focused: focused
        })
    }

    onDateChange = (date) => {
        this.setState({ date })
    }

    constructor(props) {
        super(props);
        this.state = {
            date: moment(),
            focused: false,
        };
        this.onDateChange = this.onDateChange.bind(this);
        this.onFocusChange = this.onFocusChange.bind(this);
    }
};

DP.defaultProps = {
    id: 'date',
    placeholder: 'Date',
    screenReaderInputMessage: '== screenReaderInputMessage ==',
    showClearDate: true,
    reopenPickerOnClearDate: true,
    monthFormat: 'MMMM YYYY',
    displayFormat: () => moment.localeData().longDateFormat('L'),
}

module.exports = DP;

So what does go wrong? Why does react-dates throw errors?
Webpack config. Entry and output and target:
module.exports = {
    context: path.resolve(__dirname, '..'),
    entry: {
        'index': path.resolve(__dirname, '..', 'src/js/browser.js'),
        'sdk': path.resolve(__dirname, '..', 'src/js/sdk.js'),
        'sa_widget': path.resolve(__dirname, '..', 'src/js/sa_widget.js'),
        'vendors': [
            'react',
            'react-dom',
        ]
    },
    output: {
        filename: 'js/[name].js',
        path: path.resolve(__dirname, '..', 'public'),
        publicPath: '',
        pathinfo: true,
        sourceMapFilename: "[file].map",
        devtoolModuleFilenameTemplate: "webpack:///[resource-path]?[id]",
        libraryTarget: "umd",
        library: ['AS'],
    },
    target: 'web',
    devtool: 'cheap-module-source-map',

Sorry to bump this issue, but I seem to have also encountered this error message.
I think the issue is that I have my own  wrapping the react-dates component which also has its own OutsideClickHandler. When the component is removed from the VirtualDOM, I think it tries to trigger the OutsideClickHandler internally?
Would it be beneficial to the library to have a conditional wrapping this portion? https://github.com/airbnb/react-dates/blob/master/src/components/OutsideClickHandler.jsx#L38
Something like if (this.childNode)?

I'm seeing this error as well, but for me it happens any time I click outside the date range picker to close it, regardless of whether or not I've selected a date. I copy/pasted the DateRange example in the readme and saw this error on my first attempt to use it.

I think I've found a fix.

I'm getting this too with the DRP and it seems to have just been introduced very recently as I've been using DRP for ages and I've just noticed it.

I'm on version: 12.5.0.

hm, that doesn't make any sense :-/

@chris-pearce can you try the change in 453face2df9ac8542f30e2a6afc92d8ee6f54801 locally, and see if it fixes the issue?

@ljharb I'm not sure how I apply it locally as the code is transpiled?

@chris-pearce npm install from the repo at that sha; cd into it; npm install && npm run build

@ljharb that worked.

Thanks for address this, @ljharb!

@ljharb
I see this fix is not included in release 12.5.0

@danhnguyen8br it was merged after we did the release so no, it's not
included in 12.5.0. We'll do a patch release shortly.
On Fri, Aug 25, 2017, 10:36 AM danhnguyen8br<EMAIL_ADDRESS>wrote:

@ljharb https://github.com/ljharb
I see this fix is not included in release 12.5.0
[image: image]
https://user-images.githubusercontent.com/29014761/29708631-8db1ecf8-89b3-11e7-83c4-b9a29bdff94a.png
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/airbnb/react-dates/issues/437#issuecomment-324870673,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABUdtXxIfgB1PGBbQeFXqtZN3BTnX5lgks5sbpWqgaJpZM4M5d3g
.

@majapw  Sound great. Thank you


⚠ Bofrost.de has degraded performance

In b7ae82d, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1464 ms

Resolved: Bofrost.de performance has improved in 9d12dbb after 22 minutes.


Encode utf8

Hi,
this fixes the module to encode/decode UTF-8 correctly and now handles all the specified unicode codepoints.
Fixes #8 which can be closed when applied.

Oh wow, thank you for this!


662/asterner profile tests

This PR:
Resolves (part of) #662
1. Adds basic render tests for the Profile page
2. Adds tests to check basic functionality for the Profile page
3. Factors out a MockSignedInUserContext to allow multiple tests to access user profiles
Future Steps:
We should figure out why there's a second timeout before loading the full profile page...
https://github.com/codeforpdx/PASS/blob/52c881fc278dfe0ebdc2c3c107aa4625db9c2793/src/pages/Profile.jsx#L114-L128

There's one extra line that can be removed but approving anyway.
Also would like @leekahung to give this a once-over just to be extra safe

Sweet! I'll wait for feedback from @leekahung

Awesome! Thanks y'all :) merged!


Use Located::new over struct initializer

Current dependencies on/for this PR:

main

PR #5   👈

This comment was auto-generated by Graphite.


improve how all the for loops are run with itertools possibly

https://github.com/snafees/ortho_seqs/pull/13


Potential update in definition of damping

In the Green framework, the definition of damping is such that
obj_n = obj_n * damping + obj_n_1 * (1 - damping)

where obj_n is the result for current iteration, and obj_n_1 is the result for previous iteration.
So, damping=1 would result in no damping in our codes.
However, in PySCF and other quantum chemistry packages, the definition is the opposite, i.e., damping=0 results in no damping.
Question to everyone: should we keep our definition consistent with that in PySCF, the software package we use to prepare our input?

No, no, no. The definition that we have in the code now is the one that is the most consistent with DIIS. Please don't redefine it because it will break a lot of calculations the users already have.
The definition that is present now is also consistent with the definition from the old code that we have locally.

It is understandable that this change will be incompatible with previous calculations, and also require some editing of DIIS parts. This is why I am posing it as a question, and not a bug or feature request.
The way I see it, we have had some major changes in the structure of the code already, and we are still in the BETA version. So, if we desire to make these definitions consistent, now is the opportunity.

The claim about consistency with the older versions is definitely false for the last two years. I am strongly against such changes because they don't serve any real benefit and cause a giant headache for those actually working with the code already.

This is exactly my point. The current users, specially those familiar with other q. chem. codes, had to go through the confusion between different damping defs. For new users, maybe this will make life relatively easier, though at the expense of further headache for us.
Once again, I am neither "for" nor "against" this change. I noticed this behavior and thought it is something that needs a little attention from developers.

My point is actually in maintaining consistency with the Green's function codes rather then with other more distant codes. Such things should be defined once and carefully described. I would argue that most users do not appreciate when the definition of the parameter changes from version to version. So I am against the change.

PySCF isn't that distant. We are using it for zeroth step, way before we can run the GW or GF2 calcs.
Technically, we are yet to have a FULL RELEASE of the green-phys software. This is why I say, should we decide to update the definition, now is the only chance. Once again, I am not saying we should or shouldn't make this change.

After several discussion, the final decision is:

rename damping to mixing_weight
introduce "new" damping parameter that has no default values and code will throw an exception if the value is provided

The reason for damping to be x_n = (1-a) x_n + a x_{n-1} comes from the definition of such term in dictionary, and we obviously used it wrong. It is right time to rename it and avoid any possible confusion in the future.
The proposed changes are in the PR #5 please review it and I will close this issue.


Scripting variables (request, httpRegion.request) not completely initialized

Hi @AnWeber
the body and/or rawBody on the httpyac variable request and httpRegion.request are not always set.
###
# @name postHttpbin2

{{
    console.info(`BEFORE request - current request rawBody: ${request.rawBody}`);
    console.info(`BEFORE request - current request body: ${request.body}`);

    httpRegion1 = httpFile.httpRegions.find(r => r.metaData.name === "postHttpbin1");
    console.info(`BEFORE request - httpRegion1 request rawBody: ${httpRegion1.request.rawBody}`);
    console.info(`BEFORE request - httpRegion1 request body: ${httpRegion1.request.body}`);

}}
POST https://httpbin.org/post?source=postHttpbin2 HTTP/1.1

{
    "foo": "postHttpbin2"
}

{{
    console.info(`AFTER request - current request rawBody: ${request.rawBody}`);
    console.info(`AFTER request - current request body: ${request.body}`);

    httpRegion1 = httpFile.httpRegions.find(r => r.metaData.name === "postHttpbin1");
    console.info(`AFTER request - httpRegion1 request rawBody: ${httpRegion1.request.rawBody}`);
    console.info(`AFTER request - httpRegion1 request body: ${httpRegion1.request.body}`);
}}

###
# @name postHttpbin1
POST https://httpbin.org/post HTTP/1.1

{
    "foo": "postHttpbin1"
}

Results in the following output:
INFO: BEFORE request - current request rawBody: undefined
INFO: BEFORE request - current request body: {
    "foo": "postHttpbin2"
}
INFO: BEFORE request - httpRegion1 request rawBody: undefined
INFO: BEFORE request - httpRegion1 request body: undefined
INFO: AFTER request - current request rawBody: undefined
INFO: AFTER request - current request body: {
    "foo": "postHttpbin2"
}
INFO: AFTER request - httpRegion1 request rawBody: undefined
INFO: AFTER request - httpRegion1 request body: undefined

Thank you

@wusawo request.rawBody is not used anymore. I removed property in interface.
To explain the difference between request and httpRegion.request some more explanation is needed.

request is a clone of httpRegion.request and is created at start of executing a region. For this reason you should not change httpRegion.request directly, but only request.
After request clone the body is lazy loaded to minimize memory consumption. This means on httpRegion.request the body property is never initialized. At this stage the body can have different data types.
your script is executed
before executing the real request the body is normalized to data type Buffer or string.
I did not think about the fact that after execution of the http request the variable request can still be accessed. This remains unchanged after transform, but this would be another way to free up memory. I would advise against using this and instead define a separate variable for possible accesses

In summary: httpRegin.request.body is never assigned. Don't touch httpRegion.request. request.body is lazy loaded and should be managed in custom variable, if same value and type is needed after request.

I need to access the request body of one httpRegion from another one (see my sample above). Is there a chance to force loading the body of that httpRegion? Any other ideas?

If the other request is already executed, you could save the request body in a variable. Or just use a script to init body in variable.
{{
    exports.body= {
    "foo": "postHttpbin2"
    };
}}
###
# @name postHttpbin2

POST https://httpbin.org/post?source=postHttpbin2 HTTP/1.1

{{body}}

###
# @name postHttpbin1
POST https://httpbin.org/post HTTP/1.1

{{body}}

That's a pity but not so bad. Actually I am using httpyac's domain specific language for http requests to express test data, because in one of my scenarios the test data is a http request definition. This test data request is never executed but I use its method, uri and body in an actual executed request as variables by referring to the particular httpRegion httpFile.httpRegions.find(r => r.metaData.name === "postHttpbin1")  😉
Of course to workaround this issue I can also define exports for testDataRequest.Method, testDataRequest.Uri and testDataRequestBody

With v5.10.0 I now already append the body to the httpRegion during parsing. This can be either a string or an array of string and functions. Your use case should work with this.  Also please note that the variables in this body have not been replaced yet.

Yes, that works perfectly for my scenario. Thank you.


Facebook lib is making the build to crash

Steps to reproduce

fresh clone the repo.
npm install
gulp ios

Expected Behavior
Build succeeds
Actual Behavior
There is a build compilation error un FBSDK lib
** BUILD FAILED **

The following build commands failed:
	CompileC {my local dir}/este-app/ios/build/Build/Intermediates/RCTFBSDK.build/Debug-iphonesimulator/RCTFBSDK.build/Objects-normal/x86_64/RCTConvert+FBSDKSharingContent.o RCTFBSDK/share/RCTConvert+FBSDKSharingContent.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

(1 failure)

for now the workaround to get it working is:
react-native uninstall react-native-fbsdk
edit src/native/main.js
// line 2
// import FBSDK from 'react-native-fbsdk';

// line 33
platformDeps: { uuid, storageEngine: AsyncStorage },

Do you have Facebook SDK properly installed?
https://developers.facebook.com/docs/ios/getting-started

Thanks @tomaswitek, an older version of SDK was the issue here (exactly the one coming with react-native-fbsdk).

still returns "/AppDelegate.m:14:9: fatal error: 'FBSDKCoreKit/FBSDKCoreKit.h' file not found
#import <FBSDKCoreKit/FBSDKCoreKit.h>"  after @andresbravog 's fix.  So Facebook iOS SDK appears to not be optional but required? thanks


Separators screw with scoring

Separators like whitespaces will greatly increase the scoring: https://github.com/dropbox/zxcvbn/issues/216

Maybe we could extract the separators like the java version https://github.com/GoSimpleLLC/nbvcxz/blob/master/src/main/java/me/gosimple/nbvcxz/matching/SeparatorMatcher.java

Here are some ideas that i found in some issues inside the original javascript repository:

Let it run multiple times first time with the original input and then per common separators like whitespaces - or _.
For this approach there were two ideas to generate the guesses.
1.1 Take the lower score
1.2 Take the average
Remove the separators and add a guess count per used separator. So the separators a still considered as additional characters that improve the password

Hey there, just wanted to chime in since I already "fixed" this in nbvcxz. The fact that separators didn't get a specific "match" type in zxcvbn is pretty dumb, it increase the entropy way more than it should as you noticed, as well as making more "strange" matches.
So in my implementation, I decided to add a specific separator matcher. https://github.com/GoSimpleLLC/nbvcxz/blob/master/src/main/java/me/gosimple/nbvcxz/matching/SeparatorMatcher.java
That just tries to identify the most common non alpha-numeric character in the password, and specifies that as the "separator" and then returns a "match" for each occurrence of it.
For zxcvbn, if I remember right it tried to find a match for each part of the password, and only if it couldn't find a match for that part would it then add a brute force match.
With that in mind, I realized that the matching algorithm zxcvbn uses is...well it's broken. It gets things "right" most of the time, but it does not find an optimal combination of matches in quite a few cases. That is because it always tries to find the lowest entropy for each range of the password, but once it's found the lowest entropy match for that region, it moves on to the next region to find it's lowest entropy matches. There are a ton of cases where taking a slightly higher entropy match for one later part of the password lets you get a vastly lower entropy match for an earlier part of the password. That wasn't possible if we didn't have brute force matches for each section in with the rest of the "matches" we found.
So with all that in mind, it still didn't totally fix the issue with zxcvbn's algorithm for finding the best match combination FYI.
In here:
https://github.com/GoSimpleLLC/nbvcxz/blob/master/src/main/java/me/gosimple/nbvcxz/Nbvcxz.java
Under the findBestCombination method is the new algorithm I implemented, while findGoodEnoughCombination is the original port of the algorithm. As you can see, I still use the original, as it was much faster and allows me to short circuit some more expensive code.
So if you just add a separator match without any other changes, it may or may not fix the issue you are seeing here. I just wanted to bring the other stuff to your attention, as it took me many weeks to track down and come up with fixes for them originally.
Here is the example output for that same password run through nbvcxz:
java -jar .\nbvcxz-1.5.0.jar
Commands: estimate password (e); generate password (g); quit (q)
Please enter your command:
e
Please enter the password to estimate:
buy by beer
----------------------------------------------------------
Time to calculate: 9 ms
Password: buy by beer
Entropy: 31.717160968028406
Your password does not meet the minimum strength requirement.
Warning: This is a very common password.
Suggestion: Add another word or two. Uncommon words are better.
Time to crack: ONLINE_THROTTLED: 56 years
Time to crack: ONLINE_UNTHROTTLED: 1 years
Time to crack: OFFLINE_BCRYPT_14: 19 days
Time to crack: OFFLINE_BCRYPT_12: 4 days
Time to crack: OFFLINE_BCRYPT_10: 1 days
Time to crack: OFFLINE_BCRYPT_8: 7 hours
Time to crack: OFFLINE_BCRYPT_5: 56 minutes
Time to crack: OFFLINE_SHA512: instant
Time to crack: OFFLINE_SHA1: instant
Time to crack: OFFLINE_MD5: instant
-----------------------------------
Match Type: DictionaryMatch
Entropy: 6.584962500721156
Token: buy
Start Index: 0
End Index: 2
Length: 3
Dictionary: english
Dictionary Value: buy
Rank: 96
Length: 3
Leet Substitutions: false
Reversed: false
Distance: 0
-----------------------------------
Match Type: SeparatorMatch
Entropy: 3.3219280948873626
Token:
Start Index: 3
End Index: 3
Length: 1
-----------------------------------
Match Type: BruteForceMatch
Entropy: 4.700439718141093
Token: b
Start Index: 4
End Index: 4
Length: 1
-----------------------------------
Match Type: BruteForceMatch
Entropy: 4.700439718141093
Token: y
Start Index: 5
End Index: 5
Length: 1
-----------------------------------
Match Type: SeparatorMatch
Entropy: 3.3219280948873626
Token:
Start Index: 6
End Index: 6
Length: 1
-----------------------------------
Match Type: DictionaryMatch
Entropy: 9.087462841250339
Token: beer
Start Index: 7
End Index: 10
Length: 4
Dictionary: passwords
Dictionary Value: beer
Rank: 544
Length: 4
Leet Substitutions: false
Reversed: false
Distance: 0

Many thanks 👍
That will definitely help me a lot!
If i'm going to work on this issue i would try every approach to check how they perform. But i like the idea of having a SeparatorMatcher.
I guess i will checkout your findBestCombination  too but i think this will be quite a lot of work to bring it into this code base :D