runtime: compiled WASM with NodeJS fails with “ TypeError: (intermediate value).arrayBuffer is not a function”

What version of Go are you using (go version)?

$ go version
go version go1.14.4 darwin/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/user1/Library/Caches/go-build"
GOENV="/Users/user1/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/user1/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/l7/08p741zd43xbsnqvxz68wdch0000gn/T/go-build062348627=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?
I compiled my go application using this:
GOOS=js GOARCH=wasm go build -o test.wasm
And tested it using the example .JS/HTML from the $(go env GOROOT)/misc/wasm duirectory. This works perfectly in my Chrome browser. However, it does't work using nodejs (v14.3.0).
const fs = require('fs');
require('./wasm_exec.js');

if (!WebAssembly.instantiateStreaming) { // polyfill
    WebAssembly.instantiateStreaming = async (resp, importObject) => {
        const source = await (await resp).arrayBuffer();
        return await WebAssembly.instantiate(source, importObject);
    };
}

const go = new Go();
let mod, inst;
WebAssembly.instantiateStreaming(fs.readFileSync('./test.wasm'), go.importObject).then((result) => {
    mod = result.module;
    inst = result.instance;
   // document.getElementById("runButton").disabled = false;
}).catch((err) => {
    console.error(err);
});

async function run() {
    console.clear();
    await go.run(inst);
    inst = await WebAssembly.instantiate(mod, go.importObject); // reset instance
}

run()

However, here's the problem:
TypeError: (intermediate value).arrayBuffer is not a function
    at WebAssembly.instantiateStreaming (/Users/cbourne/development/go-wasm/scratch4.js:6:43)
(node:23644) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'exports' of undefined
    at global.Go.run (/Users/cbourne/development/go-wasm/wasm_exec.js:483:39)
    at run (/Users/cbourne/development/go-wasm/scratch4.js:23:14)
    at Object.<anonymous> (/Users/cbourne/development/go-wasm/scratch4.js:27:1)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47

-->

Further to this it seems that Node.js v14.4.0 has experimental support for a WebAssembly System Interface (WASI) https://nodejs.org/api/wasi.html.
Should this work with Golang. I tried the following, but was unable to get it working:
'use strict';
const fs = require('fs');
const { WASI } = require('wasi');
require('./wasm_exec.js');

const wasi = new WASI({
  args: process.argv,
  env: process.env,
  preopens: {
    '/sandbox': '/Users/user/development/go-wasm/'
  }
});
const importObject = { wasi_snapshot_preview1: wasi.wasiImport };

(async () => {
  const wasm = await WebAssembly.compile(fs.readFileSync('./main.wasm'));
  const instance = await WebAssembly.instantiate(wasm, importObject);

  wasi.start(instance);
})();

Thank you for the report and details @carlskii! I shall kindly ping some experts @neelance @agnivade

wasm_exec.html is not meant to be used with Node.js. Either simply use go run ... or use the go_js_wasm_exec helper for running the wasm binary.

Got it thanks. Think I've got passed this now so will close.


Update spacepy version.

Solves: "ModuleNotFoundError: No module named 'setuptools.command.bdist_wininst'" when installing spacepy in the provided docker container.
See also: https://github.com/spacepy/spacepy/issues/530

Thanks for the PR. Could you provide a bit of context around this? Is the spacepy version change required to get h36m-fetch working on Windows?

No, I tried to build the docker container on an Ubuntu (20.04) system. I think the problem was only that some dependencies were out of date.

Good to know. Thanks for the PR.


Add shard pruning to Raptor

@electrum done with first pass. Generally looks good.

Minor comments, looks good otherwise.
@electrum - we should probably address the issue of empty tables being separately.


Re-enabled collision and hitbox debug overlay.

It apparently just works, so let's turn it back on!

Huh, conflict?
https://github.com/space-wizards/space-station-14/pull/15

Fixed


Test container building

It would be a nice idea to build the container running this app in the CI in order to reduce the risk for bad deployments.
Containerfile lives here: https://gitlab.com/osci/ansible-role-openshift-apps/-/blob/main/pulp-analytics/templates/Dockerfile.pulpanalytics-app

Yes this would be nice. :+1:


Set up the project and get the git hub Repository up

Create  a Git Repo to hold all the work on the Star wars Api


Fixed dropdown position in playground example

In the playground, if page scroll is present then position of dropdown is not correct.

Thanks for the fix!


feat(conf) add a config field: override_origins

Summary
A boolean value that instructs the plugin to set the config.origins
from request headers "Origin" as the value.
The user has the ability to turn off this feature.
Issues resolved
Fix #2759

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


python/adbc_driver_postgresql ingest NOT_IMPLEMENTED when running adbc_ingest with json array

What happened?
when trying to ingest a parquet table with a column that is essentially a json array, i am now getting the following error:
NotSupportedError: NOT_IMPLEMENTED: [libpq] Field #24 ('groups') has unsupported type for ingestion large_list

for what it's worth, the data in my case has polars dtype: List(Struct({'category': Struct({'code': String, 'description': String, 'id': String}), 'code': String, 'description': String, 'id': String}))
c.f. #1216
How can we reproduce the bug?

ingest data containing a large_list type

Environment/Setup
running pip3 on debian, with:
adbc-driver-manager==0.11.0
adbc-driver-postgresql==0.11.0
polars==0.20.26

I think this and #1882 are the same, I'll use that one since it's tagged as 'enhancement'

Duplicate of #1882


Postgrey integration (wish)

Hi, please consider to integrate a greylog solution; As for alpine linux the package postgrey is available. The configuration is minimal and grey logging could be disabled by default. Let me know if you need help with the configuration, if you plan to integrate it.

@mbuelte, no problems. But better to do it after first stable release.

Sounds great!

Yes please.. am about to migrate from gmail workspace back to self hosted..at home


Add a header to the viewer

Like so. Have it appear on the top of all of the pages

Fixed in ceafb33e7880ec93c0f683f9c218f3a58a4e058a


Allow division by non-0 constants in nogil code without safety checks.

Hello up there. The following example compiles just fine:
cdef void func(int N) nogil:
    for i in range(N):
        if i&1 == 0:        # <-- NOTE
            pass

However when i&1 is changed to i%2 it fails to compile:
cdef void func(int N) nogil:
    for i in range(N):
        if i%2 == 0:        # <-- NOTE
            pass

gives
Error compiling Cython file:
------------------------------------------------------------
...
cdef void func(int N) nogil:
    ^
------------------------------------------------------------

x.pyx:1:5: Function declared nogil has Python locals or temporaries

Error compiling Cython file:
------------------------------------------------------------
...
cdef void func(int N) nogil:
    for i in range(N):
            ^
------------------------------------------------------------

x.pyx:2:13: Iterating over Python object not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
cdef void func(int N) nogil:
    for i in range(N):
                 ^
------------------------------------------------------------

x.pyx:2:18: Calling gil-requiring function not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
cdef void func(int N) nogil:
    for i in range(N):
                 ^
------------------------------------------------------------

x.pyx:2:18: Constructing Python tuple not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
cdef void func(int N) nogil:
    for i in range(N):
                  ^
------------------------------------------------------------

x.pyx:2:19: Converting to Python object not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
cdef void func(int N) nogil:
    for i in range(N):
        if i%2 == 0:
              ^
------------------------------------------------------------

x.pyx:3:15: Truth-testing Python object not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
cdef void func(int N) nogil:
    for i in range(N):
        if i%2 == 0:
              ^
------------------------------------------------------------

x.pyx:3:15: Calling gil-requiring function not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
cdef void func(int N) nogil:
    for i in range(N):
        if i%2 == 0:
           ^
------------------------------------------------------------

x.pyx:3:12: Calling gil-requiring function not allowed without gil

Cython version 0.29.16
Thanks beforehand,
Kirill

The difference between the two functions is way larger than it seems. & never fails, but division needs to raise an exception when dividing by 0. And that exception cannot be propagated to the caller due to the void return, so Cython will try to print it.
You can disable division safety by switching on cdivision.

@scoder, thanks for clarifying. What could be improved here is that division by non-zero constant never fails and so can never raise exception.

(it thus could be proved to not require the GIL at all and work out of the box)

What could be improved here is that division by non-zero constant never fails and so can never raise exception.

True.  But it does have an impact on nogil code.
PR welcome.

Hang on – this is already implemented:
https://github.com/cython/cython/blob/192925d8800421a791a783307118246b9c3d922f/Cython/Compiler/ExprNodes.py#L11530-L11533
Maybe it's really just the GIL checks that are wrong here?

@scoder thanks for reopening and for the code link. /cc @samaingw

/cc @xavth

Coming back to this, the issue seems to be the type inference for the loop variable. I guess it considers % an unsafe-enough operation to infer i as a Python variable, which then leads to the errors you got.
I think this can be improved. At least some cases of division and modulo should be considered safe.
PR welcome. See MarkOverflowingArithmetic.visit_BinopNode() in TypeInference.py. Tests can go into overflow_check.pxi (which is included and tested against different integer types) and type_inference.pyx. You can look at constant node values with .has_constant_result() and .constant_result.

@scoder, thanks for your guidance.


Pass template for columns as input property of ngx-datatable

I'm submitting a ...  (check one with "x")
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior
Apply template for each column only as content of ngx-datatable
Expected behavior
Pass a templateRef of all columns  as a input property,  could be columnTemplates that read the content list of DataTableColumnDirective and recived as property.
Reproduction of the problem
new feature idea...
What is the motivation / use case for changing the behavior?
I like to make dynamic columns templates to the same table configuration.

Table version: 10.4.0
Angular version: 4.4.6

Isn't that what you were looking for? https://github.com/swimlane/ngx-datatable/blob/master/demo/templates/template-obj.component.ts

Yes, i did something similar and i used the the  cellTemplateproperty of the  DataTableColumnDirective
thanks


python3Packages.pywemo: fix tests

Motivation for this change
Testdriving https://github.com/pywemo/pywemo/issues/264.
Adds a patch that flushes the db, before relying on it during further
tests.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Needs more people to build it, the test is flaky and could just by shy.

Result of nixpkgs-review pr 119882 run on x86_64-linux 1

3 packages built:

home-assistant
python38Packages.pywemo
python39Packages.pywemo

Also worked for me.


dx-data-grid Angular2

In Angular 1, I managed to implement DevExtreme alongside SignalR to continuously update a dx-data-grid with data which was displaying ticking data from the server. To get this to work, on the SignalR callback, I had to wrap the update of the values of the array in a $scope.$apply() to automatically push the results into the UI.
I'm not sure on the whole digest or cycle methodology in Angular 2, but my understanding was that the equivalent would be zone.run(() => {} ); Wrapping my updates in this does not update the grid and therefore my grid can currently only be bound to data generated outside of SignalR.
Can you please let me know the relevant way to satisfy my requirement? I think that it's the last outstanding issue in migrating a quite complex system to use entirely DevExtreme controls with Angular 2 RC6.
thanks !

