Allow registering translations without a Validate instance

Fixes Or Enhances
The function Validate.RegisterTranslation(tag string, trans ut.Translator, registerFn RegisterTranslationsFunc, translationFn TranslationFunc) (err error) does 2 things: it adds tags translations to ut.Translator, and register a TranslationFunc for each tag in `Validate.
This method prevents creating new Validate instances using the same ut.Translator, as a second instantiation would try to add again each translation, which would return an ErrConflictingTranslation error, and none of the translations functions would be set.
This PR creates a Validate.RegisterTranslationsFunc(trans ut.Translator, translationsFn map[string]TranslationFunc) function which allows setting the translation functions for each tag without registering with ut.Translator, and also creates a RegisterDefaultTranslationsFunc(trans ut.Translator) (map[string]validator.TranslationFunc, error) for each language which returns a map of the tag=>TranslationFunc, which can be sent on the new Validate method.
The current RegisterDefaultTranslations method for the languages keeps working as today, calling both of the new functions, so it is totally compatible with the current implemenation.
With this change, I can call tf, err := en_translations.RegisterDefaultTranslationsFunc(trans) a single time during initialization, and for each new Validate instance I create, I call validate.RegisterTranslationsFunc(trans, tf), reusing all the language loading.
This initial PR just updates the english language, I will update all others if this is ok.
Make sure that you've checked the boxes below before you submit PR:

[X] Tests exist or have been written that cover this particular change.

@go-playground/validator-maintainers

Coverage: 74.123% (-0.07%) from 74.191% when pulling 8b0d4fa1e1f5c7ccb274615c486b3f8e61bb18f8 on RangelReale:translator-func into 8f07b0368280d9fc70b4ffd3708b31427bbc286d on go-playground:master.


Cannot find AirMapModule

When trying to start the app (react-native run-android), I get the following error:
 RNTest/node_modules/react-native-maps/android/src/main/java/com/airbnb/android/react/maps/AirMapManager.java: 61: error: cannot find symbol             MapsInitializer.initialize(new AirMapModule(this.appContext).getActivity());                                            ^   symbol:   class AirMapModule   location: class AirMapManager
Expected behavior: The app installs and runs on device.
Versions:

<EMAIL_ADDRESS><EMAIL_ADDRESS>(git+https://github.com/lelandrichardson/react-native-maps.git#b1ebd3aaa72442f0aa49be3a59283a8043104a10)
<EMAIL_ADDRESS>
Thank you.

I can confirm that #526 fixes this issue.


Update alert-policies.md

Docs Build status updates of commit 20cd45f:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/compliance/alert-policies.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit 50d7545:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/compliance/alert-policies.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit 593fc46:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/compliance/alert-policies.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit 593fc46:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/compliance/alert-policies.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Bug with your ReadMe File 🤡

You have a typo on language.
- C is a good programming langauge with like 3 features which makes it even better.
+ C is a good programming language with like 3 features which makes it even better.

Cheers mate! I'll fix it.


Add option to advance shows by event: instead of time:

add “event”: to show step instead of “time:” to advance the show based on that event. Guess the show will have to register handlers when it starts / remove them when it ends?

we can do this with conditional events


COMPAT: expand parse_dates keyword in dataframe.read_csv

I had a need for this today,
In [6]: !cat tst.csv
date,a
2015-01-01,1
2015-01-02,2

In [7]: pd.read_csv('tst.csv', index_col='date', parse_dates=True).index.dtype
Out[7]: dtype('<M8[ns]')

In [8]: pd.read_csv('tst.csv', index_col='date', parse_dates=['date']).index.dtype
Out[8]: dtype('<M8[ns]')

In [9]: dd.read_csv('tst.csv', index_col='date', parse_dates=['date']).index.dtype
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-9-c65944acae21> in <module>()
----> 1 dd.read_csv('tst.csv', index_col='date', parse_dates=['date']).index.dtype

...

ValueError: 'date' is not in list

FWIW, I've never been a fan of the parse_dates=True option in In [7], especially when working with MultiIndexes where only one level is datetime (my actual case).
I might be able to carve out some time for it today or early next week.

The problem here might not be parse_dates, but rather index_col.  At the moment there is no way to tell dask.dataframe that a particular column within the csv file is the index or is a sorted index.
To do this well we would want to read a little bit of the csv file at all of the lines where we break on partitions to get the index value at that point.  This is important because we can use these values to populate .divisions which helps us with a lot of parallel logic.
If we're dumb and willing to accept a full read and shuffle then the following would work, but would incur startup time.
In [1]: import dask.dataframe as dd

In [2]: df = dd.read_csv('tst.csv', parse_dates=['date']).set_index('date')

In [3]: df.compute()
Out[3]:
            a
date
2015-01-01  1
2015-01-02  2

In [4]: df.index.compute().dtype
Out[4]: dtype('<M8[ns]')

Parse_dates works well, index_col doesn't on CSV (this is hard).  This issue occurs in other places.  Closing this for now.

Hey Tom,
Just checked in your dataframe , there is a column having name 'date' or not. You have to pass column name list in parse_dates attribute to parse the values of that column in datetime format. Thanks.


XS✔ ◾ Update 6b-tekton.md

❌ Add a description.

@AsfaMumtaz Image is available for testing. docker pull stakater/workshop-exercise:SNAPSHOT-PR-82-f0358bcf


E5+ monolithic main body

Discussed in https://github.com/jon-harper/OmniBox/discussions/43

Originally posted by TheoBromine2022 October 13, 2022

e5+ can do it all in one go to make it seamless. did some mild editing around the accessory card and fan vent area.

I've added a unified base for 0.9.9. This will be next after 0.9.9 is released.

This is looking more doable now.

0.9.10 is too far along ATM to slide this in, particularly with the quad-fan rear body still in testing. Pushing back to 0.9.11.

This is included in the 0.9.11 beta.


Address and public key helpers

This PR adds getAddressFromPublicKey and getPublicKey helper methods.
Fix:

https://github.com/paulmillr/micro-sol-signer/issues/2
https://github.com/paulmillr/micro-sol-signer/issues/3

@mahnunchik yes

I've pushed to the same branch. Readme and examples updated.


Mwpw 142260 utils sync

Describe your specific features or fixes
Resolves: MWPW-142260
Test URLs:

Pre Migration Link: https://adobe.com/express/
Before: https://main--express-milo--adobecom.hlx.page/express/
After: https://MWPW-142260-utils-sync--express-milo--adobecom.hlx.page/express/

Codecov Report
Attention: Patch coverage is 64.70588% with 6 lines in your changes missing coverage. Please review.

Project coverage is 69.18%. Comparing base (3b08799) to head (e6d5b48).

Files with missing lines
Patch %
Lines

express/scripts/utils.js
63.63%
4 Missing :warning:

express/scripts/scripts.js
66.66%
2 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #97      +/-   ##
==========================================
+ Coverage   69.01%   69.18%   +0.16%
==========================================
  Files          61       60       -1
  Lines       10057     9956     -101
==========================================
- Hits         6941     6888      -53
+ Misses       3116     3068      -48

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

🚨 Try these New Features:

Flaky Tests Detection - Detect and resolve failed and flaky tests
JS Bundle Analysis - Avoid shipping oversized bundles


GetX - Obx - Using the "tag" property inside child widgets. Finding separated controller instances automatically.

Versions
Flutter:   1.25.0-4.0.pre
Get:        3.24.0
Running on MacOS: 10.15.5 (19F101)
Problem
I want to use GetX() or Obx() for reactive state management. I have some particular screens (or let's say StatelessWidgets).
I want to differentiate each controller instance from others for that particular view widget.
So, whenever a new instance of that view is created in the tree, I also want it to have a separate Get controller (or some of the controllers). Also, I want all of the reactive children (the child widgets that use Obx or GetX) to share the separate controller.

MainView (instance A)
--  controller (instance a) // <-- Get.put() here with a unique tag: "asd123"
--  --  CustomChildWidget
--  --  --  controller (instance a) // <-- Get.find() here with the same unique tag: "asd123"
--  --  AnotherCustomChildWidget
--  --  --  controller (instance a) // <-- Get.find() here with the same unique tag: "asd123"

//Let's navigate to a new MainView...

MainView (instance B)
--  controller (instance b) // <-- Get.put() here with a unique tag: "xyz789"
--  --  CustomChildWidget
--  --  --  controller (instance b) // <-- Get.find() here with the same unique tag: "xyz789"
--  --  AnotherCustomChildWidget
--  --  --  controller (instance b) // <-- Get.find() here with the same unique tag: "xyz789"

//like so on...

However, the unique tags must be passed down to the children as a parameter. Any automatic way to do that?

What do we have now?
Obviously, we can use the tag property while putting and getting the controller.
What is the problem with that?
Currently, I couldn't manage to find a way rather than passing the tag String as a parameter to each child or passing the controller as a parameter to each child. Otherwise, it can't find the right controller.
What can be done?
I have a strong Provider package background and while using provider, the children's widgets look for the tree (bottom-up) to find an ancestor ChangeNotifierProvider and use it as a controller.
Can the Get.find<Controller>() have a property like autoFind the closest controller instance?
I might miss something but this is what I understood till now.
Reproduce

Past belove code to a single main.dart file.
Run
Tap the blue button to add some items.
Tap on yellow items inside the horizontal ListView. It will increase their counter respectively. (This NOT the problematic part)
Now, tap the red button. It will navigate to a MainView.  It is supposed to have no ListItems. However, it is the. exact same MainView widget because the controller is the same.
Now, in the new route, the second MainView you've just navigated to, tap on yellow items to change the. counter again.
If you go back to the first route since the controller still the same, the changes also occur on yellow items here.

import 'package:flutter/material.dart';
import 'package:get/get.dart';

/* -------------------------------------------------------------------------- */
/*                               READ HERE FIRST                              */
/* -------------------------------------------------------------------------- */
/// How can I use different instances of controllers for each new view (or route)?
///
/// I can use:
/// Controller controller = Get.put(Controller(), tag: "uniqueTag");
///
/// However, then I have to use:
/// Controller controller = Get.find(tag: "uniqueTag");
///
/// inside each child widget class. So I need to pass the exact same "uniqueTag".

/* -------------------------------------------------------------------------- */
/*                                    main                                    */
/* -------------------------------------------------------------------------- */

void main() async {
  runApp(App());
}

/* -------------------------------------------------------------------------- */
/*                                     App                                    */
/* -------------------------------------------------------------------------- */

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      home: MainView(),
    );
  }
}

/* -------------------------------------------------------------------------- */
/*                                  MainView                                  */
/* -------------------------------------------------------------------------- */
/// This is the MainView. Let's think it like a PostScreen or ProfileScreen of Instagram, Twitter etc.
/// I would like to be able to navigate  to the new instance of the MainView.
///
class MainView extends StatelessWidget {
  /// In order to differantiate the controller instances, I have to provide a "tag".
  /// Indeed I want to use Uuid package which generates a random Uuid as a String.
  /// Obviously, any other random string can be used. Like "Random().nextInt(9999);"
  ///
  /// So it may seem that I know the  tag currently is "uniqueTag" but indeed, I won't be knowing it.
  /// Also if I have to pass the tag as a variable, I have to do it for ALL children of the MainView.
  /// Otherwise, I can't .find() the RIGHT controller instance.
  Controller controller = Get.put(Controller(), tag: "uniqueTag");

  @override
  Widget build(BuildContext context) {
    return Obx(() {
      return Scaffold(
        body: Center(
          child: Column(
            children: [
              // Title
              Container(
                padding: EdgeInsets.all(16),
                margin: EdgeInsets.all(16),
                color: Colors.red,
                child: Text("Example usage of GetX / Obx with a \"tag\" property."),
              ),
              // Button
              GestureDetector(
                onTap: () {
                  Get.to(MainView(), preventDuplicates: false);
                },
                child: Container(
                  color: Colors.pink,
                  margin: EdgeInsets.all(16),
                  padding: EdgeInsets.all(16),
                  child: Text("TAP --> Navigate to a new MainView"),
                ),
              ),
              // Button
              GestureDetector(
                onTap: () {
                  controller.addItemToList();
                },
                child: Container(
                  color: Colors.blue,
                  margin: EdgeInsets.all(16),
                  padding: EdgeInsets.all(16),
                  child: Text("TAP --> Add item to list"),
                ),
              ),
              // ListView
              Container(
                height: 200,
                child: ListView.builder(
                  scrollDirection: Axis.horizontal,
                  itemCount: controller.someList.length,
                  itemBuilder: (_, i) {
                    return ListItemWidget(index: i);
                  },
                ),
              ),
            ],
          ),
        ),
      );
    });
  }
}

/* -------------------------------------------------------------------------- */
/*                               ListItemWidget                               */
/* -------------------------------------------------------------------------- */
/// ListItemWidget: This widget used in the ListView.builder()
/// When a new item added to the list (from Controller),
/// a new ListItemWidget is also created into the horizontal ListView.
///
/// ListItemWidget shows the index and respective counter of the each item.
/// When pressed (or tapped), it increases only the respective counter of the particular ListItemWidget.
class ListItemWidget extends StatelessWidget {
  final int index;
  ListItemWidget({this.index});

  /// The problematic part for scaling my app. When putting this controller for the first time
  /// inside each instance of MainView, I have to use a unique tag.
  /// Indeed I want to use Uuid package which generates a random Uuid as a String.
  /// Obviously, any other random string can be used. Like "Random().nextInt(9999);"
  ///
  /// However, ListItemWidget doesn't know what the "tag" is. I mean the "uniqueTag"
  /// would be something like "ak38-sldjaf-9r84j-flfl" kind of Uuid, in real usage.
  Controller controller = Get.find(tag: "uniqueTag");
  // Controller controller = Get.find();

  /// Controller controller = Get.find();
  /// If I was using it like that (without a "tag"),
  /// it will give an error because there isn't a controller to find.
  ///
  /// So if I remove the "tag" while putting the controller (instantiating inside the MainView) it would work.
  /// However, this time, when navigating to a new MainView,
  /// all of the routes will share the same controller instance. This is "unwanted" for some of my use cases.

  @override
  Widget build(BuildContext context) {
    // Obx used in order to make it reactive.
    return Obx(() {
      return GestureDetector(
        behavior: HitTestBehavior.translucent,
        onTap: () {
          controller.increaseCounterAtIndex(index);
        },
        child: Container(
          margin: EdgeInsets.all(16),
          height: 200,
          color: Colors.yellow,
          child: Column(
            children: [
              Container(
                padding: EdgeInsets.all(12),
                child: Text("This is a ListItemWidget with index: $index"),
              ),
              Container(
                padding: EdgeInsets.all(12),
                child: Text("Counter of this item: " + controller.someList[index].value.toString()),
              ),
              Container(
                padding: EdgeInsets.all(12),
                child: Text("TAP to increase this counter"),
              ),
            ],
          ),
        ),
      );
    });
  }
}

/* -------------------------------------------------------------------------- */
/*                                 Controller                                 */
/* -------------------------------------------------------------------------- */

///This is the plain simple controller class. No bindings were used.
class Controller extends GetxController {
  var someList = <RxInt>[].obs;

// Adds a new list item.
  addItemToList() {
    someList.add(0.obs);
  }

// Increases the respective counter of the particular  item.
  increaseCounterAtIndex(int index) {
    someList[index].value++;
  }
}

@jonataslaw

Proof of Concept
@jonataslaw
I made a PoC in order to show you that if we can access the ancestor's controller or just the uniqueTag,
we can make Get.find() to find the separated instance automatically.
What I Added?
I thought that I can use the Provider package with GetX. Provider just helps me to create a separate block, a partition to let a main widget to live inside.
As I said, Get.find(tag: "this tag has to be passed down for every children ");
Reproduce

So I did the belove code. You have to add these to pubspec.yaml:
get: ^3.24.0
provider: ^4.3.2+3
uuid: ^2.2.2

Copy all the code belove and paste it into a single main.dart file. It should run.

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:uuid/uuid.dart';

/* -------------------------------------------------------------------------- */
/*                                    main                                    */
/* -------------------------------------------------------------------------- */

void main() async {
  runApp(App());
}

/* -------------------------------------------------------------------------- */
/*                                     App                                    */
/* -------------------------------------------------------------------------- */

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      home: MainView(),
    );
  }
}

/* -------------------------------------------------------------------------- */
/*                                   TagPVD                                   */
/* -------------------------------------------------------------------------- */

class TagPVD with ChangeNotifier {
  TagPVD() {
    init();
  }

  /// Generates a random uuid on init.
  init() => tag = Uuid().v1();
  String tag = "";
}

/* -------------------------------------------------------------------------- */
/*                              InstanceSeparator                             */
/* -------------------------------------------------------------------------- */
/// InstanceSeparator basically creates a new pair of ChangeNotifierProvider-Consumer
/// every time a new instance of MainView is created in the widget tree.
/// This new pair uses the TagPVD (TagProvider, shortened).
///
/// TagPVD has an init method inside of its  constructor. It basically generates a new Uuid String  and set as the tag variable.
/// So, every children of the InstanceSeparator widget have access to the TagPVD respectively.
class InstanceSeparator extends StatelessWidget {
  final Function(String uniqueTag) builder;

  InstanceSeparator({
    Key key,
    @required this.builder,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider<TagPVD>(
      create: (context) => TagPVD(),
      child: Consumer<TagPVD>(
        builder: (context, tagPVD, _) {
          return builder(tagPVD.tag); // This is the builder property of InstanceSeparator. Not related to provider. We will use this
        },
      ),
    );
  }
}

/* -------------------------------------------------------------------------- */
/*                                  MainView                                  */
/* -------------------------------------------------------------------------- */
class MainView extends StatelessWidget {
  /// The "controller" variable is defined here. But haven't set it to anything yet. DON'T make it final.
  /// Why here? Because I want to access "controller" variable inside custom methods of this MainView class.
  /// I generally need some class methods. They improve readability too.
  /// For ex: buildList(), buildHeader(), buildProfilePicture()
  /// If I didn't define the "controller" variable here, then I would have to pass it to the methods(functions).
  /// For ex: buildList(controller), buildHeader(controller), buildProfilePicture(controller)
  Controller controller;

  @override
  Widget build(BuildContext context) {
    /// Instance separator wraps all of the children of MainView.
    return InstanceSeparator(
      builder: (uniqueTag) {
        /// the "controller" variables are set inside here. We can grab  the "uniqueTag".
        /// This "uniqueTag" parameter is shared down to the widget tree.
        /// Child widgets can look for this parameter up in the tree because the provider indeed an InheritedWidget.
        controller = Get.put(Controller(), tag: uniqueTag);

        return Obx(() {
          return Scaffold(
            body: Center(
              child: Column(
                children: [
                  // Title
                  Container(
                    padding: EdgeInsets.all(16),
                    margin: EdgeInsets.all(16),
                    color: Colors.red,
                    child: Text("Example usage of GetX / Obx with a \"tag\" property."),
                  ),

                  /// Button
                  /// Navigating to a new screen, in our case a new MainView.
                  /// So the new MainView will have a separate instance of Get controller.
                  /// Also, all of its children will share the same controller  with the help of InstanceSeparator.
                  GestureDetector(
                    onTap: () {
                      Get.to(MainView(), preventDuplicates: false);
                    },
                    child: Container(
                      color: Colors.pink,
                      margin: EdgeInsets.all(16),
                      padding: EdgeInsets.all(16),
                      child: Text("TAP --> Navigate to a new MainView"),
                    ),
                  ),
                  // Button
                  GestureDetector(
                    onTap: () {
                      controller.addItemToList();
                    },
                    child: Container(
                      color: Colors.blue,
                      margin: EdgeInsets.all(16),
                      padding: EdgeInsets.all(16),
                      child: Text("TAP --> Add item to list"),
                    ),
                  ),
                  // ListView with builder
                  Container(
                    height: 200,
                    child: ListView.builder(
                      scrollDirection: Axis.horizontal,
                      itemCount: controller.itemList.length,
                      itemBuilder: (_, i) {
                        return ListItemWidget(index: i);
                      },
                    ),
                  ),
                  // ListView with a class method. Just for demonstration.
                  Container(
                    height: 200,
                    child: ListView(
                      scrollDirection: Axis.horizontal,
                      children: buildListView(),
                    ),
                  ),
                ],
              ),
            ),
          );
        });
      },
    );
  }

  /// Obviously, this method is not needed. It is here just because of demonstration purposes.
  /// Here we use the "controller" without calling it as a parameter inside -->  buildList() method.
  /// Because at the beginning of the MainView class, we already defined it as --> Controller controller;
  /// It might be confusing but if you use custom methods inside a widget class like me,
  /// it is better to define them first without setting to anything.
  List<Widget> buildListView() {
    List<Widget> wl = [];
    Widget w;

    /// Reminder: We set the "controller" variable inside --> InstanceSeparator  --> controller = Get.put(Controller(), tag: uniqueTag);
    for (var i = 0; i < controller.itemList.length; i++) {
      w = ListItemWidget(index: i);
      wl.add(w);
    }
    return wl;
  }
}

/* -------------------------------------------------------------------------- */
/*                               ListItemWidget                               */
/* -------------------------------------------------------------------------- */
class ListItemWidget extends StatelessWidget {
  final int index;
  ListItemWidget({
    this.index,
  });

  /// Again, in order to make "controller"  and "tagPVD" variables available inside custom class methods,
  /// we define them here. (not final). We will set them later.
  Controller controller;
  TagPVD tagPVD;

  @override
  Widget build(BuildContext context) {
    /// As a restriction of Provider package, we have to use "context".
    /// So I have to set "tagPVD" just here inside main build() method.
    /// On the other hand, Provider let us access to the "RIGHT" instance just by looking for the tree above.
    tagPVD = Provider.of<TagPVD>(context);

    /// Since we now have "tagPVD", we can get the "tag" property of it. Which is the RIGHT String for us to use.
    controller = Get.find(tag: tagPVD.tag);

    /// The rest is the same as regular usage of Obx(()=>Widget());
    return Obx(() {
      return GestureDetector(
        behavior: HitTestBehavior.translucent,
        onTap: () {
          controller.increaseCounterAtIndex(index);
        },
        child: Container(
          margin: EdgeInsets.all(16),
          height: 200,
          color: Colors.yellow,
          child: Column(
            children: [
              Container(
                padding: EdgeInsets.all(12),
                child: Text("This is a ListItemWidget with index: $index"),
              ),
              buildCounterSection(),
              Container(
                padding: EdgeInsets.all(12),
                child: Text("TAP to increase this counter"),
              ),
            ],
          ),
        ),
      );
    });
  }

  /// Let's use a method. We don't have to pass the "controller". --> Widget buildCounterSection(Controller controller) {}
  Widget buildCounterSection() {
    return Container(
      padding: EdgeInsets.all(12),
      child: Text("Counter of this item: " + controller.itemList[index].value.toString()),
    );
  }
}

/* -------------------------------------------------------------------------- */
/*                                 Controller                                 */
/* -------------------------------------------------------------------------- */
class Controller extends GetxController {
  var itemList = <RxInt>[].obs;

  addItemToList() {
    itemList.add(0.obs);
  }

  increaseCounterAtIndex(int index) {
    itemList[index].value++;
  }
}

Isnt this what GetWidget is for?

Isnt this what GetWidget is for?

Hey how are you Brian! You're doing well with the Iris app.
I really want to now if the GetWidget is for this situation.
I need a minimal sample code showing me how in order to tell it because for the last 4 days, I've been researching it. (Also the latest update). I really don't care, if it can be already done what GetX has, I'm in and want to use that.
Btw, here in my second comment, I showed how I can do it with the help of Provider. It just separates a section of the widget tree and generates a unique tag.
So all the children in that separated section (or block) of widget tree can grab that unique tag.
As long as a child widget has the right tag, I can then use it to find any amount of different controllers. So the actual state management is not related to Provider but is related to GetX.
ControllerClass1 cc1 = Get.find(tag: uniqueInstanceTagFromProvider)
This works for not only ControllerClass1 but any controller you want.
I still can't reproduce the same behavior with GetWidget. I think that even if it works, for each controller class, I have to wrap GetWidget inside of each other.

GetWidget<ControllerClass1>(
...
... ...GetWidget<ControllerClass2>(

Proof of Concept
@jonataslaw
I made a PoC in order to show you that if we can access the ancestor's controller or just the uniqueTag, we can make Get.find() to find the separated instance automatically.
What I Added?
I thought that I can use the Provider package with GetX. Provider just helps me to create a separate block, a partition to let a main widget to live inside.
As I said, Get.find(tag: "this tag has to be passed down for every children ");
Reproduce

So I did the belove code. You have to add these to pubspec.yaml:
get: ^3.24.0
provider: ^4.3.2+3
uuid: ^2.2.2
Copy all the code belove and paste it into a single main.dart file. It should run.

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:uuid/uuid.dart';

/* -------------------------------------------------------------------------- */
/*                                    main                                    */
/* -------------------------------------------------------------------------- */

void main() async {
  runApp(App());
}

/* -------------------------------------------------------------------------- */
/*                                     App                                    */
/* -------------------------------------------------------------------------- */

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      home: MainView(),
    );
  }
}

/* -------------------------------------------------------------------------- */
/*                                   TagPVD                                   */
/* -------------------------------------------------------------------------- */

class TagPVD with ChangeNotifier {
  TagPVD() {
    init();
  }

  /// Generates a random uuid on init.
  init() => tag = Uuid().v1();
  String tag = "";
}

/* -------------------------------------------------------------------------- */
/*                              InstanceSeparator                             */
/* -------------------------------------------------------------------------- */
/// InstanceSeparator basically creates a new pair of ChangeNotifierProvider-Consumer
/// every time a new instance of MainView is created in the widget tree.
/// This new pair uses the TagPVD (TagProvider, shortened).
///
/// TagPVD has an init method inside of its  constructor. It basically generates a new Uuid String  and set as the tag variable.
/// So, every children of the InstanceSeparator widget have access to the TagPVD respectively.
class InstanceSeparator extends StatelessWidget {
  final Function(String uniqueTag) builder;

  InstanceSeparator({
    Key key,
    @required this.builder,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider<TagPVD>(
      create: (context) => TagPVD(),
      child: Consumer<TagPVD>(
        builder: (context, tagPVD, _) {
          return builder(tagPVD.tag); // This is the builder property of InstanceSeparator. Not related to provider. We will use this
        },
      ),
    );
  }
}

/* -------------------------------------------------------------------------- */
/*                                  MainView                                  */
/* -------------------------------------------------------------------------- */
class MainView extends StatelessWidget {
  /// The "controller" variable is defined here. But haven't set it to anything yet. DON'T make it final.
  /// Why here? Because I want to access "controller" variable inside custom methods of this MainView class.
  /// I generally need some class methods. They improve readability too.
  /// For ex: buildList(), buildHeader(), buildProfilePicture()
  /// If I didn't define the "controller" variable here, then I would have to pass it to the methods(functions).
  /// For ex: buildList(controller), buildHeader(controller), buildProfilePicture(controller)
  Controller controller;

  @override
  Widget build(BuildContext context) {
    /// Instance separator wraps all of the children of MainView.
    return InstanceSeparator(
      builder: (uniqueTag) {
        /// the "controller" variables are set inside here. We can grab  the "uniqueTag".
        /// This "uniqueTag" parameter is shared down to the widget tree.
        /// Child widgets can look for this parameter up in the tree because the provider indeed an InheritedWidget.
        controller = Get.put(Controller(), tag: uniqueTag);

        return Obx(() {
          return Scaffold(
            body: Center(
              child: Column(
                children: [
                  // Title
                  Container(
                    padding: EdgeInsets.all(16),
                    margin: EdgeInsets.all(16),
                    color: Colors.red,
                    child: Text("Example usage of GetX / Obx with a \"tag\" property."),
                  ),

                  /// Button
                  /// Navigating to a new screen, in our case a new MainView.
                  /// So the new MainView will have a separate instance of Get controller.
                  /// Also, all of its children will share the same controller  with the help of InstanceSeparator.
                  GestureDetector(
                    onTap: () {
                      Get.to(MainView(), preventDuplicates: false);
                    },
                    child: Container(
                      color: Colors.pink,
                      margin: EdgeInsets.all(16),
                      padding: EdgeInsets.all(16),
                      child: Text("TAP --> Navigate to a new MainView"),
                    ),
                  ),
                  // Button
                  GestureDetector(
                    onTap: () {
                      controller.addItemToList();
                    },
                    child: Container(
                      color: Colors.blue,
                      margin: EdgeInsets.all(16),
                      padding: EdgeInsets.all(16),
                      child: Text("TAP --> Add item to list"),
                    ),
                  ),
                  // ListView with builder
                  Container(
                    height: 200,
                    child: ListView.builder(
                      scrollDirection: Axis.horizontal,
                      itemCount: controller.itemList.length,
                      itemBuilder: (_, i) {
                        return ListItemWidget(index: i);
                      },
                    ),
                  ),
                  // ListView with a class method. Just for demonstration.
                  Container(
                    height: 200,
                    child: ListView(
                      scrollDirection: Axis.horizontal,
                      children: buildListView(),
                    ),
                  ),
                ],
              ),
            ),
          );
        });
      },
    );
  }

  /// Obviously, this method is not needed. It is here just because of demonstration purposes.
  /// Here we use the "controller" without calling it as a parameter inside -->  buildList() method.
  /// Because at the beginning of the MainView class, we already defined it as --> Controller controller;
  /// It might be confusing but if you use custom methods inside a widget class like me,
  /// it is better to define them first without setting to anything.
  List<Widget> buildListView() {
    List<Widget> wl = [];
    Widget w;

    /// Reminder: We set the "controller" variable inside --> InstanceSeparator  --> controller = Get.put(Controller(), tag: uniqueTag);
    for (var i = 0; i < controller.itemList.length; i++) {
      w = ListItemWidget(index: i);
      wl.add(w);
    }
    return wl;
  }
}

/* -------------------------------------------------------------------------- */
/*                               ListItemWidget                               */
/* -------------------------------------------------------------------------- */
class ListItemWidget extends StatelessWidget {
  final int index;
  ListItemWidget({
    this.index,
  });

  /// Again, in order to make "controller"  and "tagPVD" variables available inside custom class methods,
  /// we define them here. (not final). We will set them later.
  Controller controller;
  TagPVD tagPVD;

  @override
  Widget build(BuildContext context) {
    /// As a restriction of Provider package, we have to use "context".
    /// So I have to set "tagPVD" just here inside main build() method.
    /// On the other hand, Provider let us access to the "RIGHT" instance just by looking for the tree above.
    tagPVD = Provider.of<TagPVD>(context);

    /// Since we now have "tagPVD", we can get the "tag" property of it. Which is the RIGHT String for us to use.
    controller = Get.find(tag: tagPVD.tag);

    /// The rest is the same as regular usage of Obx(()=>Widget());
    return Obx(() {
      return GestureDetector(
        behavior: HitTestBehavior.translucent,
        onTap: () {
          controller.increaseCounterAtIndex(index);
        },
        child: Container(
          margin: EdgeInsets.all(16),
          height: 200,
          color: Colors.yellow,
          child: Column(
            children: [
              Container(
                padding: EdgeInsets.all(12),
                child: Text("This is a ListItemWidget with index: $index"),
              ),
              buildCounterSection(),
              Container(
                padding: EdgeInsets.all(12),
                child: Text("TAP to increase this counter"),
              ),
            ],
          ),
        ),
      );
    });
  }

  /// Let's use a method. We don't have to pass the "controller". --> Widget buildCounterSection(Controller controller) {}
  Widget buildCounterSection() {
    return Container(
      padding: EdgeInsets.all(12),
      child: Text("Counter of this item: " + controller.itemList[index].value.toString()),
    );
  }
}

/* -------------------------------------------------------------------------- */
/*                                 Controller                                 */
/* -------------------------------------------------------------------------- */
class Controller extends GetxController {
  var itemList = <RxInt>[].obs;

  addItemToList() {
    itemList.add(0.obs);
  }

  increaseCounterAtIndex(int index) {
    itemList[index].value++;
  }
}

d


Create a Docker image to bundle both stoa and a full node

Dockerfile can produce Stoa dockerImage, which is based on agora dockerImage.
Used supervisord to multiProcessing run the Stoa service and agora Fullnode
Relates to #28

@Geod24 Could you Review to see if it's all right

@Geod24 ping

Is there anything lacking in this PR?

The Agora config file shouldn't be there

The Agora config file shouldn't be there

Yes, It don't need it, but what should I do with the file for example?

The Agora setup file has been deleted.
Also, I modified the README.md to match.

Ready for review.


Cannot require bytenode jsc file in electron

Hi. Please help me in this case. I'm using electron-vuejs template from this https://github.com/SimulatedGREG/electron-vue
This project, it didn't use command electron ., but using a js file to start electron. You can check in package.json (https://github.com/SimulatedGREG/electron-vue/blob/master/template/package.json)
"dev": "node .electron-vue/dev-runner.js",
When I require bytenode jsc file in this js file (dev-runner.js), it works.
But when I require jsc file in src/main/index.js , it show error

ERROR in ./src/main/config.jsc 1:0
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
@ ./src/main/index.js 7:13-36
@ multi ./src/main/index.dev.js ./src/main/index.js

Can you please check it ?

I will look into it and get back to you.

I will look into it and get back to you.

The dev-runner.js file will just spawn the electron process. So you must require bytenode inside src/main/index.js.
Put require('bytenode') at the top of that file and it should work.

The dev-runner.js file will just spawn the electron process. So you must require bytenode inside src/main/index.js.
Put require('bytenode') at the top of that file and it should work.

As I mentioned in the question
But when I require jsc file in src/main/index.js , it show error

ERROR in ./src/main/config.jsc 1:0
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
@ ./src/main/index.js 7:13-36
@ multi ./src/main/index.dev.js ./src/main/index.js

Did you try it ?
I create a config.js file like this
module.exports = {
	a: "1"
}

Then I insert these code at top of src/main/index.js
require('bytenode')
bytenode.compileFile('./src/main/config.js', './src/main/config.jsc');
require('./config.jsc');
console.log(config)

And then I run npm run dev, it show error: https://i.imgur.com/qfjdbr2.png
Please check

As I mentioned in the question
But when I require jsc file in src/main/index.js , it show error

ERROR in ./src/main/config.jsc 1:0
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
@ ./src/main/index.js 7:13-36
@ multi ./src/main/index.dev.js ./src/main/index.js

Did you try it ?
I create a config.js file like this
module.exports = {
	a: "1"
}

Then I insert these code at top of src/main/index.js
require('bytenode')
bytenode.compileFile('./src/main/config.js', './src/main/config.jsc');
require('./config.jsc');
console.log(config)

And then I run npm run dev, it show error: https://i.imgur.com/qfjdbr2.png
Please check

Oh. That seems related to webpack, which I don't have any experience with.
However, I'll look into it.

Oh. That seems related to webpack, which I don't have any experience with.
However, I'll look into it.

The project uses webpack to bundle everything in ./dist/electron/main.js when you run npm run dev. This is far beyond bytenode  and I really don't have much experience with webpack to deal with its peculiarities and edge cases.
My advice is to start figuring out how to protect your app after packaging and packing it. You don't have to protect it while in development stage. The final product will have a clearer structure and less complex setup.
Also, any .jsc files that will be generated in the development stage are NOT guaranteed to work in production.

The project uses webpack to bundle everything in ./dist/electron/main.js when you run npm run dev. This is far beyond bytenode  and I really don't have much experience with webpack to deal with its peculiarities and edge cases.
My advice is to start figuring out how to protect your app after packaging and packing it. You don't have to protect it while in development stage. The final product will have a clearer structure and less complex setup.
Also, any .jsc files that will be generated in the development stage are NOT guaranteed to work in production.

thank you

thank you

if i want to protect it in production,what should i do in this electron-vue,i hope you can answer

if i want to protect it in production,what should i do in this electron-vue,i hope you can answer

Hey there,
I solved the same problem by using __non_webpack_require__(fileLocation) in the main process or require('electron').remote.require(fileLocation) in the render process (Vue.js).
Example main.js
bytenode.compileFile({
    filename: 'src/secret.js',
    output: 'public/secret.jsc',
    compileAsModule: true
});
const fileLocation = path.join(__static, 'secret.jsc'); /* global __static */
const secretFunctions = __non_webpack_require__(fileLocation);

Example HelloWorld.vue
<template>

Simple Login Example

        Username
<input type="text" v-model="username" />

        Password
<input type="password" v-model="password" />

        <button @click="login">Login</button>

Valid user: {{ success }}

</template>


'devenv container' is not showing help output

Describe the bug
devenv container command is not showing help output for subcommands similar as for example devenv processes command does.
To reproduce

Run devenv container command

devenv container
<NO OUTPUT>

Run devenv processes (to see correct behaviour)

devenv processes
Start or stop processes.

Usage: devenv processes <COMMAND>

Commands:
  up
  down
  help  Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

Version
devenv 1.0.2 (x86_64-linux)

@domenkozar , unfortunately, even with https://github.com/cachix/devenv/commit/2733e2744aeb8390575f9c068e18aae718ae8d06 it still doesn't print any help.
With latest version built from main:
nix build .\#devenv

./result/bin/devenv container
<NO OUTPUT>

Pushed a fix:
❯ ./target/debug/devenv container
Build, copy, or run a container. https://devenv.sh/containers/

Usage: devenv container [OPTIONS] [COMMAND]

Commands:
  build  Build a container.
  copy   Copy a container.
  run    Run a container.
  help   Print this message or the help of the given subcommand(s)

Options:
  -r, --registry <REGISTRY>
  -c, --copy-args <COPY_ARGS>
  -h, --help                   Print help

Works now ! Thanks.


cleanup: removed triggerv2 downgrade + postinstall logic

With release 1.14 out, there is no longer a need to keep the triggerv2 downgrade logic, as downgrading to the previous version still leaves triggerv2 in use.

Proposed Changes

Remove the triggerv2 downgrade logic
Remove the triggerv2 post install logic

/cc @pierDipi @creydr

/cc @Leo6Leo


Isolated device factory

Fixes #483
This is a re-implementation of #597 isolated to just the changes necessary to implement the @device_factory() decorator and have functions decorated with that decorator picked up by make_all_devices: respecting any configuration passed into the decorator.
NB: this is also required for blueapi #647
Instructions to reviewer on how to test:

System test the i22 beamline to ensure that devices are instantiated, connected and named appropriately.

Checks for reviewer

[ ] Would the PR title make sense to a scientist on a set of release notes
[ ] If a new device has been added does it follow the standards
[ ] If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly
[ ] Have the connection tests for the relevant beamline(s) been run via dodal connect ${BEAMLINE}

I don't necessarily expect parallel connect to be implemented here but do we have tickets for achieving it?

I don't necessarily expect parallel connect to be implemented here but do we have tickets for achieving it?

https://github.com/DiamondLightSource/blueapi/issues/440

Assuming these are all desired behavior?

@coretl for comments?

* A device gets renamed if called again with a different name

A device can be renamed after having a name, so I think it should be allowed. Currently the device_factory name is only used if the device is currently unnamed.

* If we call with `connect=False, mock=True` we can then call again with `mock=False`

Only when connect is called is the device being mock or not considered. Calling with connect=False, mock=True then later connecting with mock=False would connect to the real signal backend.

Additionally I think there's a potential pitfall in:
dcm(mock=True)
.... # Lots of code
dcm() # This now fails because it tries to turn the cached mock one into a real one

Ophyd-async throws an exception if you try and connect a 2nd time with a different value of mock.
. I will amend to cache the value of mock after connect has been called at least one, and defer to it rather than the mock value set up with the decorator, so that we can still try and explicitly connect to [non-]mock, but will throw the exception only when we do so.

I will amend to cache the value of mock after connect has been called at least one, and defer to it rather than the mock value set up with the decorator, so that we can still try and explicitly connect to [non-]mock, but will throw the exception only when we do so.

I'm not even sure that is the best answer either.  I'm not sure there's a good solution here. I think the best thing to do is just document that calling the factory multiple times can lead to odd behavior and is not recommended.

I agree there is no good solution to be honest, caching singletons is hard to do without some hidden magic. Maybe add more logging (but in a separate change).


0.64.0 layouts/partials/post/excerpt.html displays images twice and in some cases too big

Describe the bug
The list view shows strange behaviour with the new layouts/partials/post/excerpt.html
Some preview images have the correct size, and while usually there should be only the posts text, the image is displayed a second time. With other posts the preview image is not small but huge, plus it gets displayed a second time.
Screenshots
(author removed screenshots)
expecteds behaviour
(author removed screenshots)
Hugo version:
hugo v0.92.0-B3549403+extended linux/amd64 BuildDate=2022-01-12T08:23:18Z VendorInfo=gohugoio

@chrisrummel That is because v0.64.0 changed the summaries' selection order, see also https://github.com/razonyang/hugo-theme-bootstrap/issues/341#issuecomment-1013617239 last point. But it isn't  backward compatibility.
The issue is about the summary format, plain text or HTML. We can do this via summary parameter or manual splitting(<!--more-->), but it may be dull if there are a lot of posts. So I prefer defining a new parameter(TBD, may be post.plainifyExcerpt) that allow users to pick up the format.
@sagarbehere @chrisrummel What do you think?

@razonyang I see, the cause is a year old bug in hugo and there is nothing I could do against it besides copying excerpt.html from themes to local and modifying it to remove all HTML?
post.plainifyExcerpt sounds reasonable then, I guess.

I tested
{{- else -}}   {{- $readMore = false -}}   {{- $maxLength := default 320 $.Site.Params.post.excerptMaxLength -}}   {{- $content = .Content | plainify | truncate $maxLength $readMoreButton -}}
but that gives me unrendered htmlspecialchars.

I tested {{- else -}}. {{- $readMore = false -}}. {{- $maxLength := default 320 $.Site.Params.post.excerptMaxLength -}}. {{- $content = .Content | plainify | truncate $maxLength $readMoreButton -}} but that gives me unrendered htmlspecialchars.

Use .Plain instead of .Content may works.

Use .Plain instead of .Content may works.

No, sadly it doesn't work.

@chrisrummel

Is this the issue you are getting when using plainify? If so, perhaps using htmlUnescape and safeHTML would help?
Another thing I can think of is just to use .Summary instead of .Content. That is how the HBS template originally did it. But this would mean that

You'll need to override the templates layout/partials/post/excerpt.html in your own site root dir
When this Hugo issue is fixed, this will stop working

Re: getting two images instead of one: Are you also using the images frontmatter variable? I was getting two images when I was using that variable AND the summary was not stripped of HTML

@razonyang I think post.plainifyExcerpt makes sense for those users who really do want to strip the HTML/Images/formatting from their summaries.

@chrisrummel Could you please provide an example of content and expected screenshot for testing? Because you removed the screenshots, I can't test it by myself. You can send it to me by e-mail.
I also remember that there is a table(not plain text) inside a summary shown in the screenshot you posted, but I'm not sure if that is expected.

@razonyang You can find a link to my site in the USERS.md and have a look at it.

Closed by #351.
@sagarbehere FYI, the post.plainifyExcerpt was set as true by default, so that users won't be confused after upgrading the theme to v0.64.0 or above.

@razonyang The htmlUnescape seems to have an unwanted sideeffect - the printf "<p>%s</p>" paragraph-tags show in the excerpt.

@chrisrummel It should be fixed by f429db8

Indeed it is. Thanks a lot!


Title: 400 Error when Connecting Claude Dev VS Extension to Local Ollama on Model: deepseek-coder-v2:16b

Issue:
I am encountering a 400 Bad Request error when attempting to connect the Claude Dev VS Code extension to the local Ollama server using the deepseek-coder-v2:16b model. The error prevents the extension from functioning properly when using this specific model.
Steps to Reproduce:
Install and configure the Claude Dev extension in VS Code.
Set up the local Ollama server and ensure it is running.
Select the deepseek-coder-v2:16b model within the Claude Dev extension.
Attempt to connect to the local Ollama server.

Expected Behavior:
The Claude Dev extension should connect to the local Ollama server and allow interaction with the deepseek-coder-v2:16b model without error.
Actual Behavior:
The extension returns a 400 Bad Request error, preventing successful interaction with the model.

Take off the :16b at the end and try again. I did that with llama3.1:8b, just removed it and it worked.
But it is so sensitive to the names of the models. I wish it could find your ollama models and list them like Continue does. Devs?

Take off the :16b at the end and try again. I did that with llama3.1:8b, just removed it and it worked. But it is so sensitive to the names of the models. I wish it could find your ollama models and list them like Continue does. Devs?
https://github.com/saoudrizwan/claude-dev/issues/248
same model,but my project tips
Claude is having trouble...
This may indicate a failure in his thought process or inability to use a tool properly, which can be mitigated with some user guidance (e.g. "let's try breaking this large file down into smaller files").

@rushter777 claude dev now lists models underneath the model id textfield, pls lmk if it works for you!

Running v1.7.0, I am also encountering a 400 Bad Request error when attempting to connect the Claude Dev VS Code extension to the a Ollama server on the networking using any models. It does display all my models underneath the model id textfield. So, obviously it is able to connect to the server and found all the models. But selecting any models, ex: llama3.1:latest or llama3.1, I get: 400 llama3.1:latest does not support tools.

@waiwong614 will look into this ASAP https://github.com/saoudrizwan/claude-dev/issues/330

I am facing the same issue; it's not working with the Ollama local model.


Updated Feature: Activity-based Incident Cost Model

Updated Feature: Incident Cost Model
Our Incident Cost Model is a feature that enables teams to estimate incident response cost for each incident. This new update allows users to opt in to create and use personalized cost calculations for each incident based on participant activity.
If no cost model is assigned to an incident, the default classic cost model will be used. See Incident Cost Type.

Key Features
Customizable Cost Models
Users have the flexibility to define their unique cost models based on their organization's workflow and tools. This customization can be tailored to each incident, providing a versitile approach to cost calculation. The cost model for an incident can be changed at any time during its lifespan. All participant activity costs moving forward will be calculated using the new cost model.
Plugin-Based Tracking
Users can track costs from their existing tools by using our plugin-based tracking system. Users have the flexibility to select which plugins and specific plugin events they want to track, offering a targeted approach to cost calculation.
Effort Assignment
For each tracked activity, users can assign a quantifiable measure of effort, represented in seconds of work time. This feature provides a more accurate representation of the cost of an incident.
Incident Cost Calculation
Incident cost calculation is based on the cost model and effort assignment for each tracked participant activity. This helps in understanding resource utilization and cost of an incident.

This is extremely cool. Here's some questions I had when I read the PR description:

The cost model for an incident can be changed at any time during its lifespan.

Will costs be recalculated if the model changes? If so, will the old cost be saved and the recalculation made apparent to the user when they change the model?

Users can track costs from their existing tools by using our plugin-based tracking system.

It'd be helpful as an end user to know which plugins and events are available. I think it'd be great to include it in the documentation. From a UX perspective, I think it would be helpful to surface which plugins are used in a cost model in the cost model table. This would make it easier to visually distinguish one cost model from another in the table when you scan the list. Probably a v2 UI/UX thing.

For each tracked activity, users can assign a quantifiable measure of effort, represented in seconds of work time.

Do we surface the outcome of these calculations on example incidents when users are developing/editing a cost model? I think this be a great UX addition to guide the user as they are creating a new cost model to understand how their inputs will affect the outputs. This might be a v2 thing though.
Great work on this! Please let me know when it's ready for review and I can take a look if you'd like.

Will costs be recalculated if the model changes? If so, will the old cost be saved and the recalculation made apparent to the user when they change the model?

The costs will not be recalculated, but will use the new cost model moving forwards. I opted not to automatically recalculate the incident cost to avoid a sudden surge of network traffic. We can add recalculation in the future.

It'd be helpful as an end user to know which plugins and events are available. I think it'd be great to include it in the documentation. From a UX perspective, I think it would be helpful to surface which plugins are used in a cost model in the cost model table. This would make it easier to visually distinguish one cost model from another in the table when you scan the list. Probably a v2 UI/UX thing.

That's a great idea! I've added this to the documentation for now.

Do we surface the outcome of these calculations on example incidents when users are developing/editing a cost model? I think this be a great UX addition to guide the user as they are creating a new cost model to understand how their inputs will affect the outputs. This might be a v2 thing though.

I'm planning to surface this data in the dashboard page next quarter.

Great work on this! Please let me know when it's ready for review and I can take a look if you'd like.

Ready for review! ☺

Ready for review! ☺

Sweet, I will try to review it this week. Is there any specific part of the PR you'd like closer eyes on or more testing/QA?

Sweet, I will try to review it this week. Is there any specific part of the PR you'd like closer eyes on or more testing/QA?

The main areas to focus on would be (1) the branching logic of the incident cost calculations and (2) the way I introduce/integrate plugin event polling.
The new incident cost recalculation now introduces some code duplication. The primary files involved are:

src/dispatch/incident_cost/service.py
src/dispatch/incident_cost_model/service.py

I Introduce a new model for plugin event polling. There's probably some opportunity to reuse the Plugin code or eventually restructure it for more code consistency. The primary files involved are:

src/dispatch/cli.py
src/dispatch/plugins/dispatch_slack/events.py
src/dispatch/plugins/dispatch_slack/plugin.py
src/dispatch/plugins/base/v1.py

Nice work so far! Will this support calculating the cost of cases as well?

Will this support calculating the cost of cases as well?

My goal is to extend the usage of Plugin Events to estimate the costs of cases as well. This will likely occur after the ongoing case management enhancement.

Will this support calculating the cost of cases as well?

My goal is to extend the usage of Plugin Events to estimate the costs of cases as well. This will likely occur after the ongoing case management enhancement.

Should we name the model just CostModel or something more generic instead of IncidentCostModel? It'll be harder to rename the DB model in the future than changing it now.

Should we name the model just CostModel or something more generic instead of IncidentCostModel? It'll be harder to rename the DB model in the future than changing it now.

Done.

Should we name the model just CostModel or something more generic instead of IncidentCostModel? It'll be harder to rename the DB model in the future than changing it now.

Done.

Did you generate a new db revision for it?

Should we name the model just CostModel or something more generic instead of IncidentCostModel? It'll be harder to rename the DB model in the future than changing it now.

Done.

Did you generate a new db revision for it?

I modified the existing revision.


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-source-version-target/pull/243 is merged into live branch.
Auto archive content to https://github.com/opstest2/docs-archive-test-source-version-target.git

Docs Build status updates of commit 0b5fd00:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

.openpublishing.redirection.json
:white_check_mark:Succeeded

versioningArchiveSourceFolder/TOC.yml
:white_check_mark:Succeeded
View (sql-server-2014 || azuresqldb-current || azuresqldb-mi-current || azure-sqldw-latest || >= aps-pdw-2016 || >= sql-server-2016 || >= sql-server-linux-2017 || sql-server-previousversions || sqlallproducts-allversions)

versioningArchiveSourceFolder/docfx.json
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Enzyme Crashing, MWE.

I'm running Enzyme 0.12.23, EnzymeCore 0.7.7, Linear Algebra 1.5.0, Sparse Arrays 1.10.0 in Julia 1.10.4 on a Windows machine. Without fail Enzyme crashes. I can get Zygote to differentiate the function quickly. I've tried replacing all calls to I() with there explicit matrix form, as well as making Λ non-sparse.
using Enzyme, SparseArrays, LinearAlgebra

function compute_L1(Σ::Matrix{T}, Λ::AbstractSparseMatrix{T}) where T <: Real
    # LHS coefficient from Proposition 3.2
    #   L₁ = [Σ ⊗ (Iₙ² + Λₙ)] ⊗ [vec(Iₙ) ⊗ Iₙ]
    N = size(Σ, 1)
    return kron(Σ, I + Λ) * kron(vec(I(N)), I(N))
end

Λ =  spzeros(4, 4)
Λ[1, 1] = 1.0
Λ[3, 2] = 1.0
Λ[2, 3] = 1.0
Λ[4, 4] = 1.0

Δt = 0.25

function f(θ)
    σ_z = θ[1]
    θ_z = θ[2]
    Ω = [sqrt(((σ_z^2)/(2.0 * θ_z))*(1-exp(-2*θ_z*Δt))) 0.0; 0.0 0.0]
    Σ = Ω * Ω'
    L1 = compute_L1(Σ, Λ)
    return L1[1]
end

θ = [1.0, 0.5]
dθ = similar(θ)
f(θ)
Enzyme.autodiff(Reverse, f, Active, Duplicated(θ, dθ))

How does Enzyme crash, can you post the log?

Also fyi Λ and Δt are type unstable -- which even without an error will make your original code and derivatives slow. You could pass them in as arguments to f, and/or mark the globals as const

How do I see the log. The REPL crashes and I only see message:

The terminal process "C:\Users\davle\AppData\Local\Programs\Julia-1.10.4\bin\julia.exe '-i', '--banner=no', '--project=C:\Users\davle.julia\environments\v1.10', 'c:\Users\davle.vscode\extensions\julialang.language-julia-1.83.2\scripts\terminalserver\terminalserver.jl', '\.\pipe\vsc-jl-repl-7953c62c-ff44-4ad5-9cc4-a14f065b6128', '\.\pipe\vsc-jl-cr-0aea7085-fd31-40a3-81a3-9f8306afd45b', 'USE_REVISE=true', 'USE_PLOTPANE=true', 'USE_PROGRESS=true', 'ENABLE_SHELL_INTEGRATION=true', 'DEBUG_MODE=false'" terminated with exit code: -1073741571.

Running on my linux box -- ah I see you have the type unstable vector constructor issue (x/ref https://github.com/EnzymeAD/Enzyme.jl/issues/1134). Julia 1.10 beta3 introduced a change to sparsearrays that causes an infinite recursion here. We should make this handled better, but in the interim this should be resolvable by either making things type stable or not using the array syntactic sugar.
The relevant suggested changes are here:
using Enzyme, SparseArrays, LinearAlgebra

function compute_L1(Σ::Matrix{T}, Λ::AbstractSparseMatrix{T}) where T <: Real
    # LHS coefficient from Proposition 3.2
    #   L₁ = [Σ ⊗ (Iₙ² + Λₙ)] ⊗ [vec(Iₙ) ⊗ Iₙ]
    N = size(Σ, 1)
    return kron(Σ, I + Λ) * kron(vec(I(N)), I(N))
end

Λ =  spzeros(4, 4)
Λ[1, 1] = 1.0
Λ[3, 2] = 1.0
Λ[2, 3] = 1.0
Λ[4, 4] = 1.0

Δt = 0.25

function f(θ, Λ, Δt)
    σ_z = θ[1]
    θ_z = θ[2]
    Ω = zeros(2,2)
    Ω[1,1] = sqrt(((σ_z^2)/(2.0 * θ_z))*(1-exp(-2*θ_z*Δt)))
    Σ = Ω * Ω'
    L1 = compute_L1(Σ, Λ)
    return L1[1]
end

θ = [1.0, 0.5]
dθ = similar(θ)
f(θ)
Enzyme.autodiff(Reverse, f, Active, Duplicated(θ, dθ), Const(Λ), Const(Δt))

This then hits an unrelated oddity in array push/pop, which I can look at later

Really appreciate you looking into it! It's been running for two hours on my machine once I fixed the type stability.

Oh really, that shouldn't happen (and isn't what I see)?
I get this on the code I paste above (on my mac laptop):
julia> Enzyme.autodiff(Reverse, f, Active, Duplicated(θ, dθ), Const(Λ2), Const(Δt))
┌ Warning: TODO reverse jl_array_del_end zero-set used memset rather than runtime type of (true, Vector{Float64}) in {} addrspace(10)* %6
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/Y4hSX/src/utils.jl:59
┌ Warning: TODO reverse jl_array_del_end zero-set used memset rather than runtime type of (false, nothing) in   %getfield23 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %getfield_addr22 unordered, align 8, !dbg !263, !tbaa !266, !alias.scope !268, !noalias !269, !nonnull !200, !dereferenceable !233, !align !234
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/Y4hSX/src/utils.jl:59
┌ Warning: TODO reverse jl_array_del_end zero-set used memset rather than runtime type of (false, nothing) in   %getfield21 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %getfield_addr20 unordered, align 8, !dbg !486, !tbaa !266, !alias.scope !268, !noalias !269, !nonnull !200, !dereferenceable !233, !align !234
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/Y4hSX/src/utils.jl:59
┌ Warning: TODO reverse jl_array_del_end zero-set used memset rather than runtime type of (false, nothing) in   %getfield53 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %getfield_addr52 unordered, align 8, !dbg !464, !tbaa !214, !alias.scope !216, !noalias !265, !nonnull !200, !dereferenceable !231, !align !232
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/Y4hSX/src/utils.jl:59
┌ Warning: TODO reverse jl_array_del_end zero-set used memset rather than runtime type of (false, nothing) in   %getfield57 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %getfield_addr56 unordered, align 8, !dbg !313, !tbaa !214, !alias.scope !216, !noalias !265, !nonnull !200, !dereferenceable !231, !align !232
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/Y4hSX/src/utils.jl:59
┌ Warning: TODO reverse jl_array_del_end zero-set used memset rather than runtime type of (true, Vector{Float64}) in   %getfield3 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %getfield_addr2 unordered, align 8, !dbg !281, !tbaa !205, !alias.scope !214, !noalias !217, !nonnull !200, !dereferenceable !222, !align !223
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/Y4hSX/src/utils.jl:59
┌ Warning: TODO reverse jl_array_del_end zero-set used memset rather than runtime type of (true, Vector{Float64}) in   %getfield7 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %getfield_addr6 unordered, align 8, !dbg !258, !tbaa !205, !alias.scope !214, !noalias !217, !nonnull !200, !dereferenceable !222, !align !223
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/Y4hSX/src/utils.jl:59
┌ Warning: TODO reverse jl_array_del_end zero-set used memset rather than runtime type of (false, nothing) in   %getfield71 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %getfield_addr70 unordered, align 8, !dbg !364, !tbaa !214, !alias.scope !216, !noalias !265, !nonnull !200, !dereferenceable !231, !align !232
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/Y4hSX/src/utils.jl:59
┌ Warning: TODO reverse jl_array_del_end zero-set used memset rather than runtime type of (false, nothing) in   %getfield76 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(10)* %getfield_addr75 unordered, align 8, !dbg !398, !tbaa !214, !alias.scope !216, !noalias !265, !nonnull !200, !dereferenceable !231, !align !232
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/Y4hSX/src/utils.jl:59
ERROR: BoundsError: attempt to access 6-element Vector{Int64} at index [0]
Stacktrace:
  [1] _noshapecheck_map
    @ ./essentials.jl:0
  [2] map
    @ /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/SparseArrays/src/higherorderfns.jl:1187 [inlined]
  [3] +
    @ /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/SparseArrays/src/sparsematrix.jl:2242 [inlined]
  [4] +
    @ /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/SparseArrays/src/sparsematrix.jl:4277 [inlined]
  [5] compute_L1
    @ ./REPL[93]:5
  [6] f
    @ ./REPL[119]:7 [inlined]
  [7] f
    @ ./REPL[119]:0 [inlined]
  [8] diffejulia_f_10258_inner_1wrap
    @ ./REPL[119]:0
  [9] macro expansion
    @ ~/git/Enzyme.jl/src/compiler.jl:6633 [inlined]
 [10] enzyme_call
    @ ~/git/Enzyme.jl/src/compiler.jl:6233 [inlined]
 [11] CombinedAdjointThunk
    @ ~/git/Enzyme.jl/src/compiler.jl:6110 [inlined]
 [12] autodiff
    @ ~/git/Enzyme.jl/src/Enzyme.jl:314 [inlined]
 [13] autodiff(::ReverseMode{false, FFIABI, false}, ::typeof(f), ::Type{Active}, ::Duplicated{Vector{Float64}}, ::Const{SparseMatrixCSC{Float64, Int64}}, ::Const{Float64})
    @ Enzyme ~/git/Enzyme.jl/src/Enzyme.jl:326
 [14] top-level scope
    @ REPL[123]:1

I'm getting the same error as you with the posted code in maybe 30 seconds. Not sure what is happening with the indexing...

This now hits the hvcat stackoverflow, which I suppose is an improvement.
julia> Enzyme.autodiff(Reverse, f, Active, Duplicated(θ, dθ))
ERROR: StackOverflowError:
Stacktrace:
     [1] hvcat
       @ /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/SparseArrays/src/sparsevector.jl:1269 [inlined]
     [2] hvcat
       @ /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/SparseArrays/src/sparsevector.jl:0 [inlined]
     [3] augmented_julia_hvcat_3526_inner_1wrap
       @ /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/SparseArrays/src/sparsevector.jl:0
     [4] macro expansion
       @ ~/git/Enzyme.jl/src/compiler.jl:9227 [inlined]
     [5] enzyme_call
       @ ~/git/Enzyme.jl/src/compiler.jl:8793 [inlined]
     [6] AugmentedForwardThunk
       @ ~/git/Enzyme.jl/src/compiler.jl:8630 [inlined]
     [7] runtime_generic_augfwd(activity::Type{…}, runtimeActivity::Val{…}, width::Val{…}, ModifiedBetween::Val{…}, RT::Val{…}, f::typeof(hvcat), df::Nothing, primal_1::Tuple{…}, shadow_1_1::Nothing, primal_2::Float64, shadow_2_1::Base.RefValue{…}, primal_3::Float64, shadow_3_1::Base.RefValue{…}, primal_4::Float64, shadow_4_1::Base.RefValue{…}, primal_5::Float64, shadow_5_1::Base.RefValue{…})
        Use `show(err)` to see complete types.

A fix has been made to upstream julia: https://github.com/JuliaSparse/SparseArrays.jl/pull/579
It is in the process of being backported to 1.10 and 1.11, closing


feat(Mathlib/FieldTheory): define differential fields

Define logarithmic derivatives and prove some properties.

[x] depends on: #14857
[x] depends on: #14699

Don't you think that the log derivative and Liouville extensions should live in separate files? Certainly, I have heard of the first but never of the second

That makes sense, I'll move it.
By the way, Liouville extensions are something I came up with for field extensions which satisfy (a slight generalization of) Liouville's theorem, they don't appear in the literature that I know of. Perhaps I should add a comment about that.

Ah yes, definitely mention that!

bot fix style

bors d+

bors r+


Add to file boot section select all

Can you please add a function that selects all bin or elfs? Thank you

Identical to this issue- https://github.com/InoriRus/Kyty/issues/6?
Anyway - voting for it.


(PUP-6617) raise exception on failure

Since the master's implementation of Puppet::Util::Execution.execute
does not have the same API as the Ruby implementation, the exit status
was being lost. This just raises an exception when the ProcessOutput
object is initialized with a non-zero implementation.
I don't know if this is the best way to accomplish this, and I don't
really know the best way of testing it since the code path for exposing
the regression was when the Puppetserver implementation was called.
This doesn't handle the fact that the other .execute() options are
effectively ignored.

CLA signed by all contributors.


Adding Tensorboard

Hi I was wondering if adding a tensorboard option is planned.

No, not at the moment. With tensorboard you mean that you would like to visualize the layerwise activations throughout the training?

Ok, thanks for the fast answer!


negative binomial is broken (results in -inf at MLE)

I think the problem occurred in or around 7a473c54784fcadd3548a75044039f0f22bb0f1d.
The new code invokes nbinom_lower_trunc.logpmf, even though logpmf is never explicitly defined for this distribution (as far as I can tell). My best guess is that Scipy is helpfully providing us with the log of the raw pmf, and that code doesn't have enough precision near zero to return anything but -inf.
I think we can fix this by adding a logpmf to the distribution, based on my earlier code from the negative binomial log-likelihood: https://github.com/weecology/macroecotools/blob/debd0766ec2c3ed918076a6c85379f7567bfdd8c/macroeco_distributions/macroeco_distributions.py#L449
What do you think @rueuntal?

Thanks for looking into this! I think that would be great.


Provide a way to reload a failed async component

What problem does this feature solve?
Local register a async component by a factory function that return an object to handling loading state. But when the promise is rejected,  there will be always show error component  and no any way to reload it.
What does the proposed API look like?

Recall the factory function on parent's next active/update hook when rejected
[Recommend]Accept more options to handle loading state such as provide an 'on' to
listen replaced component's(loading/error) events and the event context allows to change loading state(rerend, of course)

I personally always felt the factory function was too high level for Vue. When using a user-side solution like vue-promised or a custom implementation, it's so much more flexible

https://github.com/fullygit/fullygit

test

This can help to solve the problem, it's hacky but it works.
It wraps the async component in a functional component which recreates the async factory.
const loadAsyncComponentWrapper = async page => {
    const createAsyncFactory = () => () => ({
        component: loadAsyncComponent(),
        loading: AppLoader,
        error: AppError,
        timeout: 15000
    });
    let componentHandler = createAsyncFactory();
    return {
        functional: true,
        render(h, { data, children }) {
            const shouldReload = navigator.onLine;  // Some criteria for reloading.
            if (shouldReload) {
                // The Vue component should be recreated completely if the page failed to load.
                // Issue: https://github.com/vuejs/vue/issues/9788
                componentHandler = createAsyncFactory();
            }
            return h(componentHandler, data, children);
        }
    };
};

@bogdanmatra I tried your solution, it's useless when async, and dead when sync (same code above). I modified your code to this:
// import...

/** get AsyncComponent with loading status
 * @param {Function: () => Promise<Component | { default: Component }>} promiseFactory eg: () => import('Component')
 *
 * @returns {Component} AsyncComponent
 */
function getAsync(promiseFactory, loading = LOADING, error = ERROR) {
  const asyncComponentFactory = () => () => ({
    error,
    loading,
    component: promiseFactory(),

    delay: 1,
    timeout: 15000,
  })

  const observe = Vue.observable({ c: asyncComponentFactory() })

  return {
    functional: true,
    render(createElement, { data, children }) {
      //  emit event $ to reloading
      if (data.on ? !data.on.$ : (data.on = {})) {
        data.on.$ = () => {
          observe.c = asyncComponentFactory()
          // parent.$forceUpdate()
        }
      }

      return createElement(observe.c, data, children)
    },
  }
}

And error.vue
<template>

Loading failed, click me to reloading

</template>

@bogdanmatra I tried your solution, it's useless when async, and dead when sync (same code above). I modified your code to this:
// import...

/** get AsyncComponent with loading status
 * @param {Function: () => Promise<Component | { default: Component }>} promiseFactory eg: () => import('Component')
 *
 * @returns {Component} AsyncComponent
 */
function getAsync(promiseFactory, loading = LOADING, error = ERROR) {
  const asyncComponentFactory = () => () => ({
    error,
    loading,
    component: promiseFactory(),

    delay: 1,
    timeout: 15000,
  })

  const observe = Vue.observable({ c: asyncComponentFactory() })

  return {
    functional: true,
    render(createElement, { data, children }) {
      //  emit event $ to reloading
      if (data.on ? !data.on.$ : (data.on = {})) {
        data.on.$ = () => {
          observe.c = asyncComponentFactory()
          // parent.$forceUpdate()
        }
      }

      return createElement(observe.c, data, children)
    },
  }
}

And error.vue
<template>

Loading failed, click me to reloading

</template>

Good work on this example! I figured I would donate my modification to make it work with @vue/composition-api and typescript. Comments welcome!
// would import these directly from vue if not using the @vue/composition-api plugin
import {
  defineComponent,
  ref,
  defineAsyncComponent,
  h
} from '@vue/composition-api'

import AsyncError from './async-error.vue' // default error component
import AsyncLoading from './async-loading.vue' // default loading component

// this is a hack to get the type of the first parameter since it isn't exported from @vue/composition-api
export type AsyncComponentSource = Parameters<typeof defineAsyncComponent>[0]

export const withReload = (
  source: AsyncComponentSource,
  initialProps: Record<string, unknown> = {
    loadingMessage: 'Setting some things up for you...'
  }
) =>
  defineComponent({
    setup(props, ctx) {
      const asyncComponentFactory = () =>
        defineAsyncComponent({
          loadingComponent: AsyncLoading,
          errorComponent: AsyncError,
          ...('loader' in source ? source : { loader: source })
          // uncomment this if you want to test the $reload function by artifically adding latency to the resolution of the module
          // loader: () =>
          //   new Promise(resolve => setTimeout(resolve, 3000)).then(
          //     () => import('./async-error.vue')
          //   )
        })

      const asyncComponent = ref(asyncComponentFactory())
      return () =>
        // I'm not sure how to best pass through the props, data, and children, but this is my best guess given the current state of documentation
        h(asyncComponent.value, {
          ...ctx,
          props: {
            ...(props as Record<string, unknown>),
            ...initialProps
          },
          on: {
            ...ctx.listeners,
            $reload() {
              asyncComponent.value = asyncComponentFactory()
            }
          }
        })
    }
  })

Here is how you would call it
withReload(() => import('./path/to/component.vue')
// or
withReload({
  loader: () => import('./path/to/component.vue'),
  loadingComponent: SomeOtherLoadingComponent,
  errorComponent: SomeOtherErrorComponent,
  delay: 400 // other options supported too
})

<template>

Loading failed, click me to reloading

</template>

Closing as this should go through the RFC process in the rfcs repository

https://iaas.af-johannesburg-1.oraclecloud.com/

https://iaas.af-johannesburg-1.oraclecloud.com/

let array = this.$store.state.Admin.BookManager.CKEditor.Book;
this.$store.state.Admin.BookManager.CKEditor.Book = [];
setTimeout(
  function () {
    this.$store.state.Admin.BookManager.CKEditor.Book = array;
  }.bind(this),
  0
);

Woking with me.


Help with use of onnx model and TensorRT

Hello @CarkusL, I haven't tested yet your code for exporting to onnx model, but congratulations. I tried to implement the same exports to onnx in the last few days until I realized that exporting PointPillars as a whole model was difficult because of the PillarsScatter backbone.
Have you tried using your onnx model in TensorRT or what's the purpose of converting the model to onnx in your case?
In my attempts the "ScatterND" operation was not supported in TensorRT, that's why I gave up
Do you have maybe and idea how to do the same operation without Scatter, another alternative?
I noticed in order to get the final results for training or inference, the functions here https://github.com/CarkusL/CenterPoint/blob/4f2fa6d0159841a8a09c3731ce5eb849f2fe58b2/det3d/models/detectors/point_pillars.py#L56 self.bbox_head.loss and self.bbox_head.predict should be adapted to the output of onnx because originally in PyTorch code the output of the head is a list of dictionaries, but in onnx the outputs are quiet different... are you also working on this adaption of the bbox_head functions to onnx output for further post-processing?

Thank you for your quesion!
Yes, TensorRT doesn't support ScatterND. I think you maybe need to implement the ScatterND in TensorRT by using cuda.
see https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#extending
now, I don't add the bbox_head for onnx because there are other ops which doesn't support in TensorRT.
I will try to add the cuda implementation for ScatterND in the next few weeks.

Thanks for your answer. So I guess, you did not use yet your onnx model for inference / prediction?
I meant before, I saw you exported the bbox_head in onnx, the forward() method of bbox_head and it works in TensorRT.
I tested it and it works fine, but the output of the bbox_head in onnx is not a list of dictionaries as in PyTorch. For the final prediction results, the function self.bbox_head.predict() must be adapted in PyTorch code as well.... have you tried this or will you try to do it soon?
I was thinking to try onnxruntime gpu (https://www.onnxruntime.ai/docs/get-started/install.html) to accelerate the model with cuda instead of TensorRT, maybe you could also take a look at this option...

Have you actually used your model with onnxruntime, can you answer please @CarkusL?
I think the input dimensions for example["voxels"] is not always the same for every batch data after voxelization,
so having fixed dimensions does not work...am I wrong?

I upload the scatterNDPlugin code for the Tensorrt, you can try to do Inference the onnx model in Tensorrt.


Gameboy Color emulator app?

Seems like it wouldn't be too hard to port something like this, it would just require changing the license to GPL: https://github.com/badgeteam/mch2022-esp32-app-gnuboy
Adding that would give access to a large library of content, plus GB Studio for creating games without coding, that are not limited to just one platform.
It looks pretty easy to use GB Studio plugins to and extend GNUBoy, and allow extra features like touch input and Bluetooth in homebrew games and apps.

Indeed. On this model was not anticipated to use buttons nor play emulated games.
Unfortunately don't have the time to help you with an implementation but would certainly be a cool feature.


Remove excessive printouts

This patch removes excessive printouts on the Go, Javascript and Python drivers. While printing every decision on every request is pretty for demonstrating the load balancing, it is annoying when used in production and can needlessly fill the logs.
As far as I can tell, the Java driver did not have such excessive printouts (it has logs in the FINE level, but those will be normally not visible).

@nyh look like we have 3 approvales.
Whats the next step?

@nyh look like we have 3 approvales. Whats the next step?

I don't know, I guess I'll just have to merge my own patch.

I can click the merge if you wish. Who are the maintainers of this repo?


Create a Header component:

Built a header component, story and test - added to the Main GameSetup and GameResults screens

This was added from the incorrect branch. Make sure git checkout to the correctly named working branch before making any PRs.


Lateral bar does not re-open menus

Description
Previously opened menus are not opened again when starting Files

Sometimes only some menus are opened.
Steps To Reproduce

Open some lateral menu
Close the app
Open the app
Repeat 2 and 3 if needed

Expected behavior
Menus should be fully open

Files Version
Versione <IP_ADDRESS> OS Version: 10.0.22000.493
Windows Version
Windows 11 1000.22000.493.0
Relevant Assets/Logs
debug.log
debug_fulltrust.log

#4128


Roll Engine from 016ee0cdafdd to 6667b66253fe (2 revisions)

https://github.com/flutter/engine/compare/016ee0cdafdd...6667b66253fe
2021-04-06<EMAIL_ADDRESS>Roll Skia from 974c82150204 to b4e5a9192d39 (1 revision) (flutter/engine#25440)
2021-04-06<EMAIL_ADDRESS>Update FlutterFragment to implement ComponentCallbacks2. (flutter/engine#25428)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Commit queue failed; closing this roll.


Big json docs in a AsyncStream over http makes the JsonArrayChunker crash

When Json object is bigger than the JsonArrayChunker buffer the buffer is reset and the json parser fails
Expected behavior
When the buffer is not split and de decode function is called the new buffer should be appended and the position should be kept and not resetted.
Actual behavior
The buffer is always reset when appending a new Buf
Steps to reproduce the behavior
Use a very big JSON document in the AsyncStream.

create a pull request to fix this issue #439

@tommichiels merged in 6ff9fd7c3cf7013e2ad067d8e34363c952301994


Print JVM args in Apalache

We currently print JVM arguments in the apalache-mc runscript:
$ apalache-mc version --debug
# Tool home: ...
# Package:   ...
# JVM args:  -Xmx4096m
#
...

To make sure that the JVM actually picks them up, we should print them in Apalache instead.

I'm in favor of this!


Use partd for dask.dataframe.set_index

This uses partd for the set_index operation, particularly in the set_partition sub-operation.
This replaces the old pframe on-disk data structure which has been removed.

Merging soon if no comment


Hack to workaround a clang lto bug

We hit an assert in AllocStackHoisting that is only triggered in a release lto
build.
Clang forwards the read of parent basic block of 'AssignedLoc' in the next
statement:
auto *EntryBB = AssignedLoc->getFunction()->getEntryBlock(); // read AssignedLoc->ParentBB
AssignedLoc->removeFromParent(); // writes AssignedLoc->ParentBB
To this read:
EntryBB->push_front(AssignedLoc); // read AssignedLoc->ParentBB and assert if non-null, should reload
As a temporary workaround outline code to prevent the miscompile.
rdar://29982182

@swift-ci Please smoke test

@swiftix Can you review for swift-3.1-branch?

@aschwaighofer LGTM!


AlternativeImages are all moved to page level when saving

I just found that the new PAGE-XML editing facility still has one bug: it does not retain AlternativeImage under their original segment (which could be region, line, word or even glyph), but moves them all to the top (page) level.
This is a big problem for OCR-D especially. (It means a region or line crop will be mistaken for a page image.)

Finally got the time to look into it and the PR here should hopefully fix this.
Will push a custom build of PrimeDla to the LAREX dev branch after some further testing.

Updated PrimaDla in 31258ab to include the fix for this issue.
Non page-level alternative images should now be kept when updating / writing the PAGE XML (not when changing region types (e. g. from TextRegion to ImageRegion) yet but this is part of another issue we have to address).


Translation files for Dutch

Gotcha, I made another PR at https://github.com/catamphetamine/social-components-react/pull/1
Please let me know if it's sufficient or if I am missing anything.

@repfuel Oh, excuse me, I forgot the main file:
https://github.com/catamphetamine/anychan/tree/master/src/messages

Thx, I've merged your pull requests and copy-pasted them into the gitlab repos.
I'll be deploying a new version of anychan perhaps by the end of November, including your patches.
Yesterday and today I've been introducing support for jschan engine. That included refactoring of imageboard package. So it'll have to be tested a bit locally before deploying it to the website.


prevent duration = 0.0 and divding by zero

It is small bug. On my windows, it  occurs dividing zero 100%. It might occur on linux.

LGTM
Thank you for your contribution!

How about showing inf for speed when duration is zero?

Hello again, Hakuyume-san,
Would you want to see stack trace?
Downloading from http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar...
Traceback (most recent call last):
  File "D:\DeepLearning\Github\sitifukujin_chainercv\examples\detection\visualize_models.py", line 53, in <module>
    main()
  File "D:\DeepLearning\Github\sitifukujin_chainercv\examples\detection\visualize_models.py", line 18, in main
    dataset = VOCDetectionDataset(year='2007', split='test')
  File "D:\DeepLearning\Github\sitifukujin_chainercv\chainercv\datasets\voc\voc_detection_dataset.py", line 72, in __init__
    data_dir = voc_utils.get_voc(year, split)
  File "D:\DeepLearning\Github\sitifukujin_chainercv\chainercv\datasets\voc\voc_utils.py", line 34, in get_voc
    download_file_path = utils.cached_download(urls[key])
  File "D:\DeepLearning\Github\sitifukujin_chainercv\chainercv\utils\download.py", line 72, in cached_download
    request.urlretrieve(url, temp_path, _reporthook)
  File "C:\Anaconda3\lib\urllib\request.py", line 284, in urlretrieve
    reporthook(blocknum, bs, size)
  File "D:\DeepLearning\Github\sitifukujin_chainercv\chainercv\utils\download.py", line 27, in _reporthook
    speed = int(progress_size / (1024 * duration))
ZeroDivisionError: float division by zero
Press any key to continue . . .

@sitifukujin I think using small value for duration is not a good solution because it shows nonsense speed. How about showing 'inf KB/s' when the duration is zero. User can know that the speed can't be computed now.

@Hakuyume
Line this?
Downloading from http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar...

...0, 0.0078125 MB, inf KB/s, 0.0 seconds passed
...0, 0.015625 MB, 59 KB/s, 0.26875853538513184 seconds passed
...0, 0.0234375 MB, 89 KB/s, 0.26875853538513184 seconds passed

@sitifukujin Yes. I think this output is better. I added a comment. Please check it.

Please check it again.

Thanks, Yuyu-san and Hakuyume-san. See you.


Use console script entry points instead of scripts directory

The benefits of using console script entry points is that the actual scripts can live inside the package, and can use the module name for e.g. logger names. It will also make it easier to install on non posix platforms. Additionally it makes it easier to use the tools from within a virtualenv without first activating it.  (Ideally something like pipsi install taxii-client should make the cli programs available.)

implemented in #17


samples: Use DT_ prefix define for DT filters

Update the filters that are extracting info from DT to use a define that
has a DT_ prefix so its clear that its coming from DT_.  Also this lets
us remove any non-DT prefixed defines in the conf db.
Signed-off-by: Kumar Gala<EMAIL_ADDRESS>

Codecov Report

Merging #13200 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #13200      +/-   ##
==========================================
+ Coverage   48.74%   48.75%   +<.01%
==========================================
  Files         319      319
  Lines       46871    46871
  Branches    10835    10835
==========================================
+ Hits        22849    22850       +1
  Misses      19394    19394
+ Partials     4628     4627       -1

Impacted Files
Coverage Δ

arch/posix/core/posix_core.c
91.91% <0%> (+1.01%)
:arrow_up:

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 4433041...4edeccf. Read the comment docs.


forge coverage doesn't fail on failing tests

Component
Forge
Have you ensured that all of these are up to date?

[X] Foundry
[X] Foundryup

What version of Foundry are you on?
forge 0.2.0 (28b2ae6 2023-03-06T00:04:30.253422Z)
What command(s) is the bug in?
forge coverage
Operating System
macOS (Apple Silicon)
Describe the bug
Description
Running forge coverage exits with code 0 even on test failures. This may be just a mismatch in my expections, but just used to running similar modes e.g. in JS testing tools where coverage would fail on any test failures.
If it's deliberate that coverage doesn't fail on failing tests (as in fairness the act of producing metric didn't fail), it could be nice to call it out in the Foundry book that it's a command to run coverage only, not to run tests with coverage.
Steps to reproduce:

Create a failing test:

function testThatFalseIsTrue() public {
  assertEq(true, false, "This will fail");
}

Run forge test — test fails as expected
Run forge coverage

Current outcome

forge coverage passes and prints coverage metrics. Returns 0 exit code

Expected outcome

Highlights same test failures as forge test (or exits non-zero).

This seems related to #3900 .