[Question] How can i get the response from card buttons?

I want to get the response of a hero card button click on the next waterfall?
How to do it?
I don't want to use dialogAction to route to another dialog. I have this cards which asks various questions and store the response in an object. I want to get the response to store.

@Nisthar are you using C# or Node SDK?

@nwhitmont I am using nodejs.
Offtopic, But i would like to ask this here: Does the session.dialogData holds the data from previous conversation. I mean does it automatically get cleared for each sessions? Do i have to manually session.dialogData.save() or session.dialogData.clear()?

You can find the response data in result.response.entity. For example:
var choicesObject = {
    "herocard": "Hero Card",
    "slackbuttons": "Slack Buttons",
    "basictext": "Basic text"
};

bot.dialog('/', [
    function (session) {
        session.send('Hi, I am Slack Support Bot!\n\n I will show you what is possible with Bot Framework for Slack.');

        botBuilder.Prompts.choice(session, 'Choose a demo', choicesObject);
    },
    function (session, result) {
        console.log('Result object:\n'); // log the result object
        console.log(result);

        switch (result.response.entity) {
            case 'Hero Card':
                session.beginDialog('herocard');
                break;
            case 'Slack Buttons':
                session.beginDialog('buttons');
                break;
            case 'Basic message':
                session.beginDialog('basicMessage');
                break;
            default:
                session.send('invalid choice');
                break;
        }
    }
]);

@nwhitmont
I was trying to get the response from herocard button click. Is it possible?
I can only see openUrl and some other predefined functions. I can build buttons with prompts. But is there any way to get the response from herocard button click?

@Nisthar I don't understand what you mean.  What is the "response from herocard button click"?

Offtopic, But i would like to ask this here: Does the session.dialogData holds the data from previous conversation. I mean does it automatically get cleared for each sessions? Do i have to manually session.dialogData.save() or session.dialogData.clear()?

session.dialogData is a temporary variable that does not persist across conversations. No you do not have to call save or clear.  If you want to persist data, then store it in session.userData or session.conversationData object. Read more about dialogs here.

@nwhitmont Like how to know which button was clickied in hero card and call a function as a response for that button click?

@Nisthar can you share your code for your Hero Card and related dialog?

When you create a Hero Card using the botBuilder.HeroCard class, one of the properties is buttons which accepts an array of objects of the type botBuilder.CardAction. The available card actions are described on L75-105 (included below) - from https://github.com/Microsoft/BotBuilder/blob/master/Node/core/src/cards/CardAction.ts#L75
static call(session: Session, number: string, title?: string|string[]): CardAction {
        return new CardAction(session).type('call').value(number).title(title || "Click to call");
    }

    static openUrl(session: Session, url: string, title?: string|string[]): CardAction {
        return new CardAction(session).type('openUrl').value(url).title(title || "Click to open website in your browser");
    }

    static imBack(session: Session, msg: string, title?: string|string[]): CardAction {
        return new CardAction(session).type('imBack').value(msg).title(title || "Click to send response to bot");
    }

    static postBack(session: Session, msg: string, title?: string|string[]): CardAction {
        return new CardAction(session).type('postBack').value(msg).title(title || "Click to send response to bot");
    }

    static playAudio(session: Session, url: string, title?: string|string[]): CardAction {
        return new CardAction(session).type('playAudio').value(url).title(title || "Click to play audio file");
    }

    static playVideo(session: Session, url: string, title?: string|string[]): CardAction {
        return new CardAction(session).type('playVideo').value(url).title(title || "Click to play video");
    }

    static showImage(session: Session, url: string, title?: string|string[]): CardAction {
        return new CardAction(session).type('showImage').value(url).title(title || "Click to view image");
    }

    static downloadFile(session: Session, url: string, title?: string|string[]): CardAction {
        return new CardAction(session).type('downloadFile').value(url).title(title || "Click to download file");
    }

    static dialogAction(session: Session, action: string, data?: string, title?: string|string[]): CardAction {
        var value = 'action?' + action;
        if (data) {
            value += '=' + data;
        }
        return new CardAction(session).type('postBack').value(value).title(title || "Click to send response to bot");
    }

One way to approach this would be to send a postBack message to your bot, and then in the next waterfall step, parse the message from the card postBack action and use it to trigger your other function.

An example code would help me a lot. Because i can't actually understand
the function of postBack and how to use it.
On Tue, May 9, 2017 at 4:57 AM, Nils<EMAIL_ADDRESS>wrote:

When you create a Hero Card using the botBuilder.HeroCard class, one of
the properties is buttons which accepts an array of objects of the type
botBuilder.CardAction. The available card actions are described on
L75-105 (included below) - from https://github.com/Microsoft/
BotBuilder/blob/master/Node/core/src/cards/CardAction.ts#L75
static call(session: Session, number: string, title?: string|string[]): CardAction {
return new CardAction(session).type('call').value(number).title(title || "Click to call");
}
static openUrl(session: Session, url: string, title?: string|string[]): CardAction {
    return new CardAction(session).type('openUrl').value(url).title(title || "Click to open website in your browser");
}

static imBack(session: Session, msg: string, title?: string|string[]): CardAction {
    return new CardAction(session).type('imBack').value(msg).title(title || "Click to send response to bot");
}

static postBack(session: Session, msg: string, title?: string|string[]): CardAction {
    return new CardAction(session).type('postBack').value(msg).title(title || "Click to send response to bot");
}

static playAudio(session: Session, url: string, title?: string|string[]): CardAction {
    return new CardAction(session).type('playAudio').value(url).title(title || "Click to play audio file");
}

static playVideo(session: Session, url: string, title?: string|string[]): CardAction {
    return new CardAction(session).type('playVideo').value(url).title(title || "Click to play video");
}

static showImage(session: Session, url: string, title?: string|string[]): CardAction {
    return new CardAction(session).type('showImage').value(url).title(title || "Click to view image");
}

static downloadFile(session: Session, url: string, title?: string|string[]): CardAction {
    return new CardAction(session).type('downloadFile').value(url).title(title || "Click to download file");
}

static dialogAction(session: Session, action: string, data?: string, title?: string|string[]): CardAction {
    var value = 'action?' + action;
    if (data) {
        value += '=' + data;
    }
    return new CardAction(session).type('postBack').value(value).title(title || "Click to send response to bot");
}

One way to approach this would be to send a postBack message to your bot,
and then in the next waterfall step, parse the message from the card
postBack action and use it to trigger your other function.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/BotBuilder/issues/2715#issuecomment-300018734,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALcELV-T_01b9ZCdzYev9Hzzdac0AK8Tks5r36TegaJpZM4NTDcv
.

When I´m using the postBack method on a HeroCard button, my script does not start the next step of the waterfall.
I´m looping the same step over and over again.
But the value of the button is in the session.message.text property.
I can parse this and redirect the manually, but that is not pretty handy.
function (session) {
    // Can get value of button here after hitting in one time and then manually redirect
    var msg = new builder.Message(session);
    msg.attachments([
        new builder.HeroCard(session)
            .title("Classic Gray T-Shirt")
            .buttons([
                builder.CardAction.postBack(session, "testData", "Buy")
            ])
    ]);
    session.send(msg);
}
function (session, results) {
    // Never reaching this step automatically when hitting a button
}

I think this is related to the question of @Nisthar

@schneiderpat I'm getting the exact same issue. Where clicking the (in your case Buy) button just triggers the same dialog stack again.

@pourmesomecode You are commenting on a closed issue. If you have a problem or question, please open a new issue. Thx

Did any one got resolution of this?
I am also facing the same problem. I can get the response if I use Prompts, but cannot get the response for the card inputs.
function (session, args, next) {
    // Can get value of button here after hitting in one time and then manually redirect
    var msg = new builder.Message(session);
    msg.attachments([
        new builder.HeroCard(session)
            .title(dbEntity.name)
            .buttons([
                builder.CardAction.postBack(session, dbEntity.action.data, dbEntity.action.title)
            ])
    ]);
    session.send(msg);
    // without next call the dialog stack starts over
    next();  // with next call the dialog stack will move to the next function without waiting for the user input
}
function (session, results) {
     // does not reach here, if next is not called in previous step
     // reaches here is next is called, but does not wait for user input, so results remains empty
     console.log(JSON.stringify(results));
}

http://blog.geektrainer.com/2017/06/08/Working-with-custom-buttons-to-drive-conversations/
found it!

@haligasd I think that link describes the wrong way of handling this scenario. In fact, that link is saying "Yeah, don't use HeroCards with buttons, because they don't work". What you basically need to do is handling the respose on the same step of the dialog. It is not very well documented and a weird way of doing it but I think that is best.
BTW: Thanks everyone on this thread for explaining the issue, as I was having the very same issue myself. This also happens with the Action.Submit in the AdaptiveCards buttons. You need to handle the response on the same step.

For now, the only solution is, the buttons on your hero card, should trigger another dialog. For example if your button has the text Send, you must have a dialog that should be triggered with a regex matches that except the word Send

A slightly more graceful way to do this might be to use the "dialogAction" functionality for a CardAction. You can use it in conjunction with a dialog's beginDialogAction action. That way you could pass additional data to whichever dialog you want to be triggered.
Here's a link to the Botbuilder NodeJS SDK referencing the same. I'm sure there must be something similar for C# too.
Sorry for commenting on a closed issue, but thought this could help people.

@nwhitmont sorry to comment on the closed issue. How will we send the object to the another dialog when someone clicks a imBack or dialogAction button. As far as I see everywhere it is taking only string.

Maybe you could use JSON.stringify and JSON.parse. I am doing that to send an object. @jagadeeshmarthy

Yes,@sfratini. I have found that,  as of now it is the only way.

This works for me
  bot.dialog('example', [
    (session, args, next) => {
      const choices = ['foo', 'bar', 'baz']

      const cards = choices.map(item => {
        // return new builder.ThumbnailCard(session) // You can use thumbnails
        return new builder.HeroCard(session)
          .buttons([builder.CardAction.imBack(session, item, item)])
          .images([builder.CardImage.create(
            session, `http://via.placeholder.com/300x150?text=${item}`
          )])
      })

      const msg = new builder.Message(session)
        // .attachmentLayout(builder.AttachmentLayout.carousel) // This works
        .attachments(cards)
        .text('Choose a card')

      builder.Prompts.choice(session, msg, choices, {
        retryPrompt: msg
      })
    }, (session, args, next) => {
      session.send(args.response.entity)
      session.endDialogWithResult(args)
    }
  ])

Great Answer @benswinburne  Thank you very much, but please note if you are going to use an Array of objects you had to create a string manually in  builder.Prompts.choice(session, msg, choices, {
retryPrompt: msg
})
or you will get some "exec" Error
just create a string matching your hero card postback value

