Fails with a CORS error

Hi Nate,
Thanks for providing 2 very useful modules.
Do you have a working demo app that uses both koa-shopify-auth-cookieless and koa-shopify-graphql-proxy-cookieless?
I got the app to install and load using the new Shopify session tokens but I'm really struggling with koa-shopify-graphql-proxy-cookieless, it seems to fail with a CORS error every time I do a graphql query.
POST /graphql                                    303 See Other
Access to fetch at 'https://XXXX.myshopify.com/admin/auth/login' (redirected from 'https://XX.ngrok.io/graphql') from origin 'https://XX.ngrok.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Hi, @pramodparanthaman thanks for raising the issue. Can you show me the code that is failing?
Here is a snippet from a working app:
router.post("/graphql", async (ctx, next) => {
    const bearer = ctx.request.header.authorization;
    const secret = process.env.SHOPIFY_API_SECRET;
    const valid = isVerified(bearer, secret);
    if (valid) {
      const token = bearer.split(" ")[1];
      const decoded = jwt.decode(token);
      const shop = new URL(decoded.dest).host;
      const settings = await getAppSettings(shop);
      const proxy = graphQLProxy({
        shop: shop,
        password: settings.data.getUser.token || "accessToken",
        version: ApiVersion.July20,
      });
      await proxy(ctx, next);
    }
  });

  router.get("/", async (ctx, next) => {
    const shop = getQueryKey(ctx, "shop");
    const settings = await getAppSettings(shop);
    const token = settings.data.getUser && settings.data.getUser.token;
    ctx.state = { shopify: { shop: shop, accessToken: token } };
    await verifyToken(ctx, next);
  });

Please note that I'm using the following package for isVerified:
https://www.npmjs.com/package/shopify-jwt-auth-verify
And also the follwing package for the jwt namespace above:
https://www.npmjs.com/package/jsonwebtoken
I'm also storing credentials in AWS AppSync, so that's where the settings are being pulled on these lines:
const settings = await getAppSettings(shop);
How are you storing your access token? You mentioned that you are successfully using session tokens, but if you're not storing a valid access token, then the verifyToken method in the koa-shopify-auth-cookieless package will redirect you to /auth.
If you can show me a snippet of how you're trying to accomplish this, it might be helpful.
Nate

I have a live Node/React embedded app on Shopify hosted on Google App Engine that I'm migrating to the new JWT authentication. I plan to use Cloud datastore to persist App Tokens, for now I'm hardcoding the token during development. Almost all my code is identical to the Shopify Node React demo:
https://github.com/Shopify/shopify-demo-app-node-react
Here's my server.js code:
require('isomorphic-fetch');
const dotenv = require('dotenv');
const Koa = require('koa');
const next = require('next');
const Router = require('koa-router');
const { createShopifyAuth, verifyToken, getQueryKey, redirectQueryString } = require("koa-shopify-auth-cookieless");
const { graphQLProxy, ApiVersion } = require("koa-shopify-graphql-proxy-cookieless");
const isVerified = require("shopify-jwt-auth-verify")['default']
const jwt = require('jsonwebtoken');

dotenv.config();

const port = parseInt(process.env.PORT, 10) || 3000;
const dev = process.env.NODE_ENV !== 'production';
const app = next({ dev });
const handle = app.getRequestHandler();

const { SHOPIFY_API_SECRET_KEY, SHOPIFY_API_KEY, HOST, TEST } = process.env;

app.prepare().then(() => {
  const server = new Koa();
  const router = new Router();
  server.keys = [SHOPIFY_API_SECRET_KEY];

  server.use(
    createShopifyAuth({
      apiKey: SHOPIFY_API_KEY,
      secret: SHOPIFY_API_SECRET_KEY,
      scopes: ['read_products', 'read_orders', 'write_inventory'],
      accessMode: 'offline',
      async afterAuth(ctx) {
        const { shop, accessToken } = ctx.state.shopify;
        // TODO: Save  shop and accessToken to datastore
        console.log('ctx.state.shopify: ', ctx.state.shopify);
        const redirectQuery = redirectQueryString(ctx);
        ctx.redirect(`/?${redirectQuery}`);
      },
    }),
  );

  router.post("/graphql", async (ctx, next) => {
    const bearer = ctx.request.header.authorization;
    const secret = SHOPIFY_API_SECRET_KEY;
    const valid = isVerified(bearer, secret);
    console.log('isVerified: ', valid); // Displays true
    if (valid) {
      const token = bearer.split(" ")[1];
      const decoded = jwt.decode(token);
      console.log('graphQL decoded: ', decoded); // Displays fully decoded JWT payload
      const shop = new URL(decoded.dest).host;
      // TODO: get accessToken from datastore using shop
      const accessToken ='shpat_XXXX';
      const proxy = graphQLProxy({
        shop: shop,
        password: accessToken,
        version: ApiVersion.July20,
      });
      await proxy(ctx, next);
    }
  });

  router.get("/", async (ctx, next) => {
    const shop = getQueryKey(ctx, "shop");
    // TODO: get accessToken from datastore using shop
    const accessToken ='shpat_XXXX';
    ctx.state = { shopify: { shop: shop, accessToken: accessToken } };
    await verifyToken(ctx, next);
  });

  router.get('*', async (ctx) => {
    const shop = getQueryKey(ctx, "shop");
    // TODO: get accessToken from datastore using shop
    ctx.state = { shopify: { shop: shop, accessToken: 'shpat_XXXX' } };
    const { accessToken } = ctx.state.shopify;
    switch(ctx.path) {
      default:
        await handle(ctx.req, ctx.res);
        ctx.respond = false;
        ctx.res.statusCode = 200;
        break;
    }
  });
  server.use(router.allowedMethods());
  server.use(router.routes());

  server.listen(port, () => {
    console.log(`> Ready on port ${port}`);
  });
});

I setup the GraphQL Apollo client code as shown in the Shopify documentation:
https://shopify.dev/tutorials/authenticate-your-app-using-session-tokens
  client = new ApolloClient({
    link: new HttpLink({
      credentials: 'same-origin',
      fetch: authenticatedFetch(app),
    }),
    cache: new InMemoryCache()
  });

Hi @pramodparanthaman, thanks for providing the code. I see a few things that should probably be changed:

You should consider removing the switch statement in your wildcard route. Not sure if you're planning to add more branches to the statement, but for now, since it's just the default case it's not necessary. Instead of this:

router.get('*', async (ctx) => {
    const shop = getQueryKey(ctx, "shop");
    // TODO: get accessToken from datastore using shop
    ctx.state = { shopify: { shop: shop, accessToken: 'shpat_XXXX' } };
    const { accessToken } = ctx.state.shopify;
    switch(ctx.path) {
      default:
        await handle(ctx.req, ctx.res);
        ctx.respond = false;
        ctx.res.statusCode = 200;
        break;
    }
  });

Try this:
router.get("*", async (ctx) => {
    await handle(ctx.req, ctx.res);
    ctx.respond = false;
    ctx.res.statusCode = 200;
  });

I noticed that your ApolloClient may be using the wrong HttpLink method, or you are possibly importing the wrong package. Take a look at this working example:

import { ApolloClient } from "apollo-client";
import { createHttpLink } from "apollo-link-http";
import { InMemoryCache } from "apollo-cache-inmemory";
import { ApolloProvider } from "@apollo/react-hooks";
import { AppProvider } from "@shopify/polaris";
import<EMAIL_ADDRESS>import translations from<EMAIL_ADDRESS>import createApp from "@shopify/app-bridge";
import { authenticatedFetch } from "@shopify/app-bridge-utils";
import { useRouter } from "next/router";

export default function MyApp({ Component, pageProps }) {
  const router = useRouter();
  const shopOrigin = router.query.shop || "shopOrigin";
  const app = createApp({
    apiKey: API_KEY,
    shopOrigin: shopOrigin,
    forceRedirect: true,
  });
  const link = new createHttpLink({
    credentials: "omit",
    fetch: authenticatedFetch(app), // app: App Bridge instance
  });
  const client = new ApolloClient({
    link: link,
    cache: new InMemoryCache(),
  });

  return (
    <AppProvider i18n={translations}>
      <ApolloProvider client={client}>
        <Component {...pageProps} />
      </ApolloProvider>
    </AppProvider>
  );
}

Take a look at the package.json for a working project and make sure you are using similar versions:

"dependencies": {
    "@apollo/react-hooks": "^4.0.0",
    "@babel/core": "7.9.0",
    "@babel/polyfill": "^7.6.0",
    "@babel/preset-env": "^7.6.2",
    "@babel/register": "^7.6.2",
    "@shopify/admin-graphql-api-utilities": "^0.1.1",
    "@shopify/app-bridge": "^1.26.2",
    "@shopify/app-bridge-utils": "1.26.2",
    "@shopify/app-cli-node-generator-helper": "^1.2.1",
    "@shopify/dates": "^0.4.1",
    "@shopify/koa-shopify-webhooks": "^2.3.1",
    "@shopify/network": "^1.5.0",
    "@shopify/polaris": "^5.2.1",
    "@shopify/react-network": "^3.5.3",
    "@zeit/next-css": "^1.0.1",
    "apollo-cache-inmemory": "^1.6.6",
    "apollo-client": "^2.6.10",
    "apollo-link-http": "^1.5.17",
    "aws-amplify": "^3.2.0",
    "aws-appsync": "^4.0.0",
    "dotenv": "^8.2.0",
    "eslint": "^7.3.1",
    "file-saver": "^2.0.2",
    "graphql": "^15.3.0",
    "isomorphic-fetch": "^2.1.1",
    "jsonwebtoken": "^8.5.1",
    "koa": "^2.13.0",
    "koa-compose": ">=3.0.0 <4.0.0",
    "koa-router": "^8.0.6",
    "koa-shopify-auth-cookieless": "^1.0.26",
    "koa-shopify-graphql-proxy-cookieless": "^1.0.5",
    "next": "^9.5.3",
    "next-env": "^1.1.0",
    "nonce": "^1.0.4",
    "papaparse": "^5.2.0",
    "react": "^16.13.1",
    "react-csv": "^2.0.3",
    "react-dom": "^16.13.1",
    "react-papaparse": "^3.8.0",
    "safe-compare": "^1.1.2",
    "shopify-jwt-auth-verify": "^1.0.10",
    "store-js": "^2.0.4"
  },

Let me know if that helps!

Hi @pramodparanthaman any luck with the redirects? Let me know if you have any further questions.
I’m considering creating a barebones repo with a working example as a reference.
Would this be helpful?

That would be great! Thanks

Ok, I'll go ahead and put that up as soon as I'm able.
In the meantime, I'm going to close this issue.
If you have any other troubles with this package, please reopen this issue or go ahead and open a new one.

Finally got this working.
There were two issues.

Cookies need to be deleted since some apps may have migrated from the old authentication to the new JWT sessions and users may still have the old cookie in their browser.
Some Apollo package added the header "x-requested-with" to the GraphQL requests causing the CORS error.

