Day View - missing labels at end of day

I was playing with the demo, and set the "Interval Range (daily)" to be 06:45 to 19:30.
With the "Interval Step" set to 15min, all the labels display correctly each hour terminating at 7:00pm
With the "Interval Step" set to 30min, all the labels display correctly each hour  .... BUT ... they terminate at 6:00pm ... so the 7:00pm label is not there
With the "Interval Step" set to 60min, all the labels display correctly each hour  .... BUT ... they terminate at 5:00pm ... so both the 6:00pm lable and the 7:00pm label are not there
(@digiproduct)

Sorry sent the above message from the wrong Github account

So, I have tried to reproduce what you are describing (not sure if I got it right), but I get the mentioned missing times.
Here is an image of the last one (after completing all the steps.

The Calendar interval labels can never show the first and last item because of the way the negative margins work.

@digiproductmarketer Is this what you meant or is it something else, in which case I am going to need an image. Thanks.

yes, that's what I meant ... because ... if the Daily Interval ends at 19:30 ....  there should be some display AFTER 7:00pm, so therefore I would expect to see a 7:00pm line and some further period ...

Physically, the way it is done, that's impossible. The time is put into the next div element and bumped up using a negative margin. Since there is no div element, this just can't be done. Similar, for the top, only the bottom of the text would be visible (the top portion being truncated) and it'd look bad.
Understood?
Can we close this?

Sorry, but no, I don't understand.
I mean, I undertsand what you are saying about the label of the last div not being displayed because of negative margin ... but isn't the problem really that the 7:00pm is not being displayed being caused because the actual display doesn't extend to at least the end of the day interval range.
It seems to me that the display stops at 7:00pm ... but the day interval range ends at 7:30pm ... so the actual display should reach 7:30pm ... or, if you are actually displaying whole hours, then the display probably should reach to 8:00pm .. which would then result in the 7:00pm label being displayed.
With the start of the day interval range being set to 06:45am, the actual display starts at 06:00am ... even though the 06:00am label does not display for the reasons you have previously outlined.
SO ... following the same logic ... if the end of the day interval range is 7:30pm ... then the actual display should continue to 8:00pm.

Ah, right, but the labels only do the top-of-the-hour, so 7:30 isn't even available
Maybe what you're wanting is labels on all intervals. I oculd do that, but got to figure out how to make it not look messy when interval-height isn't a high enough number.

Understand that 7:00pm isn't available and understand that it's impossible to show every time slot label without things looking messy.
I think, really, that my original message didn't properly describe the real issue ... it talked about missing lables ... but the real issue is that the display doesn't extend beyond, or at least to, the end of the day interval range.
On some other calendars that I have seen the background of the display is one colour .... and the background of the day interval range is a different colour.
Maybe such a setup requires a "day interval display range" and a "workday interval range" ... with the "workday interval range" normally being set to less than the  "day interval display range"
I'll try to find an image to display this concept for you.

A pointer to help you isoate this ... it's occuring because I set the "Interval Step" to 30 minutes
I did that because having the "Interval Step" set to 15 minutes didn't allow me to set the "Interval Height" to less than 20px, and therefore I couldn't get a complete working day to display on the viewport.
When I reset the "Interval Step" to 15 minutes, the 7:00pm label is displayed.

Just to reconfirm.
7:00pm displays correctly in this situation
Interval Range 06:45 to 19:30
Interval Step 15minutes
Interval Height 20px
7:00pm does not display at all in this situation
Interval Range 06:45 to 19:30
Interval Step 30minutes
Interval Height 20px

Just checked something else ... if the working day is a multiple of the Interval Step then it works.
so by changing the end of the Interval range to 19:45, I got it to work with Interval Step of 15 minutes and Interval Step of 30 minutes

Yeah, I'm still not clear. If the interval text is to be displayed on the very first and very last intervals it won't be displayed. That's by design (because it looks horibble having the top/bottom half of the text cut off).

Why should it need to have the bottom half of the text cut off? It's for a label that has a period following it.
The label display can be correct in each situation without any problem ... otherwise it wouldn't be displayed when the interval time is set to 30 minutes ... and wouldn't be corrected when setting the Interval Step (working day) to an exact multiple of the Interval Step .
In the set of circunstances I quoted above namely
Interval Range 06:45 to 19:30
Interval Step 30minutes
Interval Height 20px
The label is not displayed because the period from 19:00 to 19:30 is also not displayed ... the last label displayed is 6:00pm (18:00) and the interval strips from 18:00 to 19:00 are shown ... but the interval strips for 19:00 to 19:30 are not shown and therefore no 7:00pm (19:00) label is displayed.
I've attached images showing the incorrect display and the correct display. These are taken direct from the Interactive Demo.

HOWEVER ... maybe this is an edge case that I really shouldn't be bothering you with any further.

I don't know. Sometimes I think we are talking apples/oranges. As for your examples, I cannot replicate the first one, it ends up displaying like the second one.
The only thing I can think of is that I didn't adjust the interval range slider when you change the interval step.

Btw, I updated the demo. Did that clear up your issue?

I haven't checked yet ... I'll check shortly and let you know.

I'm going to say "Yes, it's OK now" ... because I now get the 7:00pm label appearing as I expect ... and I'm happy with the display of the working hours that I can produce.
However, I'm going to add a caveat ... because you've altered the interface of the Interactive Demo in such a way that I am unable to enter the exact values I was previously entering, because the Interactive Demo UI resets my Interval Range from the values I have entered.
I'd say, at this stage, that you shouldn't devote any further resources to this issue, and, if I have a serious problem with it in a real-life use-case, then I'll revisit the scenario with you at that time.

Sounds good. :)


Use new BCL HashCode class

Follows https://github.com/aspnet/EntityFrameworkCore/pull/16069
/cc @YohDeadfall just in case you haven't used the new HashCode yet :)

