Inconsistent behavior in Node poly fills

Have you read the Contributing Guidelines on issues?

[X] I have read the Contributing Guidelines on issues.

Prerequisites

[X] I'm using the latest version of Docusaurus.
[X] I have tried the npm run clear or yarn clear command.
[X] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
[X] I have tried creating a repro with https://new.docusaurus.io.
[X] I have read the console error message carefully (if applicable).

Description
I have a library that depends on a number of Node built-ins including Buffer, TextDecoder, and TextEncoder. I created an example component to demonstrate its usage. I then render that Demo component inside a mdx file. When running Docusaurus with npm start, the <Demo /> component renders as expected. However, when I run npm run build and then npm run serve, I am seeing TextDecoder, etc are undefined.
Reproducible demo
https://github.com/ericmasiello/docusaurus-polyfill-fail
Steps to reproduce

Create a component in the docs folder called Demo.tsx. the contents should look like this:

import React from 'react';

export const Demo = () => {
    var decoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
    console.log({ decoder })

    return
Success

};

Create a Demo.mdx that looks like this:

# `Demo`

import { Demo } from './Demo';

TODO: Words go here that describe this component.

<Demo />

run npm start and navigate to the demo docs. Everything should load and you should see the decoder logged in the console.
run npm run build.  You'll see the following error in the output

[ERROR] Docusaurus server-side rendering could not render static page with path /docs/FusionProvider/.

ReferenceError: TextDecoder is not defined
[ERROR] Unable to build website for locale en.
[ERROR] Error: Failed to compile with errors.

Docusarus Config
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const webpack = require('webpack');

/** @type {import('@docusaurus/types').Config} */
const config = {
  title: 'My Site',
  tagline: 'Dinosaurs are cool',
  url: 'https://your-docusaurus-test-site.com',
  baseUrl: '/',
  onBrokenLinks: 'throw',
  onBrokenMarkdownLinks: 'warn',
  favicon: 'img/favicon.ico',
  organizationName: 'facebook', // Usually your GitHub org/user name.
  projectName: 'docusaurus', // Usually your repo name.

  // plugins: [
  //   function addPolyfills() {
  //     return {
  //         name: 'add-webpack-polyfills',
  //         configureWebpack() {
  //             return {
  //                 resolve: {
  //                     /*
  //                      * This loads the polyfills that we need
  //                      */
  //                     fallback: {
  //                         buffer: require.resolve('buffer/'),
  //                         util: require.resolve('util/'),
  //                     },
  //                 },
  //                 plugins: [
  //                     /*
  //                      * webpack.ProvidePlugin() will utilize the polyfills above and expose
  //                      * the necessary modules (e.g., `Buffer`, `TextDecoder`, etc.) automatically
  //                      * on the global object without needing to explicitly import them.
  //                      * See: https://webpack.js.org/plugins/provide-plugin/
  //                      */
  //                     new webpack.ProvidePlugin({
  //                         Buffer: ['buffer', 'Buffer'],
  //                     }),
  //                     new webpack.ProvidePlugin({
  //                         TextEncoder: ['util', 'TextEncoder'],
  //                     }),
  //                     new webpack.ProvidePlugin({
  //                         TextDecoder: ['util', 'TextDecoder'],
  //                     }),
  //                     new webpack.DefinePlugin({
  //                       'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
  //                       'process.env.DEBUG': JSON.stringify(process.env.DEBUG),
  //                       'process.env.NODE_DEBUG': JSON.stringify(process.env.DEBUG),
  //                     })
  //                 ],
  //             };
  //         },
  //     };
  // },
  // ],

  presets: [
    [
      'classic',
      /** @type {import('@docusaurus/preset-classic').Options} */
      ({
        docs: {
          sidebarPath: require.resolve('./sidebars.js'),
          // Please change this to your repo.
          editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
        },
        blog: {
          showReadingTime: true,
          // Please change this to your repo.
          editUrl:
            'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
        },
        theme: {
          customCss: require.resolve('./src/css/custom.css'),
        },
      }),
    ],
  ],

  themeConfig:
    /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
    ({
      navbar: {
        title: 'My Site',
        logo: {
          alt: 'My Site Logo',
          src: 'img/logo.svg',
        },
        items: [
          {
            type: 'doc',
            docId: 'intro',
            position: 'left',
            label: 'Tutorial',
          },
          {to: '/blog', label: 'Blog', position: 'left'},
          {
            href: 'https://github.com/facebook/docusaurus',
            label: 'GitHub',
            position: 'right',
          },
        ],
      },
      footer: {
        style: 'dark',
        links: [
          {
            title: 'Docs',
            items: [
              {
                label: 'Tutorial',
                to: '/docs/intro',
              },
            ],
          },
          {
            title: 'Community',
            items: [
              {
                label: 'Stack Overflow',
                href: 'https://stackoverflow.com/questions/tagged/docusaurus',
              },
              {
                label: 'Discord',
                href: 'https://discordapp.com/invite/docusaurus',
              },
              {
                label: 'Twitter',
                href: 'https://twitter.com/docusaurus',
              },
            ],
          },
          {
            title: 'More',
            items: [
              {
                label: 'Blog',
                to: '/blog',
              },
              {
                label: 'GitHub',
                href: 'https://github.com/facebook/docusaurus',
              },
            ],
          },
        ],
        copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
      },
      prism: {
        theme: lightCodeTheme,
        darkTheme: darkCodeTheme,
      },
    }),
};

module.exports = config;

Expected behavior
I would expect the app to behave the same when running in developer mode with npm start and for production with npm run build.
Actual behavior
It fails to compile with the error stated above
Your environment

Public source code: https://github.com/ericmasiello/docusaurus-polyfill-fail
Public site URL: N/A
Docusaurus version used: 2.0.0-beta.17
Environment name and version: Node.js 16.4
Operating system and version: MacOS 12.2.1

Self-service

[X] I'd be willing to fix this bug myself.

npm run start only does client-rendering, and TextDecoder is indeed a browser global, so there's no error. The "ReferenceError: TextDecoder is not defined" error comes from server-rendering and signals that the Node runtime doesn't know TextDecoder. However, TextDecoder should always be defined, interesting 🤔

This seems relevant? https://stackoverflow.com/questions/57712235/referenceerror-textencoder-is-not-defined-when-running-react-scripts-test

Interesting! console.log(JSON.stringify(Object.getOwnPropertyNames(globalThis))) logs different stuff in SSR and in a Node script. SSR is missing important globals like URLSearchParams and TextDecoder that are supposed to be universal.

Comparison of SSR and Node globals
$ diff ssr-globals.json node-globals.json -U 100
--- ssr-globals.json    2022-03-15 10:06:21.000000000 +0800
+++ node-globals.json   2022-03-15 10:13:46.000000000 +0800
@@ -1,106 +1,90 @@
 [
-  "__assign",
-  "__asyncDelegator",
-  "__asyncGenerator",
-  "__asyncValues",
-  "__await",
-  "__awaiter",
-  "__classPrivateFieldGet",
-  "__classPrivateFieldSet",
-  "__createBinding",
-  "__decorate",
-  "__exportStar",
-  "__extends",
-  "__filename",
-  "__generator",
-  "__importDefault",
-  "__importStar",
-  "__makeTemplateObject",
-  "__metadata",
-  "__param",
-  "__read",
-  "__rest",
-  "__spread",
-  "__spreadArray",
-  "__spreadArrays",
-  "__values",
-  "_",
+  "AbortController",
+  "AbortSignal",
   "AggregateError",
   "Array",
   "ArrayBuffer",
+  "atob",
   "Atomics",
   "BigInt",
   "BigInt64Array",
   "BigUint64Array",
   "Boolean",
+  "btoa",
+  "Buffer",
   "clearImmediate",
   "clearInterval",
   "clearTimeout",
-  "consola",
   "console",
   "DataView",
   "Date",
   "decodeURI",
   "decodeURIComponent",
+  "DOMException",
   "encodeURI",
   "encodeURIComponent",
   "Error",
   "escape",
   "eval",
   "EvalError",
-  "exports",
+  "Event",
+  "EventTarget",
   "FinalizationRegistry",
   "Float32Array",
   "Float64Array",
   "Function",
   "global",
   "globalThis",
   "Infinity",
   "Int16Array",
   "Int32Array",
   "Int8Array",
   "Intl",
   "isFinite",
   "isNaN",
   "JSON",
   "Map",
   "Math",
-  "module",
+  "MessageChannel",
+  "MessageEvent",
+  "MessagePort",
   "NaN",
   "Number",
   "Object",
   "parseFloat",
   "parseInt",
   "performance",
   "process",
   "Promise",
   "Proxy",
   "queueMicrotask",
   "RangeError",
   "ReferenceError",
   "Reflect",
   "RegExp",
-  "require",
   "Set",
   "setImmediate",
   "setInterval",
   "setTimeout",
   "SharedArrayBuffer",
   "String",
   "structuredClone",
   "Symbol",
   "SyntaxError",
+  "TextDecoder",
+  "TextEncoder",
   "TypeError",
   "Uint16Array",
   "Uint32Array",
   "Uint8Array",
   "Uint8ClampedArray",
   "undefined",
   "unescape",
   "URIError",
   "URL",
+  "URLSearchParams",
   "WeakMap",
   "WeakRef",
   "WeakSet",
   "WebAssembly"
 ]