@sfratini I believe your solution of managing the response in the same function is the best!

I want to give it some conversation after that it should return adaptive card and then based on input data(response) from that adaptive card it should proceed further but I am getting adaptive card and after that else condition without going it through if condition in output, it is not taking reponse from user for that too:
if (session.message && session.message.value) {
            processSubmitAction(session, session.message.value);
            return;
        }
          var card = {
            'contentType': 'application/vnd.microsoft.card.adaptive',
            'content': {
              "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
              "type": "AdaptiveCard",
              "version": "1.0",
              "body": [{
                "type": "ColumnSet",
                "columns": [{
                    "type": "Column",
                    "width": 2,
                    "items": [{
                        "type": "TextBlock",
                        "text": "Sign-in",
                        "weight": "bolder",
                        "size": "medium",
                        "horizontalAlignment": "center"
                      },
                      {
                        "type": "TextBlock",
                        "text": "Don't worry, we'll never share or sell your information.",
                        "isSubtle": true,
                        "wrap": true,
                        "size": "small"
                      },
                      {
                        "type": "TextBlock",
                        "text": "Username",
                        "wrap": true
                      },
                      {
                        "type": "Input.Text",
                        "id": "Username",
                        "placeholder": "Username"
                      },
                      {
                        "type": "TextBlock",
                        "text": "Password",
                        "wrap": true
                      },
                      {
                        "type": "Input.Text",
                        "id": "Password",
                        "placeholder": "********",
                        "style": "password"
                      }
                    ]
                  },
                ]
              }],
              "actions": [{
                "type": "Action.Submit",
                "title": "Submit",
                "data":{
                  "x":13
              }
              }]
            }
          };

          var msg = new builder.Message(session)
            .addAttachment(card);
          session.send(msg);
          console.log("raw body212", card["content"]["actions"][0]["data"]);
          {
          if (card["content"]["actions"][0]["data"]["Username"]=="abhishakvarshney" & card["content"]["actions"][0]["data"]["Password"]=="abhishak") {
            console.log("raw body21", body);

         var purchase_payload = {
            .............................
          };

          ticket_purchase(purchase_payload, function (body) {
            console.log("raw body", body);
            session.send(
              "Your ticket has been purchased.Your available balance is " + body["data"]["availableBal"] + " and your ticket number is " + body["data"]["ticketData"]["ticketNumber"]
            );

            function createReceiptCard(session) {
              return new builder.ReceiptCard(session)
                .title(body["data"]["ticketData"]["gameName"], 'Game')
                .facts([
                  builder.Fact.create(session, body["data"]["ticketData"]["ticketNumber"], 'Ticket Number'),
                  builder.Fact.create(session, body["data"]["ticketData"]["playerPurchaseAmount"], 'Ticket Cost'),
                  builder.Fact.create(session, body["data"]["saleTransId"], 'Sale Transaction Id'),
                  builder.Fact.create(session, body["data"]["ticketData"]["purchaseTime"], 'Purchase Time'),
                  builder.Fact.create(session, body["data"]["ticketData"]["gameName"], 'Game'),
                  builder.Fact.create(session, body["data"]["ticketData"]["drawData"][0]["drawId"], 'Draw Id'),
                  builder.Fact.create(session, body["data"]["ticketData"]["drawData"][0]["drawName"], 'Draw Name'),
                  builder.Fact.create(session, body["data"]["ticketData"]["drawData"][0]["drawDate"], 'Draw Date'),
                  builder.Fact.create(session, body["data"]["ticketData"]["drawData"][0]["drawTime"], 'Draw Time')
                ])
                .total(body["data"]["availableBal"], "Available Balance")
            }
            var card = createReceiptCard(session);
            console.log("aka2", card);
            var msg = new builder.Message(session).addAttachment(card);
            session.send(msg);

          });
        } else {
          session.send("Invalid Username/Password.");
        }
        }


ICA test insufficient gas price for the network; got: 1 required at least:<PHONE_NUMBER>00000000000: insufficient fee

Problem
make test-interchain
        	Test:       	TestInterChainAccounts
    setup.go:148: Container logs - {/celestia-val-0-TestInterChainAccounts}
                    ],
                    "fee": {
                      "amount": [
                        {
        #                  "denom": "utia",
                           "amount": "1"
                        }
                      ],
        %              "gas_limit": "210000",
                      "payer": "",
                      "granter": ""
                    },
                    "tip": null
          },
                  "signatures": [
        g            "wZjPXv2YrEEvyvx2jrz9uY9olNX/VEMMsZov7+mvHg0iRjnXSmpsK1hc2IP/qi3y/jApNUbBspfgy2+TxgXPWw=="

                  ]
        w        }': insufficient gas price for the network; got: 1 required at least:<PHONE_NUMBER>00000000000: insufficient fee

        goroutine 7 [running]:
        �github.com/cosmos/cosmos-sdk/x/genutil.AppModule.InitGenesis({{}, {_, _}, {_, _}, _, {_, _}}, {{0x31d6328, 0x4688b20}, ...}, ...)

Proposal
This may be happening if we merged min gas price enforcement after ICA. To resolve, we likely need to bump the gas price / fees provided for this transaction.

gas limit: 210000
network min gas price: .000001 utia
local validator min gas price is .002utia
so the fee that is strictly needed should be: 210,000 * .000001 = .21 utia and since the tx is specifying 1 utia I would expect it to get through. 210,000 * .002 = 420 utia so the transaction is failing because it's not higher than the validator local min gas price. We have two resolution options:

Bump the gas price in the Celestia config from .000001 => .002
Override the min gas price for the validator config from .002 => .000001


Use the correct component for field of type text depending on multiline

yes, sorry for not using the new components
please commit the generated code so pipeline won't fail

@jamesricky please resolve conflicts, thanks!


Include template arguments for operation in intellisense

fix https://github.com/microsoft/typespec/issues/2423
Include template arguments for operation in intellisense

/azp run typespec - pr-tools

/azp run typespec - PR Tools

All changed packages have been documented.

:white_check_mark: @typespec/compiler

Show changes
@typespec/compiler - fix ✏

Show template arguments when hoving on an operation template

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3183/
Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3183/


AdoptOpenJDK Windows Updater

Features that impact the whole project (e.g. Adding a new OpenJDK distribution)are made over at the TSC.
Otherwise, please describe what enhancement you would like to see in the build
scripts:
I am not sure if this is already an existing feature, but a script to update AdoptOpenJDK on my Win machine

https://github.com/tushev/aojdk-updatewatcher is a community effort.


refactor: Change from fragile ls -l to more robust file.

Can't test the script myself (running Wayland).
@dev-foo-bar if you want, try this and let me know if it still works for you.

Hey,
The same as HAL9000 would answer this question - "I can not do this Dave - I use wayland as well" :-). This is the reason, why i can not use the window.sh in my setup. But i have no problem, to drop or pause this script at the moment until we find something suitable to reactivate the script. May be you can move this script to a folder named "unused" inside your git repo - as a reminder.
Kind Regards
dev-foo-bar

Ah, no problem. We can use it as is for now and if someone has an issue they can report it.


Contact us is not arranged properly

This contact us section is not arranged properly I want to make it more beautiful and attractive
please assign me this issue in GSSOC'24
Thank You

i dont need any changes to this ryt now.


Includes PowerShell completion script in the package. Closes #1551

Includes PowerShell completion script in the package. Closes #1551

Coverage remained the same at 100.0% when pulling 543b23311ea57b23ae1b5fd9228347e12ee0f3e4 on waldekmastykarz:fix-scripts into 9e086a808940f6c23a1812d60af6a6e66193063b on pnp:dev.

Merged manually


Support Arbitrary-Time-Delay Message

Make sure set the target branch to develop
What is the purpose of the change
Support Arbitrary-Time-Delay Message
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

[x] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[x] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
[x] Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test  to make sure integration-test pass.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Codecov Report

Merging #4583 (7da5422) into develop (2f5fd91) will decrease coverage by 0.23%.
The diff coverage is 24.67%.

@@              Coverage Diff              @@
##             develop    #4583      +/-   ##
=============================================
- Coverage      48.18%   47.94%   -0.24%
+ Complexity      5126     5112      -14
=============================================
  Files            649      649
  Lines          43037    43111      +74
  Branches        5629     5640      +11
=============================================
- Hits           20736    20670      -66
- Misses         19791    19919     +128
- Partials        2510     2522      +12

Impacted Files
Coverage Δ

...va/org/apache/rocketmq/common/message/Message.java
46.87% <0.00%> (-10.09%)
:arrow_down:

...main/java/org/apache/rocketmq/store/CommitLog.java
75.84% <16.66%> (-0.82%)
:arrow_down:

...pache/rocketmq/store/dledger/DLedgerCommitLog.java
74.80% <20.00%> (-0.55%)
:arrow_down:

...ocketmq/store/schedule/ScheduleMessageService.java
64.53% <34.14%> (-3.23%)
:arrow_down:

...g/apache/rocketmq/common/message/MessageConst.java
97.14% <100.00%> (+0.08%)
:arrow_up:

...ache/rocketmq/store/config/MessageStoreConfig.java
62.22% <100.00%> (-0.12%)
:arrow_down:

...va/org/apache/rocketmq/logging/inner/Appender.java
29.21% <0.00%> (-7.87%)
:arrow_down:

...tmq/namesrv/processor/DefaultRequestProcessor.java
66.04% <0.00%> (-7.48%)
:arrow_down:

...in/java/org/apache/rocketmq/test/util/MQAdmin.java
38.88% <0.00%> (-5.56%)
:arrow_down:

...org/apache/rocketmq/store/ha/WaitNotifyObject.java
66.07% <0.00%> (-5.36%)
:arrow_down:

... and 21 more

Continue to review full report at Codecov.

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

Coverage decreased (-0.05%) to 51.994% when pulling 7da54222872e78cf734bd7f45fa3caded37a9982 on jasoncw:develop into 2f5fd91a6fbd5d92b87bf7c10e0c2ae5ae0357a3 on apache:develop.

Coverage decreased (-0.05%) to 51.994% when pulling 7da54222872e78cf734bd7f45fa3caded37a9982 on jasoncw:develop into 2f5fd91a6fbd5d92b87bf7c10e0c2ae5ae0357a3 on apache:develop.


Refactor code for getting an image from Cloudfront

The TwitterNotificationListener currently assigns the CloudFront image to the twitter status directly from the https connection as an InputStream:
urlConnection = (HttpsURLConnection) new URL(offerData.getCoverImage()).openConnection();
urlConnection.setRequestProperty(HttpHeaders.ACCEPT_ENCODING, "gzip, deflate, br");

status.setMedia("Cover - " + offerData.getTitle(), urlConnection.getInputStream());