I modified your code in shopify-graphql-proxy.js to fix both issues using proxyReqOptDecorator(proxyReqOpts). Please update and also add the latest Shopify API (October20: "2020-10").
Thanks!
    await proxy(shop, {
      https: true,
      parseReqBody: false,
      // Setting request header here, not response. That's why we don't use ctx.set()
      // proxy middleware will grab this request header
      headers: {
        "Content-Type": "application/json",
        "X-Shopify-Access-Token": accessToken,
      },
      proxyReqOptDecorator(proxyReqOpts) {
        delete proxyReqOpts.headers.cookie;
        delete proxyReqOpts.headers.Cookie;
        delete proxyReqOpts.headers['x-requested-with'];
        return proxyReqOpts;
      },
      proxyReqPathResolver() {
        return `https://${shop}${GRAPHQL_PATH_PREFIX}/${version}/graphql.json`;
      },
    })(
      ctx,

      /*
        We want this middleware to terminate, not fall through to the next in the chain,
        but sadly it doesn't support not passing a `next` function. To get around this we
        just pass our own dummy `next` that resolves immediately.
      */
      noop
    );
  };
}

@pramodparanthaman, great thanks for the fix. I'll release a new package with the update as soon as I get a chance to test it.

Hi @pramodparanthaman, FYI, the fix has now been incorporated in the latest package.
Also, I created a Shopify Cookieless Demo you can check out here:
https://github.com/nprutan/shopify-cookieless-auth-demo


Update 00.md

Changes

Testing

Docs

Hey @PotatoCloud! I can’t accept this PR as I can’t find any evidence of that site linked being built with Snowpack. I’m also uncertain about the purpose of the site in general; it seems to be more of a test than anything.
If I’ve made an error, please provide more details and I’d be happy to reconsider.


OU-408: Proxy to alert manager and thanos querier

This PR starts the work on the ACM branch for the work needed on on both the frontend and the backend. It is pointed at the feature branch ACM which will be used until its time to merge
Rather than fighting roles and role bindings manually I have taken a bit of extra time to skip ahead to OU-407 and start on a branch here which can be used for deployment. Even if we don't end up shipping with ObO this will provide help during this building process and enable quick transitions to whatever other deployment due to knowing needed clusterroles and the like.
The work and the work in ObO is in an incomplete state, and may not work. Reviews are welcome and once work is complete to a working order a review will be requested manually.

This PR looks at the ACM branch, not main. I would appreciate feedback on the alertmanager and thanos-querier paramaters being passed in. I considered a couple of options:

placing them in a config file which is then read (which may be overkill)
combining the name and namespace into a single variable (which is what is done here, but requires very specific formatting)
leaving them in 4 separate variables (which creates a lot of variables)
passing in the URLs which will be proxied too (which offloads business logic upstream somewhere to either COO or one of the ACM controllers)

None of them felt like particularly good solutions, so I'd be happy to discuss what would be best

Updates to the COO PR have also been completed to bring it in sync with changes to feature and parameter names.

/lgtm


alter aria-expanded attributes for popover invokers

Native popover in Chrome exposes "expanded" accessibility info for popover invokers, which allows assistive technologies to know that the button will expand some kind of dialog or menu.
This PR adds aria-expanded=false on all popover invoker buttons that target an auto popover, during page load or insertion into the DOM, and when a popover becomes visible, it will toggle aria-expanded=true for all invokers of a visible popover.

Actually this might need rethinking a little, because it interferes with the native behaviour (as aria-expanded is then fixed to "false" in supported browsers)

This has been updated so that it sets aria-expanded on all button/input elements that are invokers for a popover=auto.

@jgerigmeyer shall I add a version bump commit?

@jgerigmeyer shall I add a version bump commit?

Go ahead and merge -- I'll do a version bump and release this afternoon 👍


Generalize OCI spec root

We now generalize and document the OCI Spec root structure. This means
that some fields have been added and other are now optional.
All corresponding usages of the new spec format have been changed and
tests have been adapted.

@saschagrunert Looks good to me. As @utam0k has taken the lead on this, I will wait for his review before merge.


Fix "Page Not Found" when accessing the "Install Docker Engine - Ente…

…rprise on Windows Servers" link
"Install Docker Engine - Enterprise on Windows Servers" link is pointing to https://docs.docker.com/ee/docker-ee/windows/docker-ee/#install-docker-engine---enterprise.
The URL has changed. The new URL is https://docs.mirantis.com/docker-enterprise/v3.0/dockeree-products/docker-ee/windows.html

@iftvio please sign the CLA as the bot instructed above.
/sig windows cluster-lifecycle

/lgtm
/approve

@iftvio  you might need to check that the email address you're using in Git matches the email address that you signed the CLA with