Simply adding TextDecoder to the static site generator plugin's globals works:
https://github.com/facebook/docusaurus/blob/ad88f5cc87bad7652ce44519efcf2e113b1aaec9/packages/docusaurus/src/webpack/server.ts#L82-L86
The reason it's not included by default is because these constructors are not enumerable on global (I used Object.getOwnPropertyNames instead of Object.keys). The eval module that the SSG plugin uses under the hood only injects common globals like console, process, URL, and require into the global scope, but forgot the rest of them.
My feeling is that the Webpack provide plugin can't fix this either, because it doesn't reach into the scope of the evaluated VM module, but I'm not sure...
@slorber should we fix this in your fork of the SSG plugin, or in Docusaurus? We already have a pseudo-polyfill for __filename, but __filename is not a "global" in a canonical sense (it's not attached to globalThis), so I'm fine with that being in the plugin options, but these genuine globals should probably be fixed in the plugin.

Sent https://github.com/pierrec/node-eval/pull/27 first. If that doesn't get accepted, we will fix it in the SSG plugin.

Thank you for looking into this so quickly.
While I await a more permanent fix, is there a relatively easy way for me to create a work around for now via the docusaurus config or some other option?

@ericmasiello The quickest way is to wrap this component in BrowserOnly or use some other SSR escape hatches, so that the code is only executed in browser.

My PR has been merged. @ericmasiello if you delete your lock file and re-install (so that transitive dependencies are bumped), the bug should be fixed now. I can confirm it works on my end.
@slorber Non-critical: if you want, you can also publish a new version of your webpack plugin. Or we can wait till the package is transferred to the @docusaurus org.


[Bug]: S3 - New Query - does not work on the attached application

Is there an existing issue for this?

[X] I have searched the existing issues

Description
On an S3 DS, on clicking new query, a blank error pops up and the query does not run
Steps To Reproduce

In the following git connected app, create an S3 datasource
Create a new query
Note an error [blank] pops up
The query does not run

App link -
https://release.app.appsmith.com/app/release-may8/page1-6458d954f506870bb7a9d70d?branch=aparna
Exists on all branches in this application.

Note: Not seeing this on other new applications or other git connected apps.
Public Sample App
No response
Environment
Release
Issue video log
No response
Version
Cloud

@btsgh would you please share this app with either support or demo account?

@rohan-arthur  - demo user / password -<EMAIL_ADDRESS>/<EMAIL_ADDRESS>


Example-iOS Obj-C lose image when calling performUpdatesAnimated method

New issue checklist

[x] I have reviewed the README and documentation
[x] I have searched existing issues and this is not a duplicate

General information

IGListKit version: 2.1.0
iOS version(s): 10.2
Xcode version: 8.2.1
Devices/Simulators affected: iphone SE

Hi @rnystrom,
I have a problem when try to load more with Example-iOS Obj-C.
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
    if (!self.isLoadingMore) {
        CGFloat _offsetY = scrollView.contentOffset.y;
        CGFloat _height = scrollView.frame.size.height;
        CGFloat _curOffsetY = _offsetY + _height;
        CGFloat _contentSizeH = scrollView.contentSize.height;
        CGFloat _percentContentSize = (_curOffsetY / _contentSizeH) * 100;

        if (_percentContentSize >= 80 && _offsetY >= 0) {
            self.isLoadingMore = YES;

                UserInfo *userE = [[UserInfo alloc] initWithName:@"userE"];
                [self.data addObjectsFromArray:@[ userE,
                                                  @"Image-Placeholder-String",
                                                  @"",
                                                  @"hope she might like it.",
                                                  @"I love it."]];
                [self.adapter performUpdatesAnimated:YES completion:nil];
//                [self.adapter reloadDataWithCompletion:nil];
        }
    }
}

I implement this code for loading more when the user scroll down of collection view, but all of images disappear when I call this method [self.adapter performUpdatesAnimated:YES completion:nil];. Otherwise, everything works well when using  [self.adapter reloadDataWithCompletion:nil];
I don't know why so can you help me to understand this
IGListKit-master.zip (demo)

Hey @damthieuquang! We should probably update the ObjC demo to use more concrete models. What's happening is the diffing algorithm seems duplicated objects and trims them from its objects array. It doesn't do this when the demo first launches because it hasn't diffed anything yet.
We'll update this example ASAP. Thanks for flagging!


Invalid map-type object

Hi. I am trying to use this directive, but I am encountering an issue. I get the following error in console:
invalid map-type object – "<overlay-map-type object="imageMapType" init-method="push">"
I am trying the out-of-the-box example you provided on here: http://ngmap.github.io/maptypes.html#/maptype-image-overlay#maptype-image-overlay
Other examples, such as the basic example works fine.
The map is showing with the overlay-map-type tag, but the tiles are not loading, and the for mentioned error occurs in console. How can I fix this? Any help is very much appreciated. Thanks in advance.

Thanks for reporting this bug

This is fixed with 1.14 release, http://ngmap.github.io/#/maptype-image-overlay.html


Cell cannot be entered when it should be possible

Ground: Grass
Env: Forest
Unit: None
Location: x=7, y=1
Problem: "impassable" flag

Seems to be fixed now


[maintainance] Setup the repository

We should set up CI and other things according to https://github.com/kubeflow/community/blob/master/repository-setup.md

