MudStepper - PreventStepChange async?

I am looking to run an async method on the PreventStepChange and when I do it seems to lock up the whole MudStepper. The reason is that I want to save the form to the db and wait for response before moving to the next step. Any insight or suggestions?
        <MudStepper @ref="_stepper" ContentStyle="min-height: 400px" Linear="false" Vertical="_vertical" Color="Color.Primary" Variant="Variant.Filled" DisableAnimation="false"
                PreventStepChange="new Func<bool>(CheckChange)">

    private bool CheckChange()
    {
         if (_stepper.GetActiveIndex() == 4) {
           return !Submit().Result;
        }
        return false;
    }

I can not say im a async expert. But did you try async Task<bool> CheckChange()?

Thanks, yes I tried several variations. When I do that or this the whole component freezes when I get to the step I want to run an async method in. No VS errors or JS errors, just freezes. If I get time later I will submit a PR.
    PreventStepChange="@(() => CheckChange().Result)">

    private async Task<bool> CheckChange()
    {
         if (_stepper.GetActiveIndex() == 4) {
           return await Submit();
        }
        return false;
    }

If you reproduce the code with task.delay where you waiting the db, i can try something also.

Here is a test fork. If I use Wait() on my async method vs await it seems to work. Still have an issue where the StateHasChanged is not updating my MudOverlay Visible variable, in my code as well:  https://github.com/enkodellc/CodeBeam.MudExtensions/blob/dev/ComponentViewer/Pages/Components/StepperPage.razor

@enkodellc did you end up going any further with this? I have been developing with the MudStepper this week and these issues has been a pain, only just seen they have been raised here.
I can force the calls to my services to run syncronsouly in-order to process the data from the user, which isn't ideal and I also have the same issue asround the StateHasChanged(), I can't get any processing or progress indicators conditionally showing.

@enkodellc did you end up going any further with a PR for this? I have been developing with the MudStepper component this week and these issues have been a right pain, I've only just seen they have been raised here by yourself.
I also have the same issue around the StateHasChanged() and variables; as such I can't get any processing or progress indicators conditionally showing due to it when the data is being processed.

Can you provide a code snippet?

@mckaragoz yeah so using the code example provided in the docs, I have added a new component property "bool _saving" and this controls just a simple alert
@if (_saving)
{
    <MudAlert Severity="Severity.Error">SAVING</MudAlert>
}

and then I've updated the CheckChange() method to set this to true/false after the action of that step
private bool CheckChange(StepChangeDirection direction)
    {
        if (_checkValidationBeforeComplete == true)
        {
            // Always allow stepping backwards, even if forms are invalid
            if (direction == StepChangeDirection.Backward)
            {
                return false;
            }
            if (_stepper.GetActiveIndex() == 0)
            {
                _saving = true;
                _form.Validate();
                _saving = false;
                return !_form.IsValid;
            }
            else if (_stepper.GetActiveIndex() == 2)
            {
                _saving = true;
                _form2.Validate();
                _saving = false;
                return !_form2.IsValid;
            }
            else
            {
                return false;
            }
        }
        else
        {
            return false;
        }
    }

Then running through the form via the browser, at no point does the Alert show, even when debugging and I've stopped on a line just after "_saving" has been set to true. Also adding "StateHasChanged()" after each "_saving" change value doesn't show the banner.
Hopefully this examples shows the issue we're having. Can't really share the Production code I'm working on due to it being enterprise software for a company, but if this example isn't enough I might be able to re-work it to be confuscated.

@PlayerModu  I copied the Mudstepper component locally and made my changes. I never submitted a PR as it was a bit more custom. I will share though I cannot promise it will work as you expect. I do use it in production.  I did this months ago and haven't synced any changes from Codebeam since Nov. 22
https://github.com/enkodellc/MudStepper/tree/main

@PlayerModu @enkodellc Now i understand the issue. I obsoleted the PreventStepChange and added PreventStepChangeAsync, is it what you want?
https://user-images.githubusercontent.com/78308169/228794860-f74b3c88-0a0b-4b8c-924b-ac5a6cb3488c.mp4

@mckaragoz ah that looks great! yeah that looks to be working as expected :)

@PlayerModu Even better, added a Loading parameter.
https://user-images.githubusercontent.com/78308169/228820724-304ce370-2051-43f1-a4e1-04579aa0b369.mp4

@mckaragoz that looks even better :D Thank you for responding and providing a potential solution so quickly!
What would be the timeline on getting your PR for this completed and out in a new release?

6.4.6 just released 🙂

@mckaragoz Thank you for providing a solution to the problem so quickly :) I'll reach out if I come across any more issues related to this issue


Add cowboy_req:buffer_data/3

This function listens for and inspects its buffer until it has received
some amount of data (if any) and then returns.
This can be useful when, for example, multiple connections might be
listened to at once with a timeout to serve the first one to answer, or
in similar cases where work can be done while waiting for data on the
line.

I don't think I will ever merge this. The way the current body function works, you already can get data in a similar way. You just have to keep it around in your code.
The proxy use case in Cowboy 2 will be covered by the stream interface, not by traditional handlers (though your custom code may still use handlers), and the stream interface will automatically forward and/or buffer data depending on configuration (even if you use only normal handlers), so it doesn't look like it will be needed there either.
Closing, thanks!

That isn't necessarily true in the case where pipelined requests are waiting down the line, but you still want to see if the connection is open.
The way of doing that is to get all the content out of the TCP receive buffer to let the stack report FIN packets once the content has been consumed. Just waiting on the body means the pipelined requests may artificially hold the connection open longer than it needs to be.
But I mean it's fine, we ended up going with our cowboyku fork for all these fixes anyway. Our proxy requirements just don't match a server's requirement plainly enough in many places.

I'm guessing you didn't see my talk (or slides) about Cowboy 2. :-)
The only way in Cowboy 2 for a request process to prevent HTTP/1.1 pipelined requests from running is if its request body is larger than what flow control currently allows. So should be just about the same as what you got.

Yeah, we had needed it in 2014 though :)
As I fine, this is totally fine to have closed.


Import state-fold to offchain

📚 Context
State-fold is an auxiliary library that is currently being used only by the dispatcher and it's in another repository in Github.
✔ Solution
Bring the state-fold as another crate inside offchain and have the rest of the offchain code use the new crate.
📈 Subtasks

[ ] Create the state-fold crate
[ ] Import the state-fold code from the repository with the same name
[ ] Update necessary code inside the offchain to point to the internal state-fold

As discussed on #49, this issue will be postponed indefinitely as we see the need to import the state-fold to the node.

Closing it. We can reopen this issue if we need to.


ddev pull changes public/fileadmin to a directory (project type: typo3)

Run a Diagnostic and Paste Link Here
https://gist.github.com/jonaseberle/01aa87572b248d093109180e997d04b1

Describe the bug

In my case, public/fileadmin and public/uploads are symlinks.
After running ddev pull, the symlink public/fileadmin is replaced by an empty directory.
To Reproduce

ddev config --docroot=public --create-docroot --project-type=typo3