@iftvio thanks for your contribution! 🎉 We really would love to have it, unfortunately to continue we need to have your (or your company's) signature on a CLA! For now I'm going to close this, but fret not! You can re-open whenever you have a chance. Thanks!
/close


Support specific type for input text

As of now TextInput component does not support limiting specific type of content in the text box. It should support limiting input by type e.g. Number only, Alpha numeric or any string.

It is already supported by passing type into props of the TextInput component.


Files may crash when pulling a tab out to separate window

Description
While doing some work requiring me to have several instances of Files open, I decided to pop out one of my tabs by dragging it outside the Files Window, forcing it to open as a new instance with the current location active. I've done this several times  in the past and have found it working perfectly with this being the first time it happened.
I did try to replicate the issue a bit afterwards but was not able to reproduce the same error more than once, where both crash cases happened while the active tab was on a different drive than the C: Drive.
Steps To Reproduce

Open two separate folders in two tabs
Choose one of the folders to pop out
Drag the selected tab outside the active Files window
Crash should occur after releasing the tab.

Crash may only occur with the tab being popped out being a non-Windows drive (any drive letter except for C:)
Expected behavior
The tab should open up in a new Files window with the folder active when the tab was pulled out being automatically reloaded instead of the Home screen popping up.
Files Version
Version: <IP_ADDRESS> OS Version: 10.0.22000.469
Windows Version
Windows 11 Version 21H2 (OS Build 22000.469)
Relevant Assets/Logs
debug.log
debug_fulltrust.log

Same as #7246


LIBITD-1550. Fixed issue when optional "asset_root" parameter is not provided

Moved "calculate_relative_path" method out of the "Assets" class into "utils.py".
Refactored the code to move relpath calculation out of the "Asset" class and into the "Batch" class, so that an asset is constructed with the relpath directly. This simplifies the "Asset" class, and puts the relpath calculation into the Batch class, which already has all the information needed to do the calculation.
Renamed the "path" instance variable in "Batch" to "manifest_path", so that it would be clearer what the variable represented. Also avoids potential confusion in the "add_asset" method, where "path" is used as a variable that is a method argument.
https://issues.umd.edu/browse/LIBITD-1550

tests pass


Data editing interface not visible

Steps: open a new or existing data card
Bug: I can't see the div at the top that's supposed to let me edit my data.

Gist: https://gist.github.com/anonymous/e051e6bb907d22e9b60a
Environment:
OSX Macbook Pro, 10.9.5
Chrome 46.0.2490.80 (64-bit)
Eve (version file says 0, not sure where else to look, but I cloned it today)
Details:
With a little testing, it seems .form-container's height is somehow set to 2px.
I'm not sure if it's relevant, but when I load any page I get these two errors:
microReact.ts:245 Error: Invalid value for <svg> attribute height="-Infinity"
Renderer.domify @  microReact.ts:245
Renderer.render @ microReact.ts:465
UiRenderer.render @ uiRenderer.ts:73
(anonymous function) @ editor.ts:177

microReact.ts:246 Error: Invalid value for <svg> attribute width="-Infinity"
Renderer.domify @ microReact.ts:246
Renderer.render @ microReact.ts:465
UiRenderer.render @ uiRenderer.ts:73
(anonymous function)	@	editor.ts:177

And when I run.sh, I get these warnings:
Warning, cannot migrate state for: "562fd764-8fb5-42e5-8cd4-39c4575ea424"
Warning, cannot migrate state for: "562fd764-8fb5-42e5-8cd4-39c4575ea424"
Warning, cannot migrate state for: "562fd764-8fb5-42e5-8cd4-39c4575ea424"
Warning, cannot migrate state for: "562fd764-8fb5-42e5-8cd4-39c4575ea424"

Same here, had to manually set a height on .table-workspace .form-container
Looking into why flex-box is collapsing like that. Might submit a pull-request.


why python use ast tree, but other languages don't use?

java、php、golang etc, these languages just use "=" to analyze hardcode. I think python use "=" to analyze is Enough. I don't know why author  use astroid turn python to ast.
@adeptex

Hi @TheNorth-sec, please refer to the readme: Python3 files are parsed as ASTs because of native language support.


Added SharePoint My Tools solution

By submitting this pull request, you agree to the contribution guidelines

If you aren't familiar with how to contribute to open-source repositories using GitHub, or if you find the instructions on this page confusing, sign up for one of our Sharing is Caring events. It's completely free, and we'll guide you through the process.

To submit a pull request with multiple authors, make sure that at least one commit is a co-authored commit by adding a Co-authored-by: trailer to the commit's message. E.g.: Co-authored-by: name<EMAIL_ADDRESS>

Put an x in all the items that apply ([x], without spaces), make notes next to any that haven't been addressed.

[ ] Bug fix?
[x] New sample?
[ ] Related issues: fixes #X, partially #Y, mentioned in #Z
[ ] Needs API permissions?
[x] Has other prerequisites? (E.g. requires a list, document library, etc.)

What's in this Pull Request?
Added a new sample called SharePoint 'My Tools'. This is designed to be embedded in SharePoint pages (similar to my SharePoint events sample) and provides users with a list of tools (links) to commonly used LOB systems. Also includes an admin app.
Ping me if you have any questions. Thanks!
Checklist

This checklist is mostly useful as a reminder of small things that can easily be forgotten – it is meant as a helpful tool rather than hoops to jump through.
Put an x in all the items that apply ([x], no spaces), make notes next to any that haven't been addressed.

[x ] My pull request affects only ONE sample.
[x] I have updated the README file.
[x] My README has at least one static high-resolution screenshot (i.e. not a GIF)
[x] My README contains complete setup instructions, including pre-requisites and permissions required

Submitter Guidance (DELETE AFTER READING)

Please update this PR information accordingly. We'll use this as part of our release notes in monthly communications.
Pull requests that do not follow this template will be automatically rejected.
Please target your PR to main branch.
Remember that this repository is maintained by community members who volunteer their time to help. Be courteous and patient.
(DELETE THIS SECTION AFTER READING)

Hello @alexc-MSFT ,
Thank you very much for submitting your project.
During my attempt to consolidate the solution components into a ZIP file, I encountered an error message indicating that a specific directory was not located. It has led me to believe that the source code folder may contain unzipped solution files instead of a project created through the “pac solution clone” command.
Would you be so kind as to verify this for us? If necessary, please refer to this instructions to properly clone the solution and upload the unpacked source code.
Thank you for your attention to this detail, and I appreciate your efforts in helping to streamline this process.
Warm regards,
Katerina Chernevskaya

@Katerina-Chernevskaya sorry about that, I have now unpacked the solution correctly using the pac solution clone cmdlet and committed the update.
Hopefully you can now approve the PR.
Thanks


VK_ERROR_INVALID_SHADER_NV: Shader module does not contain an entry point named 'main0'.

Discussed in https://github.com/KhronosGroup/MoltenVK/discussions/1948

Originally posted by rcaridade145 June 15, 2023
Looking at the output of the cts run i get 3972 hits on
[mvk-error] VK_ERROR_INVALID_SHADER_NV: Shader module does not contain an entry point named 'main0'.
I noticed this was last seen on https://github.com/KhronosGroup/MoltenVK/issues/645 .
Looking at a bug report on Ryujinx (Switch Emulator)
https://github.com/Ryujinx/Ryujinx/pull/5094
I wonder if this would fix some CTS tests on MoltenVK.

It turns out that the error that was being logged:
[mvk-error] VK_ERROR_INVALID_SHADER_NV: Shader module does not contain an entry point named 'main0'.

was a generic log message that occurred whenever a SPIR-V shader cannot be converted to an MSL shader, but the details about what caused the error are hidden unless the environment variable MVK_DEBUG is set, which is not the case when running CTS.
PR #1951 adds a logging enhancement to replace the original message above with more detail, as shown in the following CTS test failures:
Test case 'dEQP-VK.pipeline.monolithic.multisample_interpolation.nonuniform_interpolant_indexing.centroid'..
[mvk-error] SPIR-V to MSL conversion error: Trying to dynamically index into an array interface variable using pull-model interpolation. This is currently unsupported.
[mvk-error] VK_ERROR_INVALID_SHADER_NV: Fragment shader function could not be compiled into pipeline. See previous logged error.
  Fail (Fail)

Test case 'dEQP-VK.spirv_assembly.instruction.compute.float16.arithmetic.opmatrixtimesmatrix3x4_4x3'..
[mvk-error] SPIR-V to MSL conversion error: Found a buffer packing case which we cannot represent in MSL.
[mvk-error] VK_ERROR_INVALID_SHADER_NV: Compute shader function could not be compiled into pipeline. See previous logged error.
  Fail (vk.createComputePipelines(device, pipelineCache, 1u, pCreateInfo, pAllocator, &object): VK_ERROR_INVALID_SHADER_NV at vkRefUtil.cpp:49)

I'm going to close this particular uber-issue as completed, and we can add more detailed issues as they arise based on the the more detailed log info now provided.

Great. Sorry for the confusion with Ryujinx that was meant to be another question, a separate issue.


Rescheduled timer test

Thanks. Point of process, best to ignore a test so that it does not fail the build until fixed.


SpiderOak has 2FA

#211 reported SpiderOak had disabled 2FA permanently, but that was only a temporary bug with the SMS service, not a permanent shutdown.  backup.yml should be updated to the following:
  - name: SpiderOak
    url: https://spideroak.com/
    twitter: spideroak
    img: spideroak.png
    tfa: Yes
    sms: Yes
    exceptions:
        text: "US and Canada only.  Not available for free accounts."
    doc: https://blog.spideroak.com/20110620235134-2-factor-authentication-to-your-spideroak-account

I don't know where the token request URL https://spideroak.com/tokenrequest should go in this project's format.

@almafeta would you like to make a pull request with these changes?


Update MD file on new branch 2017-11-15_08-22-40

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

split/updateTestRef1.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


This package depends on the check package but it doesn't declare it

Thank you!

Done. Thanks for the feedback!


Adding page for cc163

The normal deal if description looks good then it should be good to merge.
Tried something a bit different with the title. Veratasium recently made a video about how intriguing titles and thumbnails lead to reaching and educating more people. Was somewhat convinced by his argument. If you don't like it then I'm happy to change it back to the normal format.

yes, I saw this video too! Let's try it! I might tweak it a bit.


Clarifies that Data Prepper select_entries processor does not remove events

Description
We recently had some customers expect that select_entries would also select events that match. This is not the case.
This PR attempts to clarify the behavior so that customers better understand what happens when select_when is false.
Issues Resolved
N/A
Checklist

[x] By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Can you clarify what you mean by, "... the events will not be removed from the pipeline"?

Can you clarify what you mean by, "... the events will not be removed from the pipeline"?

As in, are we referring to the Data Prepper pipeline itself, or the database where the event originates?

Can you clarify what you mean by, "... the events will not be removed from the pipeline"?

As in, are we referring to the Data Prepper pipeline itself, or the database where the event originates?

@Naarcha-AWS , I mean to say that they will not be removed from the Data Prepper pipeline. That is to say, this will not drop events similar to the drop processor.


It's not clear how to listen for the progress event..

I've been trying to fire + listen for an event that should trigger at each 10% of a video.
The 'onProgress' event is too inconsistent and I'd have to apply some dodgy logic to record 10% watched event.
Is this possible without using vgAnalytics?
I've tried using the following in a controller:
$scope.videoController.trackInfoObj = {
category: "Videogular",
label: "Main",
events: {
ready: true,
play: true,
pause: true,
stop: true,
complete: true,
progress: 10
}
}
and the following in html:

But I'm not sure how to listen for the event (or even if the event is actually triggering)
It's not clear from the following documentation how to listen for the event..
http://www.videogular.com/docs/#/api/com.2fdevs.videogular.plugins.analytics.directive:vgAnalytics

If I understand correctly, you're interested in capturing when the user has viewed 10% of the video. Playback may be nonlinear with seeking, which makes the problem more interesting. There doesn't look to be an event, but the is the played property in the media element that gives you the played ranges. Don't think that we expose that on any special way the API presently.


Do not pass forward URI scheme along.

We require the forward: scheme for the fallbackUri, but it's never used, as the request will either go to an internal endpoint via DispatcherHandler or if the endpoint is not there, it can be redirected via a different filter to an external app, via the service URI or via lb:. In both cases, forward: scheme will never be used (the forward filter that might catch it will not verify the scheme from this URI, but from the one passed explicitly in the gateway filter). Moreover, it causes https://github.com/spring-cloud/spring-cloud-gateway/issues/646 if used with an external load-balanced endpoint. By setting it null, it will still work fine internally via DispatcherHandler, while proper schemes, either from external service URI or evaluated by the LoadBalancer will be used.

Is this not a problem in Finchley as well?


Revert "assembly removed"

Hey,
would it be possible to revert https://github.com/floragunncom/search-guard-ssl/commit/a84d452363fe2fe737a511a39c568ca7a59fd51c#diff-600376dffeb79835ede4a0b285078036 ?
I currently relay on bundling the plugin through artifactory

Unfortunately no. This is the first step towards integrating the SG SSL code into the main plugin code base. ETA is with SG7.


DELG models used in benchmark paper

Hello,
I just saw your paper "Benchmarking Image Retrieval for Visual Localization". Thanks for the nice study, the results are very interesting. I have a couple of questions regarding the DELG models which were used.

In the paper, I saw that you mention using the RN101 DELG model that was trained in GLDv1 (as per footnote 10). However, Tab1 mentions the retrieval mAP numbers for DELG's RN50 backbone. Eg, RO(m) for the RN101 version is 73.2 instead of 69.7. I am wondering if this was a typo, or if you were accidentally using the RN50 version.
Have you attempted using the DELG model variants which were trained on GLDv2? They are available in our repository. I am just curious if training on this dataset could improve performance for your application.

Thanks, and again very nice work!
Andre

Hi Andre!
Thanks for your message!
We used "delg_gld_20200520", which reports RO(m) 69.7 according to the snapshot of the repo and the arxiv paper at time of our experiments. This is RN50, right? I just realized that the repo has been updated since then.
Indeed, there is a typo in footnote 10. Thanks for catching this! I will correct that.
No, unfortunately, we did not try any other model yet, but we plan doing this soon since DELG performs really well on visual localization.
Best,
Martin


Could you use getLogger(name) instead of getLogger(file)

https://github.com/argaen/aiocache/blob/e2e8806f91893986ec98dde719b32b48937fe19c/aiocache/base.py#L10
It's unable to filter out log messages of this module with your current solution

Ops, sure. You want to provide MR for changing that? I see its the same in __init__.py, decorators.py and serializers.py

Done, https://github.com/argaen/aiocache/pull/412
Seems that's generally my first pull request in the open source world

congratulations then!
thanks for the contribution :)


Using UrlSigner with ComputeCredential and IamService is painfully slow

Hi,
First of all, I would like to thank the entire .NET team at Google Cloud working on making the whole development experience so much nicer within the GCP ecosystem. I really appreciate your huge efforts and I hope you will stay committed to supporting .NET in GCP for many years to come.
Almost all of the features related to deploying .NET applications in App Engine have been really pleasant. However, I have recently run into an issue that is bugging me quite a bit so, maybe if I am lucky, you will be able to help me out.
I have built an ASP.NET Core 2.1 application, which I have deployed using the gcloud command-line tools to App Engine. Everything worked great after ironing out a few minor issues. Though, after doing a bit of testing, I ran into the problem of signing GCS blob URLs as described in #2316 and #2338.
I implemented @jskeet's suggested solution described here under the Signing URLs without a service account credential file section. I assigned the role Service Account Token Creator to the default App Engine service account and, at first sight, the solution seemed to work well.
However, after a bit of testing (using Stackdriver Trace, which is truly amazing), I realized that IAM-based solution was terribly slow. In comparison to instantiating a UrlSigner with the FromServiceAccountPath method (using the private key of service account purposely created for the task with the Storage Admin role), the signing of URLs using the IamService class is more than 50 times slower on average. I did a small sample where I signed 10 blob URLs, which I repeated 10 times, and the FromServiceAccountPath solution executed this job in less than 100 ms on average while the IamService-based solution took around 5 seconds.
I really do not know how to optimize this, other than deploying the private key of my other service account with my application, which I really do not want to do. Do you know of any tips or tricks that can help me improve the performance?
Thank you very much!

That's to be expected: the IAM approach is making a network call and the service account approach isn't.
Fundamentally, you've decided not to keep sensitive information locally - which helps meet various requirements, but then means that in order to perform operations that require sensitive information, you need to make a network call. It's a trade-off.
If you don't mind the service account file being present on the machine eventually, but don't want to deploy it, you could keep that somewhere centrally (possibly further encrypted, e.g. with KMS) and fetch it on start-up. That way the network impact of not deploying the sensitive material would be limited to start-up. If you never want the service account file to be present locally, I'm not sure that there's a better way than your current approach.

@sebastianbk: Any more feedback on this? I don't anticipate there being any more changes in this repo for this, so I'd like to close the issue if possible.

Closing for now; this can be reopened in the future if there is more feedback or specific requests.


Allow enumeration of mapMultiRowFields object properties