@gaocegege @jlewi I have read the tests of other repos and tried to use ci-bot and gcr.io/kubeflow-ci.
But I think it is difficult to test with only them.
In my understanding, the run_e2e_workflow script in gcr.io/kubeflow-ci deploy some pods defined test/workflows/components directory ( the path is defined in prow_config.yaml ) with ksonnet.
So we should rewrite manifests of katib into the ksonnet format and store in test/workflows/components, right?
And Is the code of e2e-test test/e2e/main.go?
I can`t understand when is it built and who run it..
Moreover, Katib cannot be tested with kubectl. It needs grpc (e.g. CreateStudy, GetStudy).
Is it possible to do such test?
If the e2e test is not available, we should do the component.
I added some test code https://github.com/YujiOshima/hp-tuning/blob/ci-setup/manager/main_test.go
You can run the test code by
docker run -e REPO_OWNER=YujiOshima -e REPO_NAME=hp-tuning -e PULL_BASE_SHA=ci-setup katib/test-image
I think this would be available on k8s test infra.
WDYT? Could you give me advice?

Here's how the tests work

You define an Argo workflow inside the repo

The Argo workflow specifies a bunch of pods to run

Its entirely up to you what docker images and what commands to run in each step of the Argo workflow.

So if you want to run your unittests you would just have a pod that would do "go test ...". We need to do a little bit of extra work to report the failures in the way Prow expects.  For python unittests we have py_checks but we don't have anything similar for go unittests

For E2E tests you might do something like the following

step of the workflow would deploy katib
Next step would run some tests; e.g. make gRPC requests

You can use whatever docker image you like with the pods. Alternatively if your missing some dependency that should be in the common worker image you can add it here
https://github.com/kubeflow/testing/tree/master/images

@YujiOshima There is no need to deploy katib with ksonnet. We use ksonnet and argo to construct the DAG. But you could use docker containers to do whatever you want.
You can refer to https://github.com/kubeflow/pytorch-operator . It uses ksonnet to construct the build graph while it does not use it to install the operator.

Please try to use ksonnet. We should try to be consistent about how we package things. We want to have a single registry for all our packages and deploy them in a consistent fashion.

OK, I will open an issue to keep track of the progress.

I am going to close the issue. There are one thing to do: #32


Streaming API

Hi,
I'm currently trying to make my program much more efficient, hence I wanted to use the streaming API.
I've tried following code:
const Excel = require('exceljs');
const workbook = new Excel.xlsx.WorkbookWriter({
    'filename': './myfile.xlsx'
});

workbook.getWorksheet(1);

The last line returns undefined, it's kind of obvious to me since I call this function when the file has not even been read yet. But if I have to wait till it's read, that's no streaming anymore is it? :P
So what am I missing out, I have no clue how this should work.
Any help is greatly appreciated...

Interesting, I just found this file in your code, it is however missing in node_modules, npm update said I have the latest version.
So, you might want to updated your package :D

return undefined +1

If you change the code to use addWorksheet(sheetname), it should work:
var wb = new Excel.stream.xlsx.WorkbookWriter({
  'filename': './myfile.xlsx'
});
var ws = wb.addWorksheet('Foo');
// add rows, data, etc

wb.commit()
  .then(function() {
    // done
  });


[GH-7] go modules instead of go dep

@jorianvo feedback has been processed. Could you review it again?


Bump and release 3.4.1 on rolling

Also adds the changelogs for reservation package, needed for https://github.com/open-rmf/rmf_simulation/pull/138 since the last release on rolling does not include the messages for cart attachment / detachment

fyi this could have also been a minor bump since we added a new message definition..


When tabbing out of Action button menu on Skills table, focus moves back to the start of the app rather than continuing on as normal; works fine if you press Escape to close the menu first

When tabbing out of Action button menu on Skills table, focus moves back to the start of the app rather than continuing on as normal; works fine if you press Escape to close the menu first

:+1:


Animals table

What is new?

Add scripts to create vet_clinic database and animals table
Add scripts to populate animals table with sample data
Add example queries
Update readme.md

Queries

Find all animals whose name ends in "mon".

List the name of all animals born between 2016 and 2019.

List the name of all animals that are neutered and have less than 3 escape attempts.

List the date of birth of all animals named either "Agumon" or "Pikachu".

List name and escape attempts of animals that weigh more than 10.5kg

Find all animals that are neutered.

-Find all animals not named Gabumon.

Find all animals with a weight between 10.4kg and 17.3kg (including the animals with the weights that equals precisely 10.4kg or 17.3

kg)

Thanks @Reem-lab, I think that change is a perfect example of an optional change on a code review. Cheers


Make certain builtin function parameters unnamed

Spec is not clear whether e. g. chr(i=33) is allowed.  I used Go
and Python implementations as reference.

LGTM, Thanks!


TRACE_LEVEL_OFF does create minimal trace file?

Setting the trace level to TRACE_LEVEL_OFF should disable trace files entirely.
Check if that is the case or if it is a bug (in the extension or upstream).

In my tests, this works as excpected and intended (test 087 covers this case).
What I notice is a dev_rfc.trc file which is even created when tracing is disabled. That file just tells me that I have to install uuidd. One can't seem to get rid of those files without fixing the error in it.

@ThaDafinser is it the same for you or do you get another trace file? If yes, can you provide me a minimal code example to reproduce?

@gkralik looks good, let's go to v1.0 :smile:
Found the problem on my side....i added trace again in the config :see_no_evil:
use SAPNWRFC\Connection as SapConnection;

SapConnection::setTraceLevel(SapConnection::TRACE_LEVEL_OFF);

$config = [
    // options
    'TRACE' => true,
];
try {
    $conn = new SapConnection($config);
} catch(\Exception $ex){

}

var_dump($conn->ping());


fix: Added missing translations for the Hindi language

Added missing translations for the Hindi language for Indian audience.

Closes #2830

Hey @jeanfbrito, kindly have a look at this PR and please let me know your views.


Preserve the original image format when uploading cropped image (fix #505)

If a JPG image is uploaded using the cropper tool in the image fields, its always sent to the server as image/png even if the original was image/jpeg - this can increase file size dramatically (for example a 4MB jpeg was being sent as a 10MB png to the server).
toDataURL is a canvas function which by default uses image/png
but we can just pass the file type to the function so if we originally had a jpeg it stays that way.
Fixes #505

This is great, thank you. Just merged it into the dev branch, so it will be available in the next patch release (today or tomorrow).
Thank you. Cheers!


ExpresionProperties in Wrapper bug

[x] Small bug
Maximum call stack size exceeded
There two problems
When there is an expressionPropierty in a wrapper and its fields also have a expressionPropierty.
(DEMO)
https://stackblitz.com/edit/angular-lqtphb?file=app/app.component.ts
Disabled no working with<EMAIL_ADDRESS>Since 5.2.0 no work.
(DEMO)
https://stackblitz.com/edit/angular-aphhdv?file=app/app.component.ts

first example fixed in 2.0.0-rc.49,
the second one still buggy, I'll look into it later.

after trying several approach with no consistent result due to how disabled state work in angular reactive-form and some unexpected behavior (maybe a bug in angular need some investigations), I decided to revert my last fixed that take account of  disabled state in child fields.
To make you example work you have to avoid using set disabled expression property on fieldGroup field.
https://stackblitz.com/edit/angular-xd7wuu.

but we need using set disabled expression property on fieldGroup field. We have many children and dynamically add dynamism expression property. This is very important for us

After trying the example at least it does not show errors in the console, even if the expression property in the children does not work. It can be valid.

the issue is if we disable parent then followed by enable child it doesn't produce a consistent result, sometimes all fields are enabled and sometimes it disable all fields.
parent.disable();
child1.enable();
child2.disable();

so in order to avoid that we should use one way to toggle field status.
You use-case is a valid one, maybe we can introduce an option or just using fieldTransformer that move the parent disabled condition into its the children.
any hint on the option name ?

Could it be that the children fields have priority over the parent fields?

Can it be an option that forces the removal of the father's property?

yep, if that option is passed we will apply https://github.com/formly-js/ngx-formly/pull/847, it should be only applied for disabled state right now.

I updated the example to include the patch in #847 see https://stackblitz.com/edit/angular-xd7wuu, using
    FormlyModule.forRoot({
      ...
      extras: {
        fieldTransform: [formlyFieldTransform],
      }
    }),

you can use it now until we come with a proper solution.
I'll revised this issue on next major version.

FormlyForm.html:2 ERROR TypeError: Cannot read property 'eval' of undefined
at eval (eval at _loop_1 (apes-form.component.ts:128), :3:112)
at<EMAIL_ADDRESS>(ngx-formly-core.js:1056)
at<EMAIL_ADDRESS>(ngx-formly-core.js:1003)
at checkAndUpdateDirectiveInline (core.js:10097)
at checkAndUpdateNodeInline (core.js:11363)
at checkAndUpdateNode (core.js:11325)
at debugCheckAndUpdateNode (core.js:11962)
at debugCheckDirectivesFn (core.js:11922)
at Object.eval [as updateDirectives] (FormlyForm.html:2)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:11914)

export class FormlyFieldInput extends ApesField
export class ApesField extends FieldType{
protected onDestroy$ = new Subject();
protected oldValues = {};
constructor(protected apiService: ApiService, protected events: Events, protected expressionService: ExpressionService) {
super();
}
ngOnDestroy(): void {
this.onDestroy$.next();
this.onDestroy$.complete();
}
interceptFrom(fieldName: string, expression: string) {}
Use this to not get the interceptFrom method


Using ext_contract: Cannot find function in module

Lately, when I try using the ext_contract macro, It appears that the corresponding modules are generated, but the desired functions are missing. See my reproducible example. Issuing cargo check fails:
error[E0425]: cannot find function `ft_transfer` in module `crate::interface::ext_ft`
 --> src/lib.rs:6:31
  |
6 |     crate::interface::ext_ft::ft_transfer(
  |                               ^^^^^^^^^^^ not found in `crate::interface::ext_ft`

For more information about this error, try `rustc --explain E0425`.
error: could not compile `near-sdk-issue` due to previous error

According to the docs, this should have worked.

we now address this in the docs


Short program for timing hipModuleLoad function

Compares the execution time of hipModuleLoad to the time required to the time to load the file into memory

Intended to be run on the TensileLibrary .co files, and .hsaco files, which can be found in the Tensile/library directory inside a rocBLAS build


ci: add provenance to all published packages

This commit adds provenance for all published packages. See the NPM documentation 0.
Provenance will allow people to verify that the packages were actually built on GH Actions and with the content of the corresponding commit. This will help with supply chain security.
For this to work, the id-token permission was added only where necessary.

Thanks!!


Bug when using --hardfork istanbul

Expected Behavior
The code
array.push(variable);
array.push(variable);

should work for Istanbul.
Current Behavior
We have smart contracts with complex unit tests and use ganache-cli along with truffle. Everything works fine if we don't use --hardfork istanbul even for 6.8.0-istanbul.0, but when we activate the istanbul, there is a pretty weird bug.
Steps to Reproduce
$ git clone -b ganache-istanbul-bug https://github.com/poanetwork/posdao-contracts
$ cd posdao-contracts
$ npm i
$ npm run test

After that, the unit tests are run. On the step staking epoch trufflesuite/ganache-cli#3 finished you will see revert failure:

This is the line in test/BlockRewardAuRa.js which calls BlockRewardAuRa.reward function which in turn calls ValidatorSetAuRa.newValidatorSet function.
The ValidatorSetAuRa.newValidatorSet function calls the internal _setPendingValidators function. And that _setPendingValidators reverts here:
// This reverts for some reason:
// _stakingAddresses.length == 4 here and gas is enough
for (uint256 i = 0; i < _stakingAddresses.length; i++) {
    _pendingValidators.push(_stakingAddresses[0]);
}

If we remove the --hardfork istanbul flag from our cli parameters, the test works fine as it should.
Please, take a look at these lines (and the comments there): https://github.com/poanetwork/posdao-contracts/blob/b0abf0cfd50bb78894b744f2f5fd6734054a476c/contracts/ValidatorSetAuRa.sol#L787-L808
It seems that the issue somehow relates to these lines which modificate the _pendingValidators array. The bug is only reproduced after those lines are executed in the same block.
Context
This issue doesn't let us test our contracts for Istanbul.
Your Environment

Version used: 6.8.0-istanbul.0
Version of Truffle used: 5.0.34
NodeJS Version: v8.16.0
Operating System and version: macOS High Sierra 10.13.6
Link to your project or repro gist: https://github.com/poanetwork/posdao-contracts/tree/ganache-istanbul-bug
Commit hash to use with above link for reproduction: b0abf0cfd50bb78894b744f2f5fd6734054a476c

Hi, do you know whether this is still an issue on latest Ganache? Thank you!

Closing for issue maintenance. Let us know if you're still running into this, and we'll be happy to re-open. Thanks!


Test an application that uses MP JWT

User story:
As a user of this test framework, I want to test an app that uses MP JWT
Additional detail:
JWT (Json Web Tokens) are a widely used auth protocol that has been officially adopted as the security mechanism of choice for MP apps. This test framework should make it easy to create test JWTs that can be invoked from the test client to test auth behavior of the application

Covered by this sample app: https://github.com/MicroShed/microshed-testing/tree/master/sample-apps/jaxrs-mpjwt


Folders

Folders:

I've expanded the data model to introduce folders. The folders can be nested. Conversations can be moved in and out of folders. Folders and Sub Folders with Conversations can be deleted. Folders and Conversations can be renamed via context menu.

As this took me a bit longer than I originally anticipated, I also updated the LLaMA.cpp server at some point to a newer version.
The battle with SwiftUI for hierarchies in a list view is real..

@psugihara Hey, not sure if you saw this?

Hey, I think my notifications are messed up sorry. Just taking a look.

Hey @EvolvingSoftware, I tried to run this but I get these errors:

The code looks clean and just going off your screenshots this looks very cool.
But as I mentioned in #43 I'd really prefer a folder UI that didn't interfere with the default time sorted list... that's how I like to use FreeChat: popping in for a quick question and often copying the result in a different program. If I'm going back for something, it's almost always in the latest 3 chats. Beyond my own use cases, I have some extra confidence that this is the right UI because the most popular chat clients do this too (GPT, claude).
Any chance you'd want to adapt this to do more what Notes does with folders? I think we'd add a 3rd default-hidden "Folder" column to the NavigationSplitView that lets you do folder stuff. The nice thing about the Notes implementation is that it lets you opt-in to the complexity of folders if you want to get organized, but it defaults to the simple time sort.

Hey @EvolvingSoftware, I tried to run this but I get these errors:

It's because I don't check in FreeChat.xcodeproj
If I did, it would over write your developer settings? You just need to add that one file in to the build and exclude the other. I swapped the files over during the development due to some of the complexities I was having with the structures and the debugging.
If that doesn't matter, I can just check it in next time but from my experience of taking your version of this file, there's normally 10 or so steps I need to go through to change things just to get it configured for my environment to build? (I haven't looked in to the best way to do this either).

The code looks clean and just going off your screenshots this looks very cool.
But as I mentioned in #43 I'd really prefer a folder UI that didn't interfere with the default time sorted list... that's how I like to use FreeChat: popping in for a quick question and often copying the result in a different program. If I'm going back for something, it's almost always in the latest 3 chats. Beyond my own use cases, I have some extra confidence that this is the right UI because the most popular chat clients do this too (GPT, claude).
Any chance you'd want to adapt this to do more what Notes does with folders? I think we'd add a 3rd default-hidden "Folder" column to the NavigationSplitView that lets you do folder stuff. The nice thing about the Notes implementation is that it lets you opt-in to the complexity of folders if you want to get organized, but it defaults to the simple time sort.

I could, but also consider that the folders don't prevent you from using it the way you describe today. A new chat still just goes in chronological order on the left side and you don't need to create a folder at all. If you create a folder it's at the top but the default behaviour (unless your in a folder or have it highlighted) is for a chat to be created as it is now and just go in the existing timeline.
It's probably a bit of sunk cost fallacy on my end for how long it took me to get them all working together, playing nice and looking good, so I probably just think it's a nice use case because of this.
What I really want to do with the folders though, is have each folder be able to override the default agent behaviour/custom instructions.
As an example, with Chat GPT, I use a custom instruction of "If I just paste text in that doesn’t make any sense in English, assume that it’s informal Indonesian texting between friends and translate it to English. Then after the translation of the sentence, translate each word individually so I can learn Indonesian." - This works great because I can just copy messages from WhatsApp in to ChatGPT and paste and get the exact result I want. But I can only have one of these instructions, so if I want to use it for coding, I keep providing context or writing articles etc etc.
So what I was thinking is these folders are the jumping off point to hang this extra functionality off, which to your point ChatGPT doesn't do, as they've tackled it with Custom GPT's instead, but in a similar way, they sit at the top of the timeline view too.
Anyway, let me know if that makes sense and if adding that one file in to your build and excluding the other works.


[AppDev] Project Map - Development Activities

Review and finalize "Development Activities" section of Project Map Document: https://github.com/cncf/tag-app-delivery/blob/wg-app-dev-map-review/app-development-map/v1alpha1/index.md#development-activities

@lechnerc77 do you have any inputs for updating/improving this section?

Perfect, thank you


bug: Lazy UI: Multiple highlights / extmarks not being set

Did you check docs and existing issues?

[X] I have read all the lazy.nvim docs
[X] I have searched the existing issues of lazy.nvim
[X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)
0.10.0-dev
Operating system/version
Linux 5.15.0-69-generic
Describe the bug
Not all highlights in the Lazy UI are being set when launched. This has started after the recent updates.

Steps To Reproduce

Open NeoVim
Run :Lazy

Expected Behavior
Highlighting as before.
Repro
No response

Sorry for the noise in the issues, looks like you already fixed it in the last few hours.


KAFKA-2489: add benchmark for new consumer

@ewencp
The changes here are smaller than they look - mostly refactoring/cleanup.

ConsumerPerformanceService: added new_consumer flag, and exposed more command-line settings
benchmark.py: refactored to use @parametrize and @matrix - this reduced some amount of repeated code
benchmark.py: added consumer performance tests with new consumer (using @parametrize)
benchmark.py: added more detailed test descriptions
performance.py: broke into separate files

Tests in this branch passed:
http://jenkins.confluent.io/job/kafka_system_tests_branch_builder/57/console

@granders Can we have that job run everything, including the sanity_checks? Currently the mirror maker sanity check is not passing for me (though it seems it is broken on trunk, not by this PR). I'm guessing you only run the tests directory because you're thinking of the sanity checks as useful for test developers to get quick feedback, but they are useful tests that we should always run.
Also, the tests that use new consumer are always giving me 0 for output. The logs confirm that the tool itself is indicating zeros:
Consumer performance 1: 2015-08-30 20:00:53:922, 2015-08-30 20:01:06:701, 0.0000, 0.0000, 0, 0.0000

Any idea what's going on there?

I also observed the 0 throughput, and I tricked myself into thinking I had fixed it.
I added some counters in the loop to see what is happening in the consumption loop, and when I run ConsumerPerformance directly (after running the test with --no-teardown option),  I consistently see 11 - 13 val records = consumer.poll(100) before any calls to poll yield any records.
In other words, slightly more than 1000ms before poll yields non-zero results, and therefore the loop is timing out.
I had a 2 second timeout here so the loop wouldn't quit before poll received messages
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/vagrant/core/build/dependant-libs-2.10.5/slf4j-log4j12-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/vagrant/tools/build/dependant-libs-2.10.5/slf4j-log4j12-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
loops: 0, zonZeroPolls: 0
messagesRead: 0
loops: 1, zonZeroPolls: 0
messagesRead: 0
loops: 2, zonZeroPolls: 0
messagesRead: 0
loops: 3, zonZeroPolls: 0
messagesRead: 0
loops: 4, zonZeroPolls: 0
messagesRead: 0
loops: 5, zonZeroPolls: 0
messagesRead: 0
loops: 6, zonZeroPolls: 0
messagesRead: 0
loops: 7, zonZeroPolls: 0
messagesRead: 0
loops: 8, zonZeroPolls: 0
messagesRead: 0
loops: 9, zonZeroPolls: 0
messagesRead: 0
loops: 10, zonZeroPolls: 0
messagesRead: 0
loops: 11, zonZeroPolls: 1
messagesRead: 49932
loops: 12, zonZeroPolls: 1
messagesRead: 49932
loops: 13, zonZeroPolls: 1
messagesRead: 49932
loops: 14, zonZeroPolls: 1
messagesRead: 49932
loops: 15, zonZeroPolls: 1
messagesRead: 49932
loops: 16, zonZeroPolls: 1
messagesRead: 49932
loops: 17, zonZeroPolls: 2
messagesRead: 99864
loops: 18, zonZeroPolls: 2
messagesRead: 99864
loops: 19, zonZeroPolls: 2
messagesRead: 99864
loops: 20, zonZeroPolls: 2
messagesRead: 99864
loops: 21, zonZeroPolls: 2
messagesRead: 99864
loops: 22, zonZeroPolls: 2
messagesRead: 99864
loops: 23, zonZeroPolls: 2
messagesRead: 99864
loops: 24, zonZeroPolls: 3
messagesRead: 133152
loops: 25, zonZeroPolls: 4
messagesRead: 149796
loops: 26, zonZeroPolls: 4
messagesRead: 149796
loops: 27, zonZeroPolls: 4
messagesRead: 149796
loops: 28, zonZeroPolls: 5
messagesRead: 166440
loops: 29, zonZeroPolls: 5
messagesRead: 166440
loops: 30, zonZeroPolls: 6
messagesRead: 183084
loops: 31, zonZeroPolls: 7
messagesRead: 199728
loops: 32, zonZeroPolls: 7
messagesRead: 199728
loops: 33, zonZeroPolls: 7
messagesRead: 199728
loops: 34, zonZeroPolls: 8
messagesRead: 216372
loops: 35, zonZeroPolls: 8
messagesRead: 216372
loops: 36, zonZeroPolls: 8
messagesRead: 216372
loops: 37, zonZeroPolls: 8
messagesRead: 216372
loops: 38, zonZeroPolls: 9
messagesRead: 249660
loops: 39, zonZeroPolls: 9
messagesRead: 249660
loops: 40, zonZeroPolls: 9
messagesRead: 249660
loops: 41, zonZeroPolls: 9
messagesRead: 249660
loops: 42, zonZeroPolls: 10
messagesRead: 266304
loops: 43, zonZeroPolls: 10
messagesRead: 266304
loops: 44, zonZeroPolls: 10
messagesRead: 266304
loops: 45, zonZeroPolls: 11
messagesRead: 282948
loops: 46, zonZeroPolls: 11
messagesRead: 282948
loops: 47, zonZeroPolls: 12
messagesRead: 299592
loops: 48, zonZeroPolls: 13
messagesRead: 316236
loops: 49, zonZeroPolls: 13
messagesRead: 316236
loops: 50, zonZeroPolls: 13
messagesRead: 316236
loops: 51, zonZeroPolls: 14
messagesRead: 332880
loops: 52, zonZeroPolls: 14
messagesRead: 332880
loops: 53, zonZeroPolls: 15
messagesRead: 366168
loops: 54, zonZeroPolls: 15
messagesRead: 366168
loops: 55, zonZeroPolls: 15
messagesRead: 366168
loops: 56, zonZeroPolls: 15
messagesRead: 366168
loops: 57, zonZeroPolls: 16
messagesRead: 382812
loops: 58, zonZeroPolls: 16
messagesRead: 382812
loops: 59, zonZeroPolls: 17
messagesRead: 399456
loops: 60, zonZeroPolls: 18
messagesRead: 416100
loops: 61, zonZeroPolls: 18
messagesRead: 416100
loops: 62, zonZeroPolls: 18
messagesRead: 416100
loops: 63, zonZeroPolls: 18
messagesRead: 416100
loops: 64, zonZeroPolls: 19
messagesRead: 432744
loops: 65, zonZeroPolls: 19
messagesRead: 432744
loops: 66, zonZeroPolls: 20
messagesRead: 449388
loops: 67, zonZeroPolls: 20
messagesRead: 449388
loops: 68, zonZeroPolls: 21
messagesRead: 466032
loops: 69, zonZeroPolls: 21
messagesRead: 466032
loops: 70, zonZeroPolls: 21
messagesRead: 466032
loops: 71, zonZeroPolls: 21
messagesRead: 466032
loops: 72, zonZeroPolls: 22
messagesRead: 499320
loops: 73, zonZeroPolls: 22
messagesRead: 499320
loops: 74, zonZeroPolls: 22
messagesRead: 499320
loops: 75, zonZeroPolls: 23
messagesRead: 515964
loops: 76, zonZeroPolls: 23
messagesRead: 515964
loops: 77, zonZeroPolls: 23
messagesRead: 515964
loops: 78, zonZeroPolls: 24
messagesRead: 532608
loops: 79, zonZeroPolls: 24
messagesRead: 532608
loops: 80, zonZeroPolls: 25
messagesRead: 549252
loops: 81, zonZeroPolls: 25
messagesRead: 549252
loops: 82, zonZeroPolls: 26
messagesRead: 565896
loops: 83, zonZeroPolls: 27
messagesRead: 582540
loops: 84, zonZeroPolls: 27
messagesRead: 582540
loops: 85, zonZeroPolls: 28
messagesRead: 599184
loops: 86, zonZeroPolls: 28
messagesRead: 599184
loops: 87, zonZeroPolls: 28
messagesRead: 599184
loops: 88, zonZeroPolls: 28
messagesRead: 599184
loops: 89, zonZeroPolls: 29
messagesRead: 615828
loops: 90, zonZeroPolls: 30
messagesRead: 632472
loops: 91, zonZeroPolls: 30
messagesRead: 632472
loops: 92, zonZeroPolls: 30
messagesRead: 632472
loops: 93, zonZeroPolls: 31
messagesRead: 649116
loops: 94, zonZeroPolls: 31
messagesRead: 649116
loops: 95, zonZeroPolls: 31
messagesRead: 649116
loops: 96, zonZeroPolls: 32
messagesRead: 682404
loops: 97, zonZeroPolls: 32
messagesRead: 682404
loops: 98, zonZeroPolls: 32
messagesRead: 682404
loops: 99, zonZeroPolls: 33
messagesRead: 699048
loops: 100, zonZeroPolls: 33
messagesRead: 699048
loops: 101, zonZeroPolls: 33
messagesRead: 699048
loops: 102, zonZeroPolls: 34
messagesRead: 715692
loops: 103, zonZeroPolls: 35
messagesRead: 732336
loops: 104, zonZeroPolls: 35
messagesRead: 732336
loops: 105, zonZeroPolls: 35
messagesRead: 732336
loops: 106, zonZeroPolls: 36
messagesRead: 748980
loops: 107, zonZeroPolls: 36
messagesRead: 748980
loops: 108, zonZeroPolls: 36
messagesRead: 748980
loops: 109, zonZeroPolls: 37
messagesRead: 765624
loops: 110, zonZeroPolls: 38
messagesRead: 782268
loops: 111, zonZeroPolls: 38
messagesRead: 782268
loops: 112, zonZeroPolls: 39
messagesRead: 798912
loops: 113, zonZeroPolls: 39
messagesRead: 798912
loops: 114, zonZeroPolls: 39
messagesRead: 798912
loops: 115, zonZeroPolls: 40
messagesRead: 815556
loops: 116, zonZeroPolls: 41
messagesRead: 832200
loops: 117, zonZeroPolls: 41
messagesRead: 832200
loops: 118, zonZeroPolls: 41
messagesRead: 832200
loops: 119, zonZeroPolls: 42
messagesRead: 848844
loops: 120, zonZeroPolls: 42
messagesRead: 848844
loops: 121, zonZeroPolls: 42
messagesRead: 848844
loops: 122, zonZeroPolls: 42
messagesRead: 848844
loops: 123, zonZeroPolls: 43
messagesRead: 865488
loops: 124, zonZeroPolls: 43
messagesRead: 865488
loops: 125, zonZeroPolls: 44
messagesRead: 882132
loops: 126, zonZeroPolls: 44
messagesRead: 882132
loops: 127, zonZeroPolls: 45
messagesRead: 898776
loops: 128, zonZeroPolls: 45
messagesRead: 898776
loops: 129, zonZeroPolls: 45
messagesRead: 898776
loops: 130, zonZeroPolls: 46
messagesRead: 915420
loops: 131, zonZeroPolls: 47
messagesRead: 915874
loops: 132, zonZeroPolls: 47
messagesRead: 915874
loops: 133, zonZeroPolls: 48
messagesRead: 932518
loops: 134, zonZeroPolls: 49
messagesRead: 949162
loops: 135, zonZeroPolls: 49
messagesRead: 949162
loops: 136, zonZeroPolls: 49
messagesRead: 949162
loops: 137, zonZeroPolls: 49
messagesRead: 949162
loops: 138, zonZeroPolls: 49
messagesRead: 949162
loops: 139, zonZeroPolls: 49
messagesRead: 949162
loops: 140, zonZeroPolls: 50
messagesRead: 982450
loops: 141, zonZeroPolls: 51
messagesRead: 982902
loops: 142, zonZeroPolls: 51
messagesRead: 982902
loops: 143, zonZeroPolls: 51
messagesRead: 982902
loops: 144, zonZeroPolls: 51
messagesRead: 982902
loops: 145, zonZeroPolls: 51
messagesRead: 982902
loops: 146, zonZeroPolls: 51
messagesRead: 982902
loops: 147, zonZeroPolls: 52
messagesRead: 999546
Elapsed time: 12.921 seconds
all finished! messagesRead: 1000000, bytesRead: 100000000
loops: 148, zonZeroPolls: 53
2015-08-30 23:36:53:269, 2015-08-30 23:37:06:191, 95.3674, 7.3802, 1000000, 77387.4013

Update - I rebased off of the consumer performance fix (https://github.com/apache/kafka/pull/180). We're still seeing the timeout in the consume loop; @hachikuji is looking into it

I've been able to reproduce the timeout locally on a fresh cluster. It appears to be caused by the delay required to create the __consumer_offsets topic. The consumer metadata request currently depends on this topic in order to discover the coordinator of a group. Once it's created, however, I haven't been able to reproduce the timeout.

@hachikuji So what's the proposed solution here? I see a couple of options:

Increase the timeout here/use a longer timeout for the first poll() so the broker has extra time to create the topic. It's possible we want to do this anyway because it may be too low for a join group cycle to complete with default settings if you have multiple consumers in the group. However, this is just a hack around the real issue, which is that consumer metadata lookup can block for a long time waiting for topic creation. Any code that might interact with a fresh cluster would need similar tweaking.
Create the offsets topic proactively. It looks like right now it might only be created upon consumer metadata request. Is there a good reason we can't create it earlier? Then system tests like these could just wait until it's been created before trying to proceed (we can monitor the logs for the relevant output). It also probably provides a better out-of-the-box experience for users -- it's kind of weird to potentially have your first interaction with a cluster as a consumer potentially fail... On the other hand, this fix only works well for system tests because they would know to monitor for that event; new users just running CLI commands wouldn't know about that, so it could still be a problem if the topic takes too long to create.

@ewencp I think @granders said he thought there were cases he was seeing timeouts where this wouldn't have been an issue, so I was going to wait to see what he could find. The option I discussed with him was to use the poll(0) trick to ensure that the assignment is active before beginning the consume loop. The better solution would probably be to combine waitUntil and the rebalance callback to get the same effect.

@hachikuji Yeah, I wanted to make sure we have a good solution for this because it's actually a pretty big usability issue for the new consumer, in my opinion. The poll(0) trick works, but a) isn't great since poll(0) shouldn't actually block anyway (if we fix timeouts on most things, this won't really work anymore) and b) requires every app that actually writes real tests to do the same thing because in all likelihood, if they perform an integration or system test, they'll be working with a fresh cluster.

@ewencp The better solution is to use the rebalance callback, but it's pretty awkward in code:
final AtomicBoolean isAssigned = new AtomicBoolean(false);
consumer.subscribe(topics, new ConsumerRebalanceListener() {
  void onAssign(partitions) {
    isAssigned.set(true);
  }
  void onRevoke(partitions) {
    isAssigned.set(false);
  }
}
while (!isAssigned.get())
  consumer.poll(100);

consumer.seekToBeginning()

Ouch. If this is a common enough need, maybe we should consider exposing something like ensureAssignment which has the same effect.

@ewencp @hachikuji I updated ConsumerPerformance.scala to use the better solution, and this seems to have solved the issue. Also, added logging.

@granders Looks good now. I'm getting real numbers now, although some of them might need some further investigation.
@hachikuji The code is, in fact, pretty verbose. Shall we file a JIRA to figure out if we should do anything API-wise to make this less ridiculous (especially since if you want to use the rebalance callback for anything else, it'll get significantly messier...)?
@gwenshap Probably you're up for review here since you've handled all the previous system test stuff?

LGTM. Just one small suggestion above.

@ewencp
The changes here are smaller than they look - mostly refactoring/cleanup.

ConsumerPerformanceService: added new_consumer flag, and exposed more command-line settings
benchmark.py: refactored to use @parametrize and @matrix - this reduced some amount of repeated code
benchmark.py: added consumer performance tests with new consumer (using @parametrize)
benchmark.py: added more detailed test descriptions
performance.py: broke into separate files


DPS Attribute requires unnecessary properties

In this example:
[DpsSymmetricKeyDevice(DPSIdScope = "0ne001EE11C", Id = "RefrigeratedTruck1", EnrollmentGroupId = "1", EnrollmentType = DPSEnrollmentType.Individual, PrimarySymmetricKey = "nkPceACdLU5oWDEIqAv6tKvU3togO8CEbgbR6XtzIEA=", TransportType = TransportType.Mqtt, DPSTransportType = TransportType.Mqtt)]
        public DeviceClient DeviceClient { get; set; }

The resulting generated code:
 private async Task<Microsoft.Azure.Devices.Client.DeviceClient> CreateSDeviceClientAsync()
        {
            var theDPSIdScope = "0ne001EE11C";
            var theId = "RefrigeratedTruck1";
            var theEnrollmentGroupId = "1";
            var theEnrollmentType = DPSEnrollmentType.Individual;
            var thePrimarySymmetricKey = "nkPceACdLU5oWDEIqAv6tKvU3togO8CEbgbR6XtzIEA=";
            var theTransportType = TransportType.Mqtt;
            var theDPSTransportType = TransportType.Mqtt;
            using var security = new SecurityProviderSymmetricKey(theId, thePrimarySymmetricKey, null);
            using var transport = new ProvisioningTransportHandlerMqtt();
            var theGlobalDeviceEndpoint = "global.azure-devices-provisioning.net";
            ProvisioningDeviceClient provClient = ProvisioningDeviceClient.Create(theGlobalDeviceEndpoint, theDPSIdScope, security, transport);
            DeviceRegistrationResult result = await provClient.RegisterAsync();
            if (result.Status != ProvisioningRegistrationStatusType.Assigned)
            {
                throw new Exception($"Registration status did not assign a hub, status: {result.Status}");
            }

            IAuthenticationMethod auth = new DeviceAuthenticationWithRegistrySymmetricKey(result.DeviceId, security.GetPrimaryKey());
            var deviceClient = DeviceClient.Create(result.AssignedHub, auth, theTransportType);
            return deviceClient;
        }

The EnrollmentGroupId, EnrollmentGroupId, DPSTransportType are mandatory but are not in use.

Fixed

Fixed


libMMMarkdown-iOS.a is showing red in Xcode

Hi,
When I add libMMMarkdown-iOS.a in include libraries in my project ---> It appears as red. it means there is not library like this. Please help me how to include "libMMMarkdown-iOS.a" library in my project.
In your MMMarkdown github folder also I am unable to find "libMMMarkdown-iOS.a" library. Please help me!!

MMMarkdown no longer includes a pre-built iOS binary. You'll need to follow the instructions in the setup section of the README.

Hi Mdiep,
Thank you so much for your swift response!!
I followed the steps (4 steps) provided in step guide. I added MMMarkdown-iOS.a in my projects Build Phase Target Dependencies also. I also followed Apple documentation on how to add static libraries in Xcode.
I think I am doing wrong in step 4. Can you please tell me what I have to enter in "Header Search Paths" in Build settings of my projects. Do i have to enter the path of MMMarkdown-iOS.a located in my computer? I have no experience in this and I googled a lot to find out about it but haven't found a single document which explained about it clearly. Can you please tell me what I have to enter in Header search path for "$(CONFIGURATION_BUILD_DIR)/MMMarkdown-iOS/public/" ?
Thanks again,
Waiting for your response

Open your project in Xcode
Press ⌘1 to open the sidebar
Click on your project in the sidebar
Click on the "Build Settings" tab
In the search field, type "search"
Under search paths, you should see a row labeled "Header Search Paths"
Edit that row and add the value $(CONFIGURATION_BUILD_DIR)/MMMarkdown-iOS/public/

Hi mdiep,

I followed the steps clearly. Please see the attached screenshot.
I am getting an error message whenever I do #import <MMMarkdown/MMMarkdown.h>
Error message : MMMarkdown/MMMarkdown.h file not found. Please see the attached screenshots.

What I am doing wrong? Please help me

Have you tried building? The library will be red until you build.


AEROGEAR-10381: in case of 404 or redirection response do not record the uri

do not record the request uri as a prometheus tag, in case of 3xx or 404 responses.
recording not mapped uris leads to a high cardinality metric and can make the metrics DB perform slower

@bionarkos thanks!


Dark version

I love using this theme during the day, but have to switch to something else at night for easier reading. Do you have any plans for a dark version? Happy to work on it if you don't have the time 👍

Hi. Currently you can use fluent-dark.css. This is not
a completed version. I'll work on that later.

Hi. Currently you can use fluent-dark.css. This is not
a completed version. I'll work on that later.

Thanks for the response @HereIsLz. I'll check it out.

Thanks for the response @HereIsLz. I'll check it out.

Hi,
A new version with built-in dark mode has been released. Try it out and any feedback is welcomed. Thanks.

Excellent, the contrast and colours are on point, very nice.


Change the UI lib Bootstrap to another

Prerequisites

[x] I have read the documentation;

Description
There was another topic about but it was closed. I'd like to use another UI lib, the https://ant.design/. How can I replace Bootstrap? The Ant Design has its owns components.

I'm developing a lib what you want,but I haven't finished it yet.are you interesting with my project
https://github.com/eddyzhang1986/antd-jsonschema-form

Perfect!

I'm also interested in using Gridforms UI for this project. If anyone working on it, please post it here.

@eddyzhang1986 why a separate project? Can't we have a pluggable ui library in react-json-form?

@asifmom we can if you contribute it, thanks

combine material-ui ？

There is now a way to include custom themes -- see #1222


Email and password retrival fail

See title.

If this does not happen it's probably not super important, I do not remember this being in our goals


Introduction of client3 causes connectivity test from starting on 2 node kind cluster, but works for 2 node minikube cluster

Bug report
So this is an interesting corner case
single node deployments, like the documented minikube install work fine as there is some logic in the cilium-cni code that detects that client3 shouldn't attempt to be installed.

A 2 node minikube cluster doesn't have the problem, its a bit of a head scratcher.
General Information

Cilium CLI version (run cilium version)

$ cilium version
cilium-cli: v0.16.8 compiled with go1.22.3 on darwin/arm64
cilium image (default): v1.15.5
cilium image (stable): v1.15.5

How to reproduce the issue

install kind with 2 nodes using:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: test
nodes:
- role: control-plane
- role: worker
networking:
  disableDefaultCNI: true

kind create cluster --config test-config.yaml
2. install cilium
cilium install --version 1.15.5
3. run connectivity tests
4. Notice that client3 deployment is attempted but fails
5. cry
6. repeat with 2 node minikube
minikube start --cni cilium -n 2
7. run connectivity tests
8. watch client3 deployment succeed and wonder about life decisions that led you here

I should note the minikube is installing cilium v1.15.3, while kind is installing v1.15.5. I can't find a way to have minikube startup without a CNI present to do a traditional self install of cilium. So its not a perfect naranjas to oranges comparison between kind and minikube.
But I'm hoping the logic as to whether or not client3 deployment is attempted is something in cilium-cli logic, and it just needs to taste test the cluster node arrangement to figure out if it should be done.


Integrate keys-on-map with Privacy mode plugin

Privacy mode should turn off keys-on-map display. Since we're already doing inter-plugin communication, there is a precedent even :)

If we already have an explicit option to turn keys off/on, is this really necessary?
Sometimes you may want to share a fielding plan where you want no distractions like chat or personal info, but you do want key counts present so folks know how many to collect.


Data types for API

We should make a conscious decision about at least a few very basic data types we want to use in the beginning.
For floating-point data, I think there is not much to discuss: double precision is IMHO the only viable option.
For integer data, there are several options, since C defaults to 32-bit int while Julia defaults to 64-bit Int64 (which we use in Trixi.jl):

We could just use int for everything. That's by far the simplest option, but might put a hard limit on the maximum problem size (e.g., with N = 3 and 64 DOFs/element, this restricts to at most ~34 mio. elements).
We could use long for everything. This is similarly simple in terms of the API, and there is no chance for accidentally using a wrong type. It might put a (memory, usability) burden on everyone not working with large problems though.
We could use long for everything that might conceivably grow beyond 2.1 billion, such as number of elements, number of DOFs etc., and int for everything else. This is conservative with memory, but also easy to get wrong ("which integer was used for this API call again?").
We could provide two separate APIs: a default one foo(int) and one with large-integer support foo(long). This gives users flexibility, but causes overhead for the libtrixi maintainers (everything has to be set up to work for both sizes, additional testing etc.).
We could eschew using hard-coded integer values and make it configurable during build time. That is, have the ability to compile with 32-bit integers or 64-bit integers. This gives users flexibility, but creates overhead for libtrixi maintainers.

I don't think we need to make a decision now and stick to it for eternity. However, we should make some decision now, while being aware of the immediate implications/limitations. A later switch is always possible, but might be a breaking change (and, of course, cause more overhead).

Personally, I think we should either use int for everything or long for everything, i.e., variant 1) or 2). Everything else imho causes too much headache on the libtrixi maintainer side.

After the comments we received today regarding how this is handled in MESSy (32-bit integers and 64-bit floats virtually everywhere), I think we should go ahead and just use int everywhere for now.
This is probably by far the easiest option for most users. As a bonus, following YAGNI it is what we currently need and thus we should not try to find a more complicated solution.
If you agree @bgeihe, we can IMHO close this issue for now.

Yes, I agree!


MINOR: Fix log message error of loadTransactionMetadata

Committer Checklist (excluded from commit message)

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

retest this please

retest this please


chore(webapp): Bump axum-login dependency to 0.13.1

Not being super optimistic, but maybe the latest axum-login release fixes the issue with the randomly unresponsive webapp (https://github.com/get10101/10101/issues/1938)
It looks like axum-login had issues with deadlocks in the past, but with tower-sessions those deadlock should have been fixed. Bumping from 0.12 to 0.13.1 also bumps the tower-session dependency. So this might help 🤞.

sending to merge to give this a try right away.

Hey @holzeis, sorry to drop in unannounced: I was looking at the impl of the session store here and noticed you all using a synchronous lock.
Maybe I'm misunderstanding here, but is this meant to be used in production? If so, I would be concerned that a synchronous lock within a store might directly lead to e.g. deadlocks.
Is there a reason to not use tokio::sync::RwLock instead?

Hey @holzeis, sorry to drop in unannounced: I was looking at the impl of the session store here and noticed you all using a synchronous lock.
Maybe I'm misunderstanding here, but is this meant to be used in production? If so, I would be concerned that a synchronous lock within a store might directly lead to e.g. deadlocks.
Is there a reason to not use tokio::sync::RwLock instead?

Hey, @maxcountryman! Thanks for taking the time to look at our code and offer some advice.
I think you are absolutely right. At some point we spent a lot of time auditing the code base for instances of blocking code in an async context, but it seems like this has slipped code review.
Thanks again!

@maxcountryman: I've been giving it a bit more thought and I now think this code is actually fine! Maybe you can correct me if I'm wrong though.
I am pretty sure the common advice is to avoid using async Mutex/RwLock unless strictly necessary^1. That is, if you need to hold it across an await point. The reason given is that async locks are considerably slower.
As far as I can tell, we are not actually holding the RwLock across an await point here.
What do you think?

While you're absolutely correct you generally don't need async locks, this is an example of the use case tokio calls out for async locks:

The primary use case for the async mutex is to provide shared mutable access to IO resources such as a database connection. ^1

Granted, we have a HashMap here, but the session store is used as though it is non-blocking and same principle should apply.
In your second link, Alice mentions:

In my experience, the best way to avoid the above issue is to never lock the mutex in async code in the first place. Instead, you define non-async methods on the wrapper struct and lock the mutex there. Then, you call those non-async methods from your async code.

Emphasis mine. Observe that our blocking code is inside the async methods of the session store API and so we might be leading ourselves into trouble.
More specifically multiple tasks may load and save but this is impossible when we've blocked on a synchronous lock.

We could be causing it ourselves in delete_expired, since we lock the sessions for reading and then for writing later without dropping the guard - we are going to look into this imminently but I'm just putting a pin in it here so I don't forget!


hi-dpi on Plasma 6 not detected

We use a bit of a hack to detect on macOS:
if ((try renderer.getOutputSize()).width_pixels == request_width * 2)
    try renderer.setScale(scale * 2, scale * 2)
else
    try renderer.setScale(scale, scale);

This doesn't do the trick on KDE. Probably a better solution.

Closing as … WONTFIX? 🤞


The images on article are completely wrong

see https://github.com/DinisCruz/Book_Practical_Git/blob/master/manuscript/Creating_a_version_TeamMentor_which_uses_the_new_GitUserData.config_file.md
and compare with original
http://blog.diniscruz.com/2013/03/creating-version-teammentor-which-uses.html
This is not good at all, and I need to figure out the root cause of this prob (and hopefully there will not be other posts with it)..
That said, I did find a weird image on a post I fixed a couple days ago (need to go back into it a look at why)

all (as far as I can tell) image issues have been solved


add CI

@homunkulus r+

:pushpin: Commit 2e65227 has been approved by japaric

:hourglass: Testing commit 2e65227 with merge 2e65227...

:pushpin: Commit dc216fc has been approved by japaric

@homunkulus r+

:hourglass: Testing commit dc216fc with merge dc216fc...

:pushpin: Commit 141433b has been approved by japaric

@homunkulus r+

:hourglass: Testing commit 141433b with merge 141433b...

@homunkulus r+

:pushpin: Commit aac9902 has been approved by japaric

:hourglass: Testing commit aac9902 with merge aac9902...

Tests green. Merging.


Research & implement open weight models

Describe the issue
Ride the chatter and implement a open vs closed source GenAI model

TODO(s)

[ ] implement
[ ] dockerize the solution
[ ] research on the workflows that can be used for monitoring
[ ] implement explainability
[ ] ride the chatter and add the business values
[ ] more words -> based on the various personas
[ ] ethics chat
[ ] do(s)/ dont'(s)
[ ] collaborate

Rethinking!!


text/tabwriter: character width

What steps will reproduce the problem?
Issue:
gofmt, or text.tabwriter, assumes that all Unicode code points occupy exactly one column
in editors or on terminals. That assumption is not correct because most (but not all)
Chinese/Japanese/Korean characters, emojis, "fullwidth" Latin characters, etc,
occupy two columns. As a result gofmt formats Go code like this.

var Countries = map[string]string{
        "アメリカ合衆国": "United States of America",
        "日本":      "Japan",
        "ドイツ":     "Germany",
        "フランス":    "France",
        "ポーランド":   "Poland",
}

As you can see the column of the map value is misaligned. You cannot fix this by hand
because gofmt would reformat it for you in the wrong way if you do that. That's annoying.

In Unicode, there's a zero column character (ZERO WIDTH SPACE; U+200B). SOFT HYPHEN
(U+00AD) may be displayed as a hyphen at the end of a line but may be zero-width in
other places, depending on your display environment. These chracters also affect the
column layout.

What is the expected output? What do you see instead?
Proposal:
Unicode Standard Annex #11 gives the definition of column width for characters in the
legacy East Asian character sets. I propose to add the East Asian Width property to the
unicode package, so that we can get the column width for a CJK character. East Asian
Fullwidth and East Asian Wide characters should be treated as two column by tabwriter.

(Note: East Asian Ambiguous characters need to be treated as one column. They are
treated as two columns only in East Asian display environment. The character set
contains Cyrillic characters and others which we would never want to handle as two
column.)

Because the Annex #11 does not say anything about characters that are not in the legacy
East Asian character sets, we need additional rules for characters not in CJK character
sets but in Unicode. I propose this simple rule:

 - ZERO WIDTH SPACE is 0 column
 - Emojis are 2 columns
 - Other code points, including U+0000, SOFT HYPHEN, and all control characters, are 1 column

This additional rule will be implemented to an unexported function in text.tabwriter.

Caveats:
I deliberately avoid defining the generic "wcswidth" function to determine the
column width for a string in the standard library. That function can never be defined in
the right way because there's no standard for it. Also it'd be hard to get a reasonable
definition for characters with odd semantics, such as SOFT HYPHEN.

I see support for full-width characters as something integral to this package. It would be a bit sad if we left many millions of users in countries that use CJK characters without a usably text/tabwriter package.

For an example implementation of a function to figure out how many columns a character occupies, see https://github.com/mattn/go-runewidth.

For what it's worth, this is also a problem with combining characters (and not all meaningful combinations have canonical forms):
var test = map[string]int{
    "tes̪t":   0,
    "testing": 0,
}

@imuli Combining characters are handled as if their width is 0. This is fine if the code will never introduce a line-break before a combining character (which it doesn't). There's no need for canonical forms as this scheme works just fine.

@fuzxxl Yes, the package you linked to handles combining characters just fine. I meant that they are another side of this bug however, one that perhaps doesn't fall under "variable width font".

Any updates on this?

@XenoPhex Sorry, but this package is frozen: https://go-review.googlesource.com/#/c/31910/2/src/text/tabwriter/tabwriter.go .

PS: Even if the package were not frozen, we are not going to add specific character sets or tables to this package for special treatment. The only sensible approach would be to provide a function that given a Unicode char returns a width, leaving the actual width determination to a client. However, the only way we could add such a function is by extending the API; specifically it would probably require a new Init function.
This package is one of the earliest Go packages with some features (like HTML filtering) that are not needed/used anymore (at least by gofmt). We are not going to make further changes at this point.
If you need a special version, you can always vendor and adjust the code. A future gofmt might use a rewritten and trimmed version of this package. None of this is high-priority.
I will close this issue.

FYI: one another ways to do it. https://github.com/olekukonko/tablewriter

@mpvl Thanks for the info. I don't think we want to be dependent on x/text. I was hoping that there might be a small number of unicode code point ranges that we could trivially detect (and that are unlikely to change in the future) to identify full-width/wide chars and just give them the space of 2 characters. Of course this all depends on the actual font used during rendering and so this assumes that wide characters are taking the space of 2 regular characters in that font.

@griesemer: I don't think that is a scalable approach and leaves out handling zero-width characters, which is easier actually. We could do something similar what is done for core though: generate the tables in x/text and then copy them in to gofmt. x/text has been set up to automate this.

Thanks, @mpvl, that is useful additional input. It sounds like there's no simple solution to address this.


Bug

Describe the bug
The update keeps saying update failed and loops forever
To Reproduce
Steps to reproduce the behavior:

Simply update Goosemod/BetterDiscord and update

Expected behavior
It's supposed to just update right away
Screenshots
https://media.discordapp.net/attachments/831237416886599722/847329328845160458/unknown.png
(You should be able to find the following information in the bottom of your settings.)
GooseMod info:

Update Channel: no clue, but uses Goosemod/BetterDiscord
Version: can't launch
Modules: can't launch

Discord info:

Update Channel: Canary
OS: Windows 10
Host Version: idk

Other info:

Other Mods:BetterDiscord

Additional context
N/A

No one else has the issue, what's the contents of your settings.json?

Here it is:
{
  "BACKGROUND_COLOR": "#202225",
  "IS_MAXIMIZED": true,
  "IS_MINIMIZED": false,
  "UPDATE_ENDPOINT": "https://updates.goosemod.com/betterdiscord+goosemod",
  "NEW_UPDATE_ENDPOINT": "https://updates.goosemod.com/betterdiscord+goosemod/",
  "WINDOW_BOUNDS": {
    "x": -1611,
    "y": 547,
    "width": 1280,
    "height": 720
  }
}

Sorry didn't spot issue, it looks fine, can you try relaunching?

Pretty sure this was a GooseUpdate bug which broke mixing (>1 mod) which was fixed on the same day as when the issue was opened. Closing.


Support for deserialising structs with fields of custom Rust types

Following up on a discussion with @mehcode on the project Discord: I have a Prost/Tonic-generated struct with a field of a custom Timestamp struct type, and I'd like to be able to seamlessly use query! to interoperate between that and a Postgres table where the corresponding columns are of type timestamp. I have conversions between Timestamp and chrono::NaiveDateTime in both directions, and Encode and Decode instances:
impl From<Timestamp> for ::chrono::NaiveDateTime
impl From<::chrono::NaiveDateTime> for Timestamp
impl Decode<Postgres> for Timestamp
impl Encode<Postgres> for Timestamp

and queries like
  async fn post_by_id(
    &self,
    req: Request<PostByIdRequest>,
  ) -> Result<Response<PostByIdReply>, Status> {
    info!("fetching post by id");
    let post = sqlx::query_as!(
      Post,
r#"
select
id, created_at, updated_at, <20+ other fields>
from posts
where id = $1
"#,
      req.into_inner().id
    )
    .fetch_one(&mut &self.db_pool)
    .map_err(|_| Status::not_found("Post with given id not found"))
    .await?;
    Ok(Response::new(PostByIdReply { post }))
  }

Now this, on sqlx master, complains that it can't match NaiveDateTime with Timestamp (well, the actual error is about a missing ResultExt impl).
Possible solutions

Write a new SQLPost struct, and conversions in both directions that are essentially a ton of silly code like

fn to_post(sqlpost: SQLPost) -> Post {
  Post {
    id: sqlpost.id,
    created_at: sqlpost.created_at.into(),
    updated_at: sqlpost.updated_at.into(),
    /// *gulp*
    field1: sqlpost.field1,
    field2: sqlpost.field2,
    ...,
    field20: sqlpost.field20
  }
}

(one direction for queries that read from the database, and the other for queries that write to it).

SQLx could offer some sort of serde-like attribute on structs that lets the user specify custom serialisation/deserialisation functions (which would be the From impls in this case). Here's some completely made-up syntax that I'm not at all attached to:

// requirement: must not fail for valid inputs,
// i.e. specify an isomorphism between the two types
fn deserialise(x: NaiveDateTime) -> Timestamp
fn serialise(x: Timestamp) -> NaiveDateTime

#[sqlx::pg_struct]
pub struct Post {
  id: i32,
  #[sqlx::repr(pg_type="timestamp", pg_deserialise=deserialise, pg_serialise=serialise)]
  created_at: Timestamp
}

Perhaps this would be at the cost of type inference, but query! and friends could deserialise a column of type T to any type that implements some kind of trait (a new Encode with an extra parameter) saying that it can be made out of a T.

My current hack around this, for a side-project I'm using SQLx on, is to change ResultExt to silently convert using From impls:

pub trait ResultExt<T>: Sized {
    fn try_unwrap_optional(self) -> crate::Result<T>;
}

impl<T, A> ResultExt<T> for crate::Result<A>
where
    T: From<A>,
{
    fn try_unwrap_optional(self) -> crate::Result<T> {
        self.map(From::from)
    }
}

A more principled way would involve defining my own Cast class instead of potentially exposing myself to silent conversions arising from tons of From impls that I don't actually want to be using for SQL conversions... but it works for now, and it's let me move on to other stuff.
--
Lastly, I've expressed this sentiment when talking to Ryan couple times on Discord a, but for any other contributors reading this: this is an incredible library, and I'm very thankful for all of your work on it. query_as! is, frankly, quite magical, and the source code is really readable, too... I look forward to perhaps becoming a contributor someday :)

We have been discussing a way to provide additional information or overrides for individual columns within the query itself by leveraging quoted identifiers, which are a SQL standard.
This came up because we want to use Option where columns can possibly be null instead of erroring, which is otherwise suboptimal. query_as!() this is a non-issue because of ResultExt, which lets you specify either T or Option<T> and it will handle things correctly either way (if T, then error if null). Different database backends provide different levels of detail on nullability, however; for example, for Postgres we can only infer the nullability of columns which directly come from tables, and that requires looking up the column in pg_attribute to check if it has a NOT NULL constraint--so in this case we cannot know for sure if the result of an expression is null or not. MySQL, on the other hand, gives us a nullability flag directly with the column information and marks it correctly even when using expressions.
The existing plans were only to provide a marker for columns which could not be null even when we can't infer this, e.g. by having the column name be "<Rust name>:NOT_NULL" or something like that. We could extend this syntax to include an output Rust type override (which could subsume the not-null marker if you, e.g., override the type with Option<_>).

This is now supported in query_as() ( the function ) with a #[derive(FromRow)]. Support for this in macros is now centrally tracked here: #148


UTF Handling of MFHD records are not handled the same way as bibs, leading to more encoding errors

Released in 1.4.1


Tray icon is not shown by default

I confirm (by marking "x" in the [ ] below):

[x] This is not a troubleshooting question. Troubleshooting questions go here: http://www.mattermost.org/troubleshoot/.
[x] This doesn't reproduce on web browsers (such as in Chrome). If it does, issue reports go to the Mattermost Server repository.
[x] I have read contributing guidelines.

Summary
Tray icon is not shown by default
Steps to reproduce

Operating System: Ubuntu 16.10
Mattermost Desktop App version: v3.5.0
Mattermost Server version: v3.5.1
Clear steps to reproduce the issue:

Install the application for the first time
Ensure the folder ~/.config/Mattermost to be empty before installation (In case any previous versions were installed).
After installation check ~/.config/Mattermost/config.json

{
"teams": [
{
"name": "JustDial",
"url": "http://<IP_ADDRESS>",
"index": false
}
],
"hideMenuBar": false,
"showTrayIcon": true,
"trayIconTheme": "",
"disablewebsecurity": true,
"minimizeToTray": true,
"toggleWindowOnTrayIconClick": false,
"version": 1,
"notifications": {
"flashWindow": 2
},
"showUnreadBadge": true,
"lastMattermostVersion": "3.5.0"
}
Expected behavior
"trayIconTheme": "" should be set to "light" by default.
Observed behavior
"trayIconTheme": "" is not being set.

Possible fixes

As a workaround, please configure the tray icon setting. https://github.com/mattermost/desktop/issues/394#issuecomment-267017181


Prevent accidental deep cloning.

Addresses issue https://github.com/livingdocsIO/editable.js/issues/188. According to the docs the cloneNode() default paramenter deep changes for different DOM and browser versions, and it should always be specified. All other uses of cloneNode() are fine.

:tada: This PR is included in version 2.2.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


How to generate new images?

Hi,
I've trained a model and only got the pictures of the training process. The name of the model is 'model-10.pt'. I want to know how to use it to generate new images. How can I load it and use it?
The training code is as follows:
if __name__ == '__main__':
    model = Unet(
        dim=64,
        dim_mults=(1, 2, 4, 8),
        channels=1
    ).cuda()

    diffusion = GaussianDiffusion(
        model,
        image_size=200,
        timesteps=1000,
        sampling_timesteps=250,
        loss_type='l1'
    ).cuda()

    trainer = Trainer(
        diffusion,
        r'F:\PyCharm_Files\Diffusion\lucidrains\denoising-diffusion-pytorch\Images_demo',
        train_batch_size=4,
        train_lr=8e-5,
        train_num_steps=10000,
        gradient_accumulate_every=2,
        ema_decay=0.995,
        amp=True
    )

    trainer.train()

Hello, I also want to know, have you found a solution

Once you've trained your network, you can use the sample method of diffusion. For example the following code will generate 1 image:
`
sampled_images = diffusion.sample(batch_size = 1)
def show(img):
npimg = img.numpy()
plt.imshow(np.transpose(npimg, (1, 2, 0)),
interpolation='nearest')
plt.show()
show(sampled_images[0])
`

@NinePeAkSword  To load a model previously trained, you can just load it with trainer.load("10"), which loads the 10-th checkpoint in the results folder.

@PabloVD Hi thanks for your answer.
I tried but found that train.load('10') is a Nonetype. Appreciated if you could help me figure it out.

@modantailleur Hi thanks for your answer. I wonder what I can do instead of sampling if I wanna transport a new image(not consisted in the train set). That means I have a test set to be denoised using my trained trainer. Thanks in advance.

I do not understand your approach. A diffusion Model is learning the underlying the distribution of your training data. There is no such thing as a "test" set in this context, since the model itself is starting from random noise. If you want to have different images, you have to put those into your training data.

@modantailleur Hi thanks for your answer. I wonder what I can do instead of sampling if I wanna transport a new image(not consisted in the train set). That means I have a test set to be denoised using my trained trainer. Thanks in advance.

This library is for generating images from white noise. You give the algorithm some random noise, and it generates an image that looks like whatever you used during training (a dataset of dogs will give you a random dog, a dataset of faces a random face etc...). It does not support denoising or super-resolution. I get that it can be a bit confusing given the name of the repo, but "denoising diffusion" only refers to the technique of stable diffusion, it doesn't mean that you'll be able to denoise anything from the trained algorithm. One easy way to transform this library into a super-resolution library, is to change a little bit the U-Net and to give on different channels (channels 4, 5, 6 for colorful images) the noisy image (it is explained in the paper "Image Super-Resolution via Iterative Refinement" by Saharia et al.). That's what I'm trying to do right now, so I don't know if it works.

@Infinity2118 can you check if you have model-10.pt inside the folder results? It automatically saves there the checkpoints by default.

Thx. I've figured it out. Thx again~

@modantailleur Hi thanks for your answer. I wonder what I can do instead of sampling if I wanna transport a new image(not consisted in the train set). That means I have a test set to be denoised using my trained trainer. Thanks in advance.

I do not understand your approach. A diffusion Model is learning the underlying the distribution of your training data. There is no such thing as a "test" set in this context, since the model itself is starting from random noise. If you want to have different images, you have to put those into your training data.

Hi thx for your answer. I'm still wondering how to 'train' my another image set using the pth I've got (like model10.pth). That means I don't need to train again but use the trained model to my own data. Kind of pre-trained thing.

@modantailleur Hi thanks for your answer. I wonder what I can do instead of sampling if I wanna transport a new image(not consisted in the train set). That means I have a test set to be denoised using my trained trainer. Thanks in advance.

This library is for generating images from white noise. You give the algorithm some random noise, and it generates an image that looks like whatever you used during training (a dataset of dogs will give you a random dog, a dataset of faces a random face etc...). It does not support denoising or super-resolution. I get that it can be a bit confusing given the name of the repo, but "denoising diffusion" only refers to the technique of stable diffusion, it doesn't mean that you'll be able to denoise anything from the trained algorithm. One easy way to transform this library into a super-resolution library, is to change a little bit the U-Net and to give on different channels (channels 4, 5, 6 for colorful images) the noisy image (it is explained in the paper "Image Super-Resolution via Iterative Refinement" by Saharia et al.). That's what I'm trying to do right now, so I don't know if it works.

Thx for your specific reply. Maybe I can read this paper and learn more about it. You've got the point that I want to use this model to do super-resolution since I saw "denoising". Anyway thx again. You're sooo nice.

@modantailleur Hi thanks for your answer. I wonder what I can do instead of sampling if I wanna transport a new image(not consisted in the train set). That means I have a test set to be denoised using my trained trainer. Thanks in advance.

This library is for generating images from white noise. You give the algorithm some random noise, and it generates an image that looks like whatever you used during training (a dataset of dogs will give you a random dog, a dataset of faces a random face etc...). It does not support denoising or super-resolution. I get that it can be a bit confusing given the name of the repo, but "denoising diffusion" only refers to the technique of stable diffusion, it doesn't mean that you'll be able to denoise anything from the trained algorithm. One easy way to transform this library into a super-resolution library, is to change a little bit the U-Net and to give on different channels (channels 4, 5, 6 for colorful images) the noisy image (it is explained in the paper "Image Super-Resolution via Iterative Refinement" by Saharia et al.). That's what I'm trying to do right now, so I don't know if it works.

Thx for your specific reply. Maybe I can read this paper and learn more about it. You've got the point that I want to use this model to do super-resolution since I saw "denoising". Anyway thx again. You're sooo nice.

You're welcome ! Actually I think that the way of doing things that I mentioned in my message is a bit outdated (yes a 2021 paper is outdated for deep learning ahah), now people seem to be using more DDRMs with pre-trained models. The concept is that you train a model in an unsupservised way with a library like this one, or you download a pre-trained model that is relevant for your work. You now have a model that is able to generate an image from random noise. And then, you can condition the model during inference to generate an image that looks like the "noisy" image you give it as input. It will ultimately generate a denoised image. I suggest to take a look at the DDRM library (https://github.com/bahjat-kawar/ddrm) which is used only for inference, and to read their paper, as their method is not trivial at all.
The method I mentioned in my previous message works perfectly well, though ! I've tried it and it is fine for my study. The only thing is that training a diffusion model from scratch can be really tedious depending on your project (for my project it's fine because I'm working with small matrices). The DDRM library, on the contrary, allows you to use pre-trained diffusion models for basically any kind of denoising/restoration problem, which is amazing.

@modantailleur Hi thanks for your answer. I wonder what I can do instead of sampling if I wanna transport a new image(not consisted in the train set). That means I have a test set to be denoised using my trained trainer. Thanks in advance.

This library is for generating images from white noise. You give the algorithm some random noise, and it generates an image that looks like whatever you used during training (a dataset of dogs will give you a random dog, a dataset of faces a random face etc...). It does not support denoising or super-resolution. I get that it can be a bit confusing given the name of the repo, but "denoising diffusion" only refers to the technique of stable diffusion, it doesn't mean that you'll be able to denoise anything from the trained algorithm. One easy way to transform this library into a super-resolution library, is to change a little bit the U-Net and to give on different channels (channels 4, 5, 6 for colorful images) the noisy image (it is explained in the paper "Image Super-Resolution via Iterative Refinement" by Saharia et al.). That's what I'm trying to do right now, so I don't know if it works.

Thx for your specific reply. Maybe I can read this paper and learn more about it. You've got the point that I want to use this model to do super-resolution since I saw "denoising". Anyway thx again. You're sooo nice.

You're welcome ! Actually I think that the way of doing things that I mentioned in my message is a bit outdated (yes a 2021 paper is outdated for deep learning ahah), now people seem to be using more DDRMs with pre-trained models. The concept is that you train a model in an unsupservised way with a library like this one, or you download a pre-trained model that is relevant for your work. You now have a model that is able to generate an image from random noise. And then, you can condition the model during inference to generate an image that looks like the "noisy" image you give it as input. It will ultimately generate a denoised image. I suggest to take a look at the DDRM library (https://github.com/bahjat-kawar/ddrm) which is used only for inference, and to read their paper, as their method is not trivial at all.
The method I mentioned in my previous message works perfectly well, though ! I've tried it and it is fine for my study. The only thing is that training a diffusion model from scratch can be really tedious depending on your project (for my project it's fine because I'm working with small matrices). The DDRM library, on the contrary, allows you to use pre-trained diffusion models for basically any kind of denoising/restoration problem, which is amazing.

Sooooo happy to receive your reply again!!! Actually DDRM is the first model I learned in the diffusion models, which is more straight forward to denoising. I'd like to go back to it and take more attention of its architecture. Maybe I could strike my mind while learning. Thx for your recommendation! You're one of the best partners of my Github study! Hope you everything goes well~

@NinePeAkSword To load a model previously trained, you can just load it with trainer.load("10"), which loads the 10-th checkpoint in the results folder.

Can I check if I use the Trainer class (defined with the training data) to do the

Once you've trained your network, you can use the sample method of diffusion. For example the following code will generate 1 image:
sampled_images = diffusion.sample(batch_size = 1)

def show(img):
    npimg = img.numpy()
    plt.imshow(np.transpose(npimg, (1, 2, 0)),
                            interpolation='nearest')
    plt.show()

show(sampled_images[0])

Can I check the diffusion.sample will it take from the training set( I presume no) when it do the sample ? My understanding is that the sample is a noise ? I also puzzle where is the generative part after loading the checkpoint ? Sorry am new to diffusion and trying to figure things out.

Thx. I've figured it out. Thx again~

Hello, may I ask how to load a trained model's own image to obtain the generated image? Can you take a screenshot of the code


Can't recognize the image with dark background

New to OCR. Here is my image.

Should I do some training or something else? Any idea? Thanks.

I think you need to train your network for this font. You can use trainer app for training network for specific font.


fix background color to white for mermaid schema

preview of the changes
📑 fix background color to white for mermaid schema in workloads
currently the text between the --> is grey on black and hard to see.
https://rik-org.github.io/rik/workloads/index.html
✅ Checks

[X] My pull request adheres to the code style of this project
[ ] My code is documented
[ ] I provided unitary tests or procedure to test my code
[X] My PR have a clear description of what my code is supposed to do

ℹ Additional Information
not sure about the

Hi @thomas-mauran, thanks for contributing to RIK ! Since this PR is about documentation, I think your commit message should start with docs: instead of fix:.

done :+1:


Added quay-operator v1.0.2 to upstream-commuunity-operators

Added quay-operator v1.0.2 to upstream-commuunity-operators

Flat operator directory structure is obsolete from 23-rd of October 2019, only nested directory structure will be accepted.

New Submissions

[ ] Has you operator nested directory structure?
[ ] Have you selected the Project Community Operator Submissions in your PR on the right-hand menu bar?
[ ] Are you familiar with our contribution guidelines?
[ ] Have you packaged and deployed your Operator for Operator Framework?

[ ] Have you tested your Operator in all supported installation modes?
[ ] Is your submission signed?

Updates to existing Operators

[x] Is your new CSV pointing to the previous version with the replaces property?
[x] Is your new CSV referenced in the appropriate channel defined in the package.yaml ?
[x] Have you tested an update to your Operator when deployed via OLM?
[x] Is your submission signed?

Your submission should not

[x] Modify more than one operator
[x] Modify an Operator you don't own
[x] Rename an operator - please remove and add with a different name instead
[x] Submit operators to both upstream-community-operators and community-operators at once
[x] Modify any files outside the above mentioned folders
[x] Contain more than one commit. Please squash your commits.

Operator Description must contain (in order)

[x] Description about the managed Application and where to find more information
[x] Features and capabilities of your Operator and how to use it
[x] Any manual steps about potential pre-requisites for using your Operator

Operator Metadata should contain

[x] Human readable name and 1-liner description about your Operator
[x] Valid category name1
[x] One of the pre-defined capability levels2
[x] Links to the maintainer, source code and documentation
[x] Example templates for all Custom Resource Definitions intended to be used
[x] A quadratic logo

Remember that you can preview your CSV here.
--
1 If you feel your Operator does not fit any of the pre-defined categories, file a PR against this repo and explain your need
2 For more information see here

Hi @sabre1041, please try to rename redhatcop.redhat.io_quayecosystems_crd.yaml to quayecosystems.redhatcop.redhat.io.crd.yaml. It could help.

@J0zi this is the same CRD as in #1244

@sabre1041, you mean #1242, yes I know:) Please try to rename it.

@J0zi renamed

@J0zi any idea on the failures?

@J0zi all tests have passed. @dinhxuanvu thanks for the advice offline!


SET CURRENCY CODE ERROR

Hello guys, Im deployment a delivery note report (this report has been replicated from the standard Report  208). The standard report include the function SetCurrencyCode and It works fine in C/Side but when I export and import in VS Code it and throws the next error:

The type or method 'SetCurrencyCode' cannot be used for 'Solution' development.

Im using in the app.json the label target as solution.
Some idea of this error or a possible solution??
Thanks!

Hi @alvarotellez ! You should be using either Extension or Internal . Solution should not be used.


Testsuite fails for the version on 09/21/2017

I tried to build and install the latest version but I got some fails in testsuite.
Here are 4 fails I got after I run "make check":
FAIL: check-INTEGER
FAIL: check-OER-INTEGER
FAIL: check-OER-NativeEnumerated
FAIL: check-PER-INTEGER
Testsuite summary for asn1c 0.9.29
TOTAL: 15
PASS:  11
SKIP:  0
XFAIL: 0
FAIL:  4
XPASS: 0
ERROR: 0
Here are the version info for required packages and the compiler:
gcc -- 5.4.0
automake -- 1.15
libtool -- 2.4.6
bison -- 2.7
flex -- 2.6.0
I also attached test-suite.log for your review.
Note: I also compiled an old version from 08/14/2017 in the same environment and it passed all tests:
Testsuite summary for asn1c 0.9.29
TOTAL: 39
PASS:  39
SKIP:  0
XFAIL: 0
FAIL:  0
XPASS: 0
ERROR: 0
test-suite.txt

Thanks much!