Hi,
Angular 2 automatically applies changes to UI. No more $scope.$apply(). In your class superGrid you have a property "aGreatDataSource". In your html you bind that property to dxdatagrid datasource like this: <dx-data-grid             [dataSource]='aGreatDataSource' [...]
When you change "aGreatDataSource" it will be publish into the UI.
I Suggest you to go throw Observables and Async pipe of Angular2.

Create a service that return an Observable.
Use the Async pipe inside de html: <dx-data-grid             [dataSource]='aGreatDataSource | Async' [...]
Your SingalIR will push the data -> change the observable -> Updates de UI asynchronously.

I have found a perfect example for you: https://blog.sstorie.com/integrating-angular-2-and-signalr-part-2-of-2/
Good Luck!

That was my understanding of the mechanics of Angular2, but I simply cannot work out why the grid is not updating and therefore my last thought was to try and replicate the $scope.$apply through zone.run, since I had a similar problem before I used $scope.$apply in Angular 1.
I already have a typescript-ed SignalR service which was working in Angular 1 and was easily transferable to Angular 2 without the need for refactoring to use Observables. I can see that this is working when I replace the grid with a simple html table with ngFor for the rows.
Find below snippets of the code:
the non-working html:

        <dx-data-grid
                        [dataSource]='trades | async'
                        [columns]='[
                                    { dataField: "Asset", alignment: "center" },
                                    { dataField: "Bid", alignment: "center" },
                                    { dataField: "Ask", alignment: "center" },
                                    { dataField: "Time", alignment: "center", dataType: "date" }
                                   ]'>

        </dx-data-grid>

functional alternative html:

                Asset
                Bid
                Ask
                Time

                    {{trade.Asset}}

                    {{trade.Bid}}

                    {{trade.Ask}}

                    {{trade.Time}}

component.ts

export class TradeViewModel {
    public trades: TradePrice[] = [];

    constructor(_signalRService: TradeHubProxy) {
        var tradeItems = this.trades;
        var self = this;

        _signalRService.registerCallback(function (asset, bid, ask, time) {
            var item = tradeItems.filter(t =>t.Name == asset.Name)[0];
            if (item == undefined) {
                    var mpvm = new TradePrice(asset, bid, ask, time);
                    tradeItems.push(mpvm);
              }
            else {
                    item.SetBidAsk(bid, ask, time);
             }
        });
    }

I've tried with and without the "| async". Using the " | async" makes the grid disappear completely without an exception. Without the " | async", I see the grid but it doesn't update.
FYI a further problem which I noticed: even with data generated outside SignalR, was that I could not use the DxDataGrid without a preceding

 in the .html file. The example in GitHub works because there is a div element above the dx-data-grid. Without the div, if the array is empty, I see no headers at all, but once I add data into the array, I can see the table headers but the row entries never show up in the dx-data-grid. With the div above the data grid, I finally see the headers and the data as anticipated.
Sorry to not provide a plunker but the project is fairly large! Plus I think I am missing something very trivial here.
Thank you for your prompt response!

Hi,
The Async pipe only works if the datasource is a Promise or an Observable. It makes the async subscription and updates the value automatically. I think you are pushing your values inside tradeItems, not in trades.
 _signalRService.registerCallback( (blabla) =>{
       this.trades.push(new TradePrice(blabla));
        });

In case you need to invoke angular 2 change detection you should inject it and use it:

ChangeDetectorRef.detectChanges() - similar to $scope.$digest()

I am also having problems with the grid not showing the data.
It creates one

 element for every entry of my array.
I also had to put a div element before the grid for it to show the rows.  Otherwise the grid only shows the  header.

Add this css rule:
.dx-datagrid {
display: block;
}
If you are not using Chrome this could be your issue #45
I am too using Angular 2.0.0 in a very complex project and it's working. A simple example of a grid:
<dx-data-grid [ngStyle]="{'display': 'block'}"
[columns]='columnsByFormat'
[dataSource]='dataSourceContainer'>

In my class i have both properties columnsByFormat and dataSourceContainer. When i change the properties the grid updates and render the layout properly.
Hope it helps

can you provide a more elaborate sample of your typescript?
I had to use the "tradeItems.push()" because the "this" has a different meaning inside the callback function and therefore "trades" is undefined - however, it relates to the same underlying referenced object. I believe this is standard java script behaviour for callback functions and I had to do the same in Angular 1, so I believe that the bound array is indeed updating correctly through this indirect approach. To provide another hypothesis - I tried an alternative method which was to just bind a button click to a method which would directly update the array with some simple values. However, it does work during the initialization of the component if I stick the push directly inside the constructor or ngInit().
I've tried using the observable with the async pipe and no luck. Neither did ChangeDetectorRef.detectChanges().
I would be very interested to see how you changed the properties.
thanks for your feedback

To make 'this' the correct 'this' i use the arrow function. Look at my code (blabla) => {this.property}
You can use bind(this) too:
Http://stackoverflow.com/questions/37362178/this-scope-in-typescript-callback-function
Regards

I've edited my code to use the arrow function which works perfectly in the sense that the array is  now properly updated from within the callback function whilst using the "this" function rather than my indirect reference. However, I still experience the same issue with the dx-data-grid.
I did also try to update the grid using just a simple button which was bound to the component, and I received the same result of no grid update (with and without observables, with and without async pipes, with and without Detect Change), and I still get working behaviour only when I edit the array from the constructor or ngInit method
thanks!

I have it working like this:
[columns]='columnsByFormat'
[dataSource]='dataSourceContainer'
And in my component
ngAfterViewInit() {
this.setColumnsByFormat();
}
let formatColumns: Array<DevExpress.ui.dxDataGridColumn> = [];
formatColumns = [
{ dataField: 'id', dataType: 'number', caption: 'Id', visible: false },
{ dataField: 'alarm__UserCreation__Name', dataType: 'string', caption: 'User'},
{ dataField: 'alarm__DateCreated', dataType: 'date', format: 'dd/MM/yyyy HH:mm', caption: ' Created', alignment: 'center', width: 110 },
];
//Se asignan las columnas calculadas al valor que después se va a pasar a la rejilla. En teoría se deberían cambiar sin problemas en cualquier momento
this.columnsByFormat = formatColumns;

Ok so to roll back all the way to the code which was working in Angular1 with some basic additions for Angular 2.
grid.html:

    <dx-data-grid
                    [dataSource]='trades'
                    [columns]='[
                                { dataField: "AssetName", alignment: "center" },
                                { dataField: "Bid", alignment: "center" },
                                { dataField: "Ask", alignment: "center" },
                                { dataField: "Time", alignment: "center", dataType: "date" }
                               ]'>

    </dx-data-grid>

component.ts

import {Component, Inject} from '@angular/core';
import {TradePrice} from './Models/TradePrice';

import { DevExtremeModule } from '../../../dist';
import { NgModule }      from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { TradeHubProxy } from './../Services/SignalR/signalr.tradeHub.proxy.service';
import { CommonModule } from '@angular/common';

@Component({
    selector: 'grid-view',
    templateUrl: '/Content/Templates/Angular2/grid.html'
})

@NgModule({
        imports: [BrowserModule, CommonModule],
    bootstrap: [TradeViewModel],
    declarations: [TradeViewModel, DevExtremeModule],
})

export class TradeViewModel {
    public trades: TradePrice[] = [];
    constructor( @Inject(TradeHubProxy) private _signalRService: TradeHubProxy) {
        super();

        this._signalRService.registerCallback((asset, bid, ask, time) => {
            var item = this.trades.filter(id => id.Name === asset.Name)[0];
            if (item == undefined) {
                var mpvm = new new TradePrice(asset, bid, ask, time);
                this.trades.push(mpvm);
            }
            else {
                item.SetMonitoredBidAskEntry(bid, ask, time);
            }});

    }

};

DevextremeModule should be inside Imports, not declarations

My bad - I updated the component but still not working. Tried as shown above, then with zone.run and detectChange

Hi,
There is a known problem with the Devextreme components receiving collections. #53 . The Devextreme team are resolving this issue here today #112.
If you clone the array, it should work.

Ok great - my updates are now feeding through, but I suppose I need to wait for the fix though because I need the utmost efficiency and cloning a grid of 1000's of items every second is not a solution I can use.
Do you mean they are releasing the fix today or just working on it?
Thanks for your help!

Great! It's a pleasure to help. I've been figthing so much since the first angular 2 alphas release!
You always can refresh the dxDataGrid manually if you have such a big array:
@ViewChild(DxDataGridComponent) dataGrid: DxDataGridComponent;
(<DevExpress.ui.dxDataGrid>this.dataGrid.instance).refresh();
This solves your ploblem. My information is the same you have. That #112 ^_^

If you refresh the grid manually you can push elements into the array and after that refresh the grid.

Thanks for pushing for Angular 2! I'm finding my project much smaller and maintainable and there are just a few tweaks needed for dx, on the whole it seems to be quite functional in Angular2 already.
With regards to grid refreshing - I used this feature in Angular 1, and it results in a lock of the grid with an overlay displaying a "loading" image, making the existing items in the grid un-viewable and un-clickable. My users need to be able to see continuously ticking data and click any item, on an intra-second timescale and that functionality is the most important one for my project. I suspect this is by design therefore I would expect the same behaviour in Angular2. Therefore, the only alternative to really update the grid without regenerating it entirely is through the collection watchers which work in angular1 (despite the caveat of needing to use $scope.$apply()) and knockoutjs through the observables. I hope that the collection watcher will be fixed in Angular2 in a way which doesn't require the injection of $scope like objects or manually triggering update events - that will be a massive win in the migration.

Hi,
Have you try loadPanel options on dxDataGrid?
loadPanel: {
enabled: true,
text: 'Formatting',
showPane: true,
showIndicator: true
},
If you disable it, maybe you have your desire result.

It works a lot better with refresh plus the load panel disabled. Thanks so much!

Another few questions actually:

I noticed in another thread, you also had an issue with (onCellClick). I took only the dx.all file which they posted a few days ago, but I still have the same issue. Was that all you had to grab?

Have you noticed any issues with using jquery inside the grid? I had a .animate function on the cellElement which was being passed by the onCellChanged($event). It seems non-functional now, almost as if the function is blocked.

Not regarding dx-data-grid, but any other list based controls, eg dx-combo-box and dx-tree-view, if I press the dropdown triangle, it instantly expands then contracts the control. For the tree-view, I can drop it down by clicking the item rather than its drop down, however on the combo-box, a similar work around does not quite work, so I can never actually see the elements inside the combo-box. Is there something that I'm missing on those widgets?