Vuex's reactive object allow us to enumerate its properties, but objects returned by mapMultiRowFields do not. I want to be able to shallow copy the object but cannot without enumerable: true set.

Coverage remained the same at 100.0% when pulling 1dd5cf5c249c34a6290a6504adf93c073f92eceb on bsssshhhhhhh:patch-1 into ae30a03efaf3be4cf46d172aa22304e95c6dd65d on maoberlehner:master.


Wardley maps

Did you know about Wardley maps?
I've learned about those graphs or techniques in the last BCN Craftmanship, and I found it very interesting, so I'd like to add some structure compatible with the d3-stencil  and add those graphs into the catalogue.
I think that we can create a new specific structure for that, for example, as I did in the BGC Matrix, I know that it's a big Issue, but feel free, no pressure, we haven't deadlines here.
We'll be in touch if you want to do this! :)

@edgarordonez
I read this and it is very interesting. I feel it is a long term possibility.
It is probably more beneficial to add integration examples based on selection from here:
https://github.com/d3/d3/wiki/Gallery
Integration of the component with Angular/React/Vue examples
e.g. I have these skeletons in process:
https://github.com/peterennis/aeicons-angular
https://github.com/peterennis/aeicons-react
https://github.com/peterennis/aeicons-vue

Hey, yep it's really interesting! I've never used, but I have to.
Do you wanna have examples about how to use the components inside Angular, React, Vue? Ofc.
Would be cool to have the Wardley maps, but I think after increase the tests, examples, etc. totally agree!

I would like to put D3-Stencil as a component in my test apps and just have it work.
No/minimal changes to the component to make it work.
Documentation of the process and add details to the website.
This becomes a working example of Stencil integration for others to reference.
Write a Medium post?
Blog release?
Newsletter info for Ionic?
etc.
TBD

Cool!
I like this.
I'll create a new issue, something like a "Docs & Examples roadmap" to discuss these topics. 👍
I'm gonna close this. I have Wardley in mind for the future.


Dose pixi.js can provide a async parallel loader ?

Hi~ everyone.
I'm a new user on pixijs.
I learned that the pixi.loaders.Loader cannot load resources when the other are loading. and if one resources are loaded, load twice will throw a exception that cannot be catched.
So, Is it able to provide a async parallel loader that can cache the parallel load task then serialize execute it?

follow is my simple and ugly implement on a demo project.
 ###the resourcesLoader class implement###

import * as pixi from "pixi.js";
import * as _ from "lodash";

class ResourcesLoaderParams {
  loaderParams: string | any | any[];
  promises: Promise<PIXI.loaders.Resource>[] = [];
  resolves: ((value?: PIXI.loaders.Resource | PromiseLike<PIXI.loaders.Resource>) => void)[] = [];
  rejects: ((reason?: any) => void)[] = [];
}

export class resourcesLoader {
  constructor(public loader: pixi.loaders.Loader) {
  }

  loaderOptions: pixi.loaders.LoaderOptions;

  waitingList: ResourcesLoaderParams[] = [];
  loadingList: ResourcesLoaderParams[] = [];

  checkExist(urls: string): boolean {
    return !_.isNil(this.loader.resources[urls]);
  }

  get(urls: string) {
    return this.loader.resources[urls];
  }

  checkAndGet(urls: string): Promise<PIXI.loaders.Resource> {
    if (this.checkExist(urls)) {
      return Promise.resolve(this.get(urls));
    }
    return Promise.reject(this.get(urls));
  }

  loadResources(urls: string): Promise<PIXI.loaders.Resource> {
    // trim existed
    if (this.checkExist(urls)) {
      return this.checkAndGet(urls);
    }
    // check is in loading or waiting, then,  merge task
    // otherwise, create new loading task
    let Li = this.waitingList.find(T => T.loaderParams == urls);
    if (_.isNil(Li)) {
      Li = this.loadingList.find(T => T.loaderParams == urls);
    }
    let thisPromise = undefined;
    if (!_.isNil(Li)) {
      thisPromise = new Promise<PIXI.loaders.Resource>((resolve, reject) => {
        Li.resolves.push(resolve);
        Li.rejects.push(reject);
      });
    } else {
      let p = new ResourcesLoaderParams();

      p.loaderParams = urls;
      thisPromise = new Promise<PIXI.loaders.Resource>((resolve, reject) => {
        p.resolves.push(resolve);
        p.rejects.push(reject);
      });
      p.promises.push(thisPromise);

      if (this.waitingList.length == 0 && this.loadingList.length == 0) {
        this.waitingList.push(p);
        this.emitLoader();

      } else {
        this.waitingList.push(p);
      }
    }

    return thisPromise;
  }

  private emitLoader() {
    if (this.waitingList.length === 0) {
      return;
    }

    let list: ResourcesLoaderParams[] = [];

    let tempList = [];
    if (_.isArray(this.waitingList[0].loaderParams)) {
      list = [this.waitingList[0]];
      for (let i = 1; i != this.waitingList.length; ++i) {
        tempList.push(this.waitingList[i]);
      }
    } else {
      // first item confident not array
      let flag = false;
      for (let i = 0; i != this.waitingList.length; ++i) {
        if (!flag) {
          if (_.isArray(this.waitingList[i].loaderParams)) {
            --i;
            flag = true;
            continue;
          }
          list.push(this.waitingList[i]);
        } else {
          tempList.push(this.waitingList[i]);
        }
      }
    }
    this.waitingList = tempList;
    this.loadingList = list;

    // trim the loaded item
    this.loadingList = this.loadingList.filter(T => {
      if (this.checkExist(T.loaderParams)) {
        T.resolves.forEach(Tr => Tr(this.get(T.loaderParams)));
        return false;
      }
      return true;
    });

    if (this.loadingList.length === 0) {
      if (this.waitingList.length !== 0) {
        this.emitLoader();
      }
      return;
    }
    let param: any;
    if (this.loadingList.length === 1) {
      param = this.loadingList[0].loaderParams;
    } else {
      param = this.loadingList.map(T => T.loaderParams);
    }
    let loadingLoader = this.loader.add(param, this.loaderOptions).load(() => {
      this.loadingList.forEach(T => {
        console.log(T.loaderParams);
        T.resolves.forEach(Tr => Tr(this.loader.resources[T.loaderParams]));
      });
      this.loadingList = [];
      this.emitLoader();
    });
    // try catch error,  example double load
    // but seemingly cannot catch it
    loadingLoader.on("error", () => {
      this.loadingList.forEach(T => {
        console.log(T.loaderParams);
        T.rejects.forEach(Tr => Tr(T.loaderParams));
      });
      this.loadingList = [];
      this.emitLoader();
    });
    loadingLoader.onError.once(() => {
      this.loadingList.forEach(T => {
        console.log(T.loaderParams);
        T.rejects.forEach(Tr => Tr(T.loaderParams));
      });
      this.loadingList = [];
      this.emitLoader();
    });

  }

}

follow is the usage:
parallel create load request and serialize load it then async call the promise "then" callback at the resource loaded immediately.
and if a resource be loaded, the "resourcesLoader" will fast resolve that request with not wait.
and if a resource are loading or waiting, the new same request will merge to the loading or waiting task.
this.loader = new resourcesLoader(pixi.loader);
this.loader.loadResources("/api/static/1.png").then(T => {
      this.image1 = new pixi.Sprite(T.texture);
    // ......
});
this.loader.loadResources("/api/static/2.png").then(T => {
      this.image2 = new pixi.Sprite(T.texture);
    // ......
});
this.loader.loadResources("/api/static/3.png").then(T => {
      this.image3 = new pixi.Sprite(T.texture);
    // ......
});

// ........

check and fast read/load resources
  updateImage(imageUrl: string) {
    this.loader.checkAndGet(imageUrl).catch(E => {
      return this.loader.loadResources(imageUrl);
    }).then(T => {
      this.image = new pixi.Sprite(T.texture);
      // .......
    });
  }

this simple implement on above only can load url now. but i think it can be upgrade to similar to the original loader API.
So, Can pixi.js offical be provide a async parallel loader like this?

PixiJS uses one of our core contributor pet project https://github.com/englercj/resource-loader/
Lets look in the sources:
https://github.com/englercj/resource-loader/blob/master/src/Loader.js#L20
https://github.com/englercj/resource-loader/blob/master/src/Loader.js#L446
Ok, lets look in docs, may be pixi didnt include docs for that thing because its in another module: http://pixijs.download/dev/docs/PIXI.loaders.Loader.html , here it is, concurrency.
Anyway, there are many parts of pixi that can be done better for specific project and I encourage people to use their own implementations when its possible, that suit their project. I bless you for using custom loader, please make it into a plugin and we'll reference it in plugins list.

I learned that the pixi.loaders.Loader cannot load resources when the other are loading

Not sure where you learned this, it absolutely can (and does) load resources in parallel. Your wrapper around resource loader just adds a second async queue on top of the one already used inside resource loader. Not sure why you think it can't load resources in parallel. It even has a constructor param to configure how many resources to load concurrently at a time.

if one resources are loaded, load twice will throw a exception that cannot be catched.

You can catch the error, but you don't need to. The point of that error is to tell you are using the loader incorrectly. What you should do for caching is store resources somewhere outside the loader and use a .pre() middleware to skip loading of resources that are cached. There is an example of a simple memory caching middleware in the repo: https://github.com/englercj/resource-loader/blob/master/src/middlewares/caching/memory.js.
If you plan to use a loader instance multiple times you must call .reset() before using it again. That will clear the loader's state and it will be ready to load more data. It also clears the .resources object (no deletion, just drops references) so make sure you used or stored the loaded resources elsewhere before calling .reset().

@englercj
but if you use follow code to load resources :
    pixi.loader.add("/api/static/1.png")
      .load(() => {
        console.log("/api/static/1.png");
      });
    pixi.loader.add("/api/static/2.png")
      .load(() => {
        console.log("/api/static/2.png");
      });
    pixi.loader.add("/api/static/3.png")
      .load(() => {
        console.log("/api/static/3.png");
      });

it will case :
Error: Uncaught (in promise): Error: Cannot add resources while the loader is running.

and i get the reason from where #4100 , the loader cannot parallel load it on root resources.
so , i think it maybe can have a way to parallel create load task on root resources.
anyway, thanks your contribute.

@ivanpopelyshev thank you~
I'm glad to make a plugin, and need some times to learn how to do it.
so, where can find the documents about How To Make A PIXI Plugin ?

There are docs about renderer plugins, but for everything else the rule is "do whatever you want, give users JS file".

@ivanpopelyshev thank you~

@Lyoko-Jeremie you are using the loader incorrectly. The correct usage is to add all of the resources you want to load, then you call the load() function. Currently, you are calling load after every add.

@themoonrat but in my case, which resources need load cannot know before it need to load.
I'm writing a demo like maps . in this case,  load which pice image are depend on user who need see where.
user maybe move faster that the load speed that will case the issue Cannot add resources while the loader is running. .
and i cannot pre load all the image to browser because all the image is so large.