This is not okay, as CloudFront can fail to deliver an image (usually 301 Redirect, 403 Forbidden or 502 Bad Gateway errors). Error handling is needed for correctly assigning the image.
Proposed solution
Create a new image repository class.
This class will have a getImageFromUrl(String url) method to retrieve an image from the input url as an Optional<byte[]>.
The method will be null and error-safe:

Input url is null: return an empty optional and log there is no URL.
Response code != 200: return an empty optional and log the HTTP Response code and message (error handler?).
Response code == 200: return a filled optional with the image content.

The APICheckoutService class will call this repository to attempt to retrieve the image and add it to the PacktFreeOffer dto.

This issue is strongly related to #103

Done.


Is something wrong when computing the runtime offsets for the ivars?

Dear WinObjC Engineers,
With winobjc v 0.2.160927:
Launch the samples > HelloUI project
Change the solution's property: Linker > System > SubSystem to "Console"
Launch the solution and this is printed to the console:
Warning: Class CABasicAnimation has first ivar _from with a negative offset of -4!
Does that warning indicate that there is something wrong when computing the runtime offsets for the ivars?
Sincerely,
Ed

The negative offsets come from the compiler; I'm closing this as a dupe of #1208 since it has a self-contained repro.


WIP with matching corners with the specs

@aleffert pl review

I think I worked out a much simpler way to do this. Check out this gist https://gist.github.com/aleffert/5e5aa5545198e5c3ce40
The high level idea is that if we use an image mask then all we have to do is make sure the mask layer gets resized at the right time.

@aleffert updated the code, but the problem still persists. Please check the screenshot on the above Gist

@ehmadzubair pushed an update that I think works. See the commit message for more details, but the idea is the border view needs to deal with the border stroke too. Also, the cell's bottom divider was doing funny things - this hides it when its not necessary.

@ehmadzubair I think this is good to go?

Yes...


Deprecation messages

It seems that deprecation messages occurs in wrong places. For example, mergeFeaturesByRank gives deprecation message about agglomerateByRank. Of course it should not.
There are also some other functions that use deprecated functions internally --> gives warning. Run tests and you will see all the warnings that must be removed (assuming that tests are using the latest naming scheme which they should).

What is the status? Is everything done? @ake123

It's done!


abaplint

Hi,
I just tried to send in pull request #638 and received the error below - it refers to a class that has not been touched. Please have a look. Thanks!
Kind regards
Bernhard
Check failure on line 1506 in src/zcl_excel_common.clas.abap
@abaplint
abaplint
/ abaplint
Statement does not exist in ABAPv700(or a parser error)

its a bug in abaplint, I'll have a look tomorrow, thanks

fixed, sorry about the trouble, closing


support for multiple timezones

Storing logs in GMT is super convenient if you're in the UK, but it makes it difficult to search logs for things that happened in other time zones, if for no other reason than the fact that things that happen Thursday afternoon in California are stored as having happened on Friday morning. Perhaps allow log viewers to set the -/+ hours offset?

Bitbucket: https://bitbucket.org/yougov/pmxbot/issue/16
Originally reported by: Anonymous
Originally created at: 2011-12-08T17:38:28.371

I still consider this a high-priority to fix, but until someone volunteers a patch, this will never get fixed.

Original comment by: Jason R. Coombs


Added support for downloading only subtitles

Supports SRT, VTT, ASS and LRC formats
I personally use this tool a lot to download subtitles. The version I had was out of date, so I updated today and thought id create a pull request with my subtitle additions

This looks really good, but there are two changes I will need before I can merge this, one is just cosmetic, the other more about functionality:
194: Would you please change Subs download in progress... to Subtitles download in progress...
195: Can you change the output path to this so it is not a static path and more dynamic: %userprofile%\Videos\yt-dlp\%%(title)s.%%(ext)s

Ofcourse, added that now. Also included the full names of the subtitles format, aswell as changing "Subs" to "Subtitles" in the menu