thx

Hello,

Yes. Only that file. Get the one inside of the zip posted by dokarus. https://github.com/DevExpress/devextreme-angular2/files/476578/issue089.zip

I Don't use JQuery. I had to import it because these components need it. I do the things the Angular way when it is possible. I haven't use that event by the moment but normally i can modify the elements without problems "e.rowElement.css('background', 'blue');".

I'm using dx-select-box, dx-lookup, dx-tree-view without problems.

Regards!

I have still trouble getting the data grid to work.
The grid is showing the correct number of rows, however, the inner Html of the columns is set on &nbsp, showing nothing.
I know for sure that the grid gets the data-source.
Can anybody help?

Okay, the column names had to match the datasource-property-names.
That was it.
Cheers!

Regarding dx-data-grid again - any idea how the "dx-item-alias" maps in Angular2? Or if I can reference "this row's object" in a dxTemplate?  At the moment, when I use a cellTemplate, I have to use a dataField and the dxTemplate has access to only the property exposed in the dataField, whereas I would like all properties in each row.
EG before, I had a case where the template could contain:
{{item.Instrument}} - {{item.Bid}}
where "item" was the dx-item-alias for each grid row.
However, according to the sample, the usage is as follows:
dataField: "PropertyName", cellTemplate: "templateName"

{{cellData.value}}

and cellData.value = PropertyName
Therefore with the example provided, I am limited to only referencing one property in my template when I need more than one of the properties.
thanks !

Hi,
cellData is a complex object and you can access all of its properties. For instance:
{{cellData.data.Instrument}} - {{}cellData.data.Bid}
or {{cellData.values[2]}}
Regards

It looks like the issue is resolved. @lloydie3 please refer to this readme section.  For instance, you can declare a gird as follows:
<dx-data-grid
    [columns]="[
        "CompanyName",
        {
            dataField: "Phone",
            cellTemplate: "phoneCellTemplate"
        }
    ]"
    [dataSource]="customers">

        <dx-button (onClick)="callNumber(cellData.value)" [text]="cellData.text"></dx-button>

</dx-data-grid>

The cellData variable in this template declaration *dxTemplate="let cellData of 'phoneCellTemplate'" is an analog to dx-item-alias in the Angular 1 integration. I'm closing this issue. If you still have questions do not hesitate to reopen it.


tree borrows: add a test to sb_fails

This is something that happens in the wild (https://github.com/rust-lang/rust/issues/121626), so TB accepting this is good. Let's make sure we notice if this ever changes.

@bors r+

:pushpin: Commit d9968fa7e1db7fd300bb8c32902e63347f0754c4 has been approved by RalfJung
It is now in the queue for this repository.

:hourglass: Testing commit d9968fa7e1db7fd300bb8c32902e63347f0754c4 with merge f38d411be063e979475914c651aa026ec8a89729...


Prom testutil nonvecfix

Closes #
💸 TL;DR

Added non-vector metrics to be testable with the same Prometheus testutil. Added less-then/greater-than/less-then-or-equal/greater-then-or-equal delta testutil functions.
📜 Details
Design Doc
Jira

🧪 Testing Steps / Validation

✅ Checks

[ x ] CI tests (if present) are passing
[ x ] Adheres to code style for repo
[ x ] Contributor License Agreement (CLA) completed if not a Reddit employee

👋 hey @vendelin8 – we have a new internal package to test prometheus metrics that you may be able to use instead. Will follow up with you in DM.


Grafana & Caddy service is instantly terminating

Hi there,
I am facing this from 13th April 2020 at night. I had enabled the SMTP configuration in the docker-compose file & restarted the docker stack. From that time Grafana & caddy service are not getting started. Also, i had reverted my changes & restarted the stack again. But the same issue.
krips6tzijh3        mon_caddy              replicated          0/1                 stefanprodan/caddy:latest                      *:3000->3000/tcp, *:9090->9090/tcp, *:9093-9094->9093-9094/tcp
mzajp92kl0gn        mon_grafana            replicated          0/1                 stefanprodan/swarmprom-grafana:5.3.4

Running to Ready & vice versa is happening for Grafana & caddy services. Other than these all services are in the running stage.

I got this error after playing with weave works. Even after pruning the swarm, weave works container was still running. See if you have any bad containers hanging around.


Travis script updates

Set testing against environments that matter today - NodeJS 0.10, 0.12, 4.x and 5.x
Moved the same environment settings into their own section
Added support for the new Travis CI containment mode: sudo: false

thanks

You are welcome! And since you are the account owner, I think there must be a way for you to re-run checks on all the PR-s that failed before ;)


[Code Addition Request]: Add Hangman game in python

Have you completed your first issue?

[X] I have completed my first issue

Guidelines

[X] I have read the guidelines
[X] I have the link to my latest merged PR

Latest Merged PR Link
#534
Project Description
This is a simple Hangman game implemented in Python using the Tkinter library. Players guess letters to uncover a hidden word before running out of attempts.
Full Name
Shubh Agarwal
Participant Role
GSSOC Contributor

@shubhagarwal1 there is already a Hangman Game in this repo, so what you are planning to addon on to that project?

@shubhagarwal1 there is already a Hangman Game in this repo, so what you are planning to addon on to that project?

i am planning to add a new version of the app, with updates

@shubhagarwal1 there is already a Hangman Game in this repo, so what you are planning to addon on to that project?

i am planning to add a new version of the app, with updates

I am assigning this issue to you and label in under level2 as you said you will add features in the existing code but if you create a new project for this then I will update the level to level1.

@shubhagarwal1 there is already a Hangman Game in this repo, so what you are planning to addon on to that project?

i am planning to add a new version of the app, with updates

I am assigning this issue to you and label in under level2 as you said you will add features in the existing code but if you create a new project for this then I will update the level to level1.

i will make sure to add the new version of the game application.


fix(core): fix RPCs to work correctly on IL2CPP backend.

This computes RPC handles per-type, as discussed, and only adds performance RPC delegates per-instance.  I generally tried to clean things up and move code closer to data.  Also optimized a few minor things along the way.  (BTW, I don't understand how your recursive method fetcher worked without BindingFlags.DeclaredOnly -- please double-check that my re-implementation still does what you intended.)
I generally tried to follow the surrounding code style, but probably got some things wrong because it's radically different from my preferred one.
Tested with my stub of a game, but more tests would certainly be helpful.  If you happen to have any performance tests squirreled away then I'd test for regressions there too, just in case.

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


Investigate using eBPF for b-tree lookups

One interesting thing eBPF can do for storage devices is in-kernel b-tree lookups:
https://www.asafcidon.com/uploads/5/9/7/0/59701649/xrp.pdf
Let's look at what it takes to integrate this type of (optional) storage engine optimization.

I want to work on this feature

@andresetevejob Please do. I opened this ticket for tracking the idea, but don't have immediate plans to work on it myself.

how this ticket can be assign to me ?


LNK2019: Unresolved external symbol QtNodes::CreateCommand in DropGraphicsView.cpp

Hello, I would like to express my appreciation to the project owner for initiating such a valuable project. Currently, I am encountering a challenge involving unresolved linker errors (LNK2019) when attempting to utilize the CreateCommand constructor within DropGraphicsView.cpp. The full error message is :
DropGraphicsView.cpp.obj:-1: error: LNK2019: symbole externe non r‚solu "public: __cdecl QtNodes::CreateCommand::CreateCommand(class QtNodes::BasicGraphicsScene *,class QString,class QPointF const &)" (??0CreateCommand@QtNodes@@QEAA@PEAVBasicGraphicsScene@1@VQString@@AEBVQPointF@@@Z) r‚f‚renc‚ dans la fonction "public: void __cdecl DropGraphicsView::placeNodeInScene(class QString const &,class QPoint const &)" (?placeNodeInScene@DropGraphicsView@@QEAAXAEBVQString@@AEBVQPoint@@@Z)
Environment
Using Qt Creator for building with Qt 6.5.6 MSVC 2019 64-bit.
Additional Context
Commenting out this line resolves the issue. However, I miss the functionality of using TreeView to create a node.

This error is related due to a build error in the QtNodes library in MSVC... is a linkage error, I will take a look at the QtNode lib and check if there is something related

@rachid-benabdelmalek sorry for the delay, did you find the solution or what did you encounter?


No longer able to install Salesforce CLI on alpine linux (Docker): "env: unrecognized option: S"

Summary
We run all of our builds in Docker containers using Alpine linux as the base operating system. Since last week our build has started failing - SF will no longer run.
The error message is:
"env: unrecognized option: S"
I've done some investigation, it looks like #!/usr/bin/env node changed to #!/usr/bin/env -S node --no-deprecation as part of this PR: https://github.com/salesforcecli/cli/pull/1971/files. This makes use of the -S option in env but this option isn't available on all operating systems. In particular, this isn't available in Busybox which is what's used in Alpine Linux.
Please could you revert this changes and look to implement another way without use of -S?
Version: 2.69.14
Update:
I have worked around this by adding coreutils (apk add coreutils) into the image. This has the newer version of env which supports the -S argument.
This could still be other cases of the same issue.

I've been playing around with this for a while but can't think of a way to make it work on macos/ubuntu and busybox's env...
even in latest busybox, env is pretty limited and shebang line behave different, can't inline env vars like this:
/ # /usr/bin/env TEST=1 node
Welcome to Node.js v22.12.0.
Type ".help" for more information.
> process.env.TEST
'1'

the suggested way of doing this cross-platform seems to be making a script (sh would be more "portable" and work with alpine), see: https://unix.stackexchange.com/questions/20880/how-can-i-use-environment-variables-in-my-shebang
Given Alpine linux isn't really supported by us (you can't use the official installers, require node's alpine which isn't tier 1 supported) I'm not sure if we would make such a big change like that, we'll discuss with the team what are the options and get back.


Find new build process for Fortran libraries

The babelizer uses numpy.distutils to build Fortran libraries. In Python 3.10, numpy.distutils has been deprecated in favor of setuptools, and it will be removed entirely in Python 3.12. While setuptools has incorporated much of numpy.distutils, it's not a complete replacement. Significantly, it will not include Fortran build support.
We need to find a new way to build Fortran libraries through the babelizer.

Some recommendations from NumPy on migrating to something new. I'm just going to copy/paste this verbatim.
Migration advice
It is not necessary to migrate immediately - the release date for Python 3.12 is October 2023. It may be beneficial to wait with migrating until there are examples from other projects to follow (see below).
There are several build systems which are good options to migrate to. Assuming you have compiled code in your package (if not, we recommend using Flit) and you want to be using a well-designed, modern and reliable build system, we recommend:

Meson
CMake (or scikit-build as an interface to CMake)

If you have modest needs (only simple Cython/C extensions, and perhaps nested setup.py files) and have been happy with numpy.distutils so far, you can also consider switching to setuptools. Note that most functionality of numpy.disutils is unlikely to be ported to setuptools.

A blog post on Meson, Fortran, and Cython.

Thanks for looking into this @mdpiper! I started down this road a couple months ago trying to get mesas to build on conda-forge. Although, in the end, I got it to build, I found all the options to be rather overwhelming. Even though the use-case is different than what we're trying to do with the babelizer, maybe there is something you can use in the mesas feedstock. I ended up using cmake because I was trying to get it to build with minimal changes to the existing code base but I'm not sure that is necessary for us.
Godspeed.

A note for posterity on behavior related to this issue.
Building a babelized Fortran project was failing yesterday. I think the issue was setuptools silently overwriting parts of numpy.distutils (see https://github.com/pypa/setuptools/issues/3532 and https://github.com/pypa/setuptools/pull/3505). Here's the key from the traceback:
File "/private/var/folders/_y/rmt8prks4rgd6wwjxmbssk800000gn/T/pip-build-env-llql5toh/overlay/lib/python3.10/site-packages/numpy/distutils/mingw32ccompiler.py", line 28, in <module>
  from distutils.msvccompiler import get_build_version as get_build_msvc_version
ModuleNotFoundError: No module named 'distutils.msvccompiler'

I fixed the issue by rolling back to setuputils<60.0. However, the problem seems to have resolved on its own overnight. Perhaps a library was updated? I've saved logs from failed and successful builds, so I'll compare them.
I don't think this merits a separate issue, since this issue (i.e., #77) will supersede it. However, I wanted to note it in case I see it again.

I think the issue was setuptools silently overwriting parts of numpy.distutils

Technically, what happened is that setuptools intentionally overwrites all of distutils, and numpy.distutils modifies some of distutils, and it's all libraries modifying each other all the way down.

Perhaps a library was updated?

setuptools broke API. Setuptools then reverted the breakage.
...
In general, the complexity of this interconnected stack is the reason numpy has deprecated numpy.distutils, and recommends that people pin setuptools < 60.0 in the short term while exploring other options.

@eli-schwartz Thank you very much for clearly explaining this. I appreciate your help!

🚨 I created an example of building a model--written in Fortran and wrapped in Python with the babelizer--with meson-python. See https://github.com/mdpiper/pymt_heatf. I think it can be used as a prototype for moving the babelizer from numpy.distutils to Meson for Fortran models. (And possibly for C/C++ models, as well!)


Created feedback section, aligned footer and added social media link.

Fixed Issue #22
Changed:
Created a feedback section in main page to make website attractive.

Aligned footer properly and added social media icons to it.

Note: All lines of code is original content and follows the website coding pattern.

Kindly accept this PR @Anishkagupta04

there is an conflicting raising in the code pls see to it

Okay @Anishkagupta04 I am resolving it.


docs, readme: remove docs and add security directory

Signed-off-by: lilin90<EMAIL_ADDRESS>
What problem does this PR solve?
Problem Summary: Currently, TiKV documentation is maintained in tikv/website (what is displayed on tikv.org). But changes are still made to the docs directory and some content and links are outdated or broken in this tikv repo.
What is changed and how it works?
What's Changed:

Remove the docs directory (Applicable changes had been migrated to tikv/website in https://github.com/tikv/website/pull/211)
Create the security directory and move SECURITY.md (previously in the root dir) & Security-Audit.pdf (previously in the docs dir) into it
Update wording in CONTRIBUTING.md and move one sentence to another section

Related changes

PR to update pingcap/docs/pingcap/docs-cn: N/A
PR to update pingcap/tidb-ansible: N/A
Need to cherry-pick to the release branch: N/A

Check List
Tests

No code

Release note
N/A

/merge

/merge

/merge

/merge


Use the default update-electron-app for triggering automatic updates

Currently we are using the electron-simple-updater library to automatically pull updates off of GitHub releases.  It would be nice to switch to the default electron library instead: https://github.com/electron/update-electron-app
At the same time, it would be good to also enhance the update workflow so that the user is notified when an update to the app begins to download (in addition to the dialog that pops at the end of the download to restart the app).

So, as of https://github.com/cerner/cucumber-forge-desktop/pull/16 we have a decent system of auto-updating on Windows and also at least automatically notifying OSX/Linux users that there is a new version.
Before moving ahead on this issue we would need to determine if we could at least get similar functionality for OSX/Linux where the user is notified automatically that there is a new version available.  (At this point update-electron-app does not support actually auto-updating the app, similar to electron-simple-updater [though ESU theoretically can auto-update for certain linux package types...].  The UEA also does support auto-updating OSX apps without having a signed executable, again similar to what we have with ESU.)
So, the TLDR here is that switching to use update-electron-app is still on the table, but we need to make sure we have at least cross-platform feature parity before we do it.


XLA Padding Causing OOM

Provide as much information as possible. At least, this should include a description of your issue and steps to reproduce the problem. If possible also provide a summary of what steps or workarounds you have already tried.
Problem you have encountered:
Flax does 32x and 128x expansion, causing the TPUs to run out of memory.
What you expected to happen:
Flax should be able to successfully allocate this memory, like how it does on CPUs and GPUs.
Logs, error messages, etc:
Total hbm usage >= 11.47G:
    reserved        530.00M
    program          10.96G
    arguments            0B

Output size 0B; shares 0B with arguments.

Program hbm requirement 10.96G:
    global             4.0K
    HLO temp         10.96G (1.2% utilization: Unpadded (140.25M) Padded (10.96G), 0.0% fragmentation (0B))

  Largest program allocations in hbm:

  1. Size: 8.77G
     Operator: op_type="conv_general_dilated" op_name="jit(conv_general_dilated)/conv_general_dilated[\n  batch_group_count=1\n  dimension_numbers=ConvDimensionNumbers(lhs_spec=(0, 4, 1, 2, 3), rhs_spec=(4, 3, 0, 1, 2), out_spec=(0, 4, 1, 2, 3))\n  feature_group_count=1\n  lhs_dilation=(1, 1, 1)\n  lhs_shape=(1, 8, 2176, 1056, 2)\n  padding=((1, 1), (1, 1), (0, 0))\n  precision=None\n  preferred_element_type=None\n  rhs_dilation=(1, 1, 1)\n  rhs_shape=(3, 3, 1, 2, 1)\n  window_strides=(1, 1, 1)\n]" source_file="/home/nikhil/.local/lib/python3.8/site-packages/flax/linen/linear.py" source_line=282
     Shape: f32[8,2176,8,132,1]{4,2,3,1,0:T(8,128)}
     Unpadded size: 70.12M
     Extra memory due to padding: 8.70G (128.0x expansion)
     XLA label: %fusion = f32[8,2176,8,132,1]{4,2,3,1,0:T(8,128)} fusion(bf16[8,2176,8,132,2]{2,4,3,1,0:T(4,128)(2,1)} %copy.10, bf16[3,3,1,2,1]{4,3,2,1,0:T(4,128)(2,1)} %copy.11), kind=kOutput, calls=%fused_computation, metadata={op_type="conv_general_dilated" op_name="j...
     Allocation type: HLO temp
     ==========================

  2. Size: 2.19G
     Shape: bf16[8,2176,8,132,2]{2,4,3,1,0:T(4,128)(2,1)}
     Unpadded size: 70.12M
     Extra memory due to padding: 2.12G (32.0x expansion)
     XLA label: %copy.10 = bf16[8,2176,8,132,2]{2,4,3,1,0:T(4,128)(2,1)} copy(f32[8,2176,8,132,2]{1,4,3,2,0:T(2,128)} %bitcast)
     Allocation type: HLO temp
     ==========================

  3. Size: 4.0K
     Shape: u32[8,128]{1,0}
     Unpadded size: 4.0K
     XLA label: constant literal
     Allocation type: global
     ==========================

The stack trace below excludes JAX-internal frames.
The preceding is the original exception that occurred, unmodified.

RuntimeError: RESOURCE_EXHAUSTED: Ran out of memory in memory space hbm. Used 10.96G of 7.48G hbm. Exceeded hbm capacity by 3.47G.

Total hbm usage >= 11.47G:
    reserved        530.00M
    program          10.96G
    arguments            0B

Output size 0B; shares 0B with arguments.

Program hbm requirement 10.96G:
    global             4.0K
    HLO temp         10.96G (1.2% utilization: Unpadded (140.25M) Padded (10.96G), 0.0% fragmentation (0B))

  Largest program allocations in hbm:

  1. Size: 8.77G
     Operator: op_type="conv_general_dilated" op_name="jit(conv_general_dilated)/conv_general_dilated[\n  batch_group_count=1\n  dimension_numbers=ConvDimensionNumbers(lhs_spec=(0, 4, 1, 2, 3), rhs_spec=(4, 3, 0, 1, 2), out_spec=(0, 4, 1, 2, 3))\n  feature_group_count=1\n  lhs_dilation=(1, 1, 1)\n  lhs_shape=(1, 8, 2176, 1056, 2)\n  padding=((1, 1), (1, 1), (0, 0))\n  precision=None\n  preferred_element_type=None\n  rhs_dilation=(1, 1, 1)\n  rhs_shape=(3, 3, 1, 2, 1)\n  window_strides=(1, 1, 1)\n]" source_file="/home/nikhil/.local/lib/python3.8/site-packages/flax/linen/linear.py" source_line=282
     Shape: f32[8,2176,8,132,1]{4,2,3,1,0:T(8,128)}
     Unpadded size: 70.12M
     Extra memory due to padding: 8.70G (128.0x expansion)
     XLA label: %fusion = f32[8,2176,8,132,1]{4,2,3,1,0:T(8,128)} fusion(bf16[8,2176,8,132,2]{2,4,3,1,0:T(4,128)(2,1)} %copy.10, bf16[3,3,1,2,1]{4,3,2,1,0:T(4,128)(2,1)} %copy.11), kind=kOutput, calls=%fused_computation, metadata={op_type="conv_general_dilated" op_name="j...
     Allocation type: HLO temp
     ==========================

  2. Size: 2.19G
     Shape: bf16[8,2176,8,132,2]{2,4,3,1,0:T(4,128)(2,1)}
     Unpadded size: 70.12M
     Extra memory due to padding: 2.12G (32.0x expansion)
     XLA label: %copy.10 = bf16[8,2176,8,132,2]{2,4,3,1,0:T(4,128)(2,1)} copy(f32[8,2176,8,132,2]{1,4,3,2,0:T(2,128)} %bitcast)
     Allocation type: HLO temp
     ==========================

  3. Size: 4.0K
     Shape: u32[8,128]{1,0}
     Unpadded size: 4.0K
     XLA label: constant literal
     Allocation type: global
     ==========================

Steps to reproduce:
I'm having trouble getting FLAX to work on Colab. If I get that working, I'll create a colab notebook.

Hi, could you add a code snippet?

Here's some code that should recreate the same issue:
import jax
from tqdm import tqdm
from jax import jit
import numpy as np
import jax.numpy as jnp
from flax import linen as nn
from flax.training import train_state
from flax import optim
import optax
from flax.training import train_state

from tensorflow.keras.utils import Sequence
class Dataset(Sequence):
    def __init__(self, batch_size):
        self.batch_size = batch_size

    def __len__(self):
        return 1000

    def __getitem__(self, i):
        return np.zeros((8, 2048, 1952, 2, 1))

rng = jax.random.PRNGKey(0)
rng, key = jax.random.split(rng)

def conv_and_pool(layer, features, kernel_size):
	x = nn.Conv(features=features, kernel_size=kernel_size)(layer)
	x = nn.relu(x)
	x = nn.max_pool(x, window_shape=(1, 2, 2), strides=(1, 2, 2), padding="SAME")
	#print(x.shape)
	return x

def convtrans_layer(layer, features, kernel_size):
  x = nn.ConvTranspose(features, kernel_size=kernel_size, strides=(1, 2, 2), padding="SAME")(layer)
  x = nn.relu(x)
  return x

class Encoder(nn.Module):
	@nn.compact
	def __call__(self, input_layer):
		x = conv_and_pool(input_layer, features=2, kernel_size=(3, 3, 1))
		x = conv_and_pool(x, features=4, kernel_size=(3, 3, 1))
		x = conv_and_pool(x, features=8, kernel_size=(3, 3, 1))
		x = conv_and_pool(x, features=16, kernel_size=(3, 3, 1))
		x = conv_and_pool(x, features=32, kernel_size=(3, 3, 1))

		return x

class Decoder(nn.Module):

	@nn.compact
	def __call__(self, input_layer):
		x = convtrans_layer(input_layer, 32, kernel_size=(3, 3, 1))
		x = convtrans_layer(x, 16, kernel_size=(3, 3, 1))
		x = convtrans_layer(x, 8, kernel_size=(3, 3, 1))
		x = convtrans_layer(x, 4, kernel_size=(3, 3, 1))
		x = convtrans_layer(x, 2, kernel_size=(3, 3, 1))
		x = nn.Conv(1, (3, 3, 1), padding="SAME")(x)

		return x

class Autoencoder(nn.Module):
	def setup(self):
		self.encoder = Encoder()
		self.decoder = Decoder()

	def __call__(self, x):
		out = self.encoder(x)
		reconstructed = self.decoder(out)
		return reconstructed, x

	def generate(self, x):
		params = self.get_param("decoder")
		return Decoder.call(params, x)

def compute_metrics(generated, real):
	error = generated - real
	loss = jnp.mean(jnp.square(error))
	metrics = {
		"loss": loss
	}
	return metrics

dataset = Dataset(8)

def train_step(state):
	def loss_fn(params):
		data = dataset[0]

		rec, out = Autoencoder().apply({"params": params}, data)
		loss = compute_metrics(rec, out)["loss"]
		print(loss)
		return jnp.array(loss)

	grads = jax.grad(loss_fn)(state.params)
	return state.apply_gradients(grads=grads)

print(f"{jax.device_count()} devices")

optimizer = optim.sgd.GradientDescent(learning_rate=0.01)
EPOCHS = 10

state = train_state.TrainState.create(
	apply_fn=Autoencoder().apply,
	params=Autoencoder().init(rng, dataset[0])["params"],
	tx=optax.sgd(0.01)
)

for epoch in range(EPOCHS):
	bar = tqdm(range(len(dataset)))
	for _ in bar:
		state = train_step(state)
		bar.set_description(f"Epoch {epoch}")

I'm running this on the TPU v2-8. I also got a similar issue using Tensorflow XLA (it didn't OOM, but it was really slow and was mallocing a lot of memory).
I also read this from A Google Cloud Performance Guide:

Arrays in the Cloud TPU are tiled. This entails padding one of the dimensions to a multiple of 8, and a different dimension to a multiple of 128. XLA performs data layout transformations and data is arranged in memory such that the hardware can efficiently process the data. These transformations are driven by heuristics. While they are beneficial in most cases, there is always potential for the compiler to do the wrong thing. To achieve the highest performance, it can be beneficial to experiment with different model configurations.

My data has a shape of (8, 2048, 1952, 2, 1), so this shouldn't be an issue (8 is the batch size, (2048, 1952, 2) is the actual shape).

I have a few clarifying questions:

It seems you aren't jiting your code, is this intended? You should jit it for the code to compile on TPU. However, your stack trace does seem to compile for TPU so I guess your code snippet is not correct?
Why are you expecting this to work? Did it work on GPU, if so, on which GPU?

Hmm, the code I sent doesn't seem to be working.
Try this out, this works on my 3070 in the tensorflow-gpu docker container:
import jax
from tqdm import tqdm
from jax import jit
import numpy as np
import jax.numpy as jnp
from flax import linen as nn
from flax.training import train_state
from flax import optim
import optax
from flax.training import train_state

rng = jax.random.PRNGKey(0)
rng, key = jax.random.split(rng)

def conv_and_pool(layer, features, kernel_size):
	x = nn.Conv(features=features, kernel_size=kernel_size)(layer)
	x = nn.relu(x)
	x = nn.max_pool(x, window_shape=(1, 2, 2), strides=(1, 2, 2), padding="SAME")
	#print(x.shape)
	return x

def convtrans_layer(layer, features, kernel_size):
  x = nn.ConvTranspose(features, kernel_size=kernel_size, strides=(1, 2, 2), padding="SAME")(layer)
  x = nn.relu(x)
  return x

class Encoder(nn.Module):
	@nn.compact
	def __call__(self, input_layer):
		x = conv_and_pool(input_layer, features=2, kernel_size=(3, 3, 1))
		x = conv_and_pool(x, features=4, kernel_size=(3, 3, 1))
		x = conv_and_pool(x, features=8, kernel_size=(3, 3, 1))
		x = conv_and_pool(x, features=16, kernel_size=(3, 3, 1))
		x = conv_and_pool(x, features=32, kernel_size=(3, 3, 1))
		#print("encoder")
		#print(x.shape) # == 68, 33, 2, 32

		return x

class Decoder(nn.Module):

	@nn.compact
	def __call__(self, input_layer):
		x = convtrans_layer(input_layer, 32, kernel_size=(3, 3, 1))
		x = convtrans_layer(x, 16, kernel_size=(3, 3, 1))
		x = convtrans_layer(x, 8, kernel_size=(3, 3, 1))
		x = convtrans_layer(x, 4, kernel_size=(3, 3, 1))
		x = convtrans_layer(x, 2, kernel_size=(3, 3, 1))
		x = nn.Conv(1, (3, 3, 1), padding="SAME")(x)
		#print("decoder")
		#print(x.shape)
		return x

class Autoencoder(nn.Module):
	def setup(self):
		self.encoder = Encoder()
		self.decoder = Decoder()

	def __call__(self, x):
		#print(args)
		#print(x)
		#print(kwargs)
		out = self.encoder(x)
		reconstructed = self.decoder(out)
		#print(f"out: {out}, rec: {reconstructed.shape}")
		return reconstructed, x

<EMAIL_ADDRESS>	def generate(self, x):
		params = self.get_param("decoder")
		return Decoder.call(params, x)

#@jit
def compute_metrics(generated, real):
	error = generated - real
	loss = jnp.mean(jnp.square(error))
	metrics = {
		"loss": loss
	}
	return metrics

class Dataset():
	def __init__(self):
		pass
	def __getitem__(self, i):
		return jnp.zeros((8, 2176, 1056, 2))

dataset = Dataset()

#@jit
def train_step(state):
	def loss_fn(params):
		data = dataset[0]
		#data = dataset[0][0]

		rec, out = Autoencoder().apply({"params": params}, data)
		#globals()["p"] = rec, out
		loss = compute_metrics(rec, out)["loss"]
		return jnp.array(loss)

	#optimizer, _, _ = optimizer.optimize(loss_fn)
	grads = jax.grad(loss_fn)(state.params)
	return state.apply_gradients(grads=grads)
	#return optimizer

<EMAIL_ADDRESS>#def eval_step(params, batch):
#  logits = CNN().apply({'params': params}, batch['image'])
#  return compute_metrics(logits, batch['label'])
print(f"{jax.device_count()} devices")

#_, autoencoder = Autoencoder.create_by_shape(KEY, [((2176, 1056, 2, 1), jnp.float32)])

optimizer = optim.sgd.GradientDescent(learning_rate=0.01)
EPOCHS = 10

state = train_state.TrainState.create(
	apply_fn=Autoencoder().apply,
	params=Autoencoder().init(rng, dataset[0])["params"],
	tx=optax.sgd(0.01)
)

for epoch in range(EPOCHS):
	bar = tqdm(range(100))
	for _ in bar:
		state = train_step(state)
		bar.set_description(f"Epoch {epoch}")

However, it doesn't work on the TPU and gives me the OOM error.

You should jit it for the code to compile on TPU
Will non-jitted code not run on the TPU?

You should jit it for the code to compile on TPU

Will non-jitted code not run on the TPU?

Yes it does run it on the TPU, but you should always jit the code so it can be optimized by the XLA compiler. You should try to jit compile large code chunks (e.g., a train step function), so the XLA compiler is able to apply optimizations such as fusions so your code will run faster and consume less memory.

I jitted all the big code blocks and it runs fine, so my initial question is answered. However, when I do this, I also want to track the loss after each batch. The issue is that with jit, I can't coerce the Traceds to ints, so I can print them. Is there a way I can do this?

Great, happy to hear it is resolved!
If you want to output the loss you can return it from the jitted function and output it then. This is done in all our example, I would recommend taking a look at the mnist example and the Annotated MNIST which contains more explanation.

I looked over the FLAX examples, but with my code:
        def loss_fn(params):
                data = dataset[0]
                #data = dataset[0][0]

                rec, out = Autoencoder().apply({"params": params}, data)
                #globals()["p"] = rec, out
                loss = compute_metrics(rec, out)["loss"]
                return jnp.array(loss)

        grads = jax.grad(loss_fn)(state.params)

I never actually return the loss, so I don't have a way to get the loss itself. Am I using the wrong Jax/Flax functions?

If you have taken a look at the examples, then you must have noticed that they don't use jax.grad, but jax.grad_and_value, which returns the gradient and the value. In your case you only return the gradient so you don't have the actual loss.

Thanks, that seems to get the loss and the grad.
Sorry to keep bothering you (especially since these questions aren't completely on topic) but this code
state = train_state.TrainState.create(
           apply_fn=Autoencoder().apply,
           params=Autoencoder().init(rng, dataset[0])["params"],
           tx=optax.sgd(0.01)
    )

which was in the main code (not in a function), was causing an OOM, so I wrapped that in a jitted main. However, now I can't print out the loss because I'm still inside jitted code. I tried creating the state in a jit function and getting the value into a non-jit function, but that still causes OOMs. Am I going about this the wrong way or is there just no way to do this?


[Geo Sites] Untranslated pages

The below pages are not completely translated, for all geos .
https://zhcn-hlxsites-moleculardevices.onelink-translations.com/products/3d-biology
https://zhcn-hlxsites-moleculardevices.onelink-translations.com/products/3d-biology/custom-organoid-expansion-service
https://zhcn-hlxsites-moleculardevices.onelink-translations.com/products/3d-biology/3d-bioprinting-bab400-bioprinter-automation-solution-com

This is on transperfect, @dev-rajneeshkumar please discuss with Simranjit and forward to Transperfect.


Write Python Algorithm

create mode 100644 Python/Data Compression/huffman_code_algorithm_less_Complexicity.py
create mode 100644 Python/Divide-and-Conquer/Stock data.csv
create mode 100644 Python/Divide-and-Conquer/divide_and_conquer.ipynb
create mode 100644 Python/Dynamic-Programming/travelling_salesman_algorithm.py
create mode 100644 Python/Greedy-Algorithm/prims_algorithm.py
create mode 100644 Python/Sorting/Stock data.csv
create mode 100644 Python/Sorting/quick_sort.ipynb
delete mode 100644 Python/Divide-and-Conquer/divide_and_conquer.ipynb
create mode 100644 Python/Divide-and-Conquer/divide_and_conquer.py
delete mode 100644 Python/Sorting/quick_sort.ipynb
create mode 100644 Python/Sorting/quick_sort.py

@ayushete02 Could you raise an issue first, instead of directly raising a PR.
Also please try to implement certain algorithm with less libraries or in-built functions.

Sure i will add


Memory leak caused by leafletControlHelpers.updateLayersControl

Hi,
I'm using the directive to show markers on maps that all have a different ID. There seems to however be a memory leak in leafletControlHelpers, which is caused by _controls[mapId] holding a reference to map data, which is not destroyed when the directive gets destroyed.
I was able to get rid of the memory leak by changing the line https://github.com/angular-ui/ui-leaflet/blob/master/src/services/leafletControlHelpers.js#L162
to
            var _layersControl = _controls[mapId];
            _controls = {};
            _controls[mapId] = _layersControl;

which removes all but the current references from the _controls object.
This is not a suitable workaround though, because it essentially prevents having multiple directives running at the same time. Do you have any suggestions as to how to remove the reference when the map with the corresponding mapId is destroyed?
A-P

Fixed with #281


Fix 'A closing curly bracket must not be preceded by a blank line.' issue in LearnFiles\Basics\IfStatements.cs

CodeFactor found an issue: A closing curly bracket must not be preceded by a blank line.
It's currently on:
LearnFiles\Basics\IfStatements.cs:22
Commit 8bc37b7c3914a1d197abac859e73e551c4188406

No major changes, stylisation fixes


fix realpath command not found (on mac)

https://unix.stackexchange.com/questions/136494/whats-the-difference-between-realpath-and-readlink-f
https://github.com/google/enjarify/issues/9

Many thanks @mzk - we merged in #48 in the end which also fixes this.


[Feature Request] Simultaneaous Controller+Keyboard/Mouse (Mixed Input) support

To give an bit of context, and this will be copy-pasted from the REFramework issue report:

Simultaneously Controller+Keyboard/Mouse, Mixed Input (or Hybrid Input for newer Ubisoft gaames) for short, is a Input Method that enables users to use the Gamepad and Keyboard/Mouse Inputs at the same time. Typically: this is used for something like Gyro Aiming (most Controllers like PlayStation and Nintendo Switch), Tracking Aiming (for Steam Controller or Steam Deck, in combination with Gyro or not), Gaming Keypads (Azeron, Razer), Analog Keyboard (Wooting Keyboard), physically using Gamepad and Mouse device, etc. You could say this is an Accessibility-related request.
for simplification's sake: I will be referring to "Mixed Input" going forward.
Normally, this method will/may introduce issues such as:

Controller/KB+M Button prompt flickers.
Mouse and Joystick Camera Input fights with each other.
Locks you to One Input Method
Joystick Camera Input starts to behave erratically.
Certain gameplay/UI elements (example: key gameplay functions like Sprinting and Interacting is broken in Metro Exodus, KB/M and Controller-specific UI behaves erratically in Sunset Overdrive)
Input Method's entire Aiming mechanic changes (in the case with Resident Evil 5)
quick off-topic: It's rare to find a game that allows you to use Mixed Input without conflict

For more detail; refer to this cohost post by Jibb Smart (Epic Games/Fortnite Dev, JoyShockMapper creator) in regards to Mixed Input.
Got it? ok, let's resume.
According to PCGamingWiki: Max Payne 3 seems to have mixed Input support, but when I finally got the chance to play Max Payne 3 (with the Fusion Mod 2.0, and thanks for providing Steam Deck prompts!), I've found at least two specific issues that causes nuisances:
1. Gamepad button prompts flicker
Whenever you attempt to use Controller and Keyboard/Mouse inputs together: the Controller prompts will take priority over the KB/M inputs, but when you stop using the controller, the keyboard/mouse prompts will be in-use. Thankfully; there isn't any major QTE sequences, but for those who wanna play Max Payne 3 with Gyro Aiming functionality for the first time; it might be annoying to deal with the tutorial sequence.
2. Joystick Camera and Mouse Input will conflict with each other
similar to the first issue, but the camera inputs starts to conflict with each other. The current workaround is to rely on a Input Remapper (like Steam Input) and rebind the Right Stick as a Mouse Input.
https://github.com/ThirteenAG/MaxPayne3.FusionFix/assets/67606569/377de596-3a14-4307-a9b0-2e2f158b831b
(due to file size limitations, here's an higher quality version)
3. Certain actions may not work due to conflictions
To continue from Issue number 2, certain actions like the Pause button may not work properly.
the most obvious example would be the Aiming Camera, as it will just freezes (despite the character's camera animation) whenever you stop moving (with the Left Stick aka whenever the Gamepad isn't active). thankfully, this doesn't happen for regular camera movement.
https://github.com/ThirteenAG/MaxPayne3.FusionFix/assets/67606569/f8981694-995d-4ba4-8ec5-e1354c2d96f5
(due to file size limitations, here's an higher quality version)

Within those reasons; I wonder if it's there's an way to make RAGE Engine to play nicely with Mixed Input? 🤔
While I don't have access to the rest of RAGE Engine-based games (specifically: GTAIV), I have heard words from others that it seems to affect other RAGE-based games too. in context of the FusionFixs: I'm doubting that GTAIV will also have this issue.

These conflictions could also be caused by Steam Input.
For me at least, Steam Input does not work with non-Steam apps. I've got these same conflicts (the prompts flicker and the controller right joystick acts like a mouse in some form)...
If you have the game bought from RGL, you might just have to live with the game's native controller implementation... Although in my opinion, Steam Deck should behave different since it's SteamOS...

These conflictions could be caused by Steam Input. For me at least, Steam Input does not work with non-Steam apps. I've got these same conflicts (the prompts flicker and the controller right joystick acts like a mouse in some form)...

I just checked using my Xbox One controller (wired) and a Physical Mouse and disabled Steam Input completely. The same issue still occurs.
Admittingly: the "Physical Controller on the left, Physical Mouse on the right" is the easiest way to determine if a game allows for mixed input or not.


Add decorator for defining custom error handling

Blocked by #59
Overview
A decorator for creating custom error handlers.
To register a function as a custom error handler, decorate the function with this class. The decorated function should accept three positional arguments: (1) the type of the exception, (2) the exception instance raised, and (3) a traceback instance.
@error_handler
def raise_api_error(exc_type, exc_val, exc_tb):
    # wrap client error with custom API error
    ...

Then, to apply custom error handling to a request method, simply decorate the method with the registered error handler:
@raise_api_error
@get("/user/posts")
def get_posts(self):
    """Fetch all posts for the current users."""

To apply custom error handling on all request methods of a uplink.Consumer subclass, simply decorate the class with the registered error handler:
@raise_api_error
class GitHub(Consumer):
    ...

TODO

[ ] Add documentation: function decorated with error_handler can be used with the hook parameter of the Consumer constructor.

Coverage decreased (-2.9%) to 93.917% when pulling 71543d2af00643b77bf77d83df9bc58a264b7e51 on feature/v0.4.0/error-handler into 67895012df28e50422c1cf42745235b98d423fe8 on master.

As I see from code suppressing exceptions is not allowed, it's fine for me, but I think it should be mentioned in the documentation.

@daa agreed, I've added a notice about that to the doc string.


Suggestion: Apply to join group/competition

Allow users to "apply" to join a group or competition. These applications would need to be approved somehow by the person with the verification code

Hi @Sethmare understand this is quite dated but willing to take it on if still available and wanted?
I'm looking of doing something like the following:

Adding an "Apply" button to the groups / competitions homepage.
The user would then click this, a modal opens and they input there profile name.
Adding "Applications" to the dropdown inside of the configuration for groups.
Applications to see would require some form of authentication, this being through the use of the verification code.
This would generate a signed JWT token for an hour whereby the user can access the "Applications" tab.
Add middleware which could be used in future to protect the GET: /api/applications, PATCH: /api/applications DELETE: /api/applications routes.
See applications / approve / reject through the use of the JWT token.

Let me know your thoughts and if this is still available.

There's no immediate plans to implement this. Closing until that changes.


Publishing new version of cef.redist.linux.x64?

I've been experimenting with the Linux PR (a good learning process on the challenges of .NET Core) and merged in the latest changes from main to my local branch, but I found that there isn't a NuGet package of cef.redist.linux.x64 for version 120.2.4.  Any chance you could publish one to NuGet?
I also noticed that there was a missing file (libvulkan.so.1) that is included in the cef binary releases but not in the NuGet package -- if that file is not present, the cefsample app won't run on the same Linux system where I'm trying to use the CefGlue.Demo.Avalonia app (unsuccessfully so far -- made some progress, but still not enough to actually get the app to fully load).

Hi,
You may create that package from here:
https://github.com/joaompneves/cef.redist.linux
There has been several attempts from the community to make this run on Linux but no one has made it to the end.

Cool, I've got that, using a local package for now.  I'm still hacking away at getting it to run on Linux.

Linux support, now available: 120.6099.204


List score type

According to the docs:
0. 10 Point (0-10 int)

100 Point (0-100 int)
5 Star (0-5 int)
3 Smiles (":(",":|",":)" String)
10 Point decimal (0.0 - 10.0 Float)

Dear Josh,
The current way of handling the scores are a complete mess.
Strings, Floats & Integers for updating scores aren't really easy to work with.
It would be really easy if we could see this instead the docs:
0. 10 points => 100 Integer max & 1 Integer min (10x)

100 points => 100 Integer max & 1 Integer min
5 Star => 100 Integer max & 1 Integer min (20x)
:) => 100 Integer max & 1 Integer min (just weird)
10 => 100 Integer max & 1 Integer min (10x)

Just 100 - 1 ratings and outputs which are also using this as default would be awesome.
I hope that you consider to add this soon because Atarashii won't be able to support Strings, Floats & Integers at the same time. This will require us an huge amount of time to fix.

If it's any help the user model does provide a score_type value so you can know which datatype to expect.
That way if you do want to keep it as a 1-100 system you can simply define a conversion method based off of the user's score_type.

Yes but the Anime general score is using 100-1 while the Anime lists are providing the output based on the animelist.
I am using 10-1 and see 100-1 in the Anime model.

I understand the score type are a bit of a pain to work with in a type safe language but I'm having some difficulties understanding why that can't be quite easily be worked around.
I suppose it would be possible to provide a raw score along with the list item models (we store all the list scores in 0-100 in the database). However when a user changes their score system we do no conversion, e.g. a user is on the 100 point system, a score is 84, they change to the 10 point system, the raw score would still return 84 until they manually change that score using the 10 point system. So its likely you would still require some kind of parsing (or at least rounding) to get the required score for the user's score system.
My main worry with providing the raw score is that it could encourage API developers to not bother supporting all the score system types, and instead just force the user to use the 100 point system.

We are using https://code.google.com/p/google-gson/ and https://github.com/square/retrofit to take care of the magic with JSON.
The problem with the following libraries is that you can not use multipe variables with the same object name. AniList is providing Strings/Integers/Double with the same object name, this is a pain using the following libraries.
I know that you are trying to force devs to use your score system but this is a bit too much. If you just passed "10.0", "10", "5", "100" & ":)" as string it would be easy to work with.
Currently I decided to drop the ":) :| :(" support because the other are all numbers. Users of AniList won't be able to use the app with this score setting and will in beta 3 get a warning that they won't be able to use the app because the settings.

Beta developers being lazy shouldn't really be a concern of yours. That, or make a different node for each score. You shouldn't switch types on the JSON values unless you really want every score to be treated as the type all of them can fit as, which is "string". Dynamic typing is good and all in some languages, but not all support that. Adding extra burden on developers to figure out how to work with the scores means you'll likely see lots of buggy implementations. Changing the display is easier than changing the entire value handling.
I highly recommend exposing the internal raw score and requesting developers adjust their display based on the user's preferred score type. In the alternate, having "score_numeric" or "score_string" depending on the values would be the next best option.

Would the following be a suitable? Or you would rather have some multiplications of them so they are all 0-100, or just give raw score instead?

10 Point (0-10 int)
100 Point (0-100 int)
5 Star (0-5 int)
3 Smiles (0-3 int)
10 Point decimal (0-100 int)

I think just raw 1-100 int would be best. It gives developers a single standard type to count on for communication to and from the API.
It's very easy to convert to and from the display style. For 5 points, divide/multiply by 20. For 10, divide/multiply by 10. The only guidance needed would be the breakpoints for the smile rating and what raw value to submit for a new rating in that type.

Okay I've added score_raw to the user list model, will push that in the next few hours and update the docs in the next couple days. You can include score_raw in your post data too and that should work fine.
The breakpoints for the other score systems are rather arbitrary in hindsight, but I'm sure there was some reason for it~
5 Star

1 - 1-29
2 - 30-49
3 - 50-69
4 - 70-89
5 - 90-100

Smiley

:( - 1-30
:| - 31-60
:) - 61-100

Make sure to also always floor the scores down, don't just round them normally.


Added item and column dragging

This adds in item and column dragging!
This also has some various bug fixes in it as well!

I did some testing and seems like you can't delete an item after it was moved to another column. Everything else seems to work fine (although I see you didn't change set_state() as we discussed).
The arrows would look better if they were using some editor icon. I didn't check the code yet, but if all is in order maybe I'll just merge this and cleanup after that 🤔 The dragging is very nicely done and the other improvements are very welcome.

Found another bug: column counter isn't updated when undoing item movement.

Finally reviewed this, sorry to keep you waiting. I could merge it already, unless you are willing to do the style fixes I commented. There's also a bug where the column counter doesn't update when you undo moving an item, but it's minor.

It's fine lol, also I thought I noticed it and fixed it. I will try to fix it as well.

I just suddenly remembered why the column headers weren't part of the columns.

They are always visible when scrolling.
The old implementation was hacky and not 100% reliable, but it was better usability-wise. Not really blocking the merge though (still need to give the PR last check xd), as it makes dragging columns more difficult. But retaining this functionality in some form would be nice.

Still needs some fixes, but it's good enough to merge; I will fix it myself. Thanks for your work!


Where are the header checks from the chain specification in PBFT?

This isn't so much an issue as it is a question from the code audit. The chain specification, section 4.2 "Permissive BFT Header Processing" specifies some checks to do when processing the block header, and among them:
2. We check that the current block is being issued for a slot no later than the current slot (as
determined by the system clock).
3. We check that the previous block hash contained in the block header corresponds to the
known hash of the previous block.

While I could see the other processing rules in applyChainState, I couldn't find these two, so this issue is to ask where they are implemented. There are checks in ChainFragment that seem to implement rule 3, but how does control from PBFT.hs reach them?

Note that the ChainSync client downloads block headers and does some processing.

This is checked in the ChainSync client: https://github.com/input-output-hk/ouroboros-network/blob/5c25acf9b89d3b4adc6235c50f25f61ce14a5d96/ouroboros-consensus/src/Ouroboros/Consensus/ChainSyncClient.hs#L402
Also see https://github.com/input-output-hk/ouroboros-network/blob/5c25acf9b89d3b4adc6235c50f25f61ce14a5d96/ouroboros-consensus/src/Ouroboros/Consensus/Node.hs#L126 https://github.com/input-output-hk/ouroboros-network/blob/5c25acf9b89d3b4adc6235c50f25f61ce14a5d96/ouroboros-consensus/src/Ouroboros/Consensus/NodeNetwork.hs#L151 We allow some configurable amount of clock skew, e.g., we won't reject a header that is one slot in the future because the node's clock might be a few seconds late.
The check in ChainFragment is triggered by https://github.com/input-output-hk/ouroboros-network/blob/5c25acf9b89d3b4adc6235c50f25f61ce14a5d96/ouroboros-consensus/src/Ouroboros/Consensus/ChainSyncClient.hs#L413
which uses the AnchoredFragments (which wraps ChainFragment) :> constructor. This check should indeed be done sooner and throw a proper exception instead of using error.

Thank you for the comprehensive answer, this clears up any confusion on my part. The issue can be closed via the PR.


[hotfix][docs] Specify operators behaviour on processing watermarks

This PR is a simple documentation improvement

Thanks, that helps.
Regarding debugging watermarks, at least in 1.4.2 sources did not display their emitted watermarks, although this may have been fixed in 1.5.0.  In turn, that makes jobs with task chaining turned on more difficult to debug.  It may be useful to suggest turning off task chaining for debugging.
Also, the Kafka connector page discusses the fact that the Kafka source only emits watermarks as the minimum of the per partition watermark, which means an idle partition may delay watermark emission. It may be good to reiterate that behavior here, as Kafka is the most commonly used connector.

Thanks for the feedback @eliaslevy. Pushed one extra commit about idling sources.

Something else missing from this page is a discussion of what happens to the timestamp attached to records when they go through different operations.  E.g. what happens to a record timestamp when it goes through map or when multiple records are emitted from flatMap?  What is the timestamp of an record emitted by an operation on a window or an aggregation operation on non-windowed stream?  None of these are discussed anywhere in the documentation from what I can tell.

I have added a sentence covering this, but it would be nice to merge it and not prolonging and ever extending this PR.

@pnowojski what about refactoring the doc into something like this.

@eliaslevy  can you open separate pull request for this? If there will be no objections I will merge this one as it is by the end of the week.


Unexpected behaviour around registries and Gauge constructor

Hello!
Thanks for the great library! We've used to great success to gather metrics for various python services. But we have also stumbled upon some quite unexpected behaviour when figuring out how to use it. Here is some example code (using 0.7.1):
from prometheus_client import (
    CollectorRegistry,
    Gauge,
    pushadd_to_gateway,
    generate_latest,
)
labels = ['namespace']
label_values = ['dev']

# 1
registry = CollectorRegistry()
gauge = Gauge("example", "Example gauge", registry=registry, labelnames=labels)
gauge.labels(label_values).set(5)

print(generate_latest(registry))
# HELP example Example gauge\n# TYPE example gauge\nexample{namespace="[\'dev\']"} 5.0\n'
# Contains gauge, with labels. As expected.

# -----------------
# 2
registry = CollectorRegistry()
gauge = Gauge(
    "example",
    "Example gauge",
    registry=registry,
    labelnames=labels,
    labelvalues=label_values,
)
gauge.set(5)

print(generate_latest(registry))
# b''
# Gauge is never added to registry if we supply "labelvalues". This is unexpected, and not mentioned by a warning log or so.

# -----------------
# 3
registry = CollectorRegistry()
gauge = Gauge(
    "example",
    "Example gauge",
    registry=registry,
    labelnames=labels,
    labelvalues=label_values,
)
gauge.set(5)

registry.register(gauge)

print(generate_latest(registry))
# b'# HELP example Example gauge\n# TYPE example gauge\nexample 5.0\n'
# Contains the gauge, but the value is *not* set to the correct label

We have found that behaviour # 2 seems to be deliberately programmed, but we can't figure out what the reasoning is:
# metrics.py
class MetricWrapperBase(object):
    def __init__(self,
        [...snip...]
        if not self._labelvalues:
            # Register the multi-wrapper parent metric, or if a label-less metric, the whole shebang.
            if registry:
                registry.register(self)

This is a dupe of #398, users specifying labelvalues is not supported nor documented.


(freecad) manual update

Description
Manual update, automatic update will work again when a version like "0.19.x" will be released.
Until now, the published version is a mix between the major version and build number so to have again a conventional versioning with the update script, it needs to manually update this package until a version greater or equal to 0.19 is released by Freecad.
RemoteVersion : 0.18.4
NuspecVersion : 0.18.16131

Motivation and Context

Manual update of Freecad. New version has been released 8 days ago and the current update script can't update Freecad until a version greater or equal to 0.19 is released.

How Has this Been Tested?

Screenshot (if appropriate, usually isn't needed):
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Migrated package (a package has been migrated from another repository)

Checklist:

[x ] My code follows the code style of this repository.
[ ] My change requires a change to documentation (this usually means the notes in the description of a package).
[ ] I have updated the documentation accordingly (this usually means the notes in the description of a package).
[ ] All files are up to date with the latest Contributing Guidelines
[ ] The added/modified package passed install/uninstall in the chocolatey test environment.
[ ] The changes only affect a single package (not including meta package).

:white_check_mark: Package verification completed without issues. PR is now pending human review

Thank you @majkinetor !

@chtof @majkinetor @gep13
I'm going to say that this was not the best practice.
This package should have been updated like such:
RemoteVersion : 0.18.4 NuspecVersion : <IP_ADDRESS>31
This is because all packages on Chocolatey are immutable this means unable to be changed.
If the package is fixed to have proper versioning in 0.18.4.x This package will never update until 0.19.x.x" is released.
Just food for thought to keep in mind for the future.


Metrics module

Depends on https://github.com/keep-network/keep-common/pull/40
Here we introduce some basic metrics gathering and exposing them through an HTTP endpoint.

It might be helpful to expose https://golang.org/pkg/net/http/pprof/ as well, maybe just if ran in debug mode.
And it was brought up in discord that being able to get the node id would be good, too.
I can also open an issue instead, if that's better.

It might be helpful to expose https://golang.org/pkg/net/http/pprof/ as well, maybe just if ran in debug mode.

Yeah it would.

And it was brought up in discord that being able to get the node id would be good, too.
I can also open an issue instead, if that's better.

@knarz I think this is better as a separate issue (though I strongly agree we need it) - want to open one and link back?

It might be helpful to expose https://golang.org/pkg/net/http/pprof/ as well, maybe just if ran in debug mode.

Good idea! But, let's do it as a separate PR. The scope of this PR is adding an endpoint providing some application-level metrics intended to use with tools like Prometheus and I think we shouldn't mix it with Go-specific profiling data source for pprof.

Do you have a list with metrics you want to add or are you still looking for input?

Do you have a list with metrics you want to add or are you still looking for input?

This PR is just a starting point so I'd appreciate all ideas for useful app-level metrics.

@lukasz-zimnoch This is great - it  would be helpful if you kept a table of metrics in the description of the PR.  An example invocation would  also be helpful.

Works as advertised.
➜  ~ curl -D - http://localhost:8080/metrics
HTTP/1.1 200 OK
Date: Fri, 03 Jul 2020 13:04:00 GMT
Content-Length: 293
Content-Type: text/plain; charset=utf-8

# TYPE connected_peers_count gauge
connected_peers_count 2<PHONE_NUMBER>137

# TYPE connected_bootstrap_count gauge
connected_bootstrap_count 1<PHONE_NUMBER>137

# TYPE eth_connectivity gauge
eth_connectivity 1<PHONE_NUMBER>132

libp2p_info{id="16Uiu2HAm82kFx5PMHWUARfKhPhg9gQVdasiySjZaPPsNUjuE59TV"}


Add Failing condition

Short description:
More details:
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
Bug:

!verified

!verified


DxSelectBox Two-Way-Databinding Bug

To help us process the issue more efficiently, please provide the following information:

Specify the version of the devextreme-angular and devextreme packages you are using.
devexteme version: 17.2
devextreme-angular version: 17.2

Specify the type of the issue (check one with "x"):
[x] bug Report
[ ] feature request
[ ] support inquiry

Plunker:

https://plnkr.co/edit/EWXAeRGdAq7fek7QWQ6J?p=preview

I am not sure that it will be saved. So I link the .zip file cotaining the demo here too.

DxSelectBoxChainedTwoWayBinding.zip

I did strip the DXSelectBox demo down and added a property in the .component file which the select boxes bind to. They both bind to the same property and do not update correctly all of the time.
The steps to reproduce are in the plunker.

This issue is fixed in version 17.2.4. Check out your plunk now. It does not reproduce the issue. See the screencast.


Alternative to space-infix-ops: 0

That's a pretty blunt instrument just to handle Flow syntax, because it's a pretty important linting rule for JS generally. Any ideas about a better way to handle it?

Totally agreed, I just haven't had the time to research the issue.

Tracking https://github.com/eslint/eslint/issues/5211

Removed for now: https://github.com/davezuko/react-redux-starter-kit/commit/96bd1cdd8b79f0a44836e71882c1e7122d2ced21


NIFI-7591: Allow PutS3Object to post to AWS Snowball

Added properties to enable/disable chunked encoding and path-style access
for endpoints that do not support chunked encoding / only support path-style access.
https://issues.apache.org/jira/browse/NIFI-7591
Thank you for submitting a contribution to Apache NiFi.
Please provide a short description of the PR here:
Description of PR
Enables X functionality; fixes bug NIFI-YYYY.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[x] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?

[x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

[x] Has your PR been rebased against the latest commit within the target branch (typically master)?

[x] Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not squash or use --force when pushing to allow for clean monitoring of changes.

For code changes:

[x] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
[x] Have you written or updated unit tests to verify your changes?
[ ] Have you verified that the full build is successful on JDK 8?
[ ] Have you verified that the full build is successful on JDK 11?
[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
[ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
[x] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

[x] Have you ensured that format looks appropriate for the output in which it is rendered?

Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible.

Merged to main, thanks @turcsanyip and @tpalfy


add user.js from pyllyukko/user.js

Adds Firefox configuration from https://github.com/pyllyukko/user.js

Over 100 documented configuration settings
Certificate store cleanup script
Prevents reinventing the wheel :)
Fixes https://github.com/amq/firefox-debloat/issues/12
Fixes https://github.com/amq/firefox-debloat/issues/1

Sometimes it is good to have different projects on a similar thing.
Personally, I think that user.js from pyllyukko is overworked and can cause different random issues.

Especially considering
Main goals
[...]
Still be at least somewhat usable in daily use

My primary goal is to keep the browser completely usable and just debloat it from unneeded features that leak information.

I see your point @amq, pyllyukko's user.js has tight settings and can cause browsing problems. If you want to provide a more relaxed configuration, why not start from his work and remove/edit settings you don't agree with?
This way the 2 projects could share progress.


Gibberish Request Headers

Hello,
I am trying to configure spring.sleuth.keys.http.headers to add more information to our logs when using Zipkin. However, when I add a header, the header shows up in the corresponding Zipkin pop-up as a key but the value is gibberish (some hexadecimals).
Please advise. Thank you!

Never mind, figured it out.


Feature/dev 116 merge olympia

Coverage decreased (-3.9%) to 86.259% when pulling 79d0c711220bbfe2676385a15d791ee3ccc0de04 on feature/DEV-116-merge-olympia into 390e746327668a5b82bad1d9c342962de3369433 on development.


Fixed issue regarding not displaying user's registered name

This PR is meant to address the issue regarding the portal displaying name that is associated to the Google account instead of name that user registered.

📝 Changed routes:

…ard/Components/Sidebar
/dashboard/hackerpack

(view full size)
(view full size)

/profile

(view full size)

And 1 other route:

/api/tokens

Commit 9db1eb8132a20003d8c4c4b630b9275c29d70b0e (https://hackportal-hackutd-h9851ei76-acmutd.vercel.app).


Support Lazy Loading with xarray

https://docs.xarray.dev/en/stable/internals/how-to-add-new-backend.html#rst-lazy-loading

Currently all messages are just loaded when the xarray dataset is loaded which is bad


Small adjustments to README

Thanks for an awesome library! 🎖

@sandstrom You are welcome and than k you for your efforts!


Binary size difference between v1.24 and v1.25?

Title: Binary size difference?
Description:
I've been building Envoy for years with ./ci/run_envoy_docker.sh "./ci/do_ci.sh bazel.release.server_only". I noticed in v1.25 I can't find the build_release_stripped folder and the Envoy binary I can find is about 9x larger than I'm used to seeing. I've looked through the other build targets and only found bazel.sizeopt.server_only which made almost no difference. Hoping to get some help getting back to ~60MB builds

If you build on the current main you would find the binary as a tar.gz in under /build/envoy/x64/envoy_binary.tar.gz given you have set ENVOY_DOCKER_BUILD_DIR=~/build like mentioned in https://github.com/envoyproxy/envoy/blob/main/ci/README.md#on-linux

@phylake i will take a look at this - i made some changes to adjacent code - but i didnt think this should be affected - ill check

Just tried this again. The only tar.gz I find is this
ubuntu@ip-10-0-0-80:~/envoy$ sudo find /tmp/envoy-docker-build/ -path "*.tar.gz"
/tmp/envoy-docker-build/tmp/_bazel_envoybuild/b570b5ccd0454dc9af9f65ab1833764d/external/rules_pkg/tests/testdata/tar_test.tar.gz

The envoy executable I find is here
ubuntu@ip-10-0-0-80:~/envoy$ sudo find /tmp/envoy-docker-build/ -type f -path "*envoy"
/tmp/envoy-docker-build/envoy/source/exe/envoy/envoy

and it's a whopper compared to v1.24 built the same way
ubuntu@ip-10-0-0-80:~/envoy$ ls -alh /tmp/envoy-docker-build/envoy/source/exe/envoy/envoy
-r-xr-xr-x 1 root docker 448M Sep 29 18:33 /tmp/envoy-docker-build/envoy/source/exe/envoy/envoy

im guessing its something to do with a change in flags - ideally you want it building with -c opt - im guessing the larger bins are fastbuild - but not sure

I build with bazel.sizeopt.server_only which should have set COMPILE_TYPE="opt" but the binary is still 434MB


Migrate to Androidx  and Config upload to maven central

Upload to maven central

Change gradle.properties

signing.keyId=xxxxxx
signing.password=xxxxxx
signing.secretKeyRingFile=xxxxxx.gpg

Add nameandpassword to local.properties

sonatype.name=xxxx
sonatype.password=xxxx

run maven_publish.sh

Hi @azhon
Great work. Thanks for doing it. I will review it and collaborate with you to release it.

@amitshekhariitbhu Thank you very much, looking forward to your good news！👍

Hi @amitshekhariitbhu , any chance to see this PR merged & released ? This is a small quick win for this very useful lib 👀