@Lyoko-Jeremie make a resource that never acutally loads, add children to it.

As another option, you can take resource and queue from resource-loader, but make your own Loader class that stores resources differently.

@ivanpopelyshev how to make a resource that never acutally loads ?
I don't find this info from other place, i think this warnning need writing to guid to let new user can know that. because i think it's a anti-conscious feature.

@Lyoko-Jeremie
If you need a custom loader for your game  - you have to code it yourself. Its better if you salvage parts that are ok or hack existing code to save the time, but for that you have to learn all the code from 1) resource-loader repo 2) all pixi middlewares 3) advanced middlewares (Spine).
I can answer your questions after you spend hours on studying all that code.
Alternatively, you can look how fromImage works, its easier, it uses cache and you might do something like that.

@ivanpopelyshev  I like to do that, but maybe no time give me to do it.
in now day, this wrapper resourcesLoader are enough to this demo.
and i will try to read the loader code on my free time.
thank you very much.

As an idea for others having this issue, one option could be to have a pool of resource loaders. If you need a resource loading, but existing loaders are already busy, create a new loader and load the resource that way. If an existing loader had finished, reset it and reuse. Then build your own wrapper class to have a single 'load this asset' function, and it manages the resource loaders in the background

@themoonrat Good idea !!!
so, can create any more resource loader without any other limit ? and don't need bind to any pixi's compoment ?

Yeps
If you want to use the PIXI version with it's own middleware, then you'd use
const loader = new PIXI.loaders.Loader();

Loaders are very lightweight, so don't worry about having multiple of them.
The only thing I'd be aware of, is that the loaders let you set how many assets it can concurrently download, which has a default of 10. If you had 3 loaders, you could be effectively trying to load up to 30 resources at once (tho I'm sure browser would limit lower than that). So maybe you'd create each loader with a lower limit? Or maybe your primary loader has a large limit to get the initial assets down, but your 'in-game-streaming- asset loaders have a lower limit to focus on getting each individual asset down faster.

@themoonrat thank you for your explain~~ I love you~

This seems answered, thank you all for your response.

I think on the first,  I will change my resources loader to pool version, and each loader load one request. This don't need many times.
But I still have a question, how to catch the error of  Resource with name "…" already exists ?

Check that resource with name "..." already exists in the same loader.resources before you actually add it.
Again, with the nature of your project (BIG MAP), I advice you to change the attitude, meditate for some time and prepare for hundreds of questions like that.
It might be that in a few days time you'll start forum search about "how to show big map" and stumble across my countless posts about pixi-tilemap, graphics, meshes, e.t.c.

oh~ good  forum. thank you~

not knowing whether to cry or to laugh..

That's the spirit!

all the pice is real world satellite like image , have big size (20MB per pice),

Is the target mobile or PC? Depending on it, you may use compressed textures instead. On mobile you'll have serious lag when pixi uploads that into gpu, we dont have progressive uploader, yet. There are issues about that.

Basically, you need a view 2x of the camera, and when camera touches the edge of "prepared" rectangle you add more objects, and put the old ones into some kind of queue. Right now pixi gc unloads from videomemory any texture that doesnt get rendered in 4 minutes or so. (PIXI.settings.GC_MODE, renderer.texture_gc.mode). You need your own queue anyway because you store loaders and initial downloaded data within them, to be re-used if user moves camera back.

thanks for your notice~
now it's not on mobile , but who know the Unpredictable future ?
in other side. By some reason, many future's user maybe use the older broswer and dont support WebGL. (this reason you may not know if you never develop a program for Chinses people.)
so, i also need to test the canvas' performence when demo is OK, and make the decision at that time that , whether or not to show a Banned page to older brwser users and let they to install a new browser. (Helplessly and stall hands...)

and I have a Unfragmented Zoom feature, this means Unlimited Zoom.  (Doge Face~)

If you are sure about your target audience , do it for canvas and test it for canvas. If its possible to actually measure audience, if you know your traffic source, you can estimate how many people have webgl enabled in their browser.


The WebFontLoader breaks when imported in a server side rendered app

I have a React app running with SSR.
When I import WebFontLoader from 'webfontloader' the SSR crashes with window is not defined.
Would it make sense to add a check for typeof window !== 'undefined' in the package?
If not I would have to fork and maintain such change. Thanks

@gfpacheco facing the same issue. did you already identify where it happens?

here : line 49
should be :
window = typeof window === 'undefined' ? null : window;
/**
 * @type {webfont.WebFont}
 */
var webFontLoader = new webfont.WebFont(window);

Another option should be, where is possible, inject the configuration script after the render process.
Something like:
if(isServer){
const script = doc.createElement('script');
script.setAttribute('type', 'application/json');
script.textContent = escapeHtml(wefontLoaderScript);
doc.body.appendChild(script);
}
Instead, there is no reason to run the script on server side.

one option if you are using webpack for transpiling your server side, you can add a null-loader as and alias for webfontloader
  resolve: {
    alias: {
      'webfontloader': 'null-loader',
    },
  },

Here is my approach
export default function () {
  if (sessionStorage.getItem('fonts')) {
    // If the font had been loaded before
    // Just active the font immediately
    document.documentElement.classList.add('wf-active')
  }

  // We use dynamic import to prevent "window is not defined" error
  import('webfontloader').then(WebFontLoader => {
    WebFontLoader.load({
      timeout: 3000,
      typekit: {
        id: KIT_ID,
      },
      active: () => {
        sessionStorage.setItem('fonts', true)
      },
    })
  })
}

Please add window check! Impossible to use for events listening without ugly hacking.

Issue opened for 2y+ without official feedback, the solution is simple though.
@bramstein Pinging you for official feedback on this :)
Workarounds exist, but it slows down adoption of this package for universal apps, such as when using https://github.com/zeit/next.js

Issue opened for 2y+ without official feedback, the solution is simple though.
@bramstein Pinging you for official feedback on this :)
Workarounds exist, but it slows down adoption of this package for universal apps, such as when using https://github.com/zeit/next.js
Personal solution:
import { isBrowser } from '@unly/utils';
if (isBrowser()) {
    // eslint-disable-next-line @typescript-eslint/no-var-requires
    const WebFontLoader = require('webfontloader');

    // Load our fonts. Until they're loaded, their fallback fonts will be used
    // This fixed an issue when loading fonts from external sources that don't show the text until the font is loaded
    // With this, instead of not showing any text, it'll show the text using its fallback font, and then show the font once loaded
    WebFontLoader.load({
      typekit: {
        id: 'dddddd', // Load "neuzeit-grotesk" font
      },
    });
  }

Thank you, where should this code go? in _document? index?

@TrejoCode Updated previous answer to provide more information :)

it's purely import that's broken, just require inline
componentDidMount() {
  const WebFontLoader = require('webfontloader');
}

any news on this?

Still pretty relevant!

Yep totally relevant; I was looking to load web fonts in a Frontity project and ran into this error today.  My solution was a modified version of @neaumusic with hooks in case someone wants to just copy and paste it:
  useEffect(() => {
    const WebFontLoader = require('webfontloader')
    WebFontLoader.load({
      google: {
        families: ['Ubuntu', 'Special Elite']
      }
    })
  }, [])

Although it would be great if this could be handled in the package itself since a big use-case would be SSR apps.

My solution (to support rollup):
// webfontloader.js
/*
webfontloader tries to access `window` as soon as required, which breaks SSR.

Furthermore, with bundlers like rollup, you cannot mix ES6 with CommonJS so having
`require('webfontloader')` in an ES6 script (inside a function or behind a conditional, for example)
will result in `Uncaught ReferenceError: require is not defined`.

To solve this, we have a CommonJS module that returns webfontloader if we are in the browser,
or a mock object if we are in node (where SSR happens).
 */
const NullWebFont = {
  load: () => {},
};
const isBrowser = typeof window !== 'undefined';

module.exports = isBrowser ? require('webfontloader') : NullWebFont;

Then import in ES6:
import WebFont from './webfontloader';

In Next js

  useEffect(() => {
    (async () => {
      const WebFont = await import('webfontloader');
      WebFont.load({
        custom: {
          families: ['BlackHanSans', 'BMEuljiro10yearslater', 'Cafe24Danjunghae', 'DOSMyungjo', 'HandLetter'],
        },
      });
    })();
  }, []);

Up 2 years later


add an Endpoint to the backend for the average salary.

As the average salary have to be show on the frontend app and because we don't want to habe complexe numerical operations on the frontend to keep et best speed in the app. it is better to habe and endpoint on the api that give bach the average salary that will be show on the frontend.

Amazing, thank you for creating that issue, before me 🙇♂


fix: update dependencies

:tada: This PR is included in version 1.0.11 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Added ImageMagick version 7.1.1-30 that uses an msix installer instead.

Checklist for Pull Requests

[x] Have you signed the Contributor License Agreement?
[ ] Is there a linked Issue?

Manifests

[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[x] This PR only modifies one (1) manifest
[x] Have you validated your manifest locally with winget validate --manifest <path>?

[x] Does your manifest conform to the 1.6 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Hi @dlemstra,
This seems like it should have the PackageIdentifier of ImageMagick.ImageMagick. The most recent PR for that package didn't include MSIX installers, so a new PR could update that manifest to include these installers.

That other package was created by someone outside the @ImageMagick team. That package contains a different kind of build so I don't want to replace it. We are also planning to add a ImageMagick.Q8 and ImageMagick.Q16 package in the future.

Verify:

Advanced options:


why ruby and crystal are giving completly different result when using bsearch ?

The return type of s <=> "Completed" is Int32 which is always truthy, so the bsearch algorithm will always return the first entry / first index.
I'm pretty sure this behaviour of the Crystal implementation is unintended.
When the return type of the block is not Bool, an error should be raised on compile time. Nilable type Bool? should be allowed, but when the return value is nil, this should be a runtime error.

I really want to agree with @straight-shoota here, but I'm afraid it's not that simple because the current behavior is inherent to so many places in Crystal, and likely intentionally so.

Meh, then I guess it would just need to be a more global change.
Regarding Bool | Nil - that shouldn't be a special case, the same should apply to any union

The documentation of #bsearch already explicitly mentions true and false values. The behaviour for any other value is not defined.

Ruby's bsearch works in two modes, check the docs: you can either always return true/false or always return a number. The second mode is not available in Crystal, only the first one, and any value can act as true/false using truhiness.

@unplugandplay
In MRI Ruby, you shouldn't use "==" or the spaceship operator, it will always return nil, use "<=" or ">=", if you use "==", it's not very clear in the documentation.
Personally, I don't like the bsearch output and the way to use it, I usually will always write my own bsearch if neccessary... I guess that if we were searching for any first value that fit the condition then it is ok, but when I use it, I'd like to know if the item exists or not... or what is the value at a certain index.

For now, we should specify the return type of the block such that this fails to compile.

@98-f355-f1 thx, I think it is the best way for now,  so I can simply relicate ruby way

I guess this is something to improve (maybe having the two modes like in Ruby is fine).

Ok, then maybe shall I try  to push one pull request of modified code in the next few days ;)