mkdir -p data/files/fileadmin data/files/uploads
ln --symbolic --relative data/files/* public/

ddev start

cat > .ddev/providers/test.yaml <<EOF
files_pull_command:
  command:
EOF

ddev pull test --skip-db -y

# the former symlink `fileadmin` is now a folder
ls -als public/

Expected behavior

The symlink stays in place
Version and configuration information (please complete the following information):

Host computer OS and Version: Linux (Ubuntu)
ddev version information: v1.18.0-rc1

Thanks for the report. This is an unusual situation, right? What should the correct behavior be, just follow the symlink (if it's relative and also inside the filespace?) Pretty sure this behavior is a result of the lower-level utilities we use to copy directories, and I think they ignore symlinks.
Would it be possible to share your pull yaml?

Hi Randy, the content of the pull yaml:
The used commands are those from ddev-contrib.
These commands don't do anything with public/fileadmin
environment_variables:
  target: live

auth_command:
  command: |
    ssh-add -l >/dev/null || ( echo "Please 'ddev auth ssh' before running this command." && exit 1 )

db_pull_command:
  command: |
    # Dumps and downloads from server
    /var/www/html/.ddev/commands/web/dump-db "${target}" -y
    # ddev only supports single-file-gzipped here currently so we gzip the downloaded SQL for ddev to consume it...
    cat /var/www/html/data/sql/struct/* /var/www/html/data/sql/records/* | gzip > /var/www/html/.ddev/.downloads/db.sql.gz

files_pull_command:
  command: |
    # This rsyncs to ./data/files/fileadmin and ./data/files/uploads because the default ddev location
    # is cleared before pulling
    # in our case, ./data/files/* is symlinked to appropriate locations in a post-start hook
    /var/www/html/.ddev/commands/web/dump-files "${target}" -y

What do I think it should do?

It should not assume that fileadmin is the ONLY location where volatile filesystem data that needs downloading to dev instances is stored in a TYPO3 system
I like to have a symlink there. One reason is that I have symlinks for volatile data (shared between releases) on production, too and I want to make sure that any code handles that well. - At least it should not change a symlink to something else.
I do not put anything into the hardcoded expected path .ddev/.downloads/files - so it also should not do anything

Basically I think my problem is that ddev pull is extremely opinionated for TYPO3.
I don't think it should need any knowledge about the used framework.
In my opinion a pull provider should be allowed to handle importing into database and putting files in the correct locations his/herself. This would open up so much more possibilities. Maybe an option like automatic_import: false would help.

In my opinion a pull provider should be allowed to handle importing into database and putting files in the correct locations his/herself. This would open up so much more possibilities. Maybe an option like automatic_import: false would help.

I agree, in retrospect :) It would solve lots of problems.
Thanks for including your yaml, it will help in testing.

And ddev pull is opinionated to Drupal single-site... because I know it better than TYPO3. :)
I'm sure we can solve your symlink issue here, but it would be best to open a design suggestion issue for how you think pull can be altered, because your ideas have value.  And I know you're already thinking of how to do it in a nondisruptive way.

Maybe you were saying that ddev pull is too opinionated and limited for application to TYPO3. Could be. It also doesn't support private files on Drupal. Needs to grow up :)

It's sufficient for the default case but currently it is limited (EDIT: also see last paragraph). So many other parts of ddev are so wonderfully designed to, while being extremely easy for the default case, being able to grow for nearly any need! That is so absolutely amazing!
As you mentioned there are sometimes custom, project-specific interesting locations for a web project.
Some examples I encountered in our projects with TYPO3:

public/uploads - this has been an official location for (mostly) extension specific, volatile public files until TYPO3v9.
var/cache/data/* - a cache (default location for the TYPO3 Caching Framework API) that is expensive to rebuild, for example due to being a result of an external API (for example Geocoding results)
var/my_extension - some extension's state data (for example private data)

In production, these will be "shared" folders, meaning that any release will use the same data by means of a symlink or mount to a common (inter-release) location. (Not all "shared" folders need downloading, though)
Adding some other ideas, I am trying to express it as a User Story:
As a developer, I would like to have ddev pull...

allow multiple, custom file system locations
allow multiple databases
allow quick "sync"ing of file system locations (instead of using full .tgz) in order to save time/bandwidth
stay backwards compatible with existing providers

... in order to pull external data into my local dev system in simple and complex projects.
Ideas for implementation:

add these features to ddev pull by adding configuration, ... (complex)
allow to disable current auto-handling of /var/www/html/.ddev/.downloads/ per *_pull_command, for example by a config option disable_auto_import: true / skip_import: true (wording tbd)

Please advise: I can open a design suggestion issue.
Afterthought:
I've seen there is a skipImportArg already: https://github.com/drud/ddev/blob/master/pkg/ddevapp/provider.go#L123 - that's part of the command line API (yet not publicly documented I think) - that is something I can use as a workaround.
It seems that the skip_import idea could be done by changing https://github.com/drud/ddev/blob/master/pkg/ddevapp/provider.go#L123 to
if skipImportArg || p.FilesPullCommand.skip_import {

Taking that afterthought into account it is not "actually" limited ;) The limitation is only on the configuration side, the runtime side allows customization already.

Is this issue somehow resolved? Or is there a follow-up issue somwhere? I face this same issue for months now.

Yes,

https://github.com/drud/ddev/pull/3373

Looks like you got it.


ar

You forgot to write a description. Also, please open issues in  docker-flow/docker-flow-swarm-listener since this repo is no longer active.


Cleanup / Warning removal

There where several ruby warnings throw when running the tests.
There are still a few more fro dependancies

:+1:


Broadcast on a 2D array section segfaults

Original issue: https://charm.cs.illinois.edu/redmine/issues/1977

Segmentation fault when a section created using 2D array elements is either used in creating a callback or used for broadcast.
secProxy = CProxySection_Check::ckNew(checkArray.ckGetArrayID(), 0, numchares - 2, 1, 0, numchares - 2, 1);
secProxy(0).hello();
hello() is called on element 0 (Any element of the section can be accessed through this).
+Segmentation fault in 2 use cases+:

secProxy.hello();
CkCallback cb(CkIndex_Check::hello(), secProxy);

Original date: 2018-09-12 15:21:28

CkMulticast library needs to be used for a section broadcast.
A message inherited from CkMcastBaseMsg needs to be inherited and sent through the broadcast call.
This is noted in Section 14.2.1 of the manual though when citing an example in 14.2 the explicit mention of the CkMcastBaseMsg as a parameter would be good.
Checked for 2D and 3D arrays, and works as expected.


adding more docs and notes around ports in marathon

Concepts are accurate, but it seems some word-smithing could be applied. I recommend our wordsmith expert @sascala take a look at this.

(review comments aside, great work, @kensipe ! Thanks for working to improve our documentation!)

@kensipe Thank you for your work here. I think, though, that the ports.md page has been superseded by networking.md. The ports page no longer appears in the TOC of the Marathon site. If this is true, could you add this to the networking page, and I'll edit?

I didn't realize @sascala great catch!   I'll move to network.md and add updates based on @timcharper review.

ok @sascala moved!

@kensipe, what is the state of this diff?

I'm pretty sure this is superseded by https://github.com/mesosphere/marathon/pull/5569
Closing....


Question: propTypes for redux-connected components?

Issue details
I'm creating components that must use react-redux's connect to grab some global application state. These components also have configurable properties. I'd like to be able to view the components' propTypes in their storybooks, but I only see the connect-ed HOC's props (see screenshot below). Any thoughts on how to show the base component's propTypes?
Steps to reproduce
.storybook/config.js:
import React from "react";
import { Provider } from "react-redux";
import { configure, addDecorator } from "@storybook/react";

import configureStore from "./store/configureStore";

const context = require.context("../stories/", true, /\.js$/);
const store = configureStore();

addDecorator((render) =>
  <Provider store={store}>
    {render()}
  </Provider>
);

// ...
configure(() => context.keys().forEach(context), module);

stories/button.js:
import React from "react";
import { action } from "@storybook/addon-actions";
import { storiesOf } from "@storybook/react";
import { withInfo } from "@storybook/addon-info";

import PrimaryButton from "../components/primary-button";

storiesOf("Button", module)
  .add(
    "Primary Button",
    withInfo(PrimaryButton.WrappedComponent.__docgenInfo.description)(
      () => (
        <div>
          <PrimaryButton onPress={action("primary-button-press")}>
            Primary Button
          </PrimaryButton>
          <StorybookDivider />
          <PrimaryButton
            disabled
            onPress={action("primary-button-press")}
          >
            Disabled
          </PrimaryButton>
        </div>
      )
    )
  );

components/primary-button.js:
import React from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
// ...

const PrimaryButton = ({ disabled, onPress }) => (
  <button
    className="primary-button"
    disabled={disabled}
    onClick={onPress}
  >
    {children}
  </button>
);

PrimaryButton.defaultProps = {
  disabled: false,
  onPress: undefined
};

PrimaryButton.propTypes = {
  children: PropTypes.string.isRequired,
  disabled: PropTypes.bool,
  onPress: PropTypes.func
};

export default connect(selector)(PrimaryButton);

I can create a starter project for a full setup if needed.
Please specify which version of Storybook and optionally any affected addons that you're running

<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
Affected platforms

<EMAIL_ADDRESS>?

Screenshots / Screencast / Code Snippets (Optional)

Do the connect in a different export and just export your component as a pure component

@eddiemonge That approach doesn’t scale for me, unfortunately: I have several dozen components, each requiring unique slices/pieces of the state tree.

My app is using hundreds. They are divided into components and containers. The component only takes props and has stories that show it in different states. The other export is a container that is purely responsible for maintaining state from redux. Your code would look like this:
import React from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
// ...

export const PrimaryButton = ({ disabled, onPress }) => (
  <button
    className="primary-button"
    disabled={disabled}
    onClick={onPress}
  >
    {children}
  </button>
);

export default connect(selector)(PrimaryButton);

Then in your story:
import React from "react";
import { action } from "@storybook/addon-actions";
import { storiesOf } from "@storybook/react";
import { withInfo } from "@storybook/addon-info";

import {PrimaryButton} from "../components/primary-button";

storiesOf("Button", module)
  .add(
    "Primary Button",
    withInfo(PrimaryButton.WrappedComponent.__docgenInfo.description)(
      () => (
          <PrimaryButton onPress={action("primary-button-press")}>
            Primary Button
          </PrimaryButton>
     )
)
  .add(
    "Primary Button (disabled)",
    withInfo(PrimaryButton.WrappedComponent.__docgenInfo.description)(
      () => (
          <PrimaryButton
            disabled
            onPress={action("primary-button-press")}
          >
            Disabled
          </PrimaryButton>
      )
    )
  );

Your stories should show the components, not the containers

I created a demo project to show what's happening: https://github.com/swashcap/react-storybook-connect-example. The sample button component has a few necessary properties that gathers from the redux store. In practice this may be way more properties. It doesn’t scale well to duplicate these properties explicitly in a non-connect-ed component.
How does adding some react-redux smarts to the addon-info extension sound? It could detect whether a component is connect-ed and emit the right propTypes table.

It doesn’t scale well to duplicate these properties explicitly in a non-connect-ed component.

What do you mean by duplicating? If your can pass this props from mapStateToProps, that means that you can pass them explicitly in a story, doesn't it?
If you really need to use your container components in stories, you can do something like this:
const ConnectedPrimaryButton = connect(selector)(PrimaryButton);
ConnectedPrimaryButton.propTypes = PrimaryButton.propTypes;
export default ConnectedPrimaryButton;

It doesn’t scale well to duplicate these properties explicitly in a non-connect-ed component.

What do you mean by duplicating? If your can pass this props from mapStateToProps, that means that you can pass them explicitly in a story, doesn't it?

It's been a while, but I think what I meant was:
import React from 'react'
import { Text, TouchableOpacity } from 'react-native'
import PropTypes from 'prop-types'

const MyButton = ({
  __backgroundColor,
  __borderColor,
  __borderRadius,
  __color,
  __disabledBackgroundColor,
  __disabledBorderColor,
  __disabledColor,
  __fontFamily,
  __fontSize,
  __fontWeight,
  __lineHeight,
  __onLongPress,
  __onPress,
  __onPressIn,
  __onPressOut,
  children,
  disabled,
  onPress,
  testID
}) => {
  return (
    <TouchableOpacity
      disabled={disabled}
      style={{
        backgroundColor: disabled ? __disabledBackgroundColor : __backgroundColor,
        borderColor: disabled ? __disabledBorderColor : __borderColor,
        borderRadius: __borderRadius,
        borderWidth: 1
      }}
      onLongPress={__onLongPress}
      onPress={(event) => {
        __onPress(event)
        onPress(event)
      }}
      onPressIn={__onPressIn}
      onPresOut={__onPressOut}
      testID={testID}
    >
      <Text
        style={{
          color: disabled ? __disabledColor : __color,
          fontFamily: __fontFamily,
          fontSize: __fontSize,
          fontWeight: __fontWeight,
          lineHeight: __lineHeight
        }}
      >
        {children}
      </Text>
    </TouchableOpacity>
  )
}

MyButton.propTypes = {
  // ...
}

export default MyButton

All of the __-prefixed properties come from the redux store. Writing a story by pulling the MyButton.WrappedComponent becomes tedious:
import React from 'react'
import { View } from 'react-native'
import { storiesOf } from '@storybook/react'
import { withInfo } from '@storybook/addon-info'

import MyButton from '../components/MyButton.js'

storiesOf('Buttons', module).add(
  'My Button',
  withInfo(MyButton.WrappedComponent.__docgenInfo.description)(() => (
    <View>
      <MyButton.WrappedComponent
        __backgroundColor='lightcyan'
        __borderColor='cyan'
        __borderRadius={2}
        __color='midnightblue'
        __disabledBackgroundColor='gainsboro'
        __disabledBorderColor='silver'
        __disabledColor='dimgray'
        __fontFamily='System'
        __fontSize={18}
        __fontWeight='700'
        __lineHeight={22}
        __onLongPress={console.log}
        __onPress={console.log}
        __onPressIn={console.log}
        __onPressOut={console.log}
        onPress={console.log}
        testID='my-button'
      >
        My Button
      </MyButton.WrappedComponent>
      <MyButton.WrappedComponent
        __backgroundColor='lightcyan'
        __borderColor='cyan'
        __borderRadius={2}
        __color='midnightblue'
        __disabledBackgroundColor='gainsboro'
        __disabledBorderColor='silver'
        __disabledColor='dimgray'
        __fontFamily='System'
        __fontSize={18}
        __fontWeight='700'
        __lineHeight={22}
        __onLongPress={console.log}
        __onPress={console.log}
        __onPressIn={console.log}
        __onPressOut={console.log}
        disabled
        onPress={console.log}
        testID='my-button'
      >
        Disabled
      </MyButton.WrappedComponent>
    </View>
  ))
)

That's a lot of props! Adding .propTypes to the connect-ed component seems like a potentially harmful runtime modification: a connected component is assigned .propTypes by react-redux.
I’ve started using React Styleguidist, which supports react-redux fairly well.

@swashcap nooo!  I was so happy someone else said what I've been thinking the entire time I've been working with redux, and you disappear a month later?
I am exceedingly sad.
(I got here in a different way though - I'm looking to split propTypes out into ones the user must provide, and ones the component gets from the store, and enforce that with linting.  Unrelated, but context is always helpful).


Compare tool works with just images and labels

While cleaning up datasets, we want to look at just the images and their labels. The current rs compare requires at-least one masks directory and this PR makes the masks directory optional, one ore more to be precise! Now, we could use this tool to generate images like below:

:thumbsup:
Things I have tested rs compare for are:

Slippy map dirs for images and masks (this branch)
Slippy map dirs with images, masks and predicted masks

Something that I have not done with this tool is the following but, I don't see any blockers for something like this not to work.

Slippy map dirs with images, masks, probs, and predicted masks

One additional functionality that rs compare tool handles is filtering by min/max percentages of masks not background. The use-case here is to filter out images that have predictions above or below a threshold. Breaking that functionality out of this tool would allow us to create a generic rs compare that given two or more slippy map directories of images, combines them into one image.
Did I understand you correctly?

What I meant was

removing the threshold check since it's orthogonal to this tool's core responsibility
taking a list of paths to slippy map directories from the command line
walking all slippy maps in parallel, creating one image with all slippy map tiles next to each other


Conda/Bifrost 1.0.3 illegal instruction error

Hi,
just fyi, after installing Bifrost via Conda/bioconda, it immediately exits with an "illegal instruction" error. Building from source on the same server is possible, though. The machine is equipped with the following CPU model:
model name      : Intel(R) Xeon(R) CPU E7-8857 v2 @ 3.00GHz
stepping        : 7
microcode       : 0x715
[...]
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts md_clear flush_l1d

Best,
Peter

Hi @ptrebert,
Thanks for letting me know about this issue. When you installed Bifrost with Conda, did you run it afterwards on the same machine (the one used for the Conda install) or a different one?
Guillaume

Hi Guillaume,
yes, all steps were executed on the same machine.
Peter

Hi @ptrebert,
"Illegal instructions" is usually an error occurring when you compile the program on machine A and execute it on machine B. By default, Bifrost compiles with "-march=native" as compile option, meaning it can optimize the code for the architecture it is compiled on. By executing on a different machine, the architecture might be different, hence the "Illegal instructions". Anyway, as you are compiling and executing on the same machine, this doesn't seem to be the issue.
Surely the source of the problem is that Bifrost uses AVX2 instructions for the construction only when they are available available (hence the "-march=native"). Normally, using AVX2 instructions should be deactivated for your CPU (I see your CPU is limited to AVX) but for some reasons, it is possible that it is still activated. Hence, Bifrost tries to use AVX2 instructions while you don't have them available. How would that be possible? Honestly, I don't know. I would say "probably a Conda issue" as the source install version worked just fine but I don't want to blame anyone else than me for now :) I will look into it.

Hi Guillaume,
thanks for all your feedback, and, yes, I agree, machine incompatibility is the most likely explanation; where this is coming from in cases like this is also unclear to me (I had the same issue already with Racon). So my expectation was clearly not that you fix that right away, but rather that it shouldn't go unnoticed, in case other users run into the same problem - or, of course, somebody finds this issue by chance and has a solution :)
Best,
Peter

Conda installs precompiled binaries, so I would expect that if you want to distribute a conda package of bifrost without avx2 support, then you need to turn off avx2 support during compilation of the conda package (that is, in the bioconda recipe). I haven't found a package that does this yet, but I would guess numpy or tensorflow would have similar issues.

I should have done that some time ago: I will add an extra option in the Cmake for AVX2: OFF to deactivate, ON to activate or NATIVE to have it ON if AVX2 is available. I'm not sure if there is a way to modify the conda recipe in a way that the end user would be able to choose one of these options when installing. But once again, installing Bifrost from source is rather straightforward so I really think the conda package is a waste of time.

Hey @ptrebert and @winni2k,
I added two options to the cmake file:

-DENABLE_NATIVE_ARCH=ON/OFF to enable/disable native compilation (-march=native). Default is ON.
-DENABLE_AVX2=ON/OFF to enable/disable AVX2 instructions. Default is ON.

Those options are now explained in the README file and I also updated the Troubleshooting section with the Illegal instruction error.

I found a user question on SO about AVX2, etc. being disabled in the pip version of tensorflow.
I think one workaround would be to create two packages: one with native compilation disabled, and one with lots of extensions enabled. In the mean-time, I think it's probably fine just to push the version without native extensions to bioconda so that users have a stable version that they can easily install and use.

The main pro of Bioconda is in my opinion that it makes the install easy. How easy in this case? Well, not much easier than the source install (which has no dependency). Based on this, I'm not sure I want to disable native compilation and AVX2 instructions, which bring a nice speed up to the software, for an install which is going to be a little bit easier. Another thing that bothers me here is that large k-mers (k>31) is a compile time variable that cannot be changed with Bioconda, so anyone that works with k>31 will have to use the source install anyway.

I can see where you're coming from. If it's easy to compile, isn't that as easy to install as a conda package? I don't think that's the case, and there's some research by Serghei Manghul that backs me up on this. However, you don't need to worry about conda packaging if you don't want to. Bifrost is available on a permissive licence, and sooner or later someone who cares enough will fix the bioconda recipe for the bioinformatics community.

I did a bit more reading on the state of native support in conda. On bioconda-recipes there's an open thread on the subject, and a few more closed ones. It appears that native compilation has been an on-going subject of discussion in the conda community, and conda has so far defaulted to wide-ranging compatibility by only assuming an x86-64 architecture.
There is something called build variants in conda, and there's this package that appears to provide a path for supplying multiple binaries for different cpu architectures: https://github.com/jjhelmus/selectable_pkg_variants_example

Regarding the compile-time kmer size definition, this issue exists in McCortex as well. There, the solution is to built a kmer specific binary for a kmer size of interest (e.g. mccortex31). There is a shell script included with mccortex that selects the correct binary at run time (i.e. 'mccortex <kmer_size> [mccortex_args...]`).
For conda packaging, the bioconda recipe simply compiles a few binaries for a range of kmer sizes and includes them in the package. That seems to take care of most people's (i.e. my) requirements.

Hi @winni2k,
Thanks for all these information. I get your point regarding bioconda and the community fixing recipes. Yet, I feel very responsible for these recipes. If I just keep updating the source and no one update the recipes, people will end up using deprecated or buggy versions of Bifrost. So it's not that I don't want to take care of it, I really do but I'm lacking time for it. But hey, no one said that maintaining software was easy :)
Thank you for your link on the bioconda meta-packages, it seems to be the best solution at the moment for the problem at hand and I will probably do something like that for the next recipe update.
Thanks for the tip with McCortex. There is also BCALM2 which you can precompile for a range of k-mer sizes at first and the software will take care at run time of picking the right data structures/libraries. The thing is that for Bifrost, I would like some solution I could include directly in the API. It feels that it would be possible with a major refactoring. The idea (maybe naive) is that the MAX_KMER_SIZE parameter is mostly used in the type Kmer as a static variable. Type Kmer is currently exposed to the user in the API (some functions take as argument or return objects of type Kmer). By taking it or return strings/char arrays instead, this type would be used only internally by Bifrost and there, I would have the freedom of having something more complicated where the k-mer size would not be a static parameter anymore. It would be simpler for the user, no additional compile parameter, but the code of Bifrost would be more complex.

Though I don't have anything to add in particular about Conda recipes and related build issues, I leave the below code snippets here for people who want to automatically install Bifrost on various infrastructure potentially supporting the AVX2 extension (and cannot wait for appropriate builds being available in a Conda channel :wink: ).
I use the following Conda environment (simpler specifications would likely work as well) as part of a Snakemake pipeline, and the setup works just fine inside this environment:
name: compile
channels:
  - conda-forge
  - bioconda
dependencies:
  - python=3.6
  - pip=20.1.1
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=1_llvm
  - binutils-meta=1.0.4=0
  - binutils_impl_linux-64=2.34=h53a641e_2
  - binutils_linux-64=2.34=hc952b39_20
  - c-compiler=1.0.4=h516909a_0
  - cmake=3.17.0=h28c56e5_0
  - compilers=1.0.4=0
  - cxx-compiler=1.0.4=hc9558a2_0
  - fortran-compiler=1.0.4=he991be0_0
  - gcc_impl_linux-64=7.5.0=hd420e75_6
  - gcc_linux-64=7.5.0=h09487f9_20
  - gfortran_impl_linux-64=7.5.0=hdf63c60_6
  - gfortran_linux-64=7.5.0=h09487f9_20
  - glib=2.64.3=h6f030ca_0
  - gxx_impl_linux-64=7.5.0=hdf63c60_6
  - gxx_linux-64=7.5.0=h09487f9_20
  - ld_impl_linux-64=2.34=h53a641e_2
  - libblas=3.8.0=16_openblas
  - libcblas=3.8.0=16_openblas
  - libclang=9.0.1=default_hde54327_0
  - libcurl=7.69.1=hf7181ac_0
  - libgcc-ng=9.2.0=h24d8f2e_2
  - libgfortran-ng=7.5.0=hdf63c60_6
  - liblapack=3.8.0=16_openblas
  - libllvm9=9.0.1=he513fc3_1
  - libopenblas=0.3.9=h5ec1e0e_0
  - libstdcxx-ng=9.2.0=hdf63c60_2
  - llvm-openmp=10.0.0=hc9558a2_0
  - pkg-config=0.29.2=h516909a_1006
  - pthread-stubs=0.4=h14c3975_1001
  - xz=5.2.5=h516909a_0
  - zlib=1.2.11=h516909a_1006

Just following the setup instructions and running  cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX .. && make && make install installs the Bifrost binary into the Conda environment, i.e., Bifrost is available in $PATH after activating the Conda environment.

This is really cool @ptrebert! Thanks for sharing! I might start doing this kind of thing in some of my snakemake rules with other tools that would benefit from native compilation.

@GuillaumeHolley I'd be happy to tinker with the bifrost package on bioconda for you, I just don't want to make a decision on this for you given how much you are invested in the code ;)
Of the options described above, how would you like the bioconda package to proceed? I would recommend two steps. First, fixing the installation problems by making the bifrost package be compiled with -march=x86-64. This will slow things down, but at least guarantee that the package is installable by everyone.
Next, I can take a closer look at https://github.com/jjhelmus/selectable_pkg_variants_example and see if I can apply the recommendations therein.
@GuillaumeHolley, would it be possible for you to create a flag in the cmake file that allows the direct setting of the -march argument during compilation?

Hey @winni2k,
Sorry for the delay. I have changed the cmake option -DENABLE_NATIVE_ARCH into -DCOMPILATION_ARCH:

Default is native compilation (-march=native) with -DCOMPILATION_ARCH=native.
Bioconda can use the option -DCOMPILATION_ARCH=x86-64 (any -march= argument will work).
Disabling any form of architecture optimization is DCOMPILATION_ARCH=OFF (basically remove the -march= from the list of compilation options.

Let me know if that works for you ;)

Great! I'll change the bifrost bioconda recipe to use -march=x86-64 for now.
We should discuss what else to do. I have read through https://github.com/jjhelmus/selectable_pkg_variants_example a bit more, and it appears that this solution requires the user to select an optimization version during installation (i.e. bifrost or bifrost-skylake) based on the CPU that they are running. @ptrebert, would that kind of thing work for your use case? Because it sounds like you are installing on a range of architectures and don't really know which one you happen to be on during installation?

@winni2k
Of course, I can only speak for myself/the infrastructure I am using, but heterogeneous architectures are often encountered in cluster environments, where different architectures are usually selectable as "resource". Hence, I think the above solution is perfectly fine, although I would suggest to make the requirement more explicit, i.e., bifrost and bifrost-avx2. As an example, the software RAxML uses this way of distinguishing different binaries that rely on SSE3, AVX2 etc

Excellent. Thanks for the input @ptrebert.
@GuillaumeHolley can you create a release of the current master branch so that I can use it in the bioconda recipe?

I have been reading a bit more on the march argument in gcc, and I came across these three pages that seem helpful:

https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
https://wiki.gentoo.org/wiki/Safe_CFLAGS
https://wiki.gentoo.org/wiki/GCC_optimization#Optimization_FAQs

The first link is the gcc documentation on what can be supplied to the march flag. The second link is part of the gentoo wiki that describes safe/recommended CFLAGS that include the march flag to use with different CPU architectures. The third link explains why the gentoo wiki makes the recommendations it does in link 2.
Observations:

There are a lot of CPU architectures out there that the march flag can optimize for.
There are a lot of so-called 64 bit extensions and the set of supported extensions varies a great deal across even just intel archictectures. For example, -march=core2 turns on the instruction sets MMX, SSE, SSE2, SSE3 and SSSE3, whereas -march=skylake turns on the instruction sets MOVBE, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA, BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC and XSAVES.
From compiling bifrost on my machine it looks like march=x84-64 supports SSE2 but not SSE3 instructions.

Given the number of instruction sets that can be turned on or off, I think it would make sense to compile code with the CPU-specific march flag x86-64, core2, and skylake and create a package for each of the three, and then add more packages if there is demand.
PS This SO question was useful in diagnosing which instruction sets got used during my test compilations: https://stackoverflow.com/a/50056059/528691

Perhaps also sandybridge for an architecture that supports AVX but not AVX2.

I had a chat on the gitter channel with the folks at bioconda, and I think the idea of having multiple bioconda packages for a single project did not go over well. Also, I find the solution proposed by jjhelmus a bit daunting.
Instead, I remembered that C/C++ code can be packaged in a python package, and I found a tool-chain (scikit-build) that allows this quite easily from a CMake project. I have created a PR (#24) that includes my first attempt at packaging bifrost in a python package. I have deployed the source-only package to pypi under the name bifrost-src.
So, this now allows the compilation and installation of bifrost through pip using the command pip install bifrost-src --no-binary bifrost-src. This should create a binary using -march=native. My PR also includes an environment.yml for installing the compilation dependencies that can't be installed through pip (zlib). Here is the environment.yml again for reference:
channels:
  - conda-forge
dependencies:
  - python=3.6
  - pip=20.1.1
  - zlib=1.2.11
  - pip:
    - bifrost-src

I think what we can do now is submit this environment.yml as a meta-package to bioconda, and this will use pip to compile bifrost on the installed machine natively.
@ptrebert can you try and see if the environment.yml works on your machines? I can get it to work on my mac and a skylake machine running debian 10.

Oh, I had to change the linking of the Bifrost binary to use the static library because the dynamic library was not being found by the Bifrost binary at runtime. I bet this is an RPATH issue, and RPATH issues are still on the todo list for the scikit-build project. Is it a terrible problem if we link the Bifrost binary statically instead of dynamically? I don't know CMake very well. Is there an easy way to create a CMake flag so we can link statically only for the python package?

An update: I tried installing the pypi version into the miniconda3 minimal docker image, and I needed the following environment.yml to get the package to install.
channels:
  - conda-forge
dependencies:
  - python>=3.6
  - pip=20.1.1
  - zlib=1.2.11
  - binutils=2.32
  - gxx_linux-64=7.3.0
  - pip:
    - bifrost-src

@winni2k
Sorry that it took me so long to come back to this. I just tested installing Bifrost using the environment that you posted above (the one including binutils etc). It looks like this is working even on the machines that lack the AVX2 instruction set.

Hey everyone,
I apologize for the delay. I am currently in holidays but as soon as I am back next week, I will make a new release for Bifrost ;) Thank you for you help!

Bifrost v1.0.4 released. I will make the Brew package in the coming days.

Dear @winni2k and @ptrebert,
Bifrost 1.0.4 is officially released as Bioconda and Brew packages. The Bioconda/Brew package disables native compilation so it shouldn't be an issue to install on one machine and use it on another one. Even better, the Bioconda package is now available for MacOS (for some reasons, I couldn't pass Bioconda's CI test for OSX before).


Updating using of folklore

Updated folklore to non beta current version
Updated import usage to match folklore 2.1.0
Tests and build were run and passed

.

Thanks Chris!


We confirmed that the ActionBar title fails to render sometimes. Can you share your case so we make sure we'll cover it, too?

@sis0k0 nice i thought it was just me not sure how much my info would help but the app currently has about 25 pages each updating their titles using ngx-translate and icons the thing is the icons show fine. Another thing i noticed is the way *ngIf worked with the ActionBar changed in v4 because before i could of done something like the following
<ActionBar title="Home">
    <NavigationButton icon="res://ic_arrow_back_white_24dp" (tap)="routerExtensions.back()"></NavigationButton>
    <ActionItem *ngIf="isIOS" (tap)="routerExtensions.back()" ios.position="left" icon="res://ic_chevron_left_white_36pt"></ActionItem>

    <ActionItem *ngIf="isAndroid" (tap)="share()">
        <Button text="" class="material-icons action-bar-item"></Button>
    </ActionItem>
    <ActionItem *ngIf="isIOS" (tap)="share()" ios.systemIcon="9" ios.position="right"></ActionItem>
</ActionBar>

now nothing shows so i had to use a directive

Fixed with 1.5.1 patch.


About hand pose

I got the pose of hands from the output of the demo code. When I apply the pose to an avatar, its hands have weird pose. I guess it is related to the parameter "flat_hand_mean" of the SMPLX model. So I am wondering if the Hand4Whole model is trained with flat_hand_mean=False? If I would like a initial "flat hand", should I train the model from scratch?

Yes it is traiend with flat_hand_mean=False, and you can check here to get that
https://github.com/vchoutas/smplx/blob/main/smplx/body_models.py

Thanks for your reply. I would check it now.

you can simply add subtract the mean pose from the current estimated hand pose if you want some hand pose with flat_hand_mean=True

mean

thank you so much for reply, you meaning finetuing model is not actually necessary ?   we just need to subtract the mean pose ,then we can get the right pose ?

Yeap. you can see what they do internally
https://github.com/vchoutas/smplx/blob/1265df7ba545e8b00f72e7c557c766e15c71632f/smplx/body_models.py#L630
https://github.com/vchoutas/smplx/blob/1265df7ba545e8b00f72e7c557c766e15c71632f/smplx/body_models.py#L737C15-L737C15

Yeap. you can see what they do internally https://github.com/vchoutas/smplx/blob/1265df7ba545e8b00f72e7c557c766e15c71632f/smplx/body_models.py#L630 https://github.com/vchoutas/smplx/blob/1265df7ba545e8b00f72e7c557c766e15c71632f/smplx/body_models.py#L737C15-L737C15

Appreciate it!


You can't set adapter to DialogsList. Use #setAdapter(DialogsListAdapter) instead.

Hi,
I am android development novice, and i am use kotlin and ChatKit in my project,
when i set Adapter in fragment, i always get this error:
You can't set adapter to DialogsList. Use #setAdapter(DialogsListAdapter) instead.
This is part of the code：
mList = view.findViewById<DialogsList>(R.id.dialogsList)

mAdapter = DialogsListAdapter(R.layout.dialog_view_holder,
                DialogViewHolder::class.java,
                ImageLoader { imageView: ImageView, url: String ->
                    Picasso.with(this.context).load(url).into(imageView)
                })

mList.adapter = mAdapter

any suggestions for this error?

It seems the problem is that mAdapter  has been declared with type Adapter
so you probably have a line that looks like var mAdapter: Adapter when it should look like var mAdapter: DialogsListAdapter

@hbmartin
this is the fragment:

class DialogsListFragment: BaseMainFragment() {

    private lateinit var mToolbar: Toolbar
    private lateinit var mList: DialogsList
    private lateinit var mAdapter: DialogsListAdapter<Dialog>

    @Nullable
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        val view = inflater.inflate(R.layout.dialog_list_fragment, container, false)
        initView(view)
        return view
    }

    private fun initView(view: View) {
        mList = view.findViewById<DialogsList>(R.id.dialogsList)
        mToolbar = view.findViewById<Toolbar>(R.id.toolbar)
        mToolbar.title = "Message"

    }

    override fun onLazyInitView(savedInstanceState: Bundle?) {
        super.onLazyInitView(savedInstanceState)

        val manager = LinearLayoutManager(_mActivity)

        mAdapter = DialogsListAdapter(R.layout.dialog_view_holder,
                DialogViewHolder::class.java,
                ImageLoader { imageView: ImageView, url: String ->
                    Picasso.with(this.context).load(url).into(imageView)
                })
        mAdapter.setItems(DialogsFixtures().getDialogs())

        mList.adapter = mAdapter
        mList.layoutManager = manager
    }
}

Where is you DialogViewHolder coming from?

hmm, maybe try mList.adapter = mAdapter as DialogsListAdapter
otherwise you might have to write a Kotlin extension to handle the setter's class confusion

Alternately you can try building the library yourself with my latest commit here: https://github.com/hbmartin/ChatKit/commits/kotlin-support

fix it by just call the setAdapter funtion：
mList.setAdapter(mAdapter)
thanks, @hbmartin


I want the download to start instantly?

I have two activities so:

One for enqueueing a download at runtime and it may enqueue more than one download. I open an instance of fetch with namespace "ALL_DOWNLOADS" and enqueue a request. But I never display any progress in this activity.

The second activity displays the progress of all downloads. So I open an instance of Fetch with the same namespace and display the progress for each download.

I can see all downloads, but something is happening: The download does not start until I enter the next activity. I want the download to start instantly in the background just after enqueueing in the first activity. And only display progress when I go to the second activity.
How can I achieve this??

@Xenolion
Make sure the new request you are creating has the downloadOnEnqueue property set to true. Example:
Request request = new Request("url", "file");
request.setDownloadOnEnqueue(true);

Let me know if this helps.

the behavior was not changed


iterator support (begin(), end())

is there support for iterators?
such as supported by std regex?
std::regex_search(data.begin(), data.end(), ... );

Iterators are provided with the reflex library to search:
for (auto& iter : some_matcher.find)
  ...

For example, with PCRE2:
#include <reflex/pcre2matcher.h>
for (auto& match : reflex::PCRE2Matcher("\\w+", "How now brown cow.").find)
  std::cout << match.text() << std::endl;

displays
How
now
brown
cow

You can bind the input "data" to the matcher with the input() method or pass it as an argument to the constructor as shown above with the literal string. Input can be string, side string or an open file/stream handle.
See https://www.genivia.com/doc/reflex/html/index.html#regex-methods-find

what about for the input itself? eg
#include <reflex/pcre2matcher.h>

// a.txt : How now brown cow.

// obtain a bidirectional iterator to a.txt, from position 0 ('H') to EOF
// underlying interface could be mmap/MappedFile based, or std::ifstream based
auto it = BidirIt("a.txt");

// invoke the matcher with the bidirectional iterator, this avoids needing to read back the file if it is a large vile (size > 2GB)
for (auto& match : reflex::PCRE2Matcher("\\w+", it.begin(), it.end()).find)
  std::cout << match.text() << std::endl;

Non-matching input can be matched with a scanner scan instead of searching with find.
  for (auto& match : reflex::PCRE2Matcher("(abc)|(.|\\n)", argv[1]).scan)
    if (match.accept() == 1)
      std::cout << "match: " << match.text() << std::endl;
    else
      std::cout << "not a match: " << match.text() << std::endl;

With this approach a non-match is a single character, not a string though.
To get all non-matches without matches, use split to split up the input between the patterns specified.
There is another more efficient way using a callback function registered as a handle. This handle is passed the buffer contents that are "shifted" out when the matcher advances. This way you get the input before a match even when that input part is very large and won't fit in a buffer and is shifted out. It's the most efficient way because we do not need a large buffer (as large as a whole file), which is used by ugrep. The part that fits in a buffer is always after the last newline (unless a line is several KB long). If you want to buffer the entire input, then use the buffer() method of the matcher. This means that all text (matches and non-matches) are in a single buffer space. You can also use first() - border() to point to border() bytes (non-0-terminated) before the text match from the start of a line.

alright, but this still implies we can store the entire input in RAM for the scanner to scan, which might not be possible
for example, we may need to scan a file who's size is larger than our available free RAM

Storing the entire input in RAM is not the approach I'd advocate. But you can define a regex that consumes the input between the matches you want and distinguish them by group number. If a match is very large, this has to be buffered though. So buffer size depends on the pattern matched. So spitting out a single mismatching character at a time as I've suggested is not a bad idea for performance.
Otherwise, you may want to think about defining a buffer shift handler as I've hinted at. The documentation doesn't mention this handler. It mentions other type of handlers. It's the reflex::AbstractMatcher::Handler abstract class that is a functor you can declare with behavior you want. Then set if with reflex::AbstractMatcher::set_handler(handler). The functor is passed the buffer buf, the amount shifted out of the buffer gap, and the position in the input num of the begin of line ("character count of the input till bol_").

hmm alright

It's often a battle of tradeoffs in technology and algorithms. Either it's a simple way, which is less efficient and eats memory, or the hard way, which is fast and uses memory smartly. Don't ask for miracles :)


Dates Are Wrong

Using the premium full archive and search-tweets, I have found a tweet (https://twitter.com/TheFatApple/status/29118205491) that has a date of Oct 29, 2010. However, the API says it's 'created_at' attribute is November 4, 2010, which is wrong. This may be an API related bug, but I'm bringing it up here just to see if anyone else has experienced something similar

I don't see where in the Tweet object the November 4 date appears - that Tweet ID has a created_at attribute value of Fri Oct 29 19:56:59 +0000 2010 as far as I can see. How can I reproduce the steps you've been through?

Hmm that's interesting, I can send you my code and tell you what I did when I get home tonight

Ohh, I think the issue is not with the API, but with the Tweet parser. I was mistakenly using tweet.created_at_datetime instead of tweet['created_at'].
My main code https://pastebin.com/1VWNgXdr
InputOutput.py (just writes to csv while printing stuff) https://pastebin.com/EkiwTNDr
Some of the csv output https://pastebin.com/qWgd9Af0
The first tweet is https://twitter.com/MelissaAWardy/status/29627651793, which has a 'created_at' attribute of 'Thu Nov 04 01:33:32 +0000 2010' but str(tweet.created_at_datetime) gives 2010-11-04 01:43:01. Likewise, for the last tweet in that sample output, https://twitter.com/EconProfThomas/status/29616766978 has a 'created_at' of 'Wed Nov 03 23:22:00 +0000 2010' but a str(tweet.created_at_datetime) gives 2010-11-04 01:43:01 again.

Seems using tweet['created_at'] straightened this out...


Multiple input/output directories

For a project with a complex structure and several modules, it is necessary that there is a way to add multiple input and output directories, like
            'path/to/css': 'path/to/sass',
            'path/to/another/css': 'path/to/another/sass'

or
sassDir: [
            'path/to/sass',
            'path/to/another/sass'
          ],
cssDir: [
         'path/to/css',
         'path/to/another/css'
]

You can use this plugin:
https://www.npmjs.com/package/grunt-compass-multiple


Fatal Error in MysqlDriver due to incompatible method signature from interface Doctrine\DBAL\Driver

Laravel Version: 8.18.1
PHP Version: 7.4.12
Database Driver & Version: MySQL 5.7.28

Description:
We just upgraded to the latest laravel version and noticed the following fatal error in src/Illuminate/Database/PDO/MySqlDriver.php which gets reported from phpstan.
PHP Fatal error:  Declaration of Illuminate\Database\PDO\Concerns\ConnectsToDatabase::connect(array $params) must be compatible with Doctrine\DBAL\Driver::connect(array $params, $username = NULL, $password = NULL, array $driverOptions = Array) in application/vendor/laravel/framework/src/Illuminate/Database/PDO/MySqlDriver.php on line 16
Fatal error: Declaration of Illuminate\Database\PDO\Concerns\ConnectsToDatabase::connect(array $params) must be compatible with Doctrine\DBAL\Driver::connect(array $params, $username = NULL, $password = NULL, array $driverOptions = Array) in application/vendor/laravel/framework/src/Illuminate/Database/PDO/MySqlDriver.php on line 16

This currently only happens in phpstan due to
protected function getDoctrineDriver()
    {
        return class_exists(Version::class) ? new DoctrineDriver : new MySqlDriver;
    }

as it loads the MysqlDriver-class.

What version of the DBAL library are you using?

We don't optimize for tools like PHPStan. If you are experiencing a genuine app bug please send in a PR (which you did it seems).

@driesvints this is not a phpstan error, but a native fatal error from php.

You said:

This currently only happens in phpstan


Conflict with Maestro

Maestro mod will show this button in the Playlist Enhancer.
Also, but it is very minor, the button with the Combine action doesn't have a centered icon in it.

Thanks @apoapostolov - I'll take a look and see if I can get them both working together properly.
The "Curate" button should have wording on it next to the icon which I don't think it visible with Maestro installed so I'll check it out

Fixed in latest release


MINOR:Use StoreBuilder.name() for node name

Initially, I wanted to make sure the name for the StateStoreNode was unique.
But we ensure name uniqueness in with following steps

we create store names by appending a number from an incrementing counter
if an attempt is made to add a state store with an existing name a TopologyException is thrown.

With that in mind, it will be more clear to use the StoreBuilder.name() instead.
For testing, I ran the existing streams unit tests
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

@guozhangwang @mjsax @vvcephei
\cc @kamalcph


[#152632922] Remove file extensions from product page links

What
Links to the product pages shouldn't have a file extension because
Middleman renders them without and that's how they are referenced in the
product pages themselves.
Most of these are in the header, but there were also some references to the
support page within the custom domain documentation.
These also caused the requests to redirect off of service.gov.uk and go to
cloudapps.digital because of a bug that we're fixing in a separate story.
How to review
Describe the steps required to test the changes.

Preview the content locally (see README) and check that it renders as expected.
Follow all of the links in the top-right header and check that they work.
Follow all of the support links in /#using-a-custom-domain and check that they work.

Who can review
Anyone.

Changes look good, I'm not sure the commit message is correct though. The product pages are no longer rendered by middleman - they're now a Sinatra app. I believe it was this change that changed the URLs.

Changes look good, I'm not sure the commit message is correct though. The product pages are no longer rendered by middleman - they're now a Sinatra app. I believe it was this change that changed the URLs.

ACK, removed the referenced and rebased.


Send E-mail Does Not Work in vCheck.ps1

If I set vCheck to send an e-mail, version 6.22-Alpha-9 no longer sends it.  I've found that if I change line 746 back to what it used to be (  if ($SendEmail) {  ), then the e-mail sends just fine.  So the problem appears to be either the $EmailReportEvenIfEmpty variable or the $PluginResult Count calculation.
In my GlobalVariables file, I have $SendEmail = $true and $EmailReportEvenIfEmpty = $true

I don't mind trying to get this working - I was thinking of adding a similar $DisplayReportEvenIfEmpty anyway.
Note to self
Parameter first implemented: #119
Sneddo's implementation: b0976a07f2001f2e708ab80ff0f321266a2c30af
Sneddo's backout: 53516d386c8f7bfd5a7ad4647b00c08eb5d61695

This should now be closed with pull #329


User not redirected after login for new issue

Gogs version (or commit ref): <IP_ADDRESS>5
Git version: 2.11.1
Operating system: Windows
Database (use [x]):

[ ] PostgreSQL
[x] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gogs.io:

[x] Yes (provide example URL)
[ ] No
[ ] Not relevant

Description
If a user wants to submit an issue, he is redirected to Dashboard after log in and not the new issue site. The is especially difficult if the user wants to submit an issue to a private repository, where the issue site can only be found by direct link.

And also if the user just wants to access the Repository page.
So it would be great that after authentication the user will be redirected to the URL which he first intended to visit.

I've noticed that the redirection already happens when the "remember me" checkbox had been checked: you open the link, the browser redirects to the login page and immediately to the expected page. The functionality is already there, it just has to be used in the manual login process.

This should be fixed already.


too many error with flutter 3.0.5 help me please

Running Gradle task 'assembleDebug'...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-0.6.1/lib/src/qr_code_scanner.dart:68:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.

'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance!.addObserver(_observer);
^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-0.6.1/lib/src/qr_code_scanner.dart:86:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance!.removeObserver(_observer);
^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/infinite_scroll_pagination-3.1.0/lib/src/ui/paged_sliver_builder.dart:257:24: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/binding.dart').
WidgetsBinding.instance?.addPostFrameCallback((_) {
^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_math_fork-0.5.0/lib/src/widgets/selectable.dart:459:24: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/scheduler/binding.dart').
SchedulerBinding.instance!.addPostFrameCallback((_) {
^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_math_fork-0.5.0/lib/src/widgets/selection/overlay_manager.dart:138:28: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/scheduler/binding.dart').
if (SchedulerBinding.instance!.schedulerPhase ==
^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_math_fork-0.5.0/lib/src/widgets/selection/overlay_manager.dart:140:26: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/scheduler/binding.dart').
SchedulerBinding.instance!
^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_math_fork-0.5.0/lib/src/widgets/selection/web_selection_manager.dart:119:24: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/scheduler/binding.dart').
SchedulerBinding.instance!
^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_math_fork-0.5.0/lib/src/widgets/selection/overlay.dart:141:26: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/scheduler/binding.dart').
if (SchedulerBinding.instance!.schedulerPhase ==
^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_math_fork-0.5.0/lib/src/widgets/selection/overlay.dart:143:24: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/scheduler/binding.dart').
SchedulerBinding.instance!.addPostFrameCallback(_markNeedsBuild);
^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_math_fork-0.5.0/lib/src/widgets/selection/overlay.dart:193:26: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/scheduler/binding.dart').
if (SchedulerBinding.instance!.schedulerPhase ==
^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_math_fork-0.5.0/lib/src/widgets/selection/overlay.dart:195:24: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/scheduler/binding.dart').
SchedulerBinding.instance!.addPostFrameCallback(_markNeedsBuild);
^
Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\device_info-2.0.3\android\src\main\java\io\flutter\plugins\deviceinfo\DeviceInfoPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\qr_code_scanner-0.6.1\android\src\main\kotlin\net\touchcapture\qr\flutterqr\QRView.kt: (23, 1): Class 'QRView' is not abstract and does not implement abstract member public abstract fun onRequestPermissionsResult(p0: Int, p1: Array<(out) String!>, p2: IntArray): Boolean defined in io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\qr_code_scanner-0.6.1\android\src\main\kotlin\net\touchcapture\qr\flutterqr\QRView.kt: (217, 26): Null can not be a value of a non-null type String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\qr_code_scanner-0.6.1\android\src\main\kotlin\net\touchcapture\qr\flutterqr\QRView.kt: (248, 26): Null can not be a value of a non-null type String
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\qr_code_scanner-0.6.1\android\src\main\kotlin\net\touchcapture\qr\flutterqr\QRView.kt: (301, 5): 'onRequestPermissionsResult' overrides nothing
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\qr_code_scanner-0.6.1\android\src\main\kotlin\net\touchcapture\qr\flutterqr\QRViewFactory.kt: (10, 1): Class 'QRViewFactory' is not abstract and does not implement abstract base class member public abstract fun create(p0: Context?, p1: Int, p2: Any?): PlatformView defined in io.flutter.plugin.platform.PlatformViewFactory
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\qr_code_scanner-0.6.1\android\src\main\kotlin\net\touchcapture\qr\flutterqr\QRViewFactory.kt: (13, 5): 'create' overrides nothing

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':qr_code_scanner:compileDebugKotlin'.

Compilation error. See log for more details

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 1m 45s
Exception: Gradle task assembleDebug failed with exit code 1

Writing a new app is faster than debugging this source code.

Btw, need to change version to qr library.
You can search the Issue for it.

Hello @Benzhtb!
Please try with the latest source code base it should work.


Unfamiliar with Python guide on how to run?

So I'm not really familiar with python and I cant figure out how to open it, is it possible since you are unable to make an executable, to explain to a newbie how to run it? Thanks in advance.

Sorry for the late reply, didn't get a notification for this.
All you need to do is install Python3 (https://www.python.org/downloads/windows/) and the default settings should be fine but install as you wish as long as you're letting it update your PATH variable.
Then you just follow the steps on here, all you really need to do is run the command pip install -r requirements.txt inside the folder through CMD or PowerShell and then you can use 1fichier-dl.vbs to launch.


Juliet: TipsToken tests with accesscontrol implemented

So i worked with juliet to implement the access control in the tipsToken contract and the test has been implemented too and both passes

No merge conflict, according to GitHub, but the branch throws some on errors on testing in local. I'll merge anyway as part of an effort to fix, as discussed with @developeruche.


The help document covers the block selection menu on "{ } JavaScript" mode

Repro steps:
• Navigate to https://makecode.microbit.org/beta
• On "Blocks" page and open project document on the right-page and blcok selection menu together
• Click "JavaScript" and then switch to "{ } JavaScript" page
• Open project document on the right-page and blcok selection menu together again
Expect result:
Only open/close help document button floating on the block selection menu

Actual result:
After switching to "{ } JavaScript" page, the help document covers the block selection menu

z-index issue. maybe we should move the zindex (global file architecture) to v0.

I have moved this issue to https://github.com/Microsoft/pxt-microbit/issues


Misc plugin code cleanup

Moves some stuff from maven/gradle ProjectProperties to ConfigurationPropertyValidator
Made auth config validation non-static
Removed AuthProperty interface

Part of #594

Just pushed the "Delete Branch" button. You can always restore it later with "Restore Branch".

Even if plugins.common is not just for Gradle/Maven, I feel like we could have something (else) for Gradle/Maven not to duplicate code between them. Thinking about code duplication, I think we should. Gradle and Maven are the two top players, why not?


Unbound Variable ISOLATED_REGIONS

Good Day,
When attempting to run the script with CACHE_CONTAINER_IMAGES set to true, the install_worker.sh script throws an unbound variable error for ISOLATED_REGIONS on line 405.
Looking at the history of the install_worker.sh file, it appears that the ISOLATED_REGIONS variable used to be set if the variable INSTALL_AWSCLI was set to true, but the code has been refactored since then and is no longer gets set as a static variable.

@fiendishfeather did you ever get past this issue? I apologize I didn't see this issue get posted.


NixOS module?

Hey, this is a super nifty project— it looks like the native/supported deployment mechanism for it is via a container, but I'm wondering if there'd be any interest in supplying a flake file and NixOS module such that this could be deployed declaratively on NixOS using the standard configuration.nix, similar to how Hydra works.

Hey!
We do have a NixOS module for Nixery in TVL: https://cs.tvl.fyi/depot/-/blob/ops/modules/nixery.nix
This actually runs the public nixery.dev instance.
It only supports local storage at the moment, but could be expanded to cover more config options. It currently assumes that Nixery is built in-tree, but could have an option for specifying the nixery package to use instead (would always be required as Nixery is not currently in nixpkgs).
I'd be happy to see that module extended for supporting these things, maybe it should even be moved into the Nixery source tree (which lives under /tools/nixery in our upstream repo), and we'd definitely accept changes for these.
Note that this repository on Github is just a mirror. We use Gerrit at cl.tvl.fyi for our actual development. It's configured to allow login via Github and some other things, so if you're interested in contributing this you can log in there and propose a change.
There are some contribution guidelines here: https://cs.tvl.fyi/depot/-/blob/docs/CONTRIBUTING.md
And some information about code review flows: https://cs.tvl.fyi/depot/-/blob/docs/REVIEWS.md
If you're decide to contribute and get stuck on anything, you can also reach us via chat:

We mostly hang out on IRC. You can find us in #tvl on hackint, which is also reachable via XMPP at<EMAIL_ADDRESS>(sic!) and via Matrix at #tvl:hackint.org.

(Also the stuff I wrote here should probably be in a contributing guidelines doc in the Nixery source tree, but there's too little time and people to keep everything up to date at the moment :/)
And finally, we have a strict policy against experimental features and stick to Nix 2.3 while working on Tvix, so a flake file would not be accepted - but it should also not be necessary if we're just polishing the module.

And finally, we have a strict policy against experimental features and stick to Nix 2.3

May I ask why?

Okay, thanks for the pointer on this! For anyone else who wants to run Nixery on a flake-based NixOS machine, here's as far as I made it:
# to the inputs section of flake.nix
    nixery-flake = {
      type = "github";
      owner = "tazjin";
      repo = "nixery";
      flake = false;
    };

# to the outputs section of flake.nix
      specialArgs = {
        nixery-pkgs = import nixery-flake.outPath {
          pkgs = import nixpkgs {
            inherit system;
          };
        };
      };

And then in the main configuration:
{ nixery-pkgs, nix, pkgs, ... }:

let
  description = "Nixery";
  storagePath = "/var/lib/nixery";

  nixery = nixery-pkgs.nixery.overrideAttrs(old: {
    # Drop the nix-1p documentation page as it doesn't build in pure evaluation.
    postInstall = ''
      wrapProgram $out/bin/server \
        --prefix PATH : ${nixery-pkgs.nixery-prepare-image}/bin \
        --prefix PATH : ${nix}/bin
    '';
  });

in
{
  systemd.services.nixery = {
    inherit description;
    wantedBy = [ "multi-user.target" ];

    serviceConfig = {
      DynamicUser = true;
      StateDirectory = "nixery";
      Restart = "always";
      ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p ${storagePath}";
      ExecStart = "${nixery}/bin/server";
    };

    environment = {
      PORT = "8080";
      NIXERY_PKGS_PATH = pkgs.path;
      NIXERY_STORAGE_BACKEND = "filesystem";
      NIX_TIMEOUT = "60";
      STORAGE_PATH = storagePath;
      WEB_DIR = "/dev/null";
    };
  };
}

are there plans to upstream a nixery module/package to nixpkgs at somepoint?


Add files via upload

Factorial Of Large Number < Edit this part>
You Can find Factorial of any of the Number(upto 100000).
Fixes # (issue)
Type of change
Please delete options that are not relevant.

[x] New feature (non-breaking change which adds functionality)

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas

Plagiarism :
https://github.com/Prince294/Hacktoberfest2020/commit/4c8c3ff552b92eea351bf3aa75f166e6c5b23175


Update ChannelConfig of open channels

Fixes #952.

Nice, what parts of the ldk config can we change with that specifically?

With this PR the only thing that we are changing is the ability to override the ChannelConfig for open channels. Since this feature is only used by the coordinator and the coordinator currently only cares about updating the proportional routing fees, that's all that we can do.
Eventually we might want to use this feature to change other bits.

I guess that will have no impact on the handshake?

Yep.


Duplicate email in notification

When I receive an email that is sorted in several folders,  the notification I receive tells me I have two (or more, actually as many as folders containing the email) unread messages even though I have just one.
I mostly see that with my redirected addresses as emails go into both inbox and the folder for my redirected addresses.

That's expected behavior when there are multiple messages.
If that's because of multiple labels in Gmail see issue #752.


Put documentation in lib.rs

When cargo doc generates documentation, it looks at lib.rs to to generate the first page.
That first page is what's shown in docs.rs, for example: https://docs.rs/rhai-rand/0.1.0/rhai_rand
Right now it is empty.  The usual practice is have a copy of README modified for it.

I was just noticing that. The patch version number will have to be bumped to publish any changes but I can handle this for you if that's okay.

Go ahead!  Consider it your repo.

You can use cargo doc to fine-tune your docs until it is just right.


WAPA	BSP (Business Server Pages) Application

BSP_EXPORT_CLASSES
BSP_SHOW_SOURCE
cl_o2_api_pages=>load_with_access_permission
class CL_O2_PAGE

class cl_bsp_api_generate?

For BSP UI5 repositories there is the class /UI5/CL_UI5_REP_DT that is used by /UI5/UI5_REPOSITORY_LOAD report to upload and download the files from the BSP repository. Would be great to have ABAP GIT to support this so the UI5 html/js/css can be stored in git and synced to the abap system in a CI enviroment. I'm interested in helping with this implementation.

cool
abapGit is targeted for basis release 702, I guess the UI5 stuff was not created back then.
So there are 2 options as I see it:

Use CL_BSP_API_GENERATE to upload/download the sources. This is also the backend method used by the UI5 classes, see eg class /UI5/CL_UI5_REP_PERSISTENCE method /UI5/IF_UI5_REP_PERSISTENCE~WRITE_BSP_PAGE

Write a abapGit plugin using the UI5 classes, see https://github.com/larshp/abapGit-Plugins there are no version restrictions for these, as it doesnt matter if there are syntax errors in isolated classes.

I recommend going for 1, as this should work all the way back to 702(and before?)

On another note, you sould also check the following project https://github.com/Yelcho/sapui5-deployer it might work out for you. I think there is also another similar project, but dont remember the name of it.

fixed in https://github.com/larshp/abapGit/issues/711


Allow block context menu to be customized

Is your feature request related to a problem? Please describe.
onShowContextMenu allows the context menu of the workspace to be customized. There should be a similar function to customize the context menu of all blocks.
Describe the solution you'd like
Provide a variable called onShowBlockContextMenu, whose type is (block: Blockly.Block, info: pxtc.BlocksInfo, items: Blockly.ContextMenu.MenuItem[]) => void

Who is doing the customization? We don't allow packages to load JavaScript so do you mean the target?

Yes, the target.


Promise never settles when one of multiple queries fails

I came across an issue when sending multiple queries that end on the same task queue, when one of those failed all the Promises returned from those different source.query() calls never settle (i.e. neither resolve nor reject).
I already debugged this for many hours, and tried to find a minimal reproduction, without success unfortunately. This demo tries to mimic what we are doing in our app: https://codesandbox.io/s/orbit-pending-promise-056c2. But unfortunately as I said it does not show the same effect we experience in the real app. Not sure what piece of the puzzle is missing here...
So in that demo that final catch block (in loadData()) does get executed (caused by the 400 response from the missing book request), while in our app the promise never settles.
One important piece of the puzzle must be the request strategies' catch hook, which is essentially identical to https://github.com/cerebris/peeps-ember-orbit/blob/master/app/data-strategies/store-remote-query-pessimistic.js.
From debugging through the various (async) orbit calls, I have a strong feeling that it must be some kind of interference between the tasks invoked through the actual query calls, and those coming from requestQueue.skip() (as they also call the queue's process()).
More specifically this is what I see in our app:

The request strategy's catch hook is called before this one: https://github.com/orbitjs/orbit/blob/master/packages/%40orbit/core/src/task-queue.ts#L361-L365.
the .skip() causes _resolution to be set to null here: https://github.com/orbitjs/orbit/blob/master/packages/%40orbit/core/src/task-queue.ts#L339
the following process() call sets a new Promise instance here: https://github.com/orbitjs/orbit/blob/master/packages/%40orbit/core/src/task-queue.ts#L292
after that has happened, the aforementioned catch in _settleEach gets invoked, but as _resolution is a new reference, the equal check does not match: https://github.com/orbitjs/orbit/blob/master/packages/%40orbit/core/src/task-queue.ts#L362
so _fail() is not called, and as such the previous Promise is not rejected: https://github.com/orbitjs/orbit/blob/master/packages/%40orbit/core/src/task-queue.ts#L328

In the demo, this is the other way around! So that last equals check is true, the promise is rejected, and after that the request strategy's catch hook is invoked, calling skip().
I have no idea what is causing this different timing between app and demo. 🤔
Some ways I found to work around this, though all options seem less than optimal:

Don't call .skip() at all
Replace .skip() with .clear()
Call .skip() in the next event loop (to delay it so that the timing as described above is "fixed"):

      catch(this: RequestStrategy, e: Error) {
        setTimeout(() => {
          this.source.requestQueue.skip();
          this.target.requestQueue.skip();
        }, 0);

        console.error(e);
        throw e;
      }

@simonihmig thanks so much for the detailed error report. This helps me clearly see the hole through which promises are falling in _cancel.
I am thinking that the right answer is that any explicitly canceled tasks should ALWAYS have their promises rejected, either through a standard error or a custom error passed into skip, clear, or shift (retry should not reject, since the task may yet succeed).

Furthermore, if you want the original request to fail with the error that you caught in your RequestStrategy, you could still catch it and then pass that error object to skip (this.source.requestQueue.skip(e)). Otherwise, skip() with no argument would reject the promise with a generic TaskSkipped error, for example.
I think this is the right answer but still need to put it to the test and make sure I'm not overlooking anything.

Thanks @dgeb for looking into this!
A general question related to this: I saw this pattern to catch and explicitly call requestQueue.skip() in a RequestStrategy in your peeps-ember-orbit demo and somewhere else IIRC, but AFAIK it's not documented/recommended it the actual Orbit docs. So I wonder is this indeed best practice, or what would be the downside of not doing this?

@simonihmig I think that dealing with conflicts and errors in general is perhaps the trickiest part of working with Orbit, because there is no one-size-fits-all solution. Once an error occurs, you need to decide what to do that's appropriate for your app. The queues are paused and all the tools are available to you to skip or retry the problematic task, or just clear the slate. This is much like dealing with a merge conflict in git - there's only so far the tool can go before you as the developer need to make a decision.

So I wonder is this indeed best practice, or what would be the downside of not doing this?

I think peeps-ember-orbit is a bit overly simplistic here and that best practices are still being worked out in the community. The main point to focus on is that something needs to be done to restart the queue processing and you need to decide what's best given the error you receive and the state of your app. I definitely would like to write more about this and include it in the guides.
But of course I really need to make sure that Orbit is working as reliably as possible in this tricky area, so I'll investigate further and try to make the improvements I mentioned above soon.

Thanks for your explanation, that makes sense!

Furthermore, if you want the original request to fail with the error that you caught in your RequestStrategy, you could still catch it and then pass that error object to skip (this.source.requestQueue.skip(e)).

TS complains about expecting no arguments, and indeed I don't see where any args are used here:
https://github.com/orbitjs/orbit/blob/master/packages/%40orbit/core/src/task-queue.ts#L215-L224?

@simonihmig sorry for the confusion - I am proposing the addition of a custom argument to skip to make this approach possible, but it is not yet. See:

I am thinking that the right answer is that any explicitly canceled tasks should ALWAYS have their promises rejected, either through a standard error or a custom error passed into skip, clear, or shift (retry should not reject, since the task may yet succeed).

I'm really busy today and tomorrow but will try to implement it soon.

Ah ok, sorry, should have read that better! 😝

I'm really busy today and tomorrow but will try to implement it soon.

You are awesome! 🙏

@simonihmig This should finally been resolved in v0.16.0-beta.9. Apologies for taking a while here - it's a sensitive area of the codebase and required thorough testing. 😅
Please give the new beta a try and let me know how it goes.

Hey @dgeb, thank you for looking into this! 🙇
Unfortunately, we no longer have access to the repository where we had this issue.
@simonihmig may still have a local branch with a failing test. But he'll only be able to respond in two weeks or so.


youtube link on magnific popup is not autoplaying

On clicking the link the popup shows up with video - but does not autoplay it. Plays only on clicking again the popped up youtube button. I tried with different options for autoplay.  Any help would be much appreciated!
This is the
link

With this script
$('.popup-gallery').magnificPopup({
    		delegate: 'a',
    		type: 'image',
        callbacks: {
          elementParse: function(item) {
            // Function will fire for each target element
            // "item.el" is a target DOM element (if present)
            // "item.src" is a source that you may modify
            // console.log(item.el.context.className);
            if(item.el[0].className == 'video') {
              item.type = 'iframe',
              item.iframe = {
                 patterns: {
                   youtube: {
                     index: 'youtube.com/',
                     id: 'v=',
                     src: '//www.youtube.com/embed/%id%?autoplay=1&mute=1'
                   },
                   vimeo: {
                     index: 'vimeo.com/',
                     id: '/',
                     src: '//player.vimeo.com/video/%id%?autoplay=1'
                   },
                   gmaps: {
                     index: '//maps.google.',
                     src: '%id%&output=embed'
                   }
                 }
              }
            } else {
               item.type = 'image',
               item.tLoading = 'Loading image #%curr%...',
               item.mainClass = 'mfp-img-mobile',
               item.image = {
                 tError: 'The image #%curr% could not be loaded.'
               }
            }

          }
        },
    		gallery: {
    			enabled: true,
    			navigateByImgClick: true,
    			preload: [0,1] // Will preload 0 - before current, and 1 after the current image
    		}

    	});`

Changing this :
https://github.com/dimsemenov/Magnific-Popup/blob/c8f6b8549ebff2306c5f1179c9d112308185fe2c/src/js/iframe.js#L27
To this worked for me:
''+
This should also be OK:
''+
(YouTube embed code comes with the first version.)
Also had to change this:
https://github.com/dimsemenov/Magnific-Popup/blob/c8f6b8549ebff2306c5f1179c9d112308185fe2c/src/js/iframe.js#L37
to this:
src: 'https://www.youtube.com/embed/%id%?autoplay=1'

I didn't edit that file, but /dist/jquery.magnific-popup.js.
Here:
https://github.com/dimsemenov/Magnific-Popup/blob/c8f6b8549ebff2306c5f1179c9d112308185fe2c/dist/jquery.magnific-popup.js#L1574
and here:
https://github.com/dimsemenov/Magnific-Popup/blob/c8f6b8549ebff2306c5f1179c9d112308185fe2c/dist/jquery.magnific-popup.js#L1584
But this file is probably generated from /src/js/iframe.js.

You shouldn't need to edit any core files. I found that in addition to including options to reformat the URL, you also need to include the option to modify the iframe markup. Make sure to include allow="autoplay" on the opening iframe tag.
{
	type: 'iframe',
	iframe: {
		markup: '
' +
			'

' +
			'' +
			'
',
		patterns: {
			youtube: {
				index: 'youtube.com/',
				id: 'v=',
				src: 'https://www.youtube.com/embed/%id%?autoplay=1'
			}
		}
	}
}

Isn't this something that should be done by magnific popup automatically?

The solution from @apmeyer works perfectly. Even so I would like to know why the "Open YouTube video" example on Magnific-Popup homepage works without the iframe markup and patterns.

Not sure exactly when this changed, but in Chrome v96 the @apmeyer solution above, as well as the video examples on the Magnific Popup homepage no longer work:

just this "mfp-iframe" css class in the trigger button. for example:
WATCH VIDEO
As you can see in the anchor I have added the class name in the classist. And "Booooom"

add params mute=1 it's work for me
?autoplay=1&mute=1

    Open YouTube video


Correctly generate correlationId when lambda is invoked without headers

Description
I'm proposing this tiny change after deploying the project to my personal AWS account.
I noticed that when testing lambdas from within the AWS console, by default no HTTP headers are sent (of course it is possible to send them with a bit of fiddling in the UI, though). This will make the lambda go 500 Internal Error.
This simple code change will make the logger correctly fall back to the AWS request ID if no headers are sent.
Not a massive issue, and very unlikely to happen in the real world, but I thought it could be useful.
Related issue: none
Type of change

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

Checklist:

[x] I have performed a self-review of my own code
[ ] I have added tests that prove my fix is effective or that my feature works

Ah great @sam-artuso  thank you for the contribution. I haven't run this branch yet but notice you have not checked the test box on our pr template - are there any test cases that are affected or needed here?

Done in 7444a71.


[Unity Catalog] - Upgrade task of uploading Date/Time Dims to a notebook that creates them (deploy bash script)

Dynamically create Date/Time Dimensions into tables using a notebook (potentially the setup.py notebook) and remove the need to upload these files into DLS and load them into tables. They should go directly into the Unity Catalog.
Task for #765
DoD

[ ] Date Dimension dynamically created and loaded in Setup.py notebook
[ ] Time Dimension dynamically created and loaded in Setup.py notebook
[ ] Date/Time Dimension file upload to ADLS path removed (commented out in deploy_intrastructure.sh)

@thesqlpro, please do add a DoD and fill in the metadata.

This cannot be done yet as the SQL Dedicated pool uses these raw CSVs for it's external tables (date and time dims)
Date/Time Dimension file upload to ADLS path removed (commented out in deploy_intrastructure.sh)


Add a lazy_map method to Dataset and DatasetDict

The library is great, but it would be even more awesome with a lazy_map method implemented on Dataset and DatasetDict. This would apply a function on a give item but when the item is requested. Two use cases:

load image on the fly
apply a random function and get different outputs at each epoch (like data augmentation or randomly masking a part of a sentence for BERT-like objectives).

This is cool! I think some aspects to think about and decide in terms of API are:

do we allow several methods (chained i guess)
how do we inspect the currently set method(s)
how do we control/reset them


Create marigold Tezos nodes RPC

Problem

At this moment TzSttamp depends on ECAD nodes which may cause unmanageable ops issues
Solution
We would like to deploy our own node with RPCs. This will also be usefull for other tooling projects

[ ] Create a node for testnet

[ ] Create a node for mainnet

Resolved


links to tags are not working

I would like to have a link that lists all tutorials for a tag. That was working previously via the search page, but seems to not work anymore. E.g. https://training.galaxyproject.org/training-material/search?nanopore

Still working, but it's:
https://training.galaxyproject.org/training-material/search?query=nanopore

Try to click on one of the tags.

I see :(


Add certification kubernetes Icon

These Icon is good.
We can add it after we certificated. like
(https://github.com/aws/eks-anywhere#amazon-eks-anywhere)](https://github.com/aws/eks-anywhere#amazon-eks-anywhere)
https://github.com/aws/eks-anywhere/pull/3026

Great proposal. We'll be following up on that.