If we are going to drop .NET Framework support in the 5.0, then I know a lot of places which can be improved (:

I think we'll need a better reason than this class to drop .NET Framework... Fortunately with EF Core we don't even have to think about this...

The end of service is a good reason, but it won't happen in the nearest future.

@YohDeadfall oh I hope we'll drop .NET Framework before that happens :) If it becomes a real cost or blocking factor to support it, eventually we'll do it. Right now it doesn't seem to be the case...


[Tooling] CLI: make sure outputs to the user are not log package calls

Objective
Make sure that the CLI outputs to the user in the best way possible.
Currently, we are not logging anything inside the CLI, we might in the future, at that point we'll have to distinguish between that's UX and logging but that's another story for another day. KISS for now I'd say.
Origin Document
A discussion around the use of log vs fmt package functions when printing stuff to StdOut/StdErr
Explanation of the problem here
Tiny action Item here. Creating the issue just to log this and to finally push #177 out without additional scope creep.
Goals

[ ] Replace log package calls to fmt where appropriate in the context of the CLI.

Deliverable

[ ] Updated CLI with direct output to StdOut/StdErr and no log

Non-goals / Non-deliverables

...

General issue deliverables

[ ] Update the appropriate CHANGELOG
[ ] Update any relevant READMEs (local and/or global)
[ ] Update any relevant global documentation & references
[ ] If applicable, update the source code tree explanation
[ ] If applicable, add or update a state, sequence or flowchart diagram using mermaid

[Optional] Testing Methodology

Task specific tests: make ...
All tests: make test_all
LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @deblasis
Co-Owners: ??

@deblasis Tickets like this are fair to just throw into the "Quality of Life" milestone in the V1 Dashboard

@h5law Do you have any opinions here? I know you've looked into fmt vs log in the CLI before

Do you have any opinions here? I know you've looked into fmt vs log in the CLI before

@Olshansk so I was actually thinking about this recently. I used logger.Global for output in some of the CLI for the keybase and am starting to think this should be changed to fmt.Printf statements as they are far more readable.
We have this line (57) in runtime/configs/config.go which really frustrates me
			log.Default().Printf("No config provided, using defaults")

Basically whenever we query the RPC for lets say the current supply this will be printed before out JSON is returned.
I think a good starter task would be to go through the CLI and change any logs that represent information the user is trying to read (like p1 Keys List for example) and change the outputs to fmt.Println statements. I think anything that is not directly feeding the user information that they would like to see should instead be logged to os.Stderr this way we can redirect any unwanted logs as follows p1 Keys List 2>/dev/null this will show all sucessfull output (stdout) and hide any logs/errors (stderr).
Not entirely set on this so open to a change of mind, but I really hate that config line ngl

Do you have any opinions here? I know you've looked into fmt vs log in the CLI before

@Olshansk so I was actually thinking about this recently. I used logger.Global for output in some of the CLI for the keybase and am starting to think this should be changed to fmt.Printf statements as they are far more readable.
We have this line (57) in runtime/configs/config.go which really frustrates me
log.Default().Printf("No config provided, using defaults")

Basically whenever we query the RPC for lets say the current supply this will be printed before out JSON is returned.
I think a good starter task would be to go through the CLI and change any logs that represent information the user is trying to read (like p1 Keys List for example) and change the outputs to fmt.Println statements. I think anything that is not directly feeding the user information that they would like to see should instead be logged to os.Stderr this way we can redirect any unwanted logs as follows p1 Keys List 2>/dev/null this will show all sucessfull output (stdout) and hide any logs/errors (stderr).
Not entirely set on this so open to a change of mind, but I really hate that config line ngl

On the same page, you down to take this on?

@Olshansk Sure thing will get the PR up tmrw <3


Change default setting for AUTO_WORKSPACE_APP_REGISTRATION

Resolves #2440
Set default in sample for AUTO_WORKSPACE_APP_REGISTRATION to true.

/test-force-approve

/test-force-approve


[Logs] Processing - strengthen how we validate rfc5424 source

see https://trello.com/c/WArpjBAT/273-agent-special-characters-in-log-break-the-format-and-give-empty-metadata-hostname-service-tags
The assumption that all non rfc5424 logs wouldn't start with <
has been proved wrong at this point

@ajacquemot you're right we needed a relnote


Modal: Refresh (via dev menu) does not tear down

Is this a bug report?
yes

Have you read the Contributing Guidelines?
kind of
Environment
Environment:
OS: Windows 10
Node: 9.0.0
Yarn: 1.3.2
npm: 5.5.1
Watchman: Not Found
Xcode: N/A
Android Studio: Version <IP_ADDRESS> AI-171.4408382
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.53.0 => 0.53.0
Target Platform: Android 7.0 on Samsung Galaxy S5

Steps to Reproduce

create app and launch with react-native run-android
trigger state which causes a modal to show
launch the dev menu (via shake or keycode)
select refresh

Expected Behavior
The app closes the modal and refreshes

Actual Behavior
The app presumably refreshes, but the modal stays on top and cannot be closed

Reproducible Demo

import React, { Component } from 'react';
import { Text, View, Button, Modal, StyleSheet } from 'react-native';

export default class MyComponent extends Component {
  state = {
    modalVisible: false,
  };

  openModal() {
    this.setState({modalVisible:true});
  }

  closeModal() {
    this.setState({modalVisible:false});
  }

  render() {
    return (
        <View style={styles.container}>
          <Modal
              visible={this.state.modalVisible}
              animationType={'slide'}
              onRequestClose={() => this.closeModal()}
          >
            <View style={styles.modalContainer}>
              <View style={styles.innerContainer}>
                <Text>This is content inside of modal component</Text>
                <Button
                    onPress={() => this.closeModal()}
                    title="Close modal"
                >
                </Button>
              </View>
            </View>
          </Modal>
          <Button
              onPress={() => this.openModal()}
              title="Open modal"
          />
        </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
  },
  modalContainer: {
    flex: 1,
    justifyContent: 'center',
    backgroundColor: 'grey',
  },
  innerContainer: {
    alignItems: 'center',
  },
});

Seeing in iOS as well

I can confirm this is happening on both Android and iOS

Is there any workaround? This also affects programmatic restarting on codepush updates for example.

I too wish there was a solution for this

My workaround:
Instead of this:
<Modal visible{this.state.isVisible} />
Do this:
{this.state.isVisible && <Modal visible{true} />

This is pretty awful for developing against, but it is still possible to use the modal, so long as you close it before you reload the app.
This means you must have a way of closing the modal from the modal itself (IE: a close button), and you must close it before the app reloads...  you should also disable live reload and hot reload.

Can confirm this still happens on 0.55.4, both on a physical Xiaomi Redmi Note 4 (Android 7.0/MIUI Global 9.5) and an emulated API 23 device.

Can confirm this is happening on Android and iOS using react-native 0.55.4

"react-native": "0.55.4" contains this bug. CONFIRMED!

@jjercx not working for me :/

"react-native": "0.55.4"
this is happening  here :(

Still presenting this behavior on "react-native": "0.55.4"

same here.
react-native: "0.55.4"
any news?

Yes, this is annoying... Same thing happening here...

I guess here's the fix https://github.com/facebook/react-native/commit/e5c2a66 and will be available in 0.56

That fix is also in 0.55.4, and the problem remains (Android emulation at least).  It's a blocker for hot/live reloading, therefore for any decent development environment.  Can't use this package until it's fixed.

So.... what's the workaround here? This issue is 6 months old and its still happening on 56.0.

I can also confirm this still happens on 0.56.

ping @mdvacca @kelset

Our project just updated from RN 0.50 to 0.56. I can confirm that this has become a frustrating issue for our app.

Still occurring in 0.56

Still occurring in 0.57.0
  React Native Environment Info:
    System:
      OS: Linux 4.15 Ubuntu 16.04.5 LTS (Xenial Xerus)
      CPU: x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
      Memory: 204.00 MB / 15.54 GB
      Shell: 4.3.48 - /bin/bash
    Binaries:
      Node: 8.11.0 - ~/.nvm/versions/node/v8.11.0/bin/node
      Yarn: 1.9.4 - /usr/bin/yarn
      npm: 5.6.0 - ~/.nvm/versions/node/v8.11.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      Android SDK:
        Build Tools: 23.0.1, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.3
        API Levels: 16, 19, 22, 23, 26, 27, 28
    IDEs:
      Android Studio: 3.1 AI-173.4907809
    npmPackages:
      react: ^16.5.0 => 16.5.1
      react-native: 0.57.0 => 0.57.0
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

I have confirmed .54, .55 , .56.
Still has this issues.

I think this issue is more likely related to the Modal itself than the Dev Menu, so the solution should be addressed in the former.
However, what was really pissing me off right now was the Dev Menu so I've managed to workaround that specific issue touching some lines.
It's not a solution by any means and it works in iOS only, but may be helpful for someone else.
In the RCTDevMenu.m file, change the toggle method to
- (void)toggle
{
  UIViewController* presentedViewController = RCTPresentedViewController();
  if (_actionSheet) {
    [_actionSheet dismissViewControllerAnimated:YES completion:^(void){}];
    _actionSheet = nil;
  } else if ([presentedViewController class] == NSClassFromString(@"RCTModalHostViewController")) {
    [a dismissViewControllerAnimated:false completion:^{
      [self show];
    }];
  } else {
    [self show];
  }
}

This way, if a modal is present, it will be closed before opening the Dev Menu.

I have this issue in react native 0.57.2

I also have this issue in 0.57.2. What should we use as alternative

@khuramdogar I'm using react-native-navigation, which implements modals as well as a few other forms of navigation. It does not have this problem since it has its own native implementation. I started using it due to this specific bug.

Still have this issue in RN 0.57.4
Why?!!

No Issue is resolved thanks for asking
On Tue, 6 Nov 2018 at 5:23 PM, Siyamak Fazleelahi<EMAIL_ADDRESS>wrote:

Still have this issue in RN 0.57.4
Why?!!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/17986#issuecomment-436234077,
or mute the thread
https://github.com/notifications/unsubscribe-auth/API8yb4jsFVHHdOB001pbw3cjaAjpoJoks5usX9bgaJpZM4SGTWt
.

I am still seeing this issue as of 0.57.1

I wrote this and it solves my issue on android, haven't tried on ios yet.
import React from 'react'
import { Modal } from 'react-native'
type ExtractProps<
  TComponentOrTProps
> = TComponentOrTProps extends React.Component<infer TProps, any>
  ? TProps
  : TComponentOrTProps

export class UnMountingModal extends React.PureComponent<
  ExtractProps<Modal>,
  { mounted: boolean }
> {
  public state = { mounted: false }
  public componentDidMount() {
    this.setState({ mounted: true })
  }
  public componentWillUnmount() {
    this.setState({ mounted: false })
  }
  public render() {
    return (
      <Modal {...this.props} visible={this.state.mounted && this.props.visible}>
        {this.props.children}
      </Modal>
    )
  }
}

Still having this issue! has anyone seen a solution?

Still having this issue here, RN0.55.4

@PiotrKujawa Actually the pr you mentioned is not the fix, but the cause!
The root cause is the removal of this line
When we do reload, actually we do a pause, so the dismiss() in onHostPause() can be triggered. But since this pr merged since 0.53, so that is why this bug emerged since then.
@mdvacca Could you recall why you removed this line? I could not see how that was related to Modal not disappearing when navigating to another activity?

Ideally, modal should be notified when ReactContext was tear down. The current flow only deal with main rootviews and pure native modules, but modal was a non typical rootview, neither recorded in ReactInstanceManager nor in NativeModuleRegistry, so it is forgotten in the between.
Actually some other native modules also forgott to handle instance destroyed event, like Alert(DialogModule). If you enable live reload and fire an alert action, then modify the source code, you can see the Alert window also hang on the screen after reload.
@shergin Curious that has the new architecture considered these situations? IMHO,

the react instance events should be notifyed to viewmanagers as well, or,
there should be another list to manager special views outside of main rootviews in instance manager

For now, I suggest using a js modal like react-native-root-modal instead of this one as a workaround.

What is this 3

Confirming this is still an issue on the latest release, 0.57.8. Though the issue is very apparent when hot-reloading, it's also still an issue with any sort of reload while the modal is open.

I'm confirming it as well on 0.57.8. Could someone pls advise as our App is likely to get this issue soon and might impact customers once one of the features for the modal goes live.

@rogueturnip I'm using react-native-navigation for this is it replaces the native initialization and teardown routines with ones that handle modals correctly.

@george-steel Thanks for this!

Does anyone have a concrete solution for this? Am using RN 0.58.3

Still an issue on react-native 0.59.3

(The issue is present in Expo SDK v32.0.0 which is based on RN 0.57)

still facing this issue. Any updates ?

On emulator refresh, it appears it rendering a duplicate modal. I have to close the app in the emulator and relaunch to work around this.

On emulator refresh, it appears it rendering a duplicate modal. I have to close the app in the emulator and relaunch to work around this.

same here, "react-native": "0.59.8",

Still exists now!

Still an issues.

@PiotrKujawa Actually the pr you mentioned is not the fix, but the cause!
The root cause is the removal of this line
  public void onHostPause() {
-    // We dismiss the dialog and reconstitute it onHostResume
-    dismiss();
  }

When we do reload, actually we do a pause, so the dismiss() in onHostPause() can be triggered. But since this pr merged into 0.53, there was no dismiss anymore. This bug emerged since then.
After adding that line back, now the modal can tear down normally

@mdvacca Could you recall why you removed this line? I could not see how that was related to Modal not disappearing when navigating to another activity? Do you expect the modal should persist when navigation to another activity?

Removing this line helps. Any ideas why this is required?

please then somwone tell how to fix it

Is there no way to fix this? Still an issue :(

Are you guys kidding that, after so many RN versions and month since this issue was open, nobody made a fix?

you can set the visibility of modal to false in component life cycle methods

@EhsanSarshar its not that easy unfortunately, read the entire thread for details

Confirming, still an issue in RN 0.60.4

Confirming, still an issue in RN 0.59.0

We're running into this issue as well.

I just upgraded to 0.61.2 and the new fast refresh feature doesn't have this issue. Curious if anyone else can confirm as well.

No solution for this yet?

This is also an issue for those of us using codepush. When the app refreshes the js bundle, the previous state modal still shows and completely locks the app.

Very frustrating, even more so if you don't know what's causing it.

Confirming, still an issue in RN 0.61.5
23/12/2019

@hongdung6992 The fix will land on 0.62-rc1

A compatibility way to fix this problem if you have to use RN 0.59~0.61.(At least work for me)
Extend the ReactModalHostView and override the onHostPause method. Then use the new class instead of origin one. You may have to copy many Java files and js files from source code.
// Fix the ReactModalHostView
public class ReactModalHostFixedView extends ReactModalHostView {
    private Method dismissMethod;

    public ReactModalHostFixedView(Context context) {
        super(context);
    }

    @Override
    public void onHostPause() {
        super.onHostPause();
        Method dismiss = this.getDismissMethod();
        try {
            dismiss.invoke(this);
        } catch (InvocationTargetException e) {
            Log.e("Demo", "Cant invoke dismiss(InvocationTargetException )");
        } catch (IllegalAccessException e) {
            Log.e("Demo", "Cant invoke dismiss(IllegalAccessException )");
        }
    }

    protected Method getDismissMethod() {
        if (dismissMethod == null) {
            try {
                Method dismiss = ReactModalHostView.class.getDeclaredMethod("dismiss");
                dismiss.setAccessible(true);
                dismissMethod = dismiss;
            } catch (NoSuchMethodException e) {
                Log.e("Demo", "No dismiss method");
            }
        }
        return dismissMethod;
    }
}

// Fix the ReactModalHostManager
public class ReactModalHostFixedManager extends ReactModalHostManager {
    public static final String REACT_CLASS = "RCTModalHostFixedView";

    @Override
    public String getName() {
        return REACT_CLASS;
    }

    @Override
    protected ReactModalHostView createViewInstance(ThemedReactContext reactContext) {
        return new ReactModalHostFixedView(reactContext);
    }
}

// Create you own package and register it in "MainApplication.java"
// See https://facebook.github.io/react-native/docs/native-components-android
public class ReactModalHostFixedPackage implements  ReactPackage {
    @Override
    public List<NativeModule> createNativeModules(ReactApplicationContext reactContext)
    {
        retrun Collections.emptyList();
    }

    @Override
    public List<ViewManager> createViewManagers(ReactApplicationContext reactContext)
    {
        List<ViewManager> managers = new ArrayList<>();
        managers.add(new ReactModalHostFixedManager());
        return managers;
    }
}

// You should copy the RCTModalHostViewNativeComponent.js to your project
// from node_modules/react-native/Libraries/Modal/RCTModalHostViewNativeComponent.js

// The preceding code was omitted
// Notice you have to rewrite the import statements
export default (codegenNativeComponent<NativeProps>('ModalHostView', {
  interfaceOnly: true,
  paperComponentName: 'RCTModalHostFixedView',
}): NativeComponentType<NativeProps>);

// Use fixed view if the platform is android
// The other codes was omitted

import RCTModalHostOriginView from 'react-native/Libraries/Modal/RCTModalHostViewNativeComponent.js';
import RCTModalHostFixedView from './RCTModalHostViewNativeComponent.js';
const RCTModalHostView = Platform.OS === 'ios' ? RCTModalHostOriginView : RCTModalHostView;

It works for me.(Only test on android simulator)

A compatibility way to fix this problem if you have to use RN 0.60~0.61.(At least work for me)
Extend the ReactModalHostView and override the onHostPause method. Then use the new class instead of origin one. You may have to copy many Java files and js files from source code.
// Fix the ReactModalHostView
public class ReactModalHostFixedView extends ReactModalHostView {
    private Method dismissMethod;

    public ReactModalHostFixedView(Context context) {
        super(context);
    }

    @Override
    public void onHostPause() {
        super.onHostPause();
        Method dismiss = this.getDismissMethod();
        try {
            dismiss.invoke(this);
        } catch (InvocationTargetException e) {
            Log.e("Demo", "Cant invoke dismiss(InvocationTargetException )");
        } catch (IllegalAccessException e) {
            Log.e("Demo", "Cant invoke dismiss(IllegalAccessException )");
        }
    }

    protected Method getDismissMethod() {
        if (dismissMethod == null) {
            try {
                Method dismiss = ReactModalHostView.class.getDeclaredMethod("dismiss");
                dismiss.setAccessible(true);
                dismissMethod = dismiss;
            } catch (NoSuchMethodException e) {
                Log.e("Demo", "No dismiss method");
            }
        }
        return dismissMethod;
    }
}

// Fix the ReactModalHostManager
public class ReactModalHostFixedManager extends ReactModalHostManager {
    public static final String REACT_CLASS = "RCTModalHostFixedView";

    @Override
    public String getName() {
        return REACT_CLASS;
    }

    @Override
    protected ReactModalHostView createViewInstance(ThemedReactContext reactContext) {
        return new ReactModalHostFixedView(reactContext);
    }
}

// Create you own package and register it in "MainApplication.java"
// See https://facebook.github.io/react-native/docs/native-components-android
public class ReactModalHostFixedPackage implements  ReactPackage {
    @Override
    public List<NativeModule> createNativeModules(ReactApplicationContext reactContext)
    {
        return Collections.emptyList();
    }

    @Override
    public List<ViewManager> createViewManagers(ReactApplicationContext reactContext)
    {
        List<ViewManager> managers = new ArrayList<>();
        managers.add(new ReactModalHostFixedManager());
        return managers;
    }
}

// You should copy the RCTModalHostViewNativeComponent.js to your project
// from node_modules/react-native/Libraries/Modal/RCTModalHostViewNativeComponent.js

// The preceding codes were omitted
// Notice you have to rewrite the import statements

// Use fixed view if the platform is android
const Platform = require('react-native/Utilities/Platform');
const paperComponentName =
  Platform.OS === 'android' ? 'RCTModalHostFixedView' : 'RCTModalHostView';

// export the fixed view
// NOTICE: for RN 0.61.5
export default (codegenNativeComponent<NativeProps>('ModalHostView', {
  interfaceOnly: true,
  paperComponentName,
}): NativeComponentType<NativeProps>);

// You should copy the RCTModalHostViewNativeComponent.js to your project
// from node_modules/react-native/Libraries/Modal/RCTModalHostViewNativeComponent.js

// The preceding codes were omitted
// Notice you have to rewrite the import statements

// Use fixed view if the platform is android
const Platform = require('react-native/Utilities/Platform');
const paperComponentName =
  Platform.OS === 'android' ? 'RCTModalHostFixedView' : 'RCTModalHostView';

// export the fixed view
// NOTICE: for RN 0.60.5
module.exports = ((requireNativeComponent(
  paperComponentName,
): any): RCTModalHostViewNativeType);

// You should copy the Modal.js to your project
// from node_modules/react-native/Libraries/Modal/Modal.js

// Use fixed view above
// The other codes were omitted
import RCTModalHostView from './RCTModalHostViewNativeComponent.js';

It works for me.(Only test on android simulator and my android phone for RN 0.61.5 and RN 0.60.5)

same problem still in 61.5, i solved it somehow by adding key prop to modal.
<Modal key="anyname">
</Modal>

this fixed duplicate problem in android both emulator and devices.
note: same problem also exists in release version android, not just during debug mode.

@alzalabany this does not solves the issue in my case :(
Anyone with another workaround? I am using Code Push and the app is stuck whenever a modal is shown and the code is reloaded

I found a workaround. Just don't use the modal when the Platform.OS === 'android'. It loses some functionalities like the animation, but you can program does manually if needed. Here is some code I'm using
<TouchableHighlight
style={{
elevation: 5,
zIndex: 10,
}}
disabled={!backdropAllowed}
onPress={backdropAllowed ? onClose : () => {}}>
<SafeAreaView style={{
height: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'rgba(0, 0, 0, 0.6)',
}}>
{withSkip &&
<View style={{
width: '100%',
alignItems: 'flex-end',
position: 'relative',
top: 10,
right: 0,
}}>

<Text style={{
fontWeight: 'bold',
color: colors.lightGray,
fontSize: fontSizes.h4
}}>
OMITIR

}
<TouchableWithoutFeedback
disabled={!backdropAllowed} onPress={() => {}} >
<KeyboardAvoidingView behavior="position" style={{width: '90%', marginBottom: 20}}>
{children}

Hope it helps. If anyone needs more help or has any other ideas, just tag me.

@sunnylqm do you know if it would be possible to merge this fix into 0.61 as well? And is there a time frame for a stable 0.62?

@WouterFlorijn For release related questions, https://github.com/react-native-community/releases/issues

It's been almost another whole year and this hasn't been fixed!

@TKY2048 It's fixed in 0.62

For anyone else who is using Expo and is stuck on RN 0.61, this fixed this issues for me:
<Modal ...yourProps>
  <TouchableWithoutFeedback onPressOut={(e) => {
    if (e.nativeEvent.locationY < 0) {
      handleModal(false)
    }}
  >
    <View>
      ...modal content
    </View>
  </TouchableWithoutFeedback>
</Modal>

The TouchableWithoutFeedback fixes the problem.


Fix alignment of matrix for Transform+filterQuality when offset

Fixes https://github.com/flutter/flutter/issues/95091
Transform was not taking the offset into account when computing an image filtered transform.

Might want to check if the offset is non-zero in which case two concats may be saved. But this ought to be fine as well.

That line was cut/paste from the pushTransform method which has no checks for that.

Yup. LGTM either way.


toggl-button placement on gitlab makes me close issues

Hi,
On gitlab.com, whenever the Start timer appears, I'm about to edit an issue and bam, I mark it as closed. The button should be aligned to the left.
Environment details

Operation system: MacOS
Extension version: 1.8.0

Expected behavior
The button should appear without moving buttons
Actual behavior
When the button appears, buttons from issue bar are moved to the left, faster users may click on the wrong button.
Steps to reproduce the behavior
Visit an issue you have rights to do actions on at gitlab.com and feel the annoying problem ;)

Create a project on gitlab
Create an issue
Refresh the page of the issue
Click on edit, you will probably hit the close button when the button appears
Flip a table (╯°□°）╯︵ ┻━┻ and reopen issue

Additional details

Start button should appear at the left of the buttons, not right of them. Maybe something changed recently as I usually edit issues quickly and started to have this behaviour of closing issues by mistake only today.

TOTALLY HATE THIS. WAS ABOUT TO REPORT THE SAME.
closed already two merge requests by the buttons jumper!
i suggest to move the toggl button before the "edit", "close", "new issue" buttons

until no fix from toggl-button team, workaround is to disable gitlab integration:


White line below TabBar

Steps to reproduce
TabBar showing a white line even with all the customisations set to other colors.
### Expected results

Shows an extra white line on the bottom of the TabBar.

### Actual results

Should not show that white line.

### Code sample

<details open><summary>Code sample</summary>

```dart
TabBar(
                      padding: EdgeInsets.zero,
                      labelPadding: EdgeInsets.zero,
                      controller: ref.read(tabManager).recSpotTabController,
                      labelStyle: AppTextStyles.hintTextEntry,
                      unselectedLabelStyle: AppTextStyles.hintTextEntry2,
                      labelColor: AppColors.appCommunityBackground,
                      unselectedLabelColor: AppColors.accent2,
                      indicatorSize: TabBarIndicatorSize.tab,
                      indicatorColor: AppColors.accent2,
                      indicator: const ShapeDecoration(
                        shape: StadiumBorder(),
                        color: AppColors.accent2,
                      ),
                      tabs: const [
                        Tab(text: "OnDeck "),
                        Tab(text: 'RecLists'),
                        Tab(text: 'Sent'),
                      ],
                    ),

Screenshots or Video

Screenshots / Video demonstration

Logs
Logs
[Paste your logs here]

Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.19.5, on macOS 13.6.6 22G630 darwin-x64, locale en-IN)
    • Flutter version 3.19.5 on channel stable at /Users/tejaswgupta/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 300451adae (6 weeks ago), 2024-03-27 21:54:07 -0500
    • Engine revision e76c956498
    • Dart version 3.3.3
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc1)
    • Android SDK at /Users/tejaswgupta/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C500b
    ✗ Unable to get list of installed Simulator runtimes.
    • CocoaPods version 1.14.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] VS Code (version 1.89.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.88.0

[✓] Connected device (4 available)
    • SM N980F (mobile)               • RZ8N80LDQDH               • android-arm64  • Android 13 (API 33)
    • Tejasw’s iPhone 15 pro (mobile) • 00008130-0002404430A1401C • ios            • iOS 17.4.1 21E236
    • macOS (desktop)                 • macos                     • darwin-x64     • macOS 13.6.6 22G630 darwin-x64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 124.0.6367.156

[✓] Network resources
    • All expected network resources are available.

try add this line
TabBar(
dividerColor: Colors.transparent, /// here
)

@Tejaswgupta
That's occuring most probably due to anti-aliasing for which there's an open issue that you can track for further updates: https://github.com/flutter/flutter/issues/14288
Closing this as a duplicate.


Optimize string single char replacement and contains calls.

Here's why it's important to optimize single-char calls:

both replace and contains are much easier to compute for single-char strings, because no nested loops are needed. It may even be SIMD vectorized with a good and / or compiler.
There are a lot of callers to these functions. Every one of these benefits a bit from this optimization, lubricating the gears.
replace with string arguments copies the data even if there are no other CowData co-owners. It also iterates the array twice. This can be exploited by ustring.cpp (although not from elsewhere, because string.replace makes a copy anyway).

This PR depends on (and includes) #100015.
I don't have a benchmark yet, but I believe the single-char replace and contains functions should be several times faster than the full string ones.
For reviewers
The PR is more simple than it seems.
Almost all changes are search and replace with regex and should be correct, like:

find replace\("(\\?.)", "(\\?.)", replace with replace('$1', '$2')
same for contains, similar for find

The exceptions are:

cowdata.h, where replace is implemented.
ustring.cpp where some algorithms are optimized to make better use of the function.

I have made a simple benchmark:
	String s = "Who is Frederic?Who is Frederic?";
	auto t0 = std::chrono::high_resolution_clock::now();
	for (int i = 0; i < 1000; i ++) {
		String s1 = s.replace("e", "b");
	}
	auto t1 = std::chrono::high_resolution_clock::now();
	std::cout << std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count() << "us\n";
	t0 = std::chrono::high_resolution_clock::now();
	for (int i = 0; i < 1000; i ++) {
		String s1 = s.replace('e', 'b');
	}
	t1 = std::chrono::high_resolution_clock::now();
	std::cout << std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count() << "us\n";
	t0 = std::chrono::high_resolution_clock::now();
	for (int i = 0; i < 1000; i ++) {
		String s1 = s.replace('#', 'b');
	}
	t1 = std::chrono::high_resolution_clock::now();
	std::cout << std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count() << "us\n";

This prints
200us
72us
14us

So, just very roughly, the single-char implementation can be:

Almost 3x as fast when some characters are replaced.
About 14x as fast when no characters are replaced.

This is a duplicate of:

#92475

This is a duplicate of:
https://github.com/godotengine/godot/pull/92475

Oh, oops, I probably should search before starting to implement 😄

The rest of the code would be very useful though! Will go through that

@AThousandShips I did question whether it made more sense to separate the PR(s) into smaller packages:

contains(char) and its calls (added in mine, not in yours)
replace_chars and its calls (added in yours, not in mine)
replace_char (added in both, though implementations differ)

replace_chars's calls (should be the same in both our PRs, but can only be added after replace_char is added.

What do you think? Too much overhead or just right for the situation?

I think separating this or removing the duplicate parts would be good, and I'd say focusing on the contains part (and naming it contains_char for completeness, and ability to bind to scripting)

I think separating this or removing the duplicate parts would be good, and I'd say focusing on the contains part (and naming it contains_char for completeness, and ability to bind to scripting)

Sounds good to me! Then I will remove the duplicate parts from this PR and continue commenting on yours.

Thank you, will investigate the alternative solutions and see what we can make!

I don't mind this, but why not add an overload for contains for a const char_t? That way the change could be local to ustring only, and people can't accidentally use the wrong one?

I'd much rather see a String::contains(const char_t), or equivalent overload. So future developers can't make the mistake.

I had it as an String::contains overload first, instead of String::contains_char, but I was requested above to rename it to contains_char because similar single-char functions are appended with contains_char. I believe the main reason is that it is easier to bind to scripting languages this way?

It also will make the change local to ustring.cpp/h

How would that be possible? Callers that currently call with contains(char *) will have to be adjusted to use the single-char function with either the contains name and the contains_char name.

, or a (const char[2]) overload, I guess. perhaps both?

I experimented with this earlier, but this logic would fail for contains({ 'a', 'b' }) which is not appended with NULL. Yeah, it's a bit annoying. The only way to make it consistently select the single-char implementation at compile time would be to expose the strlen(x) == 1 check in the header file, which I'm not sure if it is a good idea to do for every single function.

I'd much rather see a String::contains(const char_t), or equivalent overload. So future developers can't make the mistake.

I had it as an String::contains overload first, but I was requested above to rename it to contains_char because similar single-char functions are appended with _char. I believe the main reason is that it is easier to bind to scripting languages this way?

The speed improvements of contains_char would have to be massive for it to matter in gdscript, but perhaps I'm being too pessimistic :P

It also will make the change local to ustring.cpp/h

How would that be possible? Callers that currently call with contains(char *) will have to be adjusted to use the single-char function with either the contains name and the contains_char name. The only way to make it consistently select the single-char implementation at compile time would be to expose the strlen(x) == 1 check in the header file, which I'm not sure if it is a good idea to do for every single function.

If we do a const char[2] overload, we can just assume size=1, right?

, or a (const char[2]) overload, I guess. perhaps both?

I experimented with this earlier, but this logic would fail for contains({ 'a', 'b' }) which is not appended with NULL. Yeah, it's a bit annoying.

Wouldn't that fail now also? If there's no null it'd just crash now, no? as in, that is already an error?

The speed improvements of contains_char would have to be massive for it to matter in gdscript, but perhaps I'm being too pessimistic :P

GDScript may not benefit, but C# and GDExtension also use the scripting interface (though I also don't know what that has to do with the c++ exposed name).

If we do a const char[2] overload, we can just assume size=1, right?

, or a (const char[2]) overload, I guess. perhaps both?

I experimented with this earlier, but this logic would fail for contains({ 'a', 'b' }) which is not appended with NULL. Yeah, it's a bit annoying.

Wouldn't that fail now also? If there's no null it'd just crash now, no? as in, that is already an error?

This turns out to be surprisingly difficult to answer, lol.
Here's a test I just ran to answer this question:
static const char s[] = { 'a', 'b' };

template <size_t l>
size_t test(const char (&s)[l]) {
	return l;
}

__attribute__((noinline)) size_t test2(const char *s) {
	return strlen(s);
}

int main()
{
	std::cout << strlen(s) << std::endl;
	std::cout << test(s) << std::endl;
	std::cout << test2(s) << std::endl;
}

It prints
2
2
24

That's right, clang cheats with its strlen implementation, assuming a NULL at compile time when it should probably complain instead.
In any case, calling String.contains({ 'a', 'b' }) would yield unexpected behavior. If evaluated at compile time, it would return String.contains(a). If evaluated at runtime, it might even SIGSEV. I guess it would be fair to document the behavior of this function.

If we can't get it merged with an overload lets just keep it like this. Maybe we can do a pass over all of the _char functions and just remove them in one fell swoop eventually.

That's fair; for the record, I also think a contains overload without a _char suffix is more appropriate. But it's something we could address later, it's not a dealbreaker.

@Ivorforce surely  calling strlen() on a char array without a null terminator is already UB. I think you're just digging into how surprising the UB is.

Thanks!


fix: call table.transform as read after write

Closes https://github.com/sensedeep/dynamodb-onetable/issues/255

Thank you.

@mobsense could I get a minor release with this fix? :)

Sure, I'm just waiting for feedback on the 2.3 release to make sure we've not overlooked anything.
Perhaps Sunday.


Add 'aws_session_token' to 'Config'

The new option aws_session_token is added to ssstar::Config.
It is needed to be able to use AWS temporal credentials with ssstar

After this lands in master a release needs to be made. The instructions are in the CONTRIBUTING file. It's not the same process as other crates. I'll probably need to do it for you.

I will try to do it myself if will fault with it I'll ask you for help)


Provide access to place-my-order-assets files.

The api needs to provide URLs to resources that it can serve because not all development servers (react-create-app) provide access to the entire file system (like to the node_modules directory). After discussion some changes are going to be made to the api that will not affect existing consumers of the api but will allow for more flexibility for new ones.
Questions

How will this change work with donejs SSR?

Two changes:

A new images object in the response that contains URLs the API can serve.

The path to the images should be relative and begin with "api".

Allow the api to serve those images, so include the place-my-order-assets package.

Resolved by pr #11


Miner RPC Unavailable - 14 days!!!

So, I've read everything related to this topic and... nothing worked for me! The Nebra hotspot is offline for almost 14 days now. My last hope is to do a "factory reset", and I think only you can do this.
As seen from my json data, you have all the details of my hotspot. Can you help?!
P.S. Also, as an improvement/suggestion, maybe it would be good to have this reset available in the Nebra dasboard, or an ability to download latest firmware (force download), bacause I think that's the problem,  correct?
P.P.S. Here is the .json diagnostics report:
{"AN":"careful-gingham-gecko","APPNAME":"Indoor","BA":"HELIUM-INDOOR-868","BCH":1154550,"BN":"red-tree","BSP":null,"BT":true,"BUTTON":26,"CELLULAR":false,"CONTAINS_FCC_IDS":["2AHRD-EPN8531","2AB8JCSR40","2ARPP-GL5712UX"],"CONTAINS_IC_IDS":[],"E0":"F0:4C:D5:AC:52:74","ECC":true,"ECCOB":true,"FCC_IDS":["2AZDM-HNTIN"],"FR":"868","FRIENDLY":"Nebra Indoor Hotspot Gen 1","FW":"2<IP_ADDRESS>-4","IC_IDS":["27187-HNTIN"],"ID":"95a9dc79fe6c25eb487dedfcdd4a35c5","LOR":true,"LTE":false,"MAC":"eth0","MC":"Failed to Fetch","MD":"Failed to Fetch","MH":null,"MN":"Failed to Fetch","MR":"Failed to Fetch","MS":false,"OK":"11BrMSZ1KVTPZTPvDYxgor8PXHhCZtACJA8CHuwEosXsrHpcjj8","PF":true,"PK":"11BrMSZ1KVTPZTPvDYxgor8PXHhCZtACJA8CHuwEosXsrHpcjj8","RE":"EU868","RESET":38,"SPIBUS":"spidev1.2","STATUS":25,"TYPE":"Full","VA":"NEBHNT-IN1","W0":"14:3D:F2:02:45:01","last_updated":"19:17 UTC 26 Dec 2021","serial_number":"000000006d477b39"}
Thanks.
Have a nice day!

This is not a support channel.
Please email<EMAIL_ADDRESS>


Use parametrized hook for chrooted hooks

Signed-off-by: David Cassany<EMAIL_ADDRESS>

This fixes a leftover in install hooks logic.


Android device PhoneState.stream.listen((event) will not work

mi phone

I just want to listen if the device is making a call, which is fine on an Apple device

mi phone , User needs to close 【 Blank Passport 】，This is useful for me


#282 Add CONAN_REMOVE_OUTDATE_PACKAGES option

The new option will run conan remove <ref> -r <remote> -f --outdated after to upload a package.
Changelog: Feature: Remove outdated package after to upload (#282)
closes #282

[x] Refer to the issue that supports this Pull Request.
[ ] If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
[x] I've read the Contributing guide.
[x] I've followed the PEP8 style guides for Python code.

All conflicts have been solved!

Ops! It's incompatible with Conan-dev branch:

AttributeError: 'ConanFileLoader' object has no attribute 'load_class'

@lasote I've mixed this PR with a fix to support Conan 1.20.0-dev. The load_class method was removed from Conan API.

Please, extract the fix for the Conan 1.20 to another branch, I'm not sure about this feature, to be honest.

I think this is still a feature worth considering, what do you all think?


Manage computed model views as tree nodes

I have a situation in which I need to derive one model from another (i.e. create a model view, somewhat related to createTransformer) and would like to have access to all contexts and tree navigation functions like getParent from the view as well as refer to it via a root ref.
Let's make this more specific:
enum DataType {
  Int = "int",
  Float = "float",
}

@model("app/Tensor")
class Tensor extends Model({
  id: idProp,
  dtype: prop<DataType>().withSetter(),
  shape: prop<number[]>().withSetter(),
}) {
  @computed
  get ndim(): number {
    return this.shape.length
  }

  // ...
}

const dataFrameContext = createContext<DataFrame>()

// A `Block` is an extension (because it has header names) and subset (because
// it has only 2 dimensions) of a `Tensor`. I need the `Tensor` because I
// operate on `Tensor` instances elsewhere, but I need the `Block` to configure
// the `DataFrame`.
@model("app/Block")
class Block extends Model({
  id: idProp,
  columns: prop<string[]>().withSetter(), // header names
  dtype: prop<DataType>().withSetter(),
}) {
  // Derive the `Tensor` from the `Block`.
  @computed
  get tensor(): Tensor {
    return new Tensor({
      id: `${this.id}.tensor`, // to make the tensor view ID deterministic
      dtype: this.dtype,
      shape: [dataFrameContext.get(this)?.rows ?? 0, this.columns.length],
    })
  }

  // ...
}

@model("app/DataFrame")
class DataFrame extends Model({
  id: idProp,
  blocks: prop<Block[]>().withSetter(),
  rows: prop<number>().withSetter(),
}) {
  onInit(): void {
    dataFrameContext.set(this, this)
  }

  // ...
}

And now I'll instantiate a DataFrame and, e.g., would like to access the parent of the tensor view:
const df = new DataFrame({
  blocks: [
    new Block({ columns: 1, dtype: DataType.Int }),
    new Block({ columns: 10, dtype: DataType.Float }),
  ],
  rows: 100,
})

getParent(df.blocks[0].tensor) // is `undefined` but I'd like it to be the `Block` instance

In order to achieve my desired behavior, I've been wondering whether it makes sense to add a new decorator called, e.g., @modelView which is @computed + attaching/detaching of the returned model. A @modelView-decorated getter must always return a model instance which must not already be attached anywhere else.
What do you think about this idea? And does my example make any sense, or does my modeling approach look wrong?

Sorry for the late reply
getParent(df.blocks[0].tensor) // is `undefined` but I'd like it to be the `Block` instance

Don't you always know that this should return df.blocks[0]
Either way, I think this feature could be easily done in the app side:
const logicalParents = new WeakMap();

const logicalGetParent = (n) => getParent(n) ?? logicalParents.get(n);

 @computed
  get tensor(): Tensor {
    const t = new Tensor({
      id: `${this.id}.tensor`, // to make the tensor view ID deterministic
      dtype: this.dtype,
      shape: [dataFrameContext.get(this)?.rows ?? 0, this.columns.length],
    })

    logicalParents.set(t, this)

    return t
  }

Sorry for the possible misunderstanding. I'm not trying to just get the parent of a computed model; this is just an example. I'd like to be able to have computed tree nodes or subtrees (as mentioned, along the lines of what createTransformer does) which are alternative views of the main tree. Does this make sense?

I've given this some more thought and think the concept of computed trees does indeed make sense. I think a computed tree has the following properties:

Immutable/Read-only because it is derived from a mutable tree and state mutations are only applied there. This property would be enforced at runtime by means of the read-only middleware. In most cases, actions of computed model instances would be useless.
Middlewares are never applied to computed trees because of immutability.
Contexts are available in computed trees.
Root refs are available with computed trees, both for (a) referencing computed model instances in a computed tree (when model instances have ID props and when the IDs are stable) and for (b) referencing non-computed model instances from within a computed tree. This also implies that computed model instances can reference other computed model instances.
Back-references are available also for referenced computed model instances.
Root store life-cycle hook (onAttachedToRootStore) gets called for computed model instances in the same way as for non-computed ones.

How about providing a new decorator? E.g.:

@computedTree which behaves like MobX' @computed plus it ensures the above properties
@tree (or @computedTree) which must be applied after MobX' @computed and ensures the above properties

@xaviergonz I sense you're not convinced by the feature or its motivation. Anything I can do to remove your doubts? :thinking:

Oh yes, I miss this feature too. Something that is not attached to the state tree, but has access to all the mobx-keystone tree methods

@quolpr Could you sketch your use case? Perhaps with a simplified example?

@xaviergonz I sense you're not convinced by the feature or its motivation. Anything I can do to remove your doubts? 🤔

It is not a lack of convincement, but a lack of laptop (just got a new one yesterday after almost a full month, and trying to get the full idea while reading it on a phone is non-optimal 😓 )
Do you have an example of how you'd expect it to look using the decorators you mentioned above?

It is not a lack of convincement, but a lack of laptop (just got a new one yesterday after almost a full month, and trying to get the full idea while reading it on a phone is non-optimal :sweat: )

Oh, I wasn't aware your laptop situation hadn't been resolved. Apologies for the misunderstanding. It's certainly not optimal to handle these discussions from a phone.

Do you have an example of how you'd expect it to look using the decorators you mentioned above?

I was thinking about a design like this (using my original example again):
@model("app/Block")
class Block extends Model({
  id: idProp,
  columns: prop<string[]>().withSetter(), // header names
  dtype: prop<DataType>().withSetter(),
}) {
  // Derive the `Tensor` from the `Block`.
  @tree // <---- new decorator here
  @computed
  get tensor(): Tensor {
    return new Tensor({
      id: `${this.id}.tensor`, // to make the tensor view ID deterministic
      dtype: this.dtype,
      shape: [dataFrameContext.get(this)?.rows ?? 0, this.columns.length],
    })
  }

  // ...
}

The @tree decorator would have to be added after MobX' @computed decorator and adds logic for bridging between the regular parent tree and the computed subtree. I.e. when @tree is used, the root of the computed subtree gets attached to the parent, the read-only middleware is applied to the subtree, etc. In contrast to regular nodes, a computed root will become attached/detached more often, specifically every time it is recomputed.
To be honest, I haven't looked into ways of implementing it yet, so I don't know about the complexity of the involved changes/additions.
I tend to prefer @tree (+ MobX' @computed) over @computedTree because I think it's more modular and has a cleaner separation of MobX' and mobx-keystone's concerns.


is_bolded

The test I did using ruby 2.1.5p273, nokogiri <IP_ADDRESS>, rubyXL(3.3.4) shown that Cell#is_bolded always return 'nil'.
When  attribute is not present, Font#b is nil and then Font#is_bold (definied as b && b.val) returns nil.
When  attribute is present, Font#b is a BooleanNode, but its val is nil. This cause Font#is_bold to return nil.

Fixed.

@RKushnir : fixed that.

@weshatheleopard Thank you, that was really fast!


Options chain does not return last trade price

When exploring the options chain pulled from a security, I do not see anywhere within the table where it returns a last trade price. Granted, a last trade will not always exist for every contract in the chain, but it would be helpful to return the value where it does.

https://www.youtube.com/watch?v=3w3ZNQniSbU&t=846s

I believe it does.
close should give you the last traded price of the option.


Compat

https://github.com/MrAlert/sdlcl

Rather use https://github.com/libretro/libretro-chailove/issues/171


how to convert HTTP/HTTPS proxy to SOCKS5 proxy

no command argaments

Options:
  -t, --source-type <http|socks5>  Source proxy type [default: http] [possible values: http, socks5]

Options:
  -t, --source-type <http|socks5>  Source proxy type [default: http] [possible values: http, socks5]

This option seems to be used to specify a new proxy protocol. I found that it automatically recognizes the forwarding protocol. Does it support http authentication forwarding to socks5?

No

Does it support http authentication forwarding to socks5?

No

Does it support http authentication forwarding to socks5?

thanks


'name' of aggregator factory is not needed to be included in cache key

Some aggregators has it

Done


New term request: Type of tendril

Definition:A qualitative trait discriminating different types of tendrils
Method:Visual assessment of the type of tendrils
Scale:1 to 3 type scale
Reference:The lentil botany, production and uses,2009,34-45

Avoid wordslike 'discriminating' (which have to do with epistemology rather
than ontology)
The definition here should simply be something like
A qualitative trait that is the type of a tendril
On Fri, Nov 13, 2015 at 2:57 PM, Karthika Rajendran <
<EMAIL_ADDRESS>wrote:

Definition:A qualitative trait discriminating different types of tendrils
Method:Visual assessment of the type of tendrils
Scale:1 to 3 type scale
Reference:The lentil botany, production and uses,2009,34-45
—
Reply to this email directly or view it on GitHub
https://github.com/Planteome/plant-trait-ontology/issues/351.

Please see the comments on #350.  Can you provide some additional information as to what is being evaluated here?

Can you be more specific as to which comments need addressing?
BS
On Tue, Nov 17, 2015 at 6:41 PM, Laurel Cooper<EMAIL_ADDRESS>wrote:

Please see the comments on #350
https://github.com/Planteome/plant-trait-ontology/issues/350. Can you
provide some additional information as to what is being evaluated here?
—
Reply to this email directly or view it on GitHub
https://github.com/Planteome/plant-trait-ontology/issues/351#issuecomment-157546413
.


Add a warning page when publishing ASP.NET Core to GCE.

Fixes #1051

Should we also look into a base image with this all set up for the user?  Like a click to deploy image for ASP.NET Core on GCP?

PTAL.
I updated the above image with the changes.
I am unable to make the window smaller, as that makes the publish dialog transitions shocking. I did try to give more horizontal padding to make it look better.
I have a small concern about the fact that there is no way to get the warning back if you suppress it, but we can fix that later.

A few nits:

Drop " Google" from App Engine, Kubernetes Engine, and Compute Engine. Our new branding guidelines don't use Google in the product names, except for a new places, like Google Cloud Platform.

Flex -> flexible. Should spell out flexible here and make it lower case.

Would be nice if you could add a line break between the 2 sentences. Helps to break up the blocky feel of the text.

change "will require" to "requires"

PTAL.


PSM-393 Upgrade com.uber.nullaway:nullaway 0.7.5 -> 0.7.10

This PR contains the following updates:

Package
Update
Change

com.uber.nullaway:nullaway
patch
0.7.5 -> 0.7.10

Release Notes

uber/NullAway
v0.7.10
Compare Source

Add Java 8 streams nullness-propagation support (#371)
Give line numbers for uninitialized fields when reporting error on an initializer (#380)
Include outer$inner class name when reporting field init errors (#375)
Update to Gradle 6.1.1 (#381)
Add @MonotonicNonNull as lazy initialization annotation. (#383)
Add default library model for CompilationUnitTree.getPackageName() (#384)
Improve matching of native Map methods (#390)

Fixes an IndexOutOfBoundsException checker crash

v0.7.9
Compare Source

Multiple dependency upgrades

Gradle to 5.6.2. (#362)
WALA to 1.5.4 (#337)
Checker Dataflow to 3.0.0 (#369)

Added OPTIONAL_CONTENT synthetic field to track Optional  emptiness (#364)

With this, -XepOpt:NullAway:CheckOptionalEmptiness should be
ready for use.

Handle Nullchk operator (#368)

v0.7.8
Compare Source

Added NullAway.Optional suppression (#359)
[JarInfer] Ignore non-public classes when inferring annotations. (#360)

v0.7.7
Compare Source

[Optionals] Support Optional isPresent call in assertThat (#349)
Preconditions checkNotNull support, added missing cases. (#355)
[JarInfer] Use Android Nullable/NonNull annotations for AARs (not javax) (#357)

v0.7.6
Compare Source

Library models for guava's AsyncFunction (#328)
Annotate StringUtils.isBlank() of org.apache.commons (lang & lang3) (#330)
Adding support for Aar-to-aar transformation (#334)
Add support for @RecentlyNullable and @RecentlyNonNull (#335)
Update to Gradle 5.5.1 (#336)
Don't compute frames on bytecode writting in JarInfer (#338)
Use exact jar output path when possible in JarInfer (#339)
Avoid adding redundant annotations during bytecode rewriting in JarInfer (#341)
Handle cases when there are no annotations on methods or parameters in JarInfer (#342)
Fix #333 Nullaway init suppression issue (#343)
Add option to JarInfer to deal with signed jars (#345)
Fix #344 onActivityCreated known initializer (#346)
Skip read-before-init analysis for assert statements (#348)

Renovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

Suggested commit message:
PSM-393 Upgrade nullaway 0.7.5 -> 0.7.10

See https://github.com/uber/NullAway/compare/v0.7.5...v0.7.10

Updated suggested commit message:
PSM-393 Upgrade nullaway 0.7.5 -> 0.7.10 (#11)

See:
- https://github.com/uber/NullAway/blob/master/CHANGELOG.md
- https://github.com/uber/NullAway/compare/v0.7.5...v0.7.10

Force-pushed commit to drop internal ticket reference.


feat: Allow to decode t as opt t

Description
This is a strawman PR to implement coercion of t to opt t when decoding values.
The test suite still passes, but I'm not sure if I broke something else in the process.
Also it uses control flow by exception, which is rather ugly.
Fixes # (issue)
How Has This Been Tested?
Unit tests have been added to test the feature.
Checklist:

[x] My changes follow the guidelines in CONTRIBUTING.md.
[x] The title of this PR complies with Conventional Commits.
[x] I have edited the CHANGELOG accordingly.
[x] I have made corresponding changes to the documentation.

This is something that I've also encountered lately, if possible it would be great to merge it-


Frames in Orbit objects

This is the first step in addressing https://github.com/poliastro/poliastro/issues/434. What I did here was to create reference frames centered in each of the bodies available in poliastro that are parallel to ICRS (sort of equivalents for HCRS and GCRS for the rest of the bodies) and add a Orbit.frame property that can compute this frame for a given Orbit. If the attractor is a custom body, for the moment it will raise an error.
Missing:

[x] Validation of reference frame transformations themselves.
[x] Proper frame in Orbit.sample.
[x] Documentation.

Some notes:

For orbits coming from ephemerides, it will set them to ICRS, so no changes on the Moon until we have a transform method.
We still don't need to touch propagation, since we cannot set a custom frame using the public API.
I realized that flake8 has a lot to complain about poliastro. Those fixes will go in a separate pull request to not clutter this one and help reviewers.
I was hesitating whether to touch the BaseState code, but in the end I didn't because of https://github.com/poliastro/poliastro/issues/370.
We had to do the work ourselves because of https://github.com/astropy/astropy/issues/7770.

I suspect the base report is missing because of recent Codecov incidences: https://status.codecov.io/incidents/t9tlhn0pfxl1

Coverage publishing failed:
https://circleci.com/gh/poliastro/poliastro/526

Error: HTTP 400
Unable to locate build via CircleCI API. Please upload with the Codecov repository upload token to resolve issue.

The testing code is affected by the changes in sample, since we were using that to plot trajectories. I think the safest thing for now is to keep accepting a BaseRepresentation and give a warning.

I've been waiting for so long to have this, so I'm merging! :rocket:


failed query when using and with fragment

[p2] == TestRepo.all(from p in Post, where: fragment(title: ^regex("other")) and fragment(title: ^regex("text")))

** (Mongo.Error) Can't canonicalize query: BadValue: $or/$and/$nor entries need to be full objects 17287

The current generated query
%{"$and": [[[title: #BSON.Regex<"other", "">]],
    [[title: #BSON.Regex<"text", "">]]]}}

Just to clarify, this is not just an issue when you and two fragments.

Fixed by a2e6277


[GO] - Handle ChanType AST Node

Dependent on: https://github.com/orgs/joernio/projects/10/views/1?pane=issue&itemId=38445455
Handle below code:
func foo(c chan int, someValue int) {
   c <- someValue * 5
}

func main() {
   fooVal := make(chan int)
   go foo(fooVal, 4)
}

Pull Request: https://github.com/joernio/joern/pull/3653


Add WhenAll with output order same as input order

Purpose
ArangoDB needs it, I can use coroutine but need smaller diff
Related Information

[ ] Design document: ...
[ ] Bench PR: ...

Testing

[ ] This change is a trivial rework or code cleanup without any test coverage.
[ ] This change is already covered by existing tests.
[ ] This PR adds tests that were used to verify all changes.
[ ] There are tests in an external testing repository: ...

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

73 of 77 (94.81%)  changed or added relevant lines in 8 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.3%) to 99.72%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

include/yaclib/async/detail/when_all_impl.hpp
54
58
93.1%

Totals

Change from base Build<PHONE_NUMBER>:
-0.3%

Covered Lines:
1425

Relevant Lines:
1429

💛  - Coveralls


Fix example

Coverage remained the same at 100.0% when pulling 769c1722a3aaa8a25385dbd12528c5e35941deee on fix-example into 0090c86bc5b37f486ba08c2962c8c107dad56cc0 on master.


Add FT232 cable for ReliOn Premier meters (UPLOAD-670)

Addresses UPLOAD-670.

Going to close this as the FT232 cable provided by EZSync does not work with the Premier meter - the wiring is incompatible.


PicartoVod is unable to extract any video

Checklist

[X] I'm reporting a broken site
[X] I've verified that I'm running yt-dlp version 2021.10.10. (update instructions)
[X] I've checked that all provided URLs are alive and playable in a browser
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
[x] I've read the guidelines for opening an issue
[ ] I've read about sharing account credentials and I'm willing to share it if required

Region
No response
Description
Trying to save any VOD returns an error saying yt-dlp is unable to extract the video. Live streams extract without issue
Verbose log
[debug] Command-line config: ['-Uv', 'https://picarto.tv/videopopout/578169']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] yt-dlp version 2021.10.10 (exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19043-SP0
[debug] exe versions: ffmpeg 2021-09-08-git-5e7e2e5031-essentials_build-www.gyan.dev, ffprobe 2021-09-08-git-5e7e2e5031-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] ANSI escape support: stdout = True, stderr = True
[debug] Proxy map: {}
yt-dlp is up to date (2021.10.10)
[debug] [PicartoVod] Extracting URL: https://picarto.tv/videopopout/578169
[PicartoVod] 578169: Downloading webpage
ERROR: [PicartoVod] 578169: Unable to extract 578169; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; type  yt-dlp -U  to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "yt_dlp\extractor\common.py", line 589, in extract
  File "yt_dlp\extractor\picarto.py", line 112, in _real_extract
  File "yt_dlp\extractor\common.py", line 1150, in _search_regex
yt_dlp.utils.RegexNotFoundError: Unable to extract 578169; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; type  yt-dlp -U  to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "yt_dlp\extractor\common.py", line 589, in extract
  File "yt_dlp\extractor\picarto.py", line 112, in _real_extract
  File "yt_dlp\extractor\common.py", line 1150, in _search_regex
yt_dlp.utils.RegexNotFoundError: Unable to extract 578169; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; type  yt-dlp -U  to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1263, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1288, in __extract_info
  File "yt_dlp\extractor\common.py", line 605, in extract
yt_dlp.utils.ExtractorError: [PicartoVod] 578169: Unable to extract 578169; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; type  yt-dlp -U  to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.

I just tried to fetch from Picarto with similar (but not identical) results. It says the stream is offline, but I'm trying to download a video, not the live stream.
X:\>youtube-dl --throttled-rate 20k --match-filter "!is_live & !live" --cookies "Y:\cookies.txt" --add-metadata --write-description --write-info-json --write-thumbnail --write-subs --write-auto-subs --sub-lang en,en_US --convert-subs srt -ciw -o "%(title)s.%(ext)s" -v https://picarto.tv/DarkCookie/videos/616575
[debug] Command-line config: ['--throttled-rate', '20k', '--match-filter', '!is_live & !live', '--cookies', 'Y:\\cookies.txt', '--add-metadata', '--write-description', '--write-info-json', '--write-thumbnail', '--write-subs', '--write-auto-subs', '--sub-lang', 'en,en_US', '--convert-subs', 'srt', '-ciw', '-o', '%(title)s.%(ext)s', '-v', 'https://picarto.tv/DarkCookie/videos/616575']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2022.02.04 [c1653e9ef] (win_exe)
[debug] Lazy loading extractors is disabled
[debug] Python version 3.9.0 (CPython 64bit) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg 2021-01-12-git-ca21cb1e36-full_build-www.gyan.dev, ffprobe 4.3.1-2020-11-19-full_build-www.gyan.dev
[debug] Optional libraries: Crypto, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] [Picarto] Extracting URL: https://picarto.tv/DarkCookie/videos/616575
[Picarto] DarkCookie: Downloading JSON metadata
ERROR: [Picarto] DarkCookie: Stream is offline
  File "yt_dlp\extractor\common.py", line 616, in extract
  File "yt_dlp\extractor\picarto.py", line 50, in _real_extract

Fixed by db9743894071760f994f640a4c24358f749a78c0


Install failed

Installing on a 2015 MacBook Pro running Monterey 12.6.2. When I clicked on the zip file, I got 2 files, inspector_test.app & inspector_test 2.app (I followed the instructions explicitly). I clicked on the first one, and it started to install, but quickly got the error msg “Python drive failed to install”. I quit, tried again, same message. I stopped, tried the _2 file & got the same error message. I cannot copy/paste the relevant files from my MBP to this message on my iPad, but will try to do so from the MBP in a separate message. Thanks

Got it. Please upload your log files per #187


use a nb global object

I think I will want to have a single nb global object that contains all variables that are now put in the global space by nbInit. Still not too sure about this.

This means that it instead of having multiple global objects injected in scope by nbInit (eg nbDoc, nbBlock, nbThisFile, nbHomeDir, ...) we have a single nb object with appropriately defined fields (eg nb.doc, nb.block, ...). This would break current internal api, but it would better track what is done inside nbInit and help with customizations.

reflecting on this I think that instead of a new type for a nb global object, I can probably update NbDoc type to incorporate all objects that are injected globally and only change the name of inject object from nbDoc to nb (and add a nbDoc template as an alias for nb to reduce api breaking).

That makes a lot of sense. If we can make it into a single injected variable it would make it easier for users to remember where to change stuff 😄


feat: Added pragma options to speedup the recap

Added the below sqlite pragma options to speed the db recapture:
  PRAGMA journal_mode = OFF;
  PRAGMA synchronous = 0;
  PRAGMA cache_size = -4000;
  PRAGMA locking_mode = EXCLUSIVE;
  PRAGMA temp_store = MEMORY;

Hi @mereacre, can you add some details on the actual speed difference of the PRAGMA options?
E.g. running pv input.pcap | ... before and afterwards and documenting the speed difference.
My gut feeling is that we can probably greatly speed things up by disabling auto-commit, e.g. by doing the following:
BEGIN TRANSACTION;
INSERT ...;
INSERT ...;
INSERT ...;
INSERT ...;
END TRANSACTION;

It should also be a lot safer, since the above PRAGMA options are pretty dangerous, since they might corrupt the connection.sqlite db.

I would first the current settings on the 4GB dataset. Then I can add more options or add the commit functionality. The speed difference is huge 16 secs compared to around 30 minute for the 400 Mb dataset.

These options are only for the recap tool. It has no connection to edgesec. Unless we want to save directly into the edgesec capture db, which I wouldn't advice.
We definitely should test the commit functionality on the actual edgesec capture code, i.e., header middleware.

The best option is I think if I add a new command line argument were the user can append the pragma options as desired.

Yep, that would also work! As long as the default PRAGMA options are safe, I'll be happy with it.

We should first test the current settings on the 4GB dataset

Tested, running the import on 5.5 GB PCAP file on main (bf10bcf81703e24f524bec93f527d6cca90b6b8d) had an ETA of more than 6 days on my laptop.
Using this branch (269923e1bca3ce3b3d9ff0389545cde2e04f4e41) turned this ETA into 10 minutes.
Please be aware that this is using the linux preset, which I believe has no optimizations on by default, that might be one of the reasons slowing things down.

@aloisklink I prefer your PR #348 so I will close this one.


modify docker file to run profiling

Ready to review.
export this right before running the node to have profiling.
LD_PRELOAD=/mangata/libbytehound.so

@gleb-urvanov  this can be merged!


Fix rendering of multiline font images

Was trying to load a font that is spread over multiple lines so I dug into the code and fixed it!
I simplified the loop to reduce nesting and complexity though I think the number of iterations is the same.
Here is an example that breaks:
MOSWHT.TGA.gz
    FONT_MOS_WHT = jo_font_load("FONTS", "MOSWHT.TGA", JO_COLOR_Green, 16, 32, 0,
        " !\"#$%&`()*+,_./\n0123456789:;<=>?\n@ABCDEFGHIJKLMNO\nPQRSTUVWXYZ[\\]^_\n\'abcdefghijklmno\npqrstuvwxyz{|}~¢"
    );

Thanks Simon !

No prob


Consider the usage of rand::rngs::SmallRng

Compare the rand::rngs::SmallRng with the current random package and measure the differences.
Reported form Rust's community discord by @Plecra

use rand::*;
let mut rng = rngs::SmallRng::from_entropy();
b.iter(|| {
    black_box(rng.gen_range(0u128, 10_000))
})

Talks from Rust's discord to move forward in this problem.
PlecraYesterday at 8:58 PM
@PumpkinSeed
pub fn criterion_benchmark(c: &mut Criterion) {
    c.bench_function("rand", |b| { // 44ns
        use rand::*;
        let mut rng = rngs::SmallRng::from_entropy();
        b.iter(|| {
            black_box(rng.gen_range(0u128, 10_000))
        })
    });
    c.bench_function("simplerand", |b| { // 53ns
        let mut rng = simplerand::Rng::new();
        b.iter(|| {
            black_box(rng.rand_range(0, 10_000))
        })
    });
}

Is my test somehow unfair? Since simplerand generates u128s, I got the same out of rand...
The SmallRng is also going to be much less predictable. It uses getrandom to seed itself, and uses a newer algorithm
PumpkinSeedYesterday at 9:20 PM
@Plecra no, your test is right... and that's true... the rand package is way more better than simplerand. the main idea behind the simplerand, that it provides a more easier usage, as I wrote in the readme it's not a replacement for rand. it's only for people who quickly just want a random number.
The main issue with the rand (for me) that it's an "enterprise" level rand package, so someone who quickly need a random number it's really hard to find out that SmallRng also provide the same funtionality.
The simplerand is much easier... It's provide a singleton seeding mechanizom under the hood, and you only have to call the simplerand::rand_range(0, 10_000).
... later
PumpkinSeedToday at 9:44 AM
@Plecra I found out the mistake in your test while I tried tom ove into it in fakeit. So can't use the rngs::SmallRng::from_entropy()  as a singleton, ot it would be a massive pain to set it up. Since the fakeit uses simple function calls I can't maintain a singleton for that and I have to recall it always. Your test should be something like:
pub fn criterion_benchmark(c: &mut Criterion) {
    c.bench_function("rand", |b| { // ??ns
        use rand::*;
        b.iter(|| {
            let mut rng = rngs::SmallRng::from_entropy();
            black_box(rng.gen_range(0u128, 10_000))
        })
    });
    c.bench_function("simplerand", |b| { // ??ns
        b.iter(|| {
            black_box(simplerand.rand_range(0, 10_000))
        })
    });
}

Since the simplerand support the sinleton implementation on-demand you don't have to call the initial setup which takes a huge amount of time.

impl 🇿🇦 for Restioson {}Yesterday at 4:47 PM
woow
thats a nice speedup if you dont need proper CSPRNG lol
Is there a reason that the smallrng is re-initialised in every iteration for rand? @PumpkinSeed
PumpkinSeedYesterday at 4:55 PM
Yes, it's because in my case I use single functions in the github.com/PumpkinSeed/fakeit (just to make more simple generating random data) and the best case would be to have a singleton implementation of the SmallRng where it is a static on the top of the crate. But it's really hard to maintain a static for this, because the underlying implementation doesn't support it properly. The simplerand solve it under the hood and maintain a static in the library.
PlecraYesterday at 4:56 PM
Kinda curious how SmallRng::seed_from_u64(SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_nanos() as u64) fares, since that'll be closer to your seed
Is there a reason you can't just throw the SmallRng into a thread_local?
PumpkinSeedYesterday at 4:56 PM
Didn't try it actually.
PlecraYesterday at 4:58 PM
But yeah, if you really can't bear creating an instance of your RNG, then ig you could use a library for it, and this will be faster than a really slow way of using rand
PumpkinSeedYesterday at 4:59 PM
I'm sure I must learn more about the rand package, because I didn't look into it properly. But until that I can use this one.
PlecraYesterday at 5:01 PM
It's a great first release ^^ and it's definitely worth questioning how complicated rands API gets. All I really want is more documentation - I appreciate it when a crate explains the sacrifices it makes in its implementation

Due to the above conversation I close this issue for now.


add tests for RustSemsimian struct

Nice! Tests pass.
Let's add the coverage (from #59) to the workflow - I'll try to get this done, time permitting.
Then we can merge so this will be available to the other PRs in progress

The basic idea here works - just need to get the coverage reports out of the workflow instance

Realized a fatal flaw in my logic: pushing reports directly to the working branch would trigger another QC run.
Going to try using Codecov like OAK does instead.


[jaeger-v2] fix storage receiver consume traces query params

Which problem is this PR solving?

Fixes #5281 issue for not being able to consume traces

Description of the changes

Added StartTimeMin and StartTimeMax query params with 1h lookback to consumeTraces function.
Added logging to the data receivers with the OTelCol codes below as the references.

https://github.com/open-telemetry/opentelemetry-collector/blob/main/otelcol/unmarshaler.go#L45
https://github.com/open-telemetry/opentelemetry-collector/blob/main/service/telemetry/telemetry.go#L118

How was this change tested?

Tested manually.

Checklist

[x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
[x] I have signed all commits
[x] I have added unit tests for the new functionality
[x] I have run lint and test steps successfully

for jaeger: make lint test
for jaeger-ui: yarn lint and yarn test

Did you also mean to add any additional logging in the datareceiver? Or does it do the logging already and you just weren't giving it a good logger?

Yes, it already has the logging there. This is where the logs have captured the error from Badger's integration test. https://github.com/jaegertracing/jaeger/blob/d887b74a504a8e25e1c4b36661ca42f4050edf5b/cmd/jaeger/internal/integration/receivers/storagereceiver/receiver.go#L74-L78

Yes, it already has the logging there. This is where the logs have captured the error from Badger's integration test.

I was rather thinking of INFO logs as the data receiver polls the storage - it's a test scenario, we don't have to be stingy about logs. E.g. something like

querying for traces, params: ...
retrieved N spans
sleeping till the next retry


Unclear constraint when setting vl

Hi,
the current section 6.2. Constraints on Setting vl has 4 constraints and a 5th item with a summary of properties derived from those 4 constraints.
In particular 5.c says vl ≤ VLMAX. However this might not be true because constraint 2 only says vl ≥ ceil(AVL / 2) if AVL < (2 * VLMAX).
This does not seem enough, and it looks to me we should explicitly state here that vl ≥ ceil(AVL / 2) and vl ≤ VLMAX if AVL < (2 * VLMAX) (or a slightly better formulation like ceil(AVL / 2) ≤ vl ≤ VLMAX if AVL < (2 * VLMAX)).
For instance, if VLMAX=64 and AVL=65, then vl must be larger than 33 but nothing seems to prevent, from the constraints, that vl could be set to, say, 75. It should be obvious that vl can't be set to 75 in this case but this is not a property that follows from the 4 constraints.
Kind regards,

There is probably other text in the chapter that normatively constrains vl <= VLMAX, but even if that's the case, I think your suggestion makes the description clearer.


Adding vCenter session age plugin version 1.0

Raised issue #311 to address a missing functionality to report on vCenter session ages. Added a plugin to report on idle sessions with a configurable maximum age. Also you are able to filter out certain users that are expected to stay connected for longer periods of time.

It would have been nicer to have the IdleMinutes column to display units of measurement dynamically eg. idle for x hour(s), y minute(s) like the vSphere client does. I was too lazy to write the required function at this time. Maybe a better coder than me will be able to add this in no-time. :grin:

Always happy to have more plugins - this one I can definitely use as well :)
$ServiceInstance is already defined in the connection plugin. We should assume that this is valid, so you can get rid of the connectivity checks.
Also, lines 18/19 are a bit redundant and could just be replaced by  $Result | Sort LoginTime
For now, I'll merge this pull and we can fix things up in version 1.1 ;)

Awesome! :+1: I'll be sure to tweak things a bit in a future version. I guess I was a bit too eager to get a working check than writing clean code. :blush:
Also I expect to add even more plugins in the near future. The company I work for had a visit from a VMware PSO engineer for a health check and a lot of those checks can be incorporated in vCheck. Think of things ranging from having the same BIOS version across all hosts in a cluster to having a minimum of 1GB RAM for Windows VMs that have a 10Gbit adapter (VMXNET3).