This still needs to be fixed.

@unplugandplay You can try, I'm not sure if it's possible to do (we don't have overloads based on a block's type, but maybe there's a way around it).

This still needs to be fixed.

What is your intended output or solution.  The Crystal behavior is similar to MRI and the algorithm is pretty as it shows an Agner type optimization. My only complaint is that it is difficult to read.  It could be optimized a little more if it didn't have to worm around the indexable library, then into it's own file and through macros.
If I had a suggestion, just add where you can bsearch for the specific value with a single T type overload, as well as the required block... in order to get the behavior I desired as a new overload of
Array(T).bsearch(value : T) : T
[1, 2, 3, 4, 5, 6, 7, 8].bsearch(4) # => 4 or nil if not present.
Otherwise, it doesn't need to be rewritten.

@asterite
def bsearch
  bsearch_impl(typeof(yield)) { yield }
end

private def bsearch_impl(type : Bool.class)
  # ...
end

private def bsearch_impl(type : Int.class)
  # ...
end

I'm not sure if we need the Int mode operation. Is this really useful? Currently, this is not supported in Crystal and we can do without it (at least for now).
The only immediate action would be to ensure that the blocks's return type is Bool (or Bool | Nil in order to be able to search types which are only partially comparable).

@straight-shoota I agree


Attempted to convert an unmarshallable managed type to Variant

Godot version:
3.2
OS/device including version:
Linux/Windows , happens on all platforms i tested
Issue description:
It might be related to #17565, not sure. In my case it happens even with an  Empty class, please see below how to reproduce. Not sure if iam doing something fundamentally wrong here, but this is how i understand the plugin system.
Steps to reproduce:
Activate the plugin under project settings ->
New Scene -> Create 3D Root Node -> Attach Child -> Pick "Bug" Spatial -> Select Spatial node in the tree -> Right Click -> Remove Node -> watch Console.
Minimal reproduction project:
PluginBug.zip

I have similar error:
E 0:00:08.498   mono_object_to_variant_impl: Attempted to convert an unmarshallable managed type to Variant. Name: 'CharacterInput2D' Encoding: 17.
  <C++ Error>   Method failed. Returning: Variant()
  <C++ Source>  modules/mono/mono_gd/gd_mono_marshal.cpp:912 @ mono_object_to_variant_impl()
  <Stack Trace> :0 @ Int32 Godot.Collections.Array.godot_icall_Array_Add(IntPtr , System.Object )()
                Array.cs:105 @ Int32 Godot.Collections.Array.Add(System.Object )()
                Array.cs:320 @ void Godot.Collections.Array`1[[GodotEntities.CharacterInput2D, desert_edge_sharp, Version=1.0.7405.29442, Culture=neutral, PublicKeyToken=null]].Add(GodotEntities.CharacterInput2D )()
                Peer.cs:124 @ void Peer.AuthCharInputProcess(Single )()
                Peer.cs:87 @ void Peer._Process(Single )()

My attempt is described in forum here: https://godotforums.org/discussion/22532/rpc-with-c-structs#latest

Classes can circumvent this issue by inheriting Godot.Object but something to note is that this same rule does not apply when using generics.
Given the following structure signature:
public class ItemInstance<ItemType> : Object, IItemInstance where ItemType : BaseItem

The following code does not work:
visitor.Items.Add(new ItemInstance<BaseWeaponItem>
{
	Item = this,
	Durability = 100.0f
});

Producing the same type marshalling error as above. However, when extended into a new type like so:
public class WeaponInstance : ItemInstance<BaseWeaponItem>

It works fine when used:
visitor.Items.Add(new WeaponInstance
{
	Item = this,
	Durability = 100.0f
});

A similar behavior happens in Unity, as it is not able to serialize generic class instances without some kind of aliasing extension layer.

Had a look through the code that produces this error and I reckon the issue is here:
https://github.com/godotengine/godot/blob/master/modules/mono/mono_gd/gd_mono_marshal.cpp#L915
From what I can surmise from this quick check either Godot or the Mono runtime builds a cache of supported object types. I assume it fails the is_assignable_from check for non-Godot.Object types for obvious reasons, however for generics that implement Godot.Object I'm not sure why they're failing.
The best guess I can hazard is that because generics are generated at runtime by the Mono JIT compiler, the class cache never gets those types registered as being assignable to a Godot.Object instance?
Tho, to be honest I'm curious why user data references, like Mono objects, could not be supported by the Godot Variant type out of the box. I can kind of understand struct types not being supported due to the obvious concerns around references leaving scope but I reckon they could be boxed and raised onto the heap.
What might be a good alternative is requiring types all implement some interface that has no fields or methods?
I don't know the codebase well enough, and I certainly don't know Mono's runtime implementation well enough either though to be certain about any of this, however.

I have the same issue when performing an RPC in C#
I've tried to change the PlayerInfo struct to a class inheriting from Godot.Object but this didn't solve the issue
lobby.zip

Only 'Godot.Collections.Dictionary' seems works: Godot v3.3.stable.mono.official
        // Godot.Collections.Dictionary to JSON
        var dict = new Godot.Collections.Dictionary<string, object>();

        dict ["name"] = "chay";
        dict ["id"] = 80230;

        string result = JSON.Print(dict );
        GD.Print("JSON : = " + result);

        // JSON parse to Godot.Collections.Dictionary
        JSONParseResult parseResult = JSON.Parse("{\"name\":\"chay\",\"id\":80230}");

        if(parseResult.Error == Error.Ok)
        {
            var dict = new Godot.Collections.Dictionary<string, object>((Godot.Collections.Dictionary)parseResult.Result);
            GD.Print("name : = " + dict["name"]);
            GD.Print("id : = " + dict["id"]);
        }

Classes can circumvent this issue by inheriting Godot.Object but something to note is that this same rule does not apply when using generics.
Given the following structure signature:
public class ItemInstance<ItemType> : Object, IItemInstance where ItemType : BaseItem

The following code does not work:
visitor.Items.Add(new ItemInstance<BaseWeaponItem>
{
	Item = this,
	Durability = 100.0f
});

Producing the same type marshalling error as above. ...

That's a marshalling bug. I think it happens because we have two paths, one for generic types and another for non-generic. We only check for Godot Objects in the latter, and only use the generics path for collections. It should be a trivial fix.

Tho, to be honest I'm curious why user data references, like Mono objects, could not be supported by the Godot Variant type out of the box.

Direct support in Variant requires approval and IIRC last time I asked reduz he didn't agree. Albeit that was long ago.
An alternative is to wrap the handle into a Reference (as it needs to be released). That's expensive (unless we could use pooling) so it never felt good enough for me to implement.

I am having a similar problem with editor plugins. I got a dictionary containing a custom class In my editor plugin, whenever I trigger a build of my game it will break my plugin and just give me this per item in the dictionary:

ERROR: Attempted to convert Variant to an unmarshallable managed type. Name: 'JsonViewer/UpdatableItem' Encoding: 18.
At: modules/mono/mono_gd/gd_mono_marshal.cpp:689

I get similar errors if I store my custom items in variables as well. I can inherit from Godot.Object to get rid of the errors but all my data seems to be lost if I do that. I also tried moving everything into a static datastorage class and only keeping string ID references around in my plugin but that also fails as the data in the static class is lost after build.
So my solution to this was to move my data into static storage classes so I avoid marshalling errors, then in addition I have a static boolean in the class for my plugin root Control.

public static bool Rebuild = true;

Then I simply check if this is true Inside the _Process and if it is true I rebuild every UI and make sure I setup all references again since I know all old references have been lost. This works since it seems after a build happens your static variables are all reset thus you can detect when a rebuild happens this way.

public override void _Process(float delta)
{
if (Rebuild)
{
ReloadEverything();
Rebuild = false;
}
}

This is a proper hassle but it works, hopefully in godot 4.0 or some later version this will no longer be necessary, but if anyone else has problems with C# EditorPlugins or [Tool] scripts this is the way to go.

With the original author's MRP I could not reproduce the issue and since the MRP does not use structs or generics it seems like the rest of the comments refer to different issues:

The issue with generics was reported in #47510 (@Kayomn)
The issue about marshalling structs has a proposal open in godotengine/godot-proposals#438 and godotengine/godot-proposals#997 (@git2013vb, @Kayomn)
The issue with RPC was reported in #41917 (@codewing)
The issue with plugins on rebuild seems to be reported in #51626 (@Beider)

I think the commenters ended up in this issue because the error message was the same but they all seem to be unrelated.
I'd suggest closing this issue since other issues are already open about the specific problems that the other commenters are having.


Fix default electrical series naming for SpikeGLXConverter

@tabedzki Does this fix your issue from Slack?

Copying message from Slack for posterity
Error reported:
When converting ephys data from SpikeGLX using the SpikeGLXConverterPipe for Neuroconv, I end up with ValueError: 'ElectricalSeriesAP' already exists in NWBFile 'root'. (See the bottom of the post for the stack trace). I have posted the directory structure below that shows we have two probes for our experimental setup.
Approaches taken:

Successfully enter the conversion routine for both imec folders individually if I use two SpikeGLXRecordingInterface s within the definition of my NWBConverter (one for the LF and one for the recording itself)

I had no problems doing an individual LFP conversion, an individual recording conversion and no problems for a combined LF/Recording conversion

However, if I point to the root folder ya008_20240525_g0 for use with the SpikeGLXConverterPipe , I get a shape mismatch warning on line 90 in ecephys.py where the len(args_to_set['electrodes'].data) = 672 and data_shape = (117364459, 384).

We have two probes, each with 384 channels/electrodes
However, they are being combined in a way that causes a shape/dimensionality mismatch.

If I create a converter that is explicitly pointed to the four files (imec0/1 and ap/lf), then the converter says ValueError: 'ElectricalSeriesAP' already exists in NWBFile 'root' but it does not have the mismatch that the previous method has.

Questions:

Because of the error message and the shape warning that only, occurs when attempting to convert multiple bin, does Neuroconv support converting the multiple imec together into a single NWB file?
@Ryan Ly Does the NWB standard itself support multiple recordings in a single NWB file like so?
If no to both of these questions, should I be converting these recordings into their own NWB files?

Please let me know if there is anything else that you would need form em to help understand or address this issue.
ya008_20240525_g0
├── ya008_20240525_g0_ct_offsets.txt -> ../ya008_20240525_g0-old/ya008_20240525_g0_ct_offsets.txt
├── ya008_20240525_g0_fyi.txt -> ../ya008_20240525_g0-old/ya008_20240525_g0_fyi.txt
├── ya008_20240525_g0_imec0
│  ├── ya008_20240525_g0_t0.imec0.ap.bin -> ../../ya008_20240525_g0-old/ya008_20240525_g0_imec0/ya008_20240525_g0_t0.imec0.ap.bin
│  ├── ya008_20240525_g0_t0.imec0.ap.meta -> ../../ya008_20240525_g0-old/ya008_20240525_g0_imec0/ya008_20240525_g0_t0.imec0.ap.meta
│  ├── ya008_20240525_g0_t0.imec0.lf.bin -> ../../ya008_20240525_g0-old/ya008_20240525_g0_imec0/ya008_20240525_g0_tcat.imec0.lf.bin
│  └── ya008_20240525_g0_t0.imec0.lf.meta -> ../../ya008_20240525_g0-old/ya008_20240525_g0_imec0/ya008_20240525_g0_tcat.imec0.lf.meta
├── ya008_20240525_g0_imec1
│  ├── ya008_20240525_g0_t0.imec1.ap.bin -> ../../ya008_20240525_g0-old/ya008_20240525_g0_imec1/ya008_20240525_g0_t0.imec1.ap.bin
│  ├── ya008_20240525_g0_t0.imec1.ap.meta -> ../../ya008_20240525_g0-old/ya008_20240525_g0_imec1/ya008_20240525_g0_t0.imec1.ap.meta
│  ├── ya008_20240525_g0_t0.imec1.lf.bin -> ../../ya008_20240525_g0-old/ya008_20240525_g0_imec1/ya008_20240525_g0_t0.imec1.lf.bin
│  └── ya008_20240525_g0_t0.imec1.lf.meta -> ../../ya008_20240525_g0-old/ya008_20240525_g0_imec1/ya008_20240525_g0_t0.imec1.lf.meta
├── ya008_20240525_g0_t0.nidq.bin -> ../ya008_20240525_g0-old/ya008_20240525_g0_t0.nidq.bin
└── ya008_20240525_g0_t0.nidq.meta -> ../ya008_20240525_g0-old/ya008_20240525_g0_t0.nidq.meta

Error stack
{
	"name": "ValueError",
	"message": "'ElectricalSeriesAP' already exists in NWBFile 'root'",
	"stack": "---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[10], line 10
      8 if os.path.exists(nwbfile_path):
      9     os.remove(nwbfile_path)
---> 10 example_nwb_converter.run_conversion(nwbfile_path=nwbfile_path, metadata=metadata, overwrite=True)

File ~/code/neuroconv/src/neuroconv/nwbconverter.py:235, in NWBConverter.run_conversion(self, nwbfile_path, nwbfile, metadata, overwrite, backend, backend_configuration, conversion_options)
    226 with make_or_load_nwbfile(
    227     nwbfile_path=nwbfile_path,
    228     nwbfile=nwbfile,
   (...)
    232     verbose=getattr(self, \"verbose\", False),
    233 ) as nwbfile_out:
    234     if no_nwbfile_provided:
--> 235         self.add_to_nwbfile(nwbfile=nwbfile_out, metadata=metadata, conversion_options=conversion_options)
    237     if backend_configuration is None:
    238         backend_configuration = self.get_default_backend_configuration(nwbfile=nwbfile_out, backend=backend)

File ~/code/neuroconv/src/neuroconv/nwbconverter.py:162, in NWBConverter.add_to_nwbfile(self, nwbfile, metadata, conversion_options)
    160 conversion_options = conversion_options or dict()
    161 for interface_name, data_interface in self.data_interface_objects.items():
--> 162     data_interface.add_to_nwbfile(
    163         nwbfile=nwbfile, metadata=metadata, **conversion_options.get(interface_name, dict())
    164     )

File ~/code/neuroconv/src/neuroconv/nwbconverter.py:162, in NWBConverter.add_to_nwbfile(self, nwbfile, metadata, conversion_options)
    160 conversion_options = conversion_options or dict()
    161 for interface_name, data_interface in self.data_interface_objects.items():
--> 162     data_interface.add_to_nwbfile(
    163         nwbfile=nwbfile, metadata=metadata, **conversion_options.get(interface_name, dict())
    164     )

File ~/code/neuroconv/src/neuroconv/datainterfaces/ecephys/baserecordingextractorinterface.py:360, in BaseRecordingExtractorInterface.add_to_nwbfile(self, nwbfile, metadata, stub_test, starting_time, write_as, write_electrical_series, compression, compression_opts, iterator_type, iterator_opts)
    357 else:
    358     recording = self.recording_extractor
--> 360 add_recording(
    361     recording=recording,
    362     nwbfile=nwbfile,
    363     metadata=metadata,
    364     starting_time=starting_time,
    365     write_as=write_as,
    366     write_electrical_series=write_electrical_series,
    367     es_key=self.es_key,
    368     compression=compression,
    369     compression_opts=compression_opts,
    370     iterator_type=iterator_type,
    371     iterator_opts=iterator_opts,
    372 )

File ~/code/neuroconv/src/neuroconv/tools/spikeinterface/spikeinterface.py:804, in add_recording(recording, nwbfile, metadata, starting_time, write_as, es_key, write_electrical_series, write_scaled, compression, compression_opts, iterator_type, iterator_opts)
    802 number_of_segments = recording.get_num_segments()
    803 for segment_index in range(number_of_segments):
--> 804     add_electrical_series(
    805         recording=recording,
    806         nwbfile=nwbfile,
    807         segment_index=segment_index,
    808         starting_time=starting_time,
    809         metadata=metadata,
    810         write_as=write_as,
    811         es_key=es_key,
    812         write_scaled=write_scaled,
    813         compression=compression,
    814         compression_opts=compression_opts,
    815         iterator_type=iterator_type,
    816         iterator_opts=iterator_opts,
    817     )

File ~/code/neuroconv/src/neuroconv/tools/spikeinterface/spikeinterface.py:734, in add_electrical_series(recording, nwbfile, metadata, segment_index, starting_time, write_as, es_key, write_scaled, compression, compression_opts, iterator_type, iterator_opts)
    732 es = pynwb.ecephys.ElectricalSeries(**eseries_kwargs)
    733 if write_as == \"raw\":
--> 734     nwbfile.add_acquisition(es)
    735 elif write_as == \"processed\":
    736     ecephys_mod.data_interfaces[\"Processed\"].add_electrical_series(es)

File /opt/anaconda3/envs/neuroconv_3.12/lib/python3.12/site-packages/hdmf/utils.py:668, in docval.<locals>.dec.<locals>.func_call(*args, **kwargs)
    666 def func_call(*args, **kwargs):
    667     pargs = _check_args(args, kwargs)
--> 668     return func(args[0], **pargs)

File /opt/anaconda3/envs/neuroconv_3.12/lib/python3.12/site-packages/pynwb/file.py:855, in NWBFile.add_acquisition(self, **kwargs)
    851 @docval({'name': 'nwbdata', 'type': (NWBDataInterface, DynamicTable)},
    852         {'name': 'use_sweep_table', 'type': bool, 'default': False, 'doc': 'Use the deprecated SweepTable'})
    853 def add_acquisition(self, **kwargs):
    854     nwbdata = popargs('nwbdata', kwargs)
--> 855     self._add_acquisition_internal(nwbdata)
    856     use_sweep_table = popargs('use_sweep_table', kwargs)
    857     if use_sweep_table:

File /opt/anaconda3/envs/neuroconv_3.12/lib/python3.12/site-packages/hdmf/utils.py:668, in docval.<locals>.dec.<locals>.func_call(*args, **kwargs)
    666 def func_call(*args, **kwargs):
    667     pargs = _check_args(args, kwargs)
--> 668     return func(args[0], **pargs)

File /opt/anaconda3/envs/neuroconv_3.12/lib/python3.12/site-packages/hdmf/container.py:1146, in MultiContainerInterface.__make_add.<locals>._func(self, **kwargs)
   1144     if tmp.name in d:
   1145         msg = \"'%s' already exists in %s '%s'\" % (tmp.name, cls.__name__, self.name)
-> 1146         raise ValueError(msg)
   1147     d[tmp.name] = tmp
   1148 return container

ValueError: 'ElectricalSeriesAP' already exists in NWBFile 'root'"
}

@CodyCBakerPhD this addresses part of the problem and correctly allows for the two electrical recordings. However, there is still the warning about the shape mismatch between the electrical recordings themselves. Any idea where the mismatch would be coming from? When I did each ap/lf pair separately, there error didn't occur. While the code prints the warning, it still continues.
The mismatch is reported on line 90 still in ecephys.py.
data_shape=(117364459, 384)
len(args_to_set['electrodes'].data)=672
Warning reported:
/opt/anaconda3/envs/neuroconv_3.12/lib/python3.12/site-packages/pynwb/ecephys.py:90: UserWarning: ElectricalSeries 'ElectricalSeriesAPIMEC0': The second dimension of data does not match the length of electrodes. Your data may be transposed.
  warnings.warn("%s '%s': The second dimension of data does not match the length of electrodes. "
/opt/anaconda3/envs/neuroconv_3.12/lib/python3.12/site-packages/pynwb/ecephys.py:90: UserWarning: ElectricalSeries 'ElectricalSeriesLFIMEC0': The second dimension of data does not match the length of electrodes. Your data may be transposed.
  warnings.warn("%s '%s': The second dimension of data does not match the length of electrodes. "

Any idea where the mismatch would be coming from?

We've seen it before and I swear we have fixed it several times by now
Could you raise a separate issue about that? But I would not worry too much about the warnings; they won't prevent you from creating the file
Then I'll add more tests for this PR (and fix current failures)

@CodyCBakerPhD
As an update to this issue, I've converted a SpikeGLX folder into a NWB folder. When using the NeuroSift tool through the NWB Guide I am unable to view the electrical series through the summary view plugins.

Do you guys know if this is due to electrical series rename?
Is there a way to specify in the NWB file that this should be usable via the EphysSummary/how do we fix the plugin usage?
This might be a Jeremy Magland question: where can I find the list of all available widgets/plugins for Neurosift? I couldn't find a list on any documentation

@tabedzki That's all neurosift issues looks like, can you raise an issue over there? https://github.com/flatironinstitute/neurosift/issues/new

Will do. Thanks

@CodyCBakerPhD  I don't know if I missed it; has this been implemented in the main branch?

Looks like this passes the tests. Is there anything else we need to do before merging?

Nope, just waiting on approval from fellow NeuroConv maintainers

That's on me. The fix makes sense but I need to take a look at the test. I will do it later this week.

@h-mayorquin Do you know how to fix that on this PR?

That was a deep dive. Basically the metadata problem comes because we are writing electrode groups by shanks which does not work well when adding more than one probe. The reason doing electrode groups by shanks is bad is because when aggregating metadata over the electrodes table we use the combination of channel name and group name as a unique global identifier.  When adding more than one probe this breaks down because both the shanks and the names are repeated across probes.
So the fix in https://github.com/catalystneuro/neuroconv/pull/977 solves this by actually using the probes as the group_name in order to have sensible electrode groups in the channels table.
#977 will probably break things because of those lazy metadata testing that we have where we just dump the output freezing the currently wrong expectations.

Concerning this PR there is one thing that I don't like but is minor. When adding data from a multi-segment recording object we have the convetion of attaching a number to the name of the ElectricalSeries. In my view, the policy here combined with the aferomentioned policy for multi-segment creates bad intuitive names. See:

What do you think?

Not having seen many past examples of multi segment multi probe; what about ElectricalSeries{probe_tag}Segment{segment_index}?
E.g., ElectricalSeriesImec0Segment0, ElectricalSeriesImec1Segment2, and so on

Yeah, I think that ElectricalSeries{probe_tag}Segment{segment_index} is a good idea.

Minimal fix almost done, @h-mayorquin will ping you when I fix the device linkage

(the segment renaming stuff will have to be a broader followup)

Thank you both for your work addressing this!

@h-mayorquin Ready

Improve metadata in SpikeGLX. We are adding shank references even to shankless probes right now.

Semantic question: is a probe with a single shank, shankless?

The principle that I would follow is not to make up information that we don't have (the way that we do by adding "s0") so things feat neatly into a third dimension.
In a similar way, probes could be in three dimensions but we don'ta add the z-dimension of the coordinates for probes that can fit into 2D.


[Event Request] table 900 "Assembly Header" - OnValidateDatesOnBeforeConfirm

Could you please add the following event snippet / Pattern around every confirm in the ValidateDates Procedure?
If you need more  details, feel free to ask.
procedure ValidateDates(FieldNumToCalculateFrom: Integer; DoNotValidateButJustAssign: Boolean)
var
    NewDueDate: Date;
    NewEndDate: Date;
    NewStartDate: Date;
    IsHandled: Boolean;
    UpdateConfirmed: Boolean;
begin
    ...

    //Before every confirm add the following event snippet/Pattern:
    IsHandled := false;
    OnValidateDatesOnBeforeConfirm(Rec, FieldNumToCalculateFrom, DoNotValidateButJustAssign, IsHandled, UpdateConfirmed);
    if not IsHandled then
        UpdateConfirmed := Confirm(.....);
    if UpdateConfirmed then
    ....

    ....

end;

[IntegrationEvent(false, false)]
local procedure OnValidateDatesOnBeforeConfirm(var AssemblyHeader: Record "Assembly Header"; FieldNumToCalculateFrom: Integer; DoNotValidateButJustAssign: Boolean; var IsHandled: Boolean; var UpdateConfirmed: Boolean)
begin
end;

We already have several events for this purpose. First, each call of ValidateDates have handled OnBefore event. Second, there is OnBeforeValidateDates event, and you an overwrite our code by yours. Not sure we should add more events for each Confirm.

We only want to disable the confirm in some cases. This is the smallest change in the business logic compared to handle the full code.
That's why I requested those events.
I know i could copy the whole function and set this to handled, but looking forward to updates I would prefer having the possiblity to simple replace the confirm by code.
It's a common need for our customers that they want to avoid some confirms and confirm always the same based on the current value or a setup value.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Availability update: We will publish a fix for this issue in the next update for release 18.


added dimensions argument to nimbleMCMC

The title says it all.
Fixes #1000

Tests passed.  Merging this in.
@ashiklom note this addresses your request to add the dimensions argument to the nimbleMCMC function.

Awesome, thanks for implementing this!


Document Update Request | Extended Message trace or Historical Search may not return all the result when filtered with Distribution group

[Enter feedback here]
This is a document update request for scenario where when a report is pulled specifying the the DL email address in the UI or using start-historicalsearch, certain messages may be not returned in the report, however if the report is pulled by specifying DL group member, they appears in the report.
Currently this is by design because we did not log the recipient if it is a Distribution group so the message will not show up by filtering with group. (Issue1584020)

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 7c796e0b-9ee3-146b-856c-1e1c5786666b
Version Independent ID: 4e5c08ec-a2d4-63a4-27f0-e08445f64f8a
Content: Start-HistoricalSearch (exchange)
Content Source: exchange/exchange-ps/exchange/Start-HistoricalSearch.md
Service: exchange-powershell
GitHub Login: @chrisda
Microsoft Alias: chrisda

Hi @qaehtesh, thank you for your feedback.
I see that you are a Microsoft employee. Here is a site you can use to see the mappings between GitHub and Microsoft aliases: https://repos.opensource.microsoft.com/people?q=qaehtesh
And if you have a Microsoft alias you can link your accounts in GitHub so that a blue "Microsoft submitter" label appears to any PR's you submit. Guidance on it here: https://docs.opensource.microsoft.com/tools/github/index.html
I'm not sure about what update applies to this article. I don't have access to Issue1584020, could you kindly provide more detail? Does it also impact to Get-MessageTrace and Get-MessageTraceDetail?
Maybe Start/Get-HistoricalSearch doesn´t show the Expand event as Get-MessageTrace and Get-MessageTraceDetail.
Thank you again!

@dariomws Thank you for the response.
This applies to all, message trace, detail and historical search.
The issue here is that recipient filter in message trace if recipient is a Distribution group so the message will not show up message because we do not log it for group as recipient and one needs to use the group member as recipient filter.
The behavior is consistent with all type of trace with UI and shell.
It is been informed to me that currently this is by design that we do not log the recipient if it is a Distribution group so the message will not show up by filtering with group. (Issue1584020) and thus a document update request.

Thanks, @qaehtesh. Sorry but I still don´t understand.
If I use the RecipientAddress parameter with Get-MessageTrace and Get-MessageTraceDetail to filter output by DL I get this for example:

I'm testing now with Start-HistoricalSearch.


Documentation.

Is there documentation for the package? E.G. Functions, methods etc? so we can use in our own project?
something like the example folder

Most of the documentation in the wiki and docs folder are focused more on the protocol, and building and using librespot as a stand-alone player, and not a library.
Other documentation is spread around in issues and PRs and not really compiled. Our resources are limited, thus PRs are always welcome :-)

Interesting. Thanks for the reply. I'll try finding projects that use this and use them as examples to learn from them.

@ashthespy can we have an separate gh-pagees branch for auto generated docs from cargo?
better than nothing. If yes LMK i'll open a PR

@ashthespy bump

I'm not sure if I follow - we haven't written any docs currently for cargo to auto generate documentation..

@ashthespy the default stuff doesnt seem to be working
https://docs.rs/librespot-core/0.1.1/librespot_core/index.html (this is the link it redirects you to when you click on any one of the options on https://docs.rs/librespot/0.1.1/librespot/ )

It would seem when the v0.1.1 was published, the various workspace modules docs weren't built/uploaded. You could use v0.1.0 docs instead, there shouldn't be too many API changes b/w the two..
FWIW, the docs at this stage aren't super helpful as all it does is expose the type information and function signatures. It's probably faster to use rust-analyser with the editor of your choice to give you the same hints..

I already have rust analyzer installed. Thanks for the reply. I am gonna close this issue.


Add Million.js to js-framework-benchmark

Is your feature request related to a problem? Please describe.
Local benchmark on my machine is 3 times slower relatively to others, million results similar to virtual-dom.
Describe the solution you'd like
Add cpu/memory/os and browser version to benchmark page
Describe alternatives you've considered
Use external service for benchmarking or allow user to post here results and then collect them to benchmark page, for example:
MacBook Air M1, 8 GB, Safari v14.1.1:

million x 26,400 ops/sec ±0.69% (24 runs sampled)
virtual-dom x 21,543 ops/sec ±0.54% (65 runs sampled)
vanilla x 3,865 ops/sec ±0.94% (24 runs sampled)
baseline x 81,198 ops/sec ±2.52% (16 runs sampled)
Fastest is baseline

It seems like this is not an difference with your machine, a newer update of million has made it slower. In regards to the external service - I'm not sure of anything that could provide some functionality like this. Investigating now

Results for google chrome looks good
https://million-benchmarks.netlify.app/

MacBook Air M1, 8 GB, Google Chrome v91.0.4472.106:

list-render:
million x 24,017 ops/sec ±9.10% (22 runs sampled)
virtual-dom x 18,777 ops/sec ±11.24% (47 runs sampled)
vanilla x 8,669 ops/sec ±0.74% (48 runs sampled)
baseline x 19,539 ops/sec ±0.48% (20 runs sampled)
Fastest is million

Interesting - I might be mistaken then.

It would be very helpful if you had time to add million.js to js-framework-benchmark
https://krausest.github.io/js-framework-benchmark/current.html

@aidenybai ill do this when I get home

CPU should not be needed as the CPU would proportionally effect all other frameworks and libraries we are benchmarking against but I will look into getting millionjs onto external benchmarking sites as well as benchmarking different browsers.

i'll be taking this on 👍

@anddddrew Just as a guideline for this issue, you'll need to fork https://github.com/krausest/js-framework-benchmark.
They have some specific rules you need to follow, let me know if you need any help with the benchmarks :)

Hey @anddddrew, just pinging to see if there are any updates or if you need any help with this task. If you're not available, no worries, I can take over this issue

If anyone has any questions about the rules or details on what works well in the benchmark I'm open to answering them. I'm very familiar with this benchmark.

Spoke to @anddddrew yesterday - he wasn't able to get around to this, but I started working on it yesterday (see here) and plan on finishing tonight. Will post here/dm if I have any questions!

Update: we're close! Expect a PR from @jasonappah sometime in the next 24h!

Just created https://github.com/krausest/js-framework-benchmark/pull/1074 :)

https://github.com/krausest/js-framework-benchmark/pull/1074 is still a draft, right?

Yes, still a draft

If keyed isn't working it may be an implementation issue in million vdom I suspect. I think it's okay to go with non-keyed for now so we at least have some initial benchmarks @jasonappah.

we did it!!


Particles turn grey when it rains

all particles from raining and the rain itself turn grey when it’s raining

raining

That's an intentional change.
Look closely at rain drops in the real world. You'll notice they don't look blue, but are rather gray-ish. But why does sea look blue then? This is because when a ray of white light goes through a thick body of water, red and green light will be absorbed by water, and only blue light will pass through. The same effect would theoretically happen while going through a rain drop, the effect isn't noticeable to human eyes because of the amount of absorbed energy being too low.
In the vanilla Minecraft, rain drops are indeed very blue-ish. I found it too unrealistic and ugly, which is why I changed it.

Oh wait, your point is that every particle turn gray, not only rain drops? That's indeed a bug which is currently unfixable. I think there's already a ticket for that.

Nope, there doesn't seem to exist. Reopening.

Hi.
Is there a way in the to disable the change of rain from blue to gray in the configuration file? I would rather have my particles unchanged during the rain.


ENYO-1959 ToggleItem: toggle image layout fault

Enyo-DCO-1.1-Signed-off-by: Art Dahm<EMAIL_ADDRESS>

This is fixed by #2269 which fixes the hierarchy so that moonstone/CheckboxItem inherits from moonstone/Item.


Proposal: do we need an official spec file in docker source code?

Somebody would like to build their own rpm file from docker source code,
but docker don't have a spec file. I saw some other open source project
offers spec file, like LXC.
So does docker need an official spec file? If it does, I'd like to write a spec
file and send a pull request.
Regards.
Thanks.

see https://github.com/docker/docker/pull/10658

you are more than welcome to add things to those references and send a PR