Ian Campbell: Watch naturesrise.com(?#suspicious post on Medical Sciences)

Ian Campbell requests the watch of the watch_keyword naturesrise\.com(?#suspicious post on Medical Sciences). See the MS search here and the Stack Exchange search in text, in URLs, and in code.

naturesrise\.com(?#suspicious post on Medical Sciences) has been seen in 0 true positives, 0 false positives, and 0 NAAs.

Approved by Jeff Schaller in Charcoal HQ


File Corruption when testing with postgres

Hi *,
I mounted successfully a nfs and started convoy via:
/usr/local/bin/convoy daemon --drivers vfs --driver-opts vfs.path=/dockerConvoyNFS
However when I run postgresql image I get the following problem:
postgresql_1  | The files belonging to this database system will be owned by user "postgres".
postgresql_1  | This user must also own the server process.
postgresql_1  |
postgresql_1  | The database cluster will be initialized with locale "en_US.utf8".
postgresql_1  | The default database encoding has accordingly been set to "UTF8".
postgresql_1  | The default text search configuration will be set to "english".
postgresql_1  |
postgresql_1  | Data page checksums are disabled.
postgresql_1  |
postgresql_1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
postgresql_1  | creating subdirectories ... ok
postgresql_1  | selecting default max_connections ... 100
postgresql_1  | selecting default shared_buffers ... 128MB
postgresql_1  | selecting dynamic shared memory implementation ... posix
postgresql_1  | creating configuration files ... ok
postgresql_1  | creating template1 database in /var/lib/postgresql/data/base/1 ... ok
postgresql_1  | initializing pg_authid ... ok
postgresql_1  | initializing dependencies ... ok
postgresql_1  | creating system views ... ok
postgresql_1  | loading system objects' descriptions ... FATAL:  could not read block 31 in file "base/1/2674": read only 0 of 8192 bytes
postgresql_1  | STATEMENT:  CREATE TEMP TABLE tmp_pg_description (      objoid oid,     classname name,         objsubid int4,  description text) WITHOUT OIDS;
postgresql_1  |
postgresql_1  | child process exited with exit code 1
postgresql_1  | initdb: removing contents of data directory "/var/lib/postgresql/data"
Any help would be great ....

It's more like a hardware or nfs (if used) problem? Convoy really doesn't deal with block level things for vfs...


Creating issue and pull request template

Having templates for pr and issue would help contributors in providing sufficient information.

Nice suggestion, I'll work on this and post the reference here when is done.


ng new "Projekt" ==> always @babel\parser :: errno -4058

i get allways an error at creating a new angular project:
new installation of NPM
Cleaning npm cache
verify npm cache
install -g @angular/cli
ng new mytestprojekt

Angular CLI: 10.1.0
Node: 14.9.0
OS: win32 x64

Package                      Version
@angular-devkit/architect    0.1001.0
@angular-devkit/core         10.1.0
@angular-devkit/schematics   10.1.0
@schematics/angular          10.1.0
@schematics/update           0.1001.0
rxjs                         6.6.2
F:\Code\Angular>npm -version
6.14.8
npm WARN tar EINVAL: invalid argument, futime
npm WARN tar EINVAL: invalid argument, futime
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules\rollup\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN notsup Unsupported engine for<EMAIL_ADDRESS>wanted: {"node":"<8.10.0"} (current: {"node":"14.9.0","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm<EMAIL_ADDRESS>npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules\watchpack-chokidar2\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path F:\Code\Angular\mytest\node_modules@babel\parser
npm ERR! dest<EMAIL_ADDRESS>npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'F:\Code\Angular\mytest\node_modules@babel\parser' -><EMAIL_ADDRESS>npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR!      C:\Users\Frank\AppData\Roaming\npm-cache_logs\2020-09-07T07_44_19_990Z-debug.log
× Package install failed, see above.
The Schematic workflow failed. See above.
F:\Code\Angular>ng --version
2020-09-07T07_44_19_990Z-debug.log

This seems like a problem with your node/npm and not with Angular CLI.
Please have a look at the fixing npm permissions page, common errors page, npm issue tracker, or open a new issue in that issue tracker if the problem you are experiencing isn't known.

Hi,
At first time im update my existing Project -> Project does not run any more ...
I try three day's with install diffrent NPM-Versions (LTS/Current Version)
I try installing (global) angular/cli in versions in diffrent Versions 10.0.8 ... current Version
At generating a new Project with "ng new xxx" i always see the problem ...
I cant see where the problem with npm exists ... the loaded package seems not in the correct version ... OR???
I think there is someting diffrent wrong with the package ...
BR
Frank


Mark use of extern static variables unsafe

Use of extern static variables will be treated as unsafe code by rustc in the future.
This change makes rsmpi able to be compiled on the nightly as of Oct/1, 2016.
Edit: Sorry. This PR sucks because it makes rsmpi unable to be compiled on the stable due to unnecessary unsafes. Please just close it or keep it for the future.

Well, I do not think it sucks. It is a step in the right direction, but it breaks on some configurations. That is exactly why I have this battery of CI tests set up. Let the machines help you keep track of things.
I have not investigated in detail, but I can think of two ways to move forward here:

build a macro that conditionally (based on the compiler version) marks the use of an extern static as unsafe,
make these variables into functions (RSMPI_COMM_WORLD becomes rsmpi_comm_world()) since they have always been unsafe.

Would you be willing to put more work into this or should I take a stab at it when I find the time?

I could not find any feature to compile codes conditionally on rustc versions .
But, I found a way to prevent the errors which is adding:
#![cfg_attr(not(feature="nightly"), allow(unused_unsafe))]

in lib.rs while this seems not to be the correct way.

The compilation on nightly is failing because of clippy's warnings of useless_transmute.
This cannot be fixed easily keeping code readable because the solution presented by clippy is also warned.
When a: &T,
let b: *const c_void = mem::transmute(a)

causes a warning of useless_transmute and it suggests:
a as *const T as *const c_void

And, this also causes a warning of trivial_casts on a as *const T.
A straightforward solution is:
let b: *const T = a;
b as *const c_void

Is this OK?

I will see if I can do something about the conditional compilation.

Yeah that is okay. The nightly builds are marked non-critical for that reason. I would rather have them taken care of in a separate PR.

I have just pushed a macro that marks an expression as unsafe on 1.13.0 and onward. Could you rework this PR to use that macro instead of unsafe?

Please wait a minute.

That macro is so cool.

Thanks for this.


updated documentation based on the discussion in #134

I've updated documentation based on the discussion in #134. @jamestalmage, @tcurdt, could you give this a read?
fixes #134

Does help - but still a bit vague on whether referring to the binary needs a ./node_modules/.bin prefix or not.

@tcurdt in the test stanza of your package.json, you should never need to provide the absolute path ./node_modules/.bin -- so as long as you follow the documentation in the README.md, life should be good.

@bcoe odd - it does indeed work without the prefix. Could have sworn that was giving me trouble. Well, nevermind then.

@jamestalmage can we ship this?

LGTM
Is there a good resource to link to on using node_modules/.bin/ for local installs?
@sindresorhus If there's not something out there you should write one and add it to https://github.com/sindresorhus/guides. This issue comes up all the time, and it would be nice to have a concise clearly written resource to point people at.
@bcoe Ship it. If we find a good link, we'll just add it when we do.

@jamestalmage I cover it briefly here, but I'll look into doing something more comprehensive.


refactor(plugin): v4.0.0

Issues

Fixes #701
Fixes #667

Compatibility Issues

[ ]  CSS generated in the wrong order ( again )

+1


Getting Closer!

Most of the imports work fine. Randomly it seems, something doesn't import correctly.
For example, Goblin Assassin imports correctly:

Goblin Assassin
Small Humanoid (Goblin), Any Alignment
Armor Class 15 (studded leather armor)
Hit Points 16 (3d6 + 6)
Speed 30 ft., climb 20 ft.
STR DEX CON INT WIS CHA
8 (−1) 16 (+3) 14 (+2) 10 (+0) 10 (+0) 8 (−1)
Skills Stealth +7
Senses darkvision 60 ft., passive Perception 10
Languages Common, Goblin
Proficiency Bonus +2
Backstab. When the assassin has advantage on their attack roll
against a creature that isn’t a Construct or Undead, their attacks
deal an extra 1d6 damage and inflict a bleeding wound on the target
that lasts until the bleeding creature regains at least 1 hit point.
A bleeding creature loses 2 hit points for each bleeding wound
they have at the start of their turn. Any creature can use an action
to staunch all a target’s wounds, ending the effect.
Crafty. The assassin doesn’t provoke opportunity attacks when
they move out of an enemy’s reach.
ACTIONS
Scimitar. Melee Weapon Attack: +5 to hit, reach 5 ft., one target.
Hit: 6 (1d6 + 3) slashing damage.
Dagger. Melee or Ranged Weapon Attack: +5 to hit, reach 5 ft. or
range 20/60 ft., one target. Hit: 5 (1d4 + 3) piercing damage.
Summon Shadows (1/Day). A 10-foot-radius sphere of magical
darkness emanates from a point the assassin can see for 1 minute.
The assassin can see in this magical darkness. At the start of their
turn, the assassin can move the darkness up to 30 feet to a point
they can see. If the assassin takes damage, the effect ends.
BONUS ACTIONS
Sneak. The assassin takes the Hide action.
Goblin Minion lists Hit Points 6 Crafty under Features:

Goblin Minion
Small Humanoid (Goblin), Any Alignment
Armor Class 14 (leather armor, shield)
Hit Points 6
Speed 30 ft., climb 20 ft.
STR DEX CON INT WIS CHA
8 (−1) 13 (+1) 10 (+0) 10 (+0) 8 (−1) 8 (−1)
Senses darkvision 60 ft., passive Perception 9
Languages Common, Goblin
Proficiency Bonus +2
Crafty. The minion doesn’t provoke opportunity attacks when they
move out of an enemy’s reach.
Minion. If the minion takes damage from an attack or as the result
of a failed saving throw, their hit points are reduced to 0. If the
minion takes damage from another effect, they die if the damage
equals or exceeds their hit point maximum, otherwise they take
no damage.
Tiny Stabs. If a visible enemy starts their turn within 5 feet of three
or more goblin minions, the enemy must succeed on a Dexterity
saving throw or take 1 piercing damage for each goblin minion
within 5 feet. The DC for this saving throw equals 10 + the number
of goblin minions within 5 feet of the enemy.
ACTIONS
Dagger (Group Attack). Melee or Ranged Weapon Attack: +3 to
hit, range 20/60 ft., one target. Hit: 1 piercing damage.
Goblin Cursespitter seems to be completely missing the To Me action:

Goblin Cursespitter
Small Humanoid (Goblin), Any Alignment
Armor Class 15 (leather armor, shield)
Hit Points 27 (5d6 + 10)
Speed 30 ft., climb 20 ft.
STR DEX CON INT WIS CHA
8 (−1) 14 (+2) 14 (+2) 10 (+0) 10 (+0) 15 (+2)
Saves Wis +2
Skills Stealth +4
Senses darkvision 60 ft., passive Perception 10
Languages Common, Goblin
Proficiency Bonus +2
Crafty. The cursespitter doesn’t provoke opportunity attacks when
they move out of an enemy’s reach.
ACTIONS
Toxic Touch. Melee or Ranged Spell Attack: +4 to hit, reach 5 ft.
or range 30 ft., one target. Hit: 7 (2d6) poison damage, and the
target must succeed on a DC 12 Constitution saving throw or be
poisoned for 1 minute (save ends at end of turn).
Brittle Bone Hex. The cursespitter chooses one creature they
can see within 60 feet of them. The target’s bones are wracked
with pain until the end of their next turn. The first time the target
willingly moves or uses an action, bonus action, or reaction before
then, they must succeed on a DC 12 Constitution saving throw or
take 9 (2d8) necrotic damage.
To Me! The cursespitter chooses up to two willing creatures they
can see within 30 feet of them. Each creature is teleported to an
unoccupied space within 5 feet of the cursespitter.
Dizzying Hex (2/Day). The cursespitter chooses one creature they
can see within 60 feet of them. The target must make a DC 12 Wisdom
saving throw. On a failed save, the target falls prone and can’t
stand back up for 1 minute (save ends at end of turn).
REACTIONS
Cowardly Commander. When a creature the cursespitter
can see hits them with an attack, the cursespitter chooses a willing
ally within 5 feet of them. The attack hits the ally instead.
Goblin Boss imported perfectly, as far as I can see:

Goblin Boss
Small Humanoid (Goblin), Any Alignment
Armor Class 17 (studded leather armor, shield)
Hit Points 36 (8d6 + 8)
Speed 30 ft., climb 20 ft.
STR DEX CON INT WIS CHA
10 (+0) 16 (+3) 13 (+1) 12 (+1) 12 (+1) 10 (+0)
Saves Dex +5, Wis +3
Skills Insight +3, Intimidation +2, Stealth +5
Senses darkvision 60 ft., passive Perception 11
Languages Common, Goblin
Proficiency Bonus +2
Crafty. The boss doesn’t provoke opportunity attacks
when they move out of an enemy’s reach.
ACTIONS
Multiattack. The boss makes two Shortsword or Shortbow
attacks. They can use Command in place of one attack.
Shortsword. Melee Weapon Attack: +5 to hit, reach 5 ft.,
one target. Hit: 6 (1d6 + 3) piercing damage.
Shortbow. Ranged Weapon Attack: +5 to hit, range 80/320 ft.,
one target. Hit: 6 (1d6 + 3) piercing damage.
Command. The boss chooses one ally they can see within 30 feet
of them. If the target can hear the boss, the target can use their
reaction to move up to their speed or make one weapon attack.
BONUS ACTIONS
Get Reckless (Recharge 6). Each willing ally within 30 feet of the
boss that can hear them becomes reckless until the start of the
boss’s next turn. While reckless, a creature has advantage on attack
rolls, and attack rolls against the creature have advantage.
REACTIONS
Cowardly Commander. When a creature the boss
can see hits them with an attack, the boss chooses
a willing ally within 5 feet of them. The attack
hits the ally instead.
Those are the four I tested on.
Oh! How would I modify the Source parameter in the Importer? I'd like to just like to copy & paste the Source as Flee Mortals. I mean, I could just type it in to the character sheet, I suppose.

These are fixed in 1.5.4. I had to add support for a couple more non-standard things MCDM is doing with their monsters. Why can't people just stick to the format? 😂

Well, it’s a pre-release. That’s part of the problem.
Most everything is working. I’ve used it to import all the Goblins.
Ken
From: James Haywood @.>
Sent: Friday, August 26, 2022 3:16 PM
To: jbhaywood/5e-statblock-importer @.>
Cc: Greyhart42 @.>; Author @.>
Subject: Re: [jbhaywood/5e-statblock-importer] Getting Closer! (Issue #33)
These are fixed in 1.5.4. I had to add support for a couple more non-standard things MCDM is doing with their monsters. Why can't people just stick to the format? 😂
—
Reply to this email directly, view it on GitHubhttps://github.com/jbhaywood/5e-statblock-importer/issues/33#issuecomment-1228955317, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALKNWTLB4QKIZQFYUBRL7ELV3EXYBANCNFSM56WLKUOA.
You are receiving this because you authored the thread.Message ID<EMAIL_ADDRESS>


如何加入自己实现的ResponseHandler？我想要对返回进行签名。

如何加入自己实现的ResponseHandler？我想要对返回进行签名。

ResponseHandler is an interface which provides you request and response. You can simply write your own class to implement this interface. The basic idea is to write anything to response.
If your request is an HTTP request, you can write a class to extend AbstractHttpResponseHandler and override doWriteToResponse method.
if you just want to write content, you can write a class to extend AbstractContentResponseHandler and override responseContent and getContentType.

ResponseHandler is an interface which provides you request and response. You can simply write your own class to implement this interface. The basic idea is to write anything to response.
If your request is an HTTP request, you can write a class to extend AbstractHttpResponseHandler and override doWriteToResponse method.
if you just want to write content, you can write a class to extend AbstractContentResponseHandler and override responseContent and getContentType.

Where and how to invoke the implemented ResponseHandler class?

@waitshang You can attach your response handler to response setting.
server.response(new YourCustomResponseHandler());

@waitshang You can attach your response handler to response setting.
server.response(new YourCustomResponseHandler());

Thank you very much.

@waitshang You can attach your response handler to response setting.
server.response(new YourCustomResponseHandler());

@dreamhead
Could I config response like this: server.request(by(uri("/hello"))).response(template("${req.method}")).response(new MyResponseHandler());
Where MyResponseHandler modify my template at last.

Moco provides functional style API which you can composite your API.
server.request(by(uri("/hello"))).response(and(with(template("${req.method}")), new MyResponseHandler()));

Moco provides functional style API which you can composite your API.
server.request(by(uri("/hello"))).response(and(with(template("${req.method}")), new MyResponseHandler()));

There is a method in DefaultMutableHttpResponse which avoid me to mutate the response's MessageContent.
    @Override
    public void setContent(final MessageContent content) {
        if (this.content != null) {
            throw new IllegalArgumentException("Content has been set");
        }

        this.content = content;
    }


Tableitem metadata

Stores metadata returned from the service in the TableItem object. This can be expanded in the future if more metadata is returned but for now only includes the date and api_version. Includes a clean-up of tests that were touched with these updates, a couple re-records, and addition of tests to async that were in sync but not async.

#13608


doc: Glossary update

Summary
Closes #1021
Checklist

[x] Scope: The referenced issue is addressed, there are no unrelated changes.
[x] Run Locally: Verified that the docs build using make server, posted screenshots, verified external links. Test with HUGO_PARAMS_SEARCH_ENABLED=true if style changes will affect the search bar.
[ ] New Features Marked: Documentation for new features is marked using the new-in-version shortcode, according to the guidelines in CONTRIBUTING.
[x] Style Guidelines: Documentation obeys style guidelines in CONTRIBUTING.
[x] Commits: Commit messages follow guidelines in CONTRIBUTING, there are no fixup commits left.

@nejraselimovic: Can you rebase and update this PR please?


Improve gerrit help

Currently, executing gerrit help just says:
Usage: gerrit [command]

It would be nice if gerrit help at least gave you a list of commands it knows. Bonus points for gerrit help [command] for more detailed help on specific commands.

d7a18725d35de1c1df205d1e6a096a1847c7c891 added support for listing all commands when you run gerrit help. It is available in 0.6.0.


Support exist condition for metric alert

Problem:
Now we only support compare condition and the threshold for metric alert
Solution:
Add exist condition for metric alert
Issue:
https://github.com/rancher/rancher/issues/21302
Types:
https://github.com/rancher/types/pull/914

Rebased

Grafana has an alert for is null value for the expression result, if we use null would be a negative option like not null value, so I change to opposite option has-value

LGTM

LGTM, needs conflict resolved though

needs rebase but lgtm

rebased, thanks


[map] Add IPCCPlace_50 to dropdown for continents & small bug fixes

Add IPCCPlace_50 to dropdown for continents

fix issue #1306

fix issue #1300

fix issue #1310

Thanks for the fixes!


[WIP] Replace FLIRT-BBR with FreeSurfer bbregister when FS preprocessing is enabled

Closes #64

It would be important to make sure that the transformation matrix produced by bbregister moves the image to the original T1 space not to the FS conformed T1.

@oesteban Could you have a look at https://circleci.com/gh/effigies/fmriprep/102?
This node is getting mis-connected, it looks like.
170221-15:17:46,817 workflow INFO:

	 Executing: DemeanFmap ID: 36

170221-15:17:46,869 workflow INFO:

	 Executing node DemeanFmap in dir: /scratch/workflow_enumerator/100185/phase_diff_and_magnitudes/DemeanFmap

Traceback (most recent call last):

  File "/root/src/nipype/nipype/pipeline/plugins/base.py", line 249, in run

    result=result))

  File "/root/src/nipype/nipype/pipeline/plugins/base.py", line 300, in _clean_queue

    raise RuntimeError("".join(result['traceback']))

RuntimeError: Traceback (most recent call last):

  File "/root/src/nipype/nipype/pipeline/plugins/multiproc.py", line 52, in run_node

    result['result'] = node.run(updatehash=updatehash)

  File "/root/src/nipype/nipype/pipeline/engine/nodes.py", line 366, in run

    self._run_interface()

  File "/root/src/nipype/nipype/pipeline/engine/nodes.py", line 476, in _run_interface

    self._result = self._run_command(execute)

  File "/root/src/nipype/nipype/pipeline/engine/nodes.py", line 607, in _run_command

    result = self._interface.run()

  File "/root/src/nipype/nipype/interfaces/base.py", line 1085, in run

    runtime = self._run_wrapper(runtime)

  File "/root/src/nipype/nipype/interfaces/base.py", line 1033, in _run_wrapper

    runtime = self._run_interface(runtime)

  File "/root/src/nipype/nipype/interfaces/utility.py", line 498, in _run_interface

    out = function_handle(**args)

  File "<string>", line 16, in demean_image

NameError: name 'NUMPY_MMAP' is not defined

Interface Function failed to run.

This shouldn't have been touched by the changes here. But I suppose it's possible that it's something on the nipype end with your recent PRs that we haven't adjusted for? (I'm pinning a newer nipype.)

BTW - I think you can switch to main branch on both niworkflows and nipype now.

I have a niworkflows branch (no PR yet) with changes needed for this bit. When I'm sure I don't need more, I'll put a PR there.

Probably has something to do with copyfile.

Yeah, it did, and wasn't at all the problem. Well, I guess I understand more of nipype's internals now. :1st_place_medal:

Okay. We're definitely getting different outputs, and it appears that bbregister is registering to the 256x256x256 FreeSurfer space.
Visually, the output images align.
sub-387_T1w.nii.gz
Dimensions: 256 x 256 x 186
Voxel sizes: 0.8984 x 0.8984 x 0.9
Affine: [[   0.            0.           -0.89999998   78.08100128]
         [   0.           -0.89840001    0.<PHONE_NUMBER>7]
         [  -0.89840001    0.            0.<PHONE_NUMBER>4]
         [   0.            0.            0.            1.        ]]

sub-387_task-Beast_run-1_bold.nii.gz
Dimensions: 100 x 100 x 64 x 650
Voxel sizes: 2.2 x 2.2 x 2.2 x 0.68
Affine: [[ -2.20000005e+00   0.00000000e+00   1.99987669e-03   1.00387001e+02]
         [  7.35627196e-04  -1.97774065e+00   9.63940501e-01   8.25609970e+01]
         [ -1.50989520e-03  -9.63606596e-01  -1.97757792e+00   1.03964500e+02]
         [  0.00000000e+00   0.00000000e+00   0.00000000e+00   1.00000000e+00]]

sub-387_task-Beast_run-1_bold_mcf.nii.gz_mean_reg_masked_flirt.nii.gz
Dimensions: 186 x 256 x 256
Voxel sizes: 0.9 x 0.8984 x 0.8984
Affine: [[   0.89999998    0.            0.          -88.41899109]
         [   0.            0.89840001    0.          -98.0719986 ]
         [   0.            0.            0.89840001 -118.77300262]
         [   0.            0.            0.            1.        ]]

sub-387_task-Beast_run-1_bold_mcf.nii.gz_mean_reg_masked_bbreg.nii.gz
Dimensions: 256 x 256 x 256
Voxel sizes: 0.8984 x 0.8984 x 0.8984
Affine: [[  -0.89840013    0.            0.<PHONE_NUMBER> ]
         [   0.            0.            0.89840001  -98.97039795]
         [   0.           -0.89840001    0.<PHONE_NUMBER>4]
         [   0.            0.            0.            1.        ]]

sub-387_task-Beast_run-1_bold_mcf.nii.gz_mean_reg_masked_flirt.mat
Registration: [[  9.99822613e-01   2.18406143e-03  -1.87130549e-02  -2.01251828e+01]
               [  1.02471905e-02  -8.96531511e-01   4.42861559e-01   1.78893223e+02]
               [ -1.58096043e-02  -4.42974773e-01  -8.96394706e-01   2.26519183e+02]
               [  0.00000000e+00   0.00000000e+00   0.00000000e+00   1.00000000e+00]]

sub-387_task-Beast_run-1_bold_mcf.nii.gz_mean_reg_masked_bbreg_sub-387.mat
Registration: [[  9.99783580e-01   4.73640000e-04  -2.07878600e-02   1.14698811e+01]
               [  1.83094900e-02   4.41616650e-01   8.96942620e-01   2.37868500e+00]
               [  9.54438000e-03  -8.97202850e-01   4.41665860e-01   1.80107742e+02]
               [  0.00000000e+00   0.00000000e+00   0.00000000e+00   1.00000012e+00]]

It might be good to pick @satra brains on this or peruse the workflows in
nipype. I have a feeling this might have been dealt with in the past.
On Thu, Feb 23, 2017 at 9:03 AM, Chris Markiewicz<EMAIL_ADDRESS>wrote:

Okay. We're definitely getting different outputs, and it appears that
bbregister is registering to the 256x256x256 FreeSurfer space.
Visually, the output images align.
sub-387_T1w.nii.gz
Dimensions: 256 x 256 x 186
Voxel sizes: 0.8984 x 0.8984 x 0.9
Affine: [[   0.            0.           -0.89999998   78.08100128]
[   0.           -0.89840001    0.<PHONE_NUMBER>7]
[  -0.89840001    0.            0.<PHONE_NUMBER>4]
[   0.            0.            0.            1.        ]]
sub-387_task-Beast_run-1_bold.nii.gz
Dimensions: 100 x 100 x 64 x 650
Voxel sizes: 2.2 x 2.2 x 2.2 x 0.68
Affine: [[ -2.20000005e+00   0.00000000e+00   1.99987669e-03   1.00387001e+02]
[  7.35627196e-04  -1.97774065e+00   9.63940501e-01   8.25609970e+01]
[ -1.50989520e-03  -9.63606596e-01  -1.97757792e+00   1.03964500e+02]
[  0.00000000e+00   0.00000000e+00   0.00000000e+00   1.00000000e+00]]
sub-387_task-Beast_run-1_bold_mcf.nii.gz_mean_reg_masked_flirt.nii.gz
Dimensions: 186 x 256 x 256
Voxel sizes: 0.9 x 0.8984 x 0.8984
Affine: [[   0.89999998    0.            0.          -88.41899109]
[   0.            0.89840001    0.          -98.0719986 ]
[   0.            0.            0.89840001 -118.77300262]
[   0.            0.            0.            1.        ]]
sub-387_task-Beast_run-1_bold_mcf.nii.gz_mean_reg_masked_bbreg.nii.gz
Dimensions: 256 x 256 x 256
Voxel sizes: 0.8984 x 0.8984 x 0.8984
Affine: [[  -0.89840013    0.            0.<PHONE_NUMBER> ]
[   0.            0.            0.89840001  -98.97039795]
[   0.           -0.89840001    0.<PHONE_NUMBER>4]
[   0.            0.            0.            1.        ]]
sub-387_task-Beast_run-1_bold_mcf.nii.gz_mean_reg_masked_flirt.mat
Registration: [[  9.99822613e-01   2.18406143e-03  -1.87130549e-02  -2.01251828e+01]
[  1.02471905e-02  -8.96531511e-01   4.42861559e-01   1.78893223e+02]
[ -1.58096043e-02  -4.42974773e-01  -8.96394706e-01   2.26519183e+02]
[  0.00000000e+00   0.00000000e+00   0.00000000e+00   1.00000000e+00]]
sub-387_task-Beast_run-1_bold_mcf.nii.gz_mean_reg_masked_bbreg_sub-387.mat
Registration: [[  9.99783580e-01   4.73640000e-04  -2.07878600e-02   1.14698811e+01]
[  1.83094900e-02   4.41616650e-01   8.96942620e-01   2.37868500e+00]
[  9.54438000e-03  -8.97202850e-01   4.41665860e-01   1.80107742e+02]
[  0.00000000e+00   0.00000000e+00   0.00000000e+00   1.00000012e+00]]
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/poldracklab/fmriprep/pull/362#issuecomment-282054153,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAOkpyZnJiL8x0ymUkh1q-M48G5ZF__tks5rfbvSgaJpZM4MDxd7
.

So 7e56d04 implements the FreeSurfer-conformed volume -> original T1w volume transformation. However, now that I'm trying to think through it, I'm confusing myself.
Basic idea: t1mgz_affine = nb.load('T1.mgz').affine :: ijk -> LIA (in FreeSurfer-conformed volume), and t1w_affine =nb.load('t1w.nii.gz').affine :: ijk -> IPL (for example; in raw MGZ space). Hence, pinv(t1mgz_affine).dot(t1w_affine) :: LIA -> IPL... except why should the ijks correspond?
@satra, if you get a second, could you have a look and let me know if this is what you were describing? If anybody else sees something obvious, let me know.

fsl bbr -> fsl1.mat
fs bbr -> fsl2.mat

fsl1.mat -> reference is regular T1.nii
fsl2.mat -> reference is freesurfer space (likely same as T1.mgz, but i'm never 100% sure till i try it out)
so technically if you know the mapping between T1.nii and freesurfer space, you should be able to go one way or the other. of the top of my head i was thinking that this would be the same as the mapping between fsl1.mat and fsl2.mat i.e., pinv(fsl1.mat).dot(fsl2.mat) or vice verse depending on which transform you want.
t1w_affine maps from ijk_t1w to xyz
t1mgz_affine maps from ijk_mgz to xyz
it's the xyz that's common to both, which is what allows you to relate them.

I think what you describe -- mapping between the two structural spaces using the functional registrations -- assumes that FSL BBR and FS bbregister are going to produce the same alignment? If that were the case, we should just choose the one that puts us in the space we want, in this case FSL.
I'd rather avoid the functional step altogether and use the structural affines, and given that FreeSurfer is doing nothing but resampling to 256^3 isometric voxels, this shouldn't be fancy. If what we're after is ijk_mgz -> ijk_t1w, I think we should be able to just turn this around and say t1mgz_affine.dot(pinv(t1w_affine)).
I might still be confused, but I feel like this make more sense.

@effigies - i wasn't saying you should map between functional spaces - since you don't really want to run both registrations. just that the mapping between those two spaces should roughly equal the structural transform as a sanity check.
however, each registration has it's own source of error so simply doing a structural transform is not going to be equivalent to running the other registration.
the structural transform is still the safest thing to do.

Wondering if this is causing an issue: Image+centering.pdf
The location of the center defined by the affine in the raw images seems to be very different, and the center in the flt_bbr'ed a bbregistered images are also different. Is this normal/something that shouldn't affect the affine correction?

So this has gone on for quite a while, and I want to try to give a status update, to clear my head and get people's opinions on how best to proceed. I'm testing on ds000005 (give or take some 0's) to avoid LR flip issues in the uh2 datasets.
We have been using the following FLIRT sequence (actual nipype filenames simplified):
$ flirt -in $EPI -ref $T1 -out init.nii.gz -omat init.mat -dof 6
$ flirt -in $EPI -ref $T1 -omat flirt.mat -searchcost bbr -dof 6 -init init.mat \
    -schedule /usr/share/fsl/5.0/etc/flirtsch/bbr.sch -wmseg $WMMASK

Here T1 refers to the ANTs-generated brainmask, not the original T1 in the BIDS folder.
Yielding flirt.mat:
 0.9997169368   -0.008484848857  -0.02222782656  -15.35086442
-0.006684317239  0.7964569286    -0.6046583701    70.34123553
 0.02283393991   0.6046357384     0.7961747509    15.49617409
 0  0  0  1

We're replacing this with:
$ recon-all -s $SUBJ -i $ORIG_T1 -all
$ bbregister --s $SUBJ --mov $EPI --init-coreg --t2 --reg bbreg.dat --fslmat fsl.mat
$ tkregister2 --no-edit --mov $EPI --reg bbreg.dat --targ $T1 --fslregout adjusted.mat

This yields fsl.mat (output of bbregister):
 0.99972117   -0.01106763   -0.02086867   33.85606003
-0.02328384   -0.61062598   -0.79157710<PHONE_NUMBER>3
-0.00398207    0.79184198   -0.61071330   70.66278839
 0.00000000    0.00000000    0.00000000    1.00000000

And adjusted.mat (output of tkregister2):
-0.99972129    0.01106763    0.02086867<PHONE_NUMBER>3
-0.02328384   -0.61062604   -0.79157716<PHONE_NUMBER>4
-0.00398206    0.79184198   -0.61071336   70.66275787
-0.00000000   -0.00000000   -0.00000000    1.00000012

These aren't the same as flirt.mat, but then, the affine matrices of the outputs of flirt and bbregister are, respectively:
   1.            0.            0.          -81.
   0.            1.33333302    0.         -133.
   0.            0.            1.33333302 -129.
   0.            0.            0.            1.

  -0.99999994    0.            0.<PHONE_NUMBER>3
   0.            0.            0.99999994 -133.
   0.           -0.99999994    0.<PHONE_NUMBER>2
   0.            0.            0.            1.

Aligning these on Freeview shows basically identical images:

So it may be that I've been making too much of differing afffines and transforms, and this is a perfectly acceptable place to be; the aligned functionals are scaled and centered slightly differently, but we have transforms back into the original T1 space. Maybe the best way to test is to determine whether or not the downstream workflow is unable to cope with these differences. What's most likely to get distorted by a messed up
Alternately, what's the best way to directly test the transforms? flirt -in bbregistered.nii.gz -ref $T1 -init adjusted.mat -applyxfm -o out.nii.gz produces those weirdly flipped images:

@chrisfilo @oesteban

As discussed, I did:
flirt -in bbregistered.nii.gz -ref $T1 -init adjusted.mat -applyxfm -o out.nii.gz

The non-shorthand command was:
flirt -in /scratch/workflow_enumerator/01/ref_epi_t1_registration/_epi_..data..sub-01..func..sub-01_task-mixedgamblestask_run-01_bold.nii.gz/explicit_mask_epi/sub-01_task-mixedgamblestask_run-01_bold_mcf.nii.gz_mean_reg_masked.nii.gz \
      -ref /scratch/workflow_enumerator/01/t1w_preprocessing/ANTsBrainExtraction/Ants_T1_Brain_Extraction/highres001_BrainExtractionBrain.nii.gz \
      -init /scratch/workflow_enumerator/01/ref_epi_t1_registration/_epi_..data..sub-01..func..sub-01_task-mixedgamblestask_run-01_bold.nii.gz/tkreg2/epi2t1w.mat \
      -applyxfm -o /scratch/test.nii.gz

Checking test.nii.gz with Freeview:

Verifying the applyxfm command with the flt_bbr output matrix:
flirt -in /scratch/workflow_enumerator/01/ref_epi_t1_registration/_epi_..data..sub-01..func..sub-01_task-mixedgamblestask_run-01_bold.nii.gz/explicit_mask_epi/sub-01_task-mixedgamblestask_run-01_bold_mcf.nii.gz_mean_reg_masked.nii.gz \
      -ref /scratch/workflow_enumerator/01/t1w_preprocessing/ANTsBrainExtraction/Ants_T1_Brain_Extraction/highres001_BrainExtractionBrain.nii.gz \
      -init /scratch/workflow_enumerator/01/ref_epi_t1_registration/_epi_..data..sub-01..func..sub-01_task-mixedgamblestask_run-01_bold.nii.gz/flt_bbr/sub-01_task-mixedgamblestask_run-01_bold_mcf.nii.gz_mean_reg_masked_flirt.mat \
      -applyxfm -o /scratch/test.nii.gz

So we're definitely not working...

What if you set the ref as the FS conformed T1?
How does the original T1 and the FS conformed T1 relate?
Can you create an affine going from original to FS conformed T1?

On Tue, Mar 14, 2017 at 1:51 PM, Chris Markiewicz<EMAIL_ADDRESS>wrote:

As discussed, I did:
flirt -in bbregistered.nii.gz -ref $T1 -init adjusted.mat -applyxfm -o out.nii.gz
The non-shorthand command was:
flirt -in /scratch/workflow_enumerator/01/ref_epi_t1_registration/epi..data..sub-01..func..sub-01_task-mixedgamblestask_run-01_bold.nii.gz/explicit_mask_epi/sub-01_task-mixedgamblestask_run-01_bold_mcf.nii.gz_mean_reg_masked.nii.gz
-ref /scratch/workflow_enumerator/01/t1w_preprocessing/ANTsBrainExtraction/Ants_T1_Brain_Extraction/highres001_BrainExtractionBrain.nii.gz
-init /scratch/workflow_enumerator/01/ref_epi_t1_registration/epi..data..sub-01..func..sub-01_task-mixedgamblestask_run-01_bold.nii.gz/tkreg2/epi2t1w.mat
-applyxfm -o /scratch/test.nii.gz
Checking test.nii.gz with Freeview:
[image: applyxfm-mean_epi_tkreg]
https://cloud.githubusercontent.com/assets/83442/23921776/42da2db6-08d6-11e7-9ba8-cdb555e44bf1.png
Verifying the applyxfm command with the flt_bbr output matrix:
flirt -in /scratch/workflow_enumerator/01/ref_epi_t1_registration/epi..data..sub-01..func..sub-01_task-mixedgamblestask_run-01_bold.nii.gz/explicit_mask_epi/sub-01_task-mixedgamblestask_run-01_bold_mcf.nii.gz_mean_reg_masked.nii.gz
-ref /scratch/workflow_enumerator/01/t1w_preprocessing/ANTsBrainExtraction/Ants_T1_Brain_Extraction/highres001_BrainExtractionBrain.nii.gz
-init /scratch/workflow_enumerator/01/ref_epi_t1_registration/epi..data..sub-01..func..sub-01_task-mixedgamblestask_run-01_bold.nii.gz/flt_bbr/sub-01_task-mixedgamblestask_run-01_bold_mcf.nii.gz_mean_reg_masked_flirt.mat
-applyxfm -o /scratch/test.nii.gz
[image: applyxfm-mean_epi_fltbbr]
https://cloud.githubusercontent.com/assets/83442/23921850/7c7a88b8-08d6-11e7-9426-e2b30de8f58a.png
So we're definitely not working...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/poldracklab/fmriprep/pull/362#issuecomment-286555884,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAOkp-KbrnjldfkMbfLvCfgi3tQIu7awks5rlv3vgaJpZM4MDxd7
.

You get the right orientations, but shifted to the right.

Resampled to isotropic voxels, re-centered to anterior commissure.
That was the goal of the whole pinv(t1w_affine).dot(t1mgz_affine) thing, which doesn't really work:

I think that's because they set their (0, 0, 0) points in different places, so there's no common xyz space to work to. Which of course presents the question of how Freeview and mricron can show these files aligned in the first place.
I have tried doing ANTs registration from one to the other, but that seems to give affines following yet another convention. I suppose I can try using flirt, but even given that, I guess we're stuck at the problem where we have all these affines and no clear way to relate them.

Hmm... If you use ANTs to coregister original T1 to FS conformed T1
restricting transformation only to translations and scaling you should get
a good approximation to how such matrix should look in theory and thus
could be estimated de novo without having to performed coregistration. Or
am I missing something?
Alterantively, we can give up on trying to figure this out and output the
conformed T1 as the T1w_preproc (and adjust FAST to use it instead of the
original T1).

@effigies - there is a magical matrix that you may be missing:
M = np.array([[-1, 0, 0, 128],
              [ 0, 0, 1,-128],
              [ 0,-1, 0, 128],
              [ 0, 0, 0,   1]],dtype=float)

try applying this it essentially relates freesurfer surface space and conformed volume space.

@satra Tried updating the transform generated by tkregister via M.dot(<tkreg_mat>) (and <tkreg_mat>.dot(M)) and then ran flirt -applyxfm. Might have fixed the axes, but shifted the center by quite a lot in both cases. Tried setting the fourth column to [0; 0; 0; 1], and that just zeroed the files. Did I misunderstand what you were suggesting, or was this not the magic we needed?
@chrisfilo Not sure if you're missing something, but I definitely am. I'll try to figure out ANTs in the morning.
I did try mri_vol2vol (mri/orig/001.mgz is the original T1 just converted to mgz):
$ mri_vol2vol --mov /out/freesurfer/sub-01/mri/T1.mgz \
              --targ /out/freesurfer/sub-01/mri/orig/001.mgz \
              --regheader --o /scratch/reorig.mgz --keep-precision
movvol /out/freesurfer/sub-01/mri/T1.mgz
targvol /out/freesurfer/sub-01/mri/orig/001.mgz
outvol /scratch/reorig.mgz
invert 0
tal    0
talres 2
regheader 1
noresample 0
interp  trilinear (1)
precision  uchar (0)
Gdiag_no  -1
Synth      0
SynthSeed<PHONE_NUMBER>

Computing registration based on scanner-to-scanner

Final tkRAS-to-tkRAS Matrix is:
-1.00000   0.00000   0.00000  -0.00002;
 0.00000   0.00000  -1.00000  -0.00003;
 0.00000   1.00000   0.00000  -0.00001;
 0.00000   0.00000   0.00000   1.00000;

Vox2Vox Matrix is:
-1.00000   0.00000   0.00000   208.00002;
 0.00000   0.00000  -1.33333   255.99997;
 0.00000   1.33333   0.00000  -0.00001;
 0.00000   0.00000   0.00000   1.00000;

Resampling
Output registration matrix is identity

mri_vol2vol done

In the reverse:
Final tkRAS-to-tkRAS Matrix is:
-1.00000   0.00000   0.00000  -0.00002;
 0.00000   0.00000   1.00000  -0.00002;
 0.00000  -1.00000   0.00000  -0.00004;
 0.00000   0.00000   0.00000   1.00000;

Vox2Vox Matrix is:
-1.00000   0.00000   0.00000   207.99997;
 0.00000   0.00000   0.75000   0.00002;
 0.00000  -0.75000   0.00000   191.99997;
 0.00000   0.00000   0.00000   1.00000;

So looks like I have three new matrices to try in the morning.

@effigies - i don't think that magic matrix is completely correct, but may still be relevant.
could you put the following files in a shared folder somewhere: raw T1, orig.mgz, flirt.mat, bbregister.mat, meanEPI (i'll take a quick look)

@satra https://qnl-linux1.bu.edu/~effigies/registration.tar.gz

thanks @effigies.
so the info you need is this (it would be good to know how doug computes the mat file below or the steps to conform a file - it can likely be replaced with a few lines of nibabel+numpy code):
tkregister2 --mov T1.mgz --targ sub-01_T1w.nii.gz --regheader --reg junk --fslregout freesurfer2subT1.mat --noedit
then do:
np.loadtxt('freesurfer2subT1.mat').dot(np.loadtxt('bbregister.mat')).savetxt('newregforflirt.mat')
then apply with flirt with the ref being sub-01_T1w.nii.gz
and correspondingly if you do
np.linalg.inv(np.loadtxt('freesurfer2subT1.mat')).dot(np.loadtxt('flirtbbr.mat')).savetxt('newregforflirt.mat')
and use T1.mgz as the ref, you should get to the conformed space.

@satra Thank you! This was exactly what I needed.
In the above case, we get a T1.mgz -> T1w.nii.gz transform of:
   1.00000012    0.00000000    0.00000000  -49.00001144
   0.00000000    0.00000000    1.00000012    0.00000763
   0.00000000   -1.00000012    0.00000000<PHONE_NUMBER>0
   0.00000000    0.00000000    0.00000000    1.00000012

An EPI -> T1.mgz transform of:
   0.99971902   -0.01112530   -0.02093013   33.86444092
  -0.02336754   -0.61066228   -0.79154629<PHONE_NUMBER>5
  -0.00397511    0.79181224   -0.61075121   70.68538666
   0.00000000    0.00000000    0.00000000    1.00000000

Which we combine to get EPI -> T1w.nii.gz:
0.999719139966 -0.011125301335 -0.0209301325116 -15.1355664563
-0.00397511047701 0.791812335017 -0.61075128329 70.6854027722
0.0233675428041 0.610662353279 0.791546384986 15.6827867119
0 0 0 1

Compare to the FLIRT-BBR generated:
0.9997169368  -0.008484848857  -0.02222782656  -15.35086442
-0.006684317239  0.7964569286  -0.6046583701  70.34123553
0.02283393991  0.6046357384  0.7961747509  15.49617409
0  0  0  1

Freeview confirms:

Latest commit updates the language on the reports. Ready for review, pending CI build to verify non-FreeSurfer runs produce unchanged reports.

Docs updated. I decided to go with the approach of noting when FreeSurfer adds to or modifies a step in the base workflow, and then describing all surface-based processing in its own section. I suspect that will be smoother when fieldmaps go in, and it allows the FreeSurfer derivatives to be described without cluttering up the main derivatives section.
An alternative approach would be to include FreeSurfer stuff by default, and have a section describing the removals/replacements if --no-freesurfer is used.

there seems to be something wrong with the MNI preproc files:
this is the preproc bold in the MNI space overlaid on top of the atlas

this is the proproc bold in the T1w space overlaid on top of the T1

This is the normalized T1w overlaid on the MNI

ds005 sub-01
I'm gonna check if the same thing happens in master.

The same thing when using master with FLIRT BBR


Example of running lithops using Google Cloud Functions

Can we add an example of how to deploy cubed on Google Cloud Functions using lithops?
@tomwhite you asked what executor would be most useful to focus on for the purposes of early-stage pangeo testing. I think I said maybe Beam on Dataflow, but actually on reflection I think Lithops on Google Cloud Functions might be the most useful right now, because:
a) A lot of the large pangeo datasets we would like to test on are currently available / only available in Google Cloud Storage (see the catalog),
b) My understanding is that beam on dataflow is likely slower than lithops, and lithops will better demonstrate cubed's serverless design,
c) Modal is invite-only.
I've started setting this up to test it out but am not sure how to set up a suitable docker container - neither the instructions for the lithops on AWS examples nor the Beam on dataflow examples seem to directly translate.

Modal is invite-only.

Is it still? https://modal.com/signup seems to suggest you can sign-up directly.
Even so, having a GCP executor would be useful I think. GCP has both Cloud Functions and Cloud Run - the former is higher-level, while the latter is more flexible. I'm not sure which is the better fit for Cubed so it might be worth trying both.
Cloud Run uses a docker file - see the example here https://github.com/lithops-cloud/lithops/tree/master/runtime/gcp_cloudrun. I think it could be adapted to include what Cubed's dockerfile for AWS lambda uses.
Cloud Functions uses a requirements.txt file (so pip only) - see https://github.com/lithops-cloud/lithops/tree/master/runtime/gcp_functions.

Is it still? https://modal.com/signup seems to suggest you can sign-up directly.

That's news to me! (I do already have access)

Even so, having a GCP executor would be useful I think. GCP has both Cloud Functions and Cloud Run - the former is higher-level, while the latter is more flexible. I'm not sure which is the better fit for Cubed so it might be worth trying both.

After some messing around @cissacstern and I managed to get the lithops-add-asarray.py example to run on Google Cloud Functions!
It actually turned out to be very simple - at least once we saw the link on building a lithops runtime you sent Tom :sweat_smile:
You basically just need to pass in a lithops configuration that looks like this:
lithops:
    backend: gcp_functions
    storage: gcp_storage

gcp:
    region: us-east1
    credentials_path: /home/tom/Documents/Work/Code/experimentation/cubed_xarray_blog/lithops_gcf/pangeo-forge-4967-28119df031a5.json

gcp_storage:
    storage_bucket: tomnicholas-lithops-config

build a lithops runtime like this
lithops runtime build -f requirements.txt cubed_runtime -b gcp_functions

then run the example script in the same way
python lithops-add-asarray.py "gs://cubed-tomnicholas-temp/zarr-temp" cubed_runtime

This setup is nice because docker was not required. I can submit a PR to add this as another example if you want @tomwhite ?
We didn't try using Cloud Run, but is there an advantage to doing that? All of cubed's dependencies are available on pip.

After some messing around @cisaacstern and I managed to get the lithops-add-asarray.py example to run on Google Cloud Functions!

Awesome!

I can submit a PR to add this as another example if you want @tomwhite ?

Yes please, that would be great.

We didn't try using Cloud Run, but is there an advantage to doing that? All of cubed's dependencies are available on pip.

If Cloud Functions works well then that's fine.


GSU support DGEMM

Added GSU support for DGEMM
added yaml files for BDAS workloads (kmeans, pca)

Full rocblas-test passed on gfx906.


Sqlite3

What would be the best way to include Sqlite3 into the image so that it can be used by packages such as https://pub.dev/packages/drift?

A few assumptions:

You're going to start out with the Dart official image (that comes from this repo).
You're trying to get to a minimal container that has just enough libraries to run your Dart app.
You're going to use a two stage build to firstly compile your AOT binary within the Dart container then copy it into your FROM scratch container.

The Dart image doesn't have Sqlite3 there by default. So the library needs to be installed. It's that library that will then be used via dart:ffi for packages like drift or sqlite3.
RUN set -eux; \
    apt-get update; \
    apt-get install -y --no-install-recommends libsqlite3-0

The library then needs to be copied into /runtime so that it's there with the other libraries that are needed for an AOT binary to dynamically link to:
RUN set -eux; \
    case "$(dpkg --print-architecture)" in \
        amd64) \
            TRIPLET="x86_64-linux-gnu" ;; \
        armhf) \
            TRIPLET="arm-linux-gnueabihf" ;; \
        arm64) \
            TRIPLET="aarch64-linux-gnu" ;; \
        *) \
            echo "Unsupported architecture" ; \
            exit 5;; \
    esac; \
    FILES="/lib/$TRIPLET/libsqlite3.so.0"; \
    for f in $FILES; do \
        dir=$(dirname "$f"); \
        mkdir -p "/runtime$dir"; \
        cp --archive --link --dereference --no-target-directory "$f" "/runtime$f"; \
    done

The section above copies liberally from the Dockerfile-debian.template in this repo, which is designed for multiple architectures. If you know your target architecture is fixed then things can be simplified quite a bit by simply copying the single libsqlite3.so.0 shared library file.
The second stage of the Dockerfile then proceeds as normal, copying in the /runtime, which will now have the sqlite3 library along with libc and the other AOT dependencies:
FROM scratch
COPY --from=build /runtime/ /

NB I've not tested this, so please excuse any typos. I'm pretty sure that the libraries libsqlite3-0.so.0 links to are already present in runtime:
ldd /lib/x86_64-linux-gnu/libsqlite3.so.0
        linux-vdso.so.1 (0x00007ffdb45f1000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa502bd1000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa5029f0000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fa502e13000)

linux-vdso.so.1 is a virtual shared object rather than a library file on disk.


"Failed Task" with localized site and entries

I installed your plugin on a single-lang site, and everything worked just fine.
Now i upgraded to Craft Pro, and when i want to import a file (even one i exported through your export-plugin), all i get is "Failed Task" in the Admin-Sidebar, but nothing else.
The first row gets imported, then it breaks.
This is the example-file:
https://gist.github.com/CinKon/ea83b546aa558c8a7e07a9329d3997b9
I don't know where to start to debug, since i can't find any error logs. In the Import-History, the ID of the file is not clickable.
I tried it with and without the "Locale"-Row.

#45

Complete uninstall end reinstall helped :)


Change CallWeb API to correctly allow access from service accounts

This has been done; need a test deployment.


make graphql/client.dart web compatible

We've received a handful of complaints about the dart:io dependency, which makes graphql/client.dart incompatible with web:

Important: Browser-based applications can't use this library. Only servers, command-line scripts, and Flutter mobile apps can import and use dart:io.

This should be avoidable.
Current progress and corresponding MR:

[x] memory persistent #325
[x] GraphQL upload file #328
[x] websocket #323

dart:io is used:

in lib/src/cache/in_memory.dart for persistence
in lib/src/core/raw_operation_data.dart for File handling
in lib/src/link/http/link_http.dart for File upload logic
in lib/src/socket_client.dart for CompressionOptions, WebSocket, and WebSocketStatus

We can probably replace file logic with https://pub.dev/packages/file, but it seems like WebSockets will require some toggle logic between dart:io and dart:html. I think we can do a conditional export

Considering Websocket (that's our pain point with @kei42 for now), I've come across this lib https://github.com/dart-lang/web_socket_channel
Maybe a solution would be to use it or take inspiration to wrap both dart:io and dart:html Websocket implementations ?

@adelcasse that's the right direction - maybe something more minimalist, idk much about websockets though. I'm not sure exactly, but I think we can leverage the conditional export to avoid any api differences between the platform (as opposed to shared interface with injection).
It'll probably be a bit before I have the time to get to this

beware on conditional import as I think the implementations on io and html are not the same (different methods, ...). @kei42 might confirm as he tried but we have pull different code conditionally, not only imports

Indeed as far as I've seen there is no "connect" method in dart:html and there are no stream handling either.
To connect on dart:html you just need this line:
WebSocket(url,           protocols: protocols);
where as for dart:io
WebSocket.connect(url,           protocols: protocols,           headers: headers,           compression: config.compression);

yeah, we'd need a wrapping/normalizing interface and platform-specific implementations in the style of web_socket_channel. It would also be a great standalone websocket module.

@micimize I took the liberty to update your original issue description to include checklist. Hopefully, after merging all 3 PRs, we can run client on browser.

All boxes (that we know of) are checked. Maybe the next step is to have an example in Flutter for Web / AngularDart?

@truongsinh that would be ideal, but could be left for another issue. If you, @adelcasse, or @kei42 use/have used it in the wild successfully that's enough for me to close this one.

I'll try it this week if I have time. I'll keep you updated

Any progress on this?

@TanaseHagi graphql/client.dart should be usable on web today. I left it open while awaiting confirmation, but I think it's better to close it and open a new issue if someone reports problems


{"failed": true, "msg": "'dict object' has no attribute 'vault'"}

TASK [vault : check_vault | Set fact about the Vault cluster's initialization state] ***
Monday 10 April 2017  17:36:00 +0800 (0:00:00.086)       0:02:34.403 **********
fatal: [node1]: FAILED! => {"failed": true, "msg": "'dict object' has no attribute 'vault'"}
fatal: [node2]: FAILED! => {"failed": true, "msg": "'dict object' has no attribute 'vault'"}
fatal: [node4]: FAILED! => {"failed": true, "msg": "'dict object' has no attribute 'vault'"}
fatal: [node3]: FAILED! => {"failed": true, "msg": "'dict object' has no attribute 'vault'"}
pls  who can help me

FWIW, I ran into this as well.  I had an existing ansible <IP_ADDRESS> installation.  Upgrading ansible solved this, though there are a lot of warnings like:
[WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ download.enabled|bool and download.container|bool }}


setting target FPU

Hi,
This recipe compiles perfectly fine using qemu_x86-64 but unfortunately I'm stuck with the compilation for the target platform which is powered by an Allwinner H2 SoC. 'do_compile' fails with:
/home/marius/mender-orangepi-warrior/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/python3-scipy/1.3.3-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/8.3.0/ld: error: build/lib.linux-x86_64-3.7/scipy/fftpack/_fftpack.cpython-37m-arm-linux-gnueabi.so uses VFP register arguments, build/temp.linux-x86_64-3.7/libfftpack.a(cffti1.o) does not
/home/marius/mender-orangepi-warrior/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/python3-scipy/1.3.3-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/8.3.0/ld: failed to merge target specific data of file build/temp.linux-x86_64-3.7/libfftpack.a(cffti1.o)

[...]

| error: Command "/home/marius/mender-orangepi-warrior/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/python3-scipy/1.3.3-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -Wall -g -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/marius/mender-orangepi-warrior/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/python3-scipy/1.3.3-r0/recipe-sysroot -shared -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now -L/home/marius/mender-orangepi-warrior/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/python3-scipy/1.3.3-r0/recipe-sysroot/usr/lib/python3.7/site-packages/numpy/core/lib build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/fftpack/_fftpackmodule.o build/temp.linux-x86_64-3.7/scipy/fftpack/src/zfft.o build/temp.linux-x86_64-3.7/scipy/fftpack/src/drfft.o build/temp.linux-x86_64-3.7/scipy/fftpack/src/zrfft.o build/temp.linux-x86_64-3.7/scipy/fftpack/src/zfftnd.o build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/fftpack/src/dct.o build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/fftpack/src/dst.o build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/fftpack/fortranobject.o -L/home/marius/mender-orangepi-warrior/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/python3-scipy/1.3.3-r0/recipe-sysroot/usr/lib -Lbuild/temp.linux-x86_64-3.7 -ldfftpack -lfftpack -lpython3.7m -lgfortran -o build/lib.linux-x86_64-3.7/scipy/fftpack/_fftpack.cpython-37m-arm-linux-gnueabi.so -Wl,--version-script=build/temp.linux-x86_64-3.7/link-version-scipy.fftpack._fftpack.map" failed with exit status 1
| ERROR: 'python3 setup.py build ' execution failed.

(Note the warning on the VFP register arguments)
I did some research and assume that it is linked to the floating point processing on the target device. I tried to enforce hard and soft FPU handling by setting target_FPU="soft" (or hard) in the machine configuration. In both cases compilation crashed at the same step.
Do you have an idea how to fix the compilation for this target machine?

Unfortunately I won't be of much help to you here. You might want to try asking on the Yocto mailing list. Someone on there might have some experience compiling to your target.

Ok. I'm in contact with the community throurgh their irc channel. I'll close the issue but will keep it updated as soon as a solution comes up.

@HerrMuellerluedenscheid , we ran into a similar issue when compiling for the RPi 3. Our work around was to switch to soft float ABI and disable the VFP unit. This isn't a great solution as this has an impact on performance, but it goes us going. I'd be interested in hearing if you got any better solutions from talking to the larger community.

@mcampbellizo Sure, I'm happy to keep you updated. For now, I would be super happy if the soft float ABI would work. Can you give me a hint on how you did that? So far I only found the TARGET_FPU switch which I set to soft but that did not do the trick, unfortunately. Given that we seem to have a pretty overpowered CPU for our task I most certainly can live with performance loss (for now).

@HerrMuellerluedenscheid we had to change the DEFAULTTUNE variable in the machine conf file (in our case conf/machine/raspberrypi3.conf. The orignal value was
DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"

and we changed it to
DEFAULTTUNE ?= "cortexa7t-neon"

This changed from the hard float ABI To soft float ABI and disabled used of the vector floating point unit. The base cortexa7t might need to be different for your board if it's not an a7 core, but this should get you started. Let me know how this goes for you.

That works! I'll see how bad the performance loss is but for now this allows to compile this recipe on Allwinner H2 plus!

That's awesome! We didn't get exact numbers but did note a measurable difference in at least Scipy performance. Depending on how bad it is for us we may investigate how to get this working with hard float and VFP enabled. Either way, do you think a note about needing to disable VFP and hard float with an example in the README.md seems like a good idea?

I've just made the wiki for this repo publicly editable, so I think that would be a good place to add things like this. You can create a new page for your particular architecture/target with specific instructions. Let me know if you're not able to do so.

Hi, I also ran into the same issue, changing the default tune worked (a9 core). I'm curious if someone finds a way to keep hard abi.

I'm also hitting this issue. Looking into a bit it seems like the issue is that the fortran compiler is not called with the -mfloat-abi -mfpu set as it should, so it generates soft-float binaries and then the linker complains when linking with the other objects file correctly compiled from C with correct float options.
I'll most likely be digging into this the next few days, and will provide updates here if